Skip to content

Event and bytype def #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/server/AIServer/NpcTableSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void CNpcTableSet::DoFieldExchange(CFieldExchange * pFX) {
RFX_Long(pFX, _T("[iWeapon2]"), m_iWeapon2);
RFX_Byte(pFX, _T("[byGroup]"), m_byGroup);
RFX_Byte(pFX, _T("[byActType]"), m_byActType);
RFX_Byte(pFX, _T("[byType]"), m_byType);
RFX_Int(pFX, _T("[byType]"), m_byType);
RFX_Byte(pFX, _T("[byFamily]"), m_byFamily);
RFX_Byte(pFX, _T("[byRank]"), m_byRank);
RFX_Byte(pFX, _T("[byTitle]"), m_byTitle);
Expand Down
2 changes: 1 addition & 1 deletion src/server/AIServer/NpcTableSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CNpcTableSet : public CRecordset {
long m_iWeapon2;
BYTE m_byGroup;
BYTE m_byActType;
BYTE m_byType;
int m_byType;
BYTE m_byFamily;
BYTE m_byRank;
BYTE m_byTitle;
Expand Down
144 changes: 115 additions & 29 deletions src/server/Ebenezer/Define.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@ const BYTE WAREHOUSE_MAX = 196; // 창고 아이템 MAX
#define EXEC_QUEST_SAVE 0X0A
#define EXEC_GIVE_NOAH 0x0B
*/

// EVENT 시작 번호들 :)
#define EVENT_POTION 1
#define EVENT_LOGOS_ELMORAD 1001
#define EVENT_LOGOS_KARUS 2001
#define EVENT_COUPON 3001

////////////////////////////////////////////////////////////

///////////////// BBS RELATED //////////////////////////////
Expand All @@ -134,28 +127,121 @@ const BYTE WAREHOUSE_MAX = 196; // 창고 아이템 MAX
#define NPC_LIVE 0X01

///////////////// NPC TYPE /////////////////////////////////
#define NPC_MONSTER 00
#define NPC_GENERAL 01 //
#define NPC_BOSS 03 // Unique Mop
#define NPC_PATROL_GUARD 11 // 경비병
#define NPC_MERCHANT 21 // 상인
#define NPC_TINKER 22 // 대장장이
#define NPC_WAREHOUSE 31 // 창고지기
#define NPC_CAPTAIN 35 // 전직
#define NPC_OFFICER 36 // 기사단 관리 NPC
#define NPC_CLERIC 37 // 대사제 NPC
#define NPC_HEALER 40 // Healer
#define NPC_WARP 41 // Warp Npc
#define NPC_GATE 50 // 성문형태 NPC
#define NPC_PHOENIX_GATE 51 // 깨지지 않는 문 (8->51)
#define NPC_SPECIAL_GATE 52 // 깨지지 않는 문이면서 2분마다 열렸다 닫혔다 하는 문
#define NPC_GATE_LEVER 55 // 성문 레버... (9->55)
#define NPC_ARTIFACT 60 // 결계석 (7->60)
#define NPC_DESTORY_ARTIFACT 61 // 파괴되는 결계석
#define NPC_MONK_ELMORAD 71 // 비러머글 수도승 >.<
#define NPC_MONK_KARUS 72 // 비러머글 수도승 >.<
#define NPC_DOMESTIC_ANIMAL 99 // 가축 NPC
#define NPC_COUPON 100 // 비러머글 복권 >.<
#define NPC_MONSTER 0
#define NPC_GENERAL 1
#define NPC_BOSS 3
#define NPC_DUNGEON_MONSTER 4
#define NPC_TRAP_MONSTER 5
#define NPC_GUARD 11
#define NPC_PATROL_GUARD 12
#define NPC_STORE_GUARD 13
#define NPC_WAR_GUARD 14
#define NPC_MERCHANT 21
#define NPC_TINKER 22
#define NPC_SELITH 23 // Selith[special store]
#define NPC_ANVIL 24

#define NPC_MARK 25
#define NPC_CLAN_MATCH_ADVISOR 26
#define NPC_SIEGE_1 27
#define NPC_OPERATOR 29 // not sure what Operator Moira was ever supposed to do...
#define NPC_WAREHOUSE 31
#define NPC_KISS 32 // pretty useless.
#define NPC_ISAAC 33 // need to check which quests he handles
#define NPC_KAISHAN 34 // need to see what he actually does to name this properly
#define NPC_CAPTAIN 35
#define NPC_CLAN 36
#define NPC_OFFICER 36
#define NPC_CLERIC 37
#define NPC_LADY 38 // Calamus lady event -- need to see what they're used for
#define NPC_ATHIAN 39 // Priest athian -- need to see what they're used for
#define NPC_HEALER 40
#define NPC_WARP 41 // Warp Npc
#define NPC_ROOM 42
#define NPC_ARENA 43 // also recon guards
#define NPC_SIEGE 44
#define NPC_SENTINEL_PATRICK 47 // need to check which quests he handles (was it the beginner quests or was that isaac?)

#define NPC_GATE 50
#define NPC_PHOENIX_GATE 51
#define NPC_SPECIAL_GATE 52
#define NPC_VICTORY_GATE 53
#define NPC_GATE_LEVER 55
#define NPC_ARTIFACT 60
#define NPC_DESTROYED_ARTIFACT 61
#define NPC_GUARD_TOWER1 62
#define NPC_GUARD_TOWER2 63
#define NPC_BOARD 64 // also encampment
#define NPC_ARTIFACT1 65 // Protective artifact
#define NPC_ARTIFACT2 66 // Guard Tower artifact
#define NPC_ARTIFACT3 67 // Guard artifact
#define NPC_ARTIFACT4 68
#define NPC_MONK_ELMORAD 71
#define NPC_MONK_KARUS 72
#define NPC_BLACKSMITH 77
#define NPC_RENTAL 78
#define NPC_ELECTION 79 // king elections
#define NPC_TREASURY 80
#define NPC_DOMESTIC_ANIMAL 99
#define NPC_COUPON 100
#define NPC_HERO_STATUE_1 106 // 1st place
#define NPC_HERO_STATUE_2 107 // 2nd place
#define NPC_HERO_STATUE_3 108 // 3rd place
#define NPC_KEY_QUEST_1 111 // Sentinel of the Key
#define NPC_KEY_QUEST_2 112 // Watcher of the Key
#define NPC_KEY_QUEST_3 113 // Protector of the Key
#define NPC_KEY_QUEST_4 114 // Ranger of the Key
#define NPC_KEY_QUEST_5 115 // Patroller of the Key
#define NPC_KEY_QUEST_6 116 // Recon of the Key
#define NPC_KEY_QUEST_7 117 // Keeper of the Key
#define NPC_ROBOS 118 // need to see what he actually does to name this properly
#define NPC_KARUS_MONUMENT 121 // Luferson Monument/Linate Monument/Bellua monument/Laon Camp Monument
#define NPC_HUMAN_MONUMENT 122 // El Morad/Asga village/Raiba village/Doda camp monuments
#define NPC_SERVER_TRANSFER 123
#define NPC_RANKING 124
#define NPC_LYONI 125 // need to see what this NPC actually does to name this properly
#define NPC_ADINE_BEGINNER_HELPER 127
#define NPC_FT_1 129
#define NPC_FT_2 130
#define NPC_FT_3 131 // also Priest Minerva
#define NPC_KJWAR 133
#define NPC_SIEGE_2 134
#define NPC_CRAFTSMAN 135 // Craftsman boy, not sure what he's actually used for
#define NPC_CHAOTIC_GENERATOR 137
#define NPC_SPY 141
#define NPC_ROYAL_GUARD 142
#define NPC_ROYAL_CHEF 143
#define NPC_ESLANT_WOMAN 144
#define NPC_FARMER 145
#define NPC_GATE_GUARD 148
#define NPC_ROYAL_ADVISOR 149
#define NPC_GATE2 150 // Doda camp gate
#define NPC_ADELIA 153 // Goddess Adelia[event]
#define NPC_BIFROST_MONUMENT 155
#define NPC_CHAOTIC_GENERATOR2 162 // newer type used by the Chaotic Generator
#define NPC_SCARECROW 171 // official scarecrow byType
#define NPC_KARUS_WARDER1 190
#define NPC_KARUS_WARDER2 191
#define NPC_ELMORAD_WARDER1 192
#define NPC_ELMORAD_WARDER2 193
#define NPC_KARUS_GATEKEEPER 198
#define NPC_ELMORAD_GATEKEEPER 199
#define NPC_CHAOS_STONE 200
#define NPC_PVP_MONUMENT 210
#define NPC_BATTLE_MONUMENT 211
// not sure
#define NPC_GUARD_TRAINEE 45
#define NPC_NASHIRA 46
#define NPC_TRADER_KIM 48
#define NPC_VERONICA 49
#define NPC_WARRIOR_SKAKY 73 // Jaki? SalliMan? Warrior Master Skaky?
#define NPC_SECRET_AGENT_ClARENCE 74
#define NPC_ARCH_MAGE_DRAKE 75
#define NPC_PRIEST_MINERVA 76
#define NPC_HERO_KARUS 109
#define NPC_ADIEN_BEGINNER_HELPER 126
#define NPC_ADIRIAN_BEGINNER_HELPER 128
#define NPC_CAPTAIN_PREMIUM 132

///////////////// NATION ///////////////////////////////////
#define UNIFY_NATION 0
Expand Down
210 changes: 200 additions & 10 deletions src/server/Ebenezer/User.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10188,20 +10188,210 @@ void CUser::ClientEvent(char * pBuf) // The main function for the quest procedur
// pEventData = pEvent->m_arEvent.GetData(pNpc->m_byEvent); //

switch (pNpc->m_tNpcType) {
case NPC_CLERIC:
eventid = EVENT_POTION;
break;

case NPC_COUPON:
eventid = EVENT_COUPON;
eventid = 4001;
break; // this one is based on server flag (Renold[Event]).. we'll just assume the flag's set
case NPC_MONK_KARUS:
eventid = 2001;
break;

case NPC_CLAN:
case NPC_MONK_ELMORAD:
eventid = EVENT_LOGOS_ELMORAD;
eventid = 1001;
break;

case NPC_MONK_KARUS:
eventid = EVENT_LOGOS_KARUS;
case NPC_WARRIOR_SKAKY:
eventid = 11001;
break;
case NPC_SECRET_AGENT_ClARENCE:
eventid = 12001;
break;
case NPC_ARCH_MAGE_DRAKE:
eventid = 13001;
break;
case NPC_PRIEST_MINERVA:
eventid = 14001;
break;
case NPC_BLACKSMITH:
eventid = 7001;
break;
case NPC_ISAAC:
eventid = 35001;
break;
case NPC_KAISHAN:
case 105: // called NPC5 unknown
eventid = 21001;
break;
case NPC_CAPTAIN:
eventid = 15002;
break;
case NPC_ARENA:
eventid = 15951;
break;
case NPC_GUARD_TRAINEE:
case 102: // called NPC2 unknown
eventid = 20701;
break;
case NPC_KEY_QUEST_1:
eventid = 15801;
break;
case NPC_KEY_QUEST_2:
eventid = 15821;
break;
case NPC_KEY_QUEST_3:
eventid = 15841;
break;
case NPC_KEY_QUEST_4:
eventid = 15861;
break;
case NPC_KEY_QUEST_5:
eventid = 15881;
break;
case NPC_KEY_QUEST_6:
eventid = 15901;
break;
case NPC_KEY_QUEST_7:
eventid = 15921;
break;
case NPC_NASHIRA:
case 104: // called NPC4 unknown
eventid = 20901;
break;
case NPC_SENTINEL_PATRICK:
case 103: // called NPC3 unknown
eventid = 20801;
break;
case NPC_TRADER_KIM:
case 101: // called NPC1 unknown
eventid = 20601;
break;
case NPC_LADY:
case NPC_VERONICA:
eventid = 20501;
break;
case NPC_SELITH:
eventid = 30001;
break;
case NPC_CLAN_MATCH_ADVISOR:
eventid = 31001;
break;
case NPC_OPERATOR:
eventid = 35201;
break;
case NPC_HERO_STATUE_1:
case NPC_HERO_KARUS:
eventid = 31101;
break;
case NPC_HERO_STATUE_2:
eventid = 31131;
break;
case NPC_HERO_STATUE_3:
eventid = 31161;
break;
case 110:
eventid = 31171;
break;
case NPC_ANVIL:
eventid = 8030;
break;
case NPC_ROBOS:
eventid = 35480;
break;
case NPC_SERVER_TRANSFER:
eventid = 35541;
break;
case NPC_LYONI:
eventid = 35553;
break;
case NPC_RANKING:
eventid = 35560;
break;
case NPC_ADIEN_BEGINNER_HELPER:
eventid = 35563;
break;
case NPC_ADINE_BEGINNER_HELPER:
eventid = 35594;
break;
case NPC_ADIRIAN_BEGINNER_HELPER:
eventid = 35615;
break;
case NPC_FT_1:
eventid = 20;
break;
case NPC_FT_2:
eventid = 50;
break;
case NPC_FT_3:
eventid = 36;
break;
case NPC_CAPTAIN_PREMIUM:
eventid = 35550;
break;
case NPC_KJWAR:
eventid = 35624;
break;
case NPC_CLERIC:
case NPC_SIEGE_2:
eventid = 1;
break;
case NPC_CRAFTSMAN:
eventid = 32000;
break;
case 136: // Aban[Battlefield Gate-keeper]
eventid = 35640;
break;
case NPC_ATHIAN:
case NPC_CHAOTIC_GENERATOR:
eventid = 22001;
break;
case 138: // ?
eventid = 35650;
break;
case 140: // Love Agent
eventid = 35662;
break;
case NPC_SPY:
eventid = 1100;
break;
case NPC_ROYAL_GUARD:
eventid = 17000;
break;
case NPC_ROYAL_CHEF:
eventid = 17550;
break;
case NPC_ESLANT_WOMAN:
eventid = 17590;
break;
case NPC_FARMER:
eventid = 17600;
break;
case 146: // Nameless Warrior
eventid = 17630;
break;
case 147: // ?
eventid = 17100;
break;
case NPC_GATE_GUARD:
eventid = 17570;
break;
case NPC_ROYAL_ADVISOR:
eventid = 17520;
break;
case NPC_GATE2:
eventid = 17681;
break;
case 151: // Sangduf[Teleport NPC]
eventid = 15310;
break;
case 152: // ?
eventid = 2901;
break;
case NPC_ADELIA:
eventid = 35212;
break;
case 154: // ?
eventid = 0;
break; // it actually returns this...
default:
eventid = -1;
break;
}

Expand Down