From f9b45fc023d0fcc75d632737e78eb40764764974 Mon Sep 17 00:00:00 2001 From: Xackery Xtal Date: Thu, 12 Jan 2023 09:56:21 -0800 Subject: [PATCH] Added initial draft of event comments --- zone/lua_parser.cpp | 198 ++++++++++++++++++++++---------------------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/zone/lua_parser.cpp b/zone/lua_parser.cpp index f8574bfa5..3e4b82658 100644 --- a/zone/lua_parser.cpp +++ b/zone/lua_parser.cpp @@ -183,107 +183,107 @@ LuaParser::LuaParser() { #endif } - NPCArgumentDispatch[EVENT_SAY] = handle_npc_event_say; - NPCArgumentDispatch[EVENT_AGGRO_SAY] = handle_npc_event_say; - NPCArgumentDispatch[EVENT_PROXIMITY_SAY] = handle_npc_event_say; - NPCArgumentDispatch[EVENT_TRADE] = handle_npc_event_trade; - NPCArgumentDispatch[EVENT_HP] = handle_npc_event_hp; - NPCArgumentDispatch[EVENT_TARGET_CHANGE] = handle_npc_single_mob; - NPCArgumentDispatch[EVENT_CAST_ON] = handle_npc_cast; - NPCArgumentDispatch[EVENT_KILLED_MERIT] = handle_npc_single_client; - NPCArgumentDispatch[EVENT_SLAY] = handle_npc_single_mob; - NPCArgumentDispatch[EVENT_ENTER] = handle_npc_single_client; - NPCArgumentDispatch[EVENT_EXIT] = handle_npc_single_client; - NPCArgumentDispatch[EVENT_TASK_ACCEPTED] = handle_npc_task_accepted; - NPCArgumentDispatch[EVENT_POPUP_RESPONSE] = handle_npc_popup; - NPCArgumentDispatch[EVENT_WAYPOINT_ARRIVE] = handle_npc_waypoint; - NPCArgumentDispatch[EVENT_WAYPOINT_DEPART] = handle_npc_waypoint; - NPCArgumentDispatch[EVENT_HATE_LIST] = handle_npc_hate; - NPCArgumentDispatch[EVENT_COMBAT] = handle_npc_hate; - NPCArgumentDispatch[EVENT_SIGNAL] = handle_npc_signal; - NPCArgumentDispatch[EVENT_TIMER] = handle_npc_timer; - NPCArgumentDispatch[EVENT_DEATH] = handle_npc_death; - NPCArgumentDispatch[EVENT_DEATH_COMPLETE] = handle_npc_death; - NPCArgumentDispatch[EVENT_DEATH_ZONE] = handle_npc_death; - NPCArgumentDispatch[EVENT_CAST] = handle_npc_cast; - NPCArgumentDispatch[EVENT_CAST_BEGIN] = handle_npc_cast; - NPCArgumentDispatch[EVENT_FEIGN_DEATH] = handle_npc_single_client; - NPCArgumentDispatch[EVENT_ENTER_AREA] = handle_npc_area; - NPCArgumentDispatch[EVENT_LEAVE_AREA] = handle_npc_area; - NPCArgumentDispatch[EVENT_LOOT_ZONE] = handle_npc_loot_zone; - NPCArgumentDispatch[EVENT_SPAWN_ZONE] = handle_npc_spawn_zone; - NPCArgumentDispatch[EVENT_PAYLOAD] = handle_npc_payload; - NPCArgumentDispatch[EVENT_DESPAWN_ZONE] = handle_npc_despawn_zone; + NPCArgumentDispatch[EVENT_SAY] = handle_npc_event_say; //triggers when a client says something to an NPC + NPCArgumentDispatch[EVENT_AGGRO_SAY] = handle_npc_event_say; //triggers when a client aggros an NPC + NPCArgumentDispatch[EVENT_PROXIMITY_SAY] = handle_npc_event_say; //triggers when a client says something within eq.set_proximity() + NPCArgumentDispatch[EVENT_TRADE] = handle_npc_event_trade; //triggers when a client finishes a trade with an NPC + NPCArgumentDispatch[EVENT_HP] = handle_npc_event_hp; //triggers when an NPC HP hits a threshold set via eq.set_next_hp_event() + NPCArgumentDispatch[EVENT_TARGET_CHANGE] = handle_npc_single_mob; //triggers when an NPC changes as their top hate target + NPCArgumentDispatch[EVENT_CAST_ON] = handle_npc_cast; //triggers when an NPC is casted on + NPCArgumentDispatch[EVENT_KILLED_MERIT] = handle_npc_single_client; //triggers when a client kills an NPC + NPCArgumentDispatch[EVENT_SLAY] = handle_npc_single_mob; //triggers when a mob kills an NPC + NPCArgumentDispatch[EVENT_ENTER] = handle_npc_single_client; //triggers when a client enters a proximity set via eq.set_proximity() + NPCArgumentDispatch[EVENT_EXIT] = handle_npc_single_client; //triggers when a client exits a proximity set via eq.set_proximity() + NPCArgumentDispatch[EVENT_TASK_ACCEPTED] = handle_npc_task_accepted; //triggers when a client accepts an NPC task + NPCArgumentDispatch[EVENT_POPUP_RESPONSE] = handle_npc_popup; //triggers when a client responds to an NPC popup + NPCArgumentDispatch[EVENT_WAYPOINT_ARRIVE] = handle_npc_waypoint; //triggers when an npc arrives at a waypoint + NPCArgumentDispatch[EVENT_WAYPOINT_DEPART] = handle_npc_waypoint; //triggers when an npc leaves a waypoint + NPCArgumentDispatch[EVENT_HATE_LIST] = handle_npc_hate; //triggers when a mob is added or removed from an NPC hate list + NPCArgumentDispatch[EVENT_COMBAT] = handle_npc_hate; //triggers when an NPC enters or leave combat + NPCArgumentDispatch[EVENT_SIGNAL] = handle_npc_signal; //triggers when another script uses eq.signal() targetting this NPC + NPCArgumentDispatch[EVENT_TIMER] = handle_npc_timer; //triggers when a timer set by eq.set_timer() interval is reached + NPCArgumentDispatch[EVENT_DEATH] = handle_npc_death; //triggers when an NPC dies + NPCArgumentDispatch[EVENT_DEATH_COMPLETE] = handle_npc_death; //triggers when an NPC completes dying + NPCArgumentDispatch[EVENT_DEATH_ZONE] = handle_npc_death; //triggers when a death event occurs, used on zone controller + NPCArgumentDispatch[EVENT_CAST] = handle_npc_cast; //triggers when an NPC casts a spell + NPCArgumentDispatch[EVENT_CAST_BEGIN] = handle_npc_cast; //triggers when a NPC begins to cast a spell + NPCArgumentDispatch[EVENT_FEIGN_DEATH] = handle_npc_single_client; //triggers when a client uses feign death while on the hate list of NPC + NPCArgumentDispatch[EVENT_ENTER_AREA] = handle_npc_area; //triggers when an npc enters an area + NPCArgumentDispatch[EVENT_LEAVE_AREA] = handle_npc_area; //triggers when an npc leaves an area + NPCArgumentDispatch[EVENT_LOOT_ZONE] = handle_npc_loot_zone; //triggers when an npc is looted, used on zone controller + NPCArgumentDispatch[EVENT_SPAWN_ZONE] = handle_npc_spawn_zone; //triggers when an npc spawns, used on zone controller + NPCArgumentDispatch[EVENT_PAYLOAD] = handle_npc_payload; //triggers when a payload is received, (a specialized signal with data) + NPCArgumentDispatch[EVENT_DESPAWN_ZONE] = handle_npc_despawn_zone; //triggers when an npc despawns, used on zone controller - PlayerArgumentDispatch[EVENT_SAY] = handle_player_say; - PlayerArgumentDispatch[EVENT_ENVIRONMENTAL_DAMAGE] = handle_player_environmental_damage; - PlayerArgumentDispatch[EVENT_DEATH] = handle_player_death; - PlayerArgumentDispatch[EVENT_DEATH_COMPLETE] = handle_player_death; - PlayerArgumentDispatch[EVENT_TIMER] = handle_player_timer; - PlayerArgumentDispatch[EVENT_DISCOVER_ITEM] = handle_player_discover_item; - PlayerArgumentDispatch[EVENT_FISH_SUCCESS] = handle_player_fish_forage_success; - PlayerArgumentDispatch[EVENT_FORAGE_SUCCESS] = handle_player_fish_forage_success; - PlayerArgumentDispatch[EVENT_CLICK_OBJECT] = handle_player_click_object; - PlayerArgumentDispatch[EVENT_CLICK_DOOR] = handle_player_click_door; - PlayerArgumentDispatch[EVENT_SIGNAL] = handle_player_signal; - PlayerArgumentDispatch[EVENT_POPUP_RESPONSE] = handle_player_popup_response; - PlayerArgumentDispatch[EVENT_PLAYER_PICKUP] = handle_player_pick_up; - PlayerArgumentDispatch[EVENT_CAST] = handle_player_cast; - PlayerArgumentDispatch[EVENT_CAST_BEGIN] = handle_player_cast; - PlayerArgumentDispatch[EVENT_CAST_ON] = handle_player_cast; - PlayerArgumentDispatch[EVENT_TASK_FAIL] = handle_player_task_fail; - PlayerArgumentDispatch[EVENT_ZONE] = handle_player_zone; - PlayerArgumentDispatch[EVENT_DUEL_WIN] = handle_player_duel_win; - PlayerArgumentDispatch[EVENT_DUEL_LOSE] = handle_player_duel_loss; - PlayerArgumentDispatch[EVENT_LOOT] = handle_player_loot; - PlayerArgumentDispatch[EVENT_TASK_STAGE_COMPLETE] = handle_player_task_stage_complete; - PlayerArgumentDispatch[EVENT_TASK_COMPLETE] = handle_player_task_update; - PlayerArgumentDispatch[EVENT_TASK_UPDATE] = handle_player_task_update; - PlayerArgumentDispatch[EVENT_TASK_BEFORE_UPDATE] = handle_player_task_update; - PlayerArgumentDispatch[EVENT_COMMAND] = handle_player_command; - PlayerArgumentDispatch[EVENT_COMBINE_SUCCESS] = handle_player_combine; - PlayerArgumentDispatch[EVENT_COMBINE_FAILURE] = handle_player_combine; - PlayerArgumentDispatch[EVENT_FEIGN_DEATH] = handle_player_feign; - PlayerArgumentDispatch[EVENT_ENTER_AREA] = handle_player_area; - PlayerArgumentDispatch[EVENT_LEAVE_AREA] = handle_player_area; - PlayerArgumentDispatch[EVENT_RESPAWN] = handle_player_respawn; - PlayerArgumentDispatch[EVENT_UNHANDLED_OPCODE] = handle_player_packet; - PlayerArgumentDispatch[EVENT_USE_SKILL] = handle_player_use_skill; - PlayerArgumentDispatch[EVENT_TEST_BUFF] = handle_test_buff; - PlayerArgumentDispatch[EVENT_COMBINE_VALIDATE] = handle_player_combine_validate; - PlayerArgumentDispatch[EVENT_BOT_COMMAND] = handle_player_bot_command; - PlayerArgumentDispatch[EVENT_WARP] = handle_player_warp; - PlayerArgumentDispatch[EVENT_COMBINE] = handle_player_quest_combine; - PlayerArgumentDispatch[EVENT_CONSIDER] = handle_player_consider; - PlayerArgumentDispatch[EVENT_CONSIDER_CORPSE] = handle_player_consider_corpse; - PlayerArgumentDispatch[EVENT_EQUIP_ITEM_CLIENT] = handle_player_equip_item; - PlayerArgumentDispatch[EVENT_UNEQUIP_ITEM_CLIENT] = handle_player_equip_item; - PlayerArgumentDispatch[EVENT_SKILL_UP] = handle_player_skill_up; - PlayerArgumentDispatch[EVENT_LANGUAGE_SKILL_UP] = handle_player_skill_up; - PlayerArgumentDispatch[EVENT_ALT_CURRENCY_MERCHANT_BUY] = handle_player_alt_currency_merchant; - PlayerArgumentDispatch[EVENT_ALT_CURRENCY_MERCHANT_SELL] = handle_player_alt_currency_merchant; - PlayerArgumentDispatch[EVENT_MERCHANT_BUY] = handle_player_merchant; - PlayerArgumentDispatch[EVENT_MERCHANT_SELL] = handle_player_merchant; - PlayerArgumentDispatch[EVENT_INSPECT] = handle_player_inspect; - PlayerArgumentDispatch[EVENT_AA_BUY] = handle_player_aa_buy; - PlayerArgumentDispatch[EVENT_AA_GAIN] = handle_player_aa_gain; - PlayerArgumentDispatch[EVENT_PAYLOAD] = handle_player_payload; - PlayerArgumentDispatch[EVENT_LEVEL_UP] = handle_player_level_up; - PlayerArgumentDispatch[EVENT_LEVEL_DOWN] = handle_player_level_down; - PlayerArgumentDispatch[EVENT_GM_COMMAND] = handle_player_gm_command; - PlayerArgumentDispatch[EVENT_BOT_CREATE] = handle_player_bot_create; + PlayerArgumentDispatch[EVENT_SAY] = handle_player_say; //triggers when a client says a message + PlayerArgumentDispatch[EVENT_ENVIRONMENTAL_DAMAGE] = handle_player_environmental_damage; //triggers when a client takes environmental damage + PlayerArgumentDispatch[EVENT_DEATH] = handle_player_death; //triggers when a client dies + PlayerArgumentDispatch[EVENT_DEATH_COMPLETE] = handle_player_death; // triggers when a client finishes dying + PlayerArgumentDispatch[EVENT_TIMER] = handle_player_timer; //triggers when a player timer set by eq_set_timer() hits an intervanl + PlayerArgumentDispatch[EVENT_DISCOVER_ITEM] = handle_player_discover_item; //triggers when a new item is discovered by a client + PlayerArgumentDispatch[EVENT_FISH_SUCCESS] = handle_player_fish_forage_success; //triggers when a client fishing attempt is successful + PlayerArgumentDispatch[EVENT_FORAGE_SUCCESS] = handle_player_fish_forage_success; //triggers when a client forage attempt is successful + PlayerArgumentDispatch[EVENT_CLICK_OBJECT] = handle_player_click_object; //triggers when a client clicks an object in a zone + PlayerArgumentDispatch[EVENT_CLICK_DOOR] = handle_player_click_door; //triggers when a client clicks a door in a zone + PlayerArgumentDispatch[EVENT_SIGNAL] = handle_player_signal; //triggers when a client receives a signal via eq.signal() + PlayerArgumentDispatch[EVENT_POPUP_RESPONSE] = handle_player_popup_response; //triggers when a client responds to a popup + PlayerArgumentDispatch[EVENT_PLAYER_PICKUP] = handle_player_pick_up; //triggers when a client picks up a ground object + PlayerArgumentDispatch[EVENT_CAST] = handle_player_cast; //triggers when a client casts a spell + PlayerArgumentDispatch[EVENT_CAST_BEGIN] = handle_player_cast; //triggers when a client starts to cast a spell + PlayerArgumentDispatch[EVENT_CAST_ON] = handle_player_cast; //triggers when a client is casted on + PlayerArgumentDispatch[EVENT_TASK_FAIL] = handle_player_task_fail; //triggers when a client fails a task + PlayerArgumentDispatch[EVENT_ZONE] = handle_player_zone; //triggers when a client first enters a zones + PlayerArgumentDispatch[EVENT_DUEL_WIN] = handle_player_duel_win; //triggers when a client wins a duel + PlayerArgumentDispatch[EVENT_DUEL_LOSE] = handle_player_duel_loss; //triggers when a client loses a duel + PlayerArgumentDispatch[EVENT_LOOT] = handle_player_loot; //triggers when a client is attempting to loot + PlayerArgumentDispatch[EVENT_TASK_STAGE_COMPLETE] = handle_player_task_stage_complete; //triggers when a client finishes a task stage + PlayerArgumentDispatch[EVENT_TASK_COMPLETE] = handle_player_task_update; //triggers when a client completes a task + PlayerArgumentDispatch[EVENT_TASK_UPDATE] = handle_player_task_update; //triggers when a client gets a task update + PlayerArgumentDispatch[EVENT_TASK_BEFORE_UPDATE] = handle_player_task_update; //triggers when a client is about to get a task update + PlayerArgumentDispatch[EVENT_COMMAND] = handle_player_command; //triggers when a client executes a #command + PlayerArgumentDispatch[EVENT_COMBINE_SUCCESS] = handle_player_combine; //triggers when a client finishes a tradeskill combine successfully + PlayerArgumentDispatch[EVENT_COMBINE_FAILURE] = handle_player_combine; //triggers when a client fails a tradeskill combine + PlayerArgumentDispatch[EVENT_FEIGN_DEATH] = handle_player_feign; //triggers when a client uses feign death + PlayerArgumentDispatch[EVENT_ENTER_AREA] = handle_player_area; //triggers when a client enters an area + PlayerArgumentDispatch[EVENT_LEAVE_AREA] = handle_player_area; //triggers when a client leaves an area + PlayerArgumentDispatch[EVENT_RESPAWN] = handle_player_respawn; //triggers when a client respawns + PlayerArgumentDispatch[EVENT_UNHANDLED_OPCODE] = handle_player_packet; //triggers when a client sends a packet with an unhandled opcode to the server + PlayerArgumentDispatch[EVENT_USE_SKILL] = handle_player_use_skill; //triggers when a client uses a skill + PlayerArgumentDispatch[EVENT_TEST_BUFF] = handle_test_buff; //triggers when the test buff command is executed + PlayerArgumentDispatch[EVENT_COMBINE_VALIDATE] = handle_player_combine_validate; //triggers when a client tradeskill combine is being validated + PlayerArgumentDispatch[EVENT_BOT_COMMAND] = handle_player_bot_command; //triggers when a client executes a bot command, e.g. ^help + PlayerArgumentDispatch[EVENT_WARP] = handle_player_warp; //triggers when a client is detected as warping + PlayerArgumentDispatch[EVENT_COMBINE] = handle_player_quest_combine; //triggers when a client completes a tradeskill combine + PlayerArgumentDispatch[EVENT_CONSIDER] = handle_player_consider; //triggers when a client considers a mob + PlayerArgumentDispatch[EVENT_CONSIDER_CORPSE] = handle_player_consider_corpse; //triggers when a client considers a corpse + PlayerArgumentDispatch[EVENT_EQUIP_ITEM_CLIENT] = handle_player_equip_item; //triggers when a client equips an item + PlayerArgumentDispatch[EVENT_UNEQUIP_ITEM_CLIENT] = handle_player_equip_item; //triggers when a client unequips an item + PlayerArgumentDispatch[EVENT_SKILL_UP] = handle_player_skill_up; //triggers when a client gets a skill up + PlayerArgumentDispatch[EVENT_LANGUAGE_SKILL_UP] = handle_player_skill_up; //triggers when a client gets a language skill up + PlayerArgumentDispatch[EVENT_ALT_CURRENCY_MERCHANT_BUY] = handle_player_alt_currency_merchant; //triggers when a client purchases an alt currency item + PlayerArgumentDispatch[EVENT_ALT_CURRENCY_MERCHANT_SELL] = handle_player_alt_currency_merchant; //triggers when a client sells an alt currency item + PlayerArgumentDispatch[EVENT_MERCHANT_BUY] = handle_player_merchant; //triggers when a client purchases an item to a merchant + PlayerArgumentDispatch[EVENT_MERCHANT_SELL] = handle_player_merchant; //triggers when a client sells an item to a merchant + PlayerArgumentDispatch[EVENT_INSPECT] = handle_player_inspect; //triggers when a client inspects another client + PlayerArgumentDispatch[EVENT_AA_BUY] = handle_player_aa_buy; //triggers when a client buys an AA + PlayerArgumentDispatch[EVENT_AA_GAIN] = handle_player_aa_gain; //triggers when a client gains an AA + PlayerArgumentDispatch[EVENT_PAYLOAD] = handle_player_payload; //triggers when a client receives a payload + PlayerArgumentDispatch[EVENT_LEVEL_UP] = handle_player_level_up; //triggers when a client levels up + PlayerArgumentDispatch[EVENT_LEVEL_DOWN] = handle_player_level_down; //triggers when a client levels down + PlayerArgumentDispatch[EVENT_GM_COMMAND] = handle_player_gm_command; //triggers when a client uses a GM command + PlayerArgumentDispatch[EVENT_BOT_CREATE] = handle_player_bot_create; //triggers when a client uses a bot create command - ItemArgumentDispatch[EVENT_ITEM_CLICK] = handle_item_click; - ItemArgumentDispatch[EVENT_ITEM_CLICK_CAST] = handle_item_click; - ItemArgumentDispatch[EVENT_TIMER] = handle_item_timer; - ItemArgumentDispatch[EVENT_WEAPON_PROC] = handle_item_proc; - ItemArgumentDispatch[EVENT_LOOT] = handle_item_loot; - ItemArgumentDispatch[EVENT_EQUIP_ITEM] = handle_item_equip; - ItemArgumentDispatch[EVENT_UNEQUIP_ITEM] = handle_item_equip; - ItemArgumentDispatch[EVENT_AUGMENT_ITEM] = handle_item_augment; - ItemArgumentDispatch[EVENT_UNAUGMENT_ITEM] = handle_item_augment; - ItemArgumentDispatch[EVENT_AUGMENT_INSERT] = handle_item_augment_insert; - ItemArgumentDispatch[EVENT_AUGMENT_REMOVE] = handle_item_augment_remove; + ItemArgumentDispatch[EVENT_ITEM_CLICK] = handle_item_click; //triggers when an item is clicked + ItemArgumentDispatch[EVENT_ITEM_CLICK_CAST] = handle_item_click; //triggers when an item is clicked when it has a casting component + ItemArgumentDispatch[EVENT_TIMER] = handle_item_timer; //triggers when an item timer interval is reached set via eq.set_timer + ItemArgumentDispatch[EVENT_WEAPON_PROC] = handle_item_proc; //triggers when an item proc effect occurs + ItemArgumentDispatch[EVENT_LOOT] = handle_item_loot; //triggers when an item is looted + ItemArgumentDispatch[EVENT_EQUIP_ITEM] = handle_item_equip; //triggers when an item is equipped + ItemArgumentDispatch[EVENT_UNEQUIP_ITEM] = handle_item_equip; //triggers when an item is unequipped + ItemArgumentDispatch[EVENT_AUGMENT_ITEM] = handle_item_augment; //triggers when an item is placed in an augment slot + ItemArgumentDispatch[EVENT_UNAUGMENT_ITEM] = handle_item_augment; //triggers when an item is removed from an augment slot + ItemArgumentDispatch[EVENT_AUGMENT_INSERT] = handle_item_augment_insert; //triggers when an item is inserted into an augment + ItemArgumentDispatch[EVENT_AUGMENT_REMOVE] = handle_item_augment_remove; //triggers when an item is removed from an augment SpellArgumentDispatch[EVENT_SPELL_EFFECT_CLIENT] = handle_spell_event; SpellArgumentDispatch[EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT] = handle_spell_event;