diff --git a/Perl-API.md b/Perl-API.md index 97aacb4..7f673de 100644 --- a/Perl-API.md +++ b/Perl-API.md @@ -118,7 +118,166 @@ sub EVENT_NPC_SLAY # Triggered when an NPC slays another NPC. sub EVENT_PLAYER_PICKUP # Triggered when a player picks up an object from the ground. sub EVENT_POPUPRESPONSE # Used with quest::popup. sub EVENT_PROXIMITY_SAY # Triggered if the client enters a mob's proximity and uses the appropriate text trigger supplied beneath this event. (set quest::enable_proximity_say() and param 7 in q:set_prox) -sub EVENT_RESPAWN # Triggered when a mob respawns. +sub EVENT_RESPAWN $npc->ChangeLastName(string name) +$npc->CheckNPCFactionAlly(other_faction) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(identifier, newvalue) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetCopper(amt) +$npc->SetGold(amt) +$npc->SetPrimSkill(skill_id) +$npc->SetSilver(amt) +$npc->SetSwarmTarget(target_id) +$npc->SetTaunting(bool toggle) +$npc->SignalNPC(_signal_id) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc | grep -v "int" | grep -v "()" +Opening 'zone/perl_npc.cpp' +$npc->ChangeLastName(string name) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetPrimSkill(skill_id) +$npc->SetSwarmTarget(target_id) +$npc->SetTaunting(bool toggle) +$npc->SignalNPC(_signal_id) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc | grep -v "int" | grep -v "()" +Opening 'zone/perl_npc.cpp' +$npc->ChangeLastName(string name) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetTaunting(bool toggle) +$npc->SignalNPC(_signal_id) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc | grep -v "int" | grep -v "()" +Opening 'zone/perl_npc.cpp' +$npc->ChangeLastName(string name) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetTaunting(bool toggle) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc +Opening 'zone/perl_npc.cpp' +$npc->AI_SetRoambox(float distance, float max_x, float min_x, float max_y, float min_y, [uint32 max_delay = 2500], [uint32 min_delay = 2500]) +$npc->AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust) +$npc->AddCash(uint16 copper, uint16 silver, uint16 gold, uint16 platinum) +$npc->AddDefensiveProc(int spell_id, int chance) +$npc->AddItem(uint32 item_id, [uint16 charges = 0], [bool equip_item = true], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint32 aug6 = 0]) +$npc->AddLootTable([uint32 loottable_id]) +$npc->AddMeleeProc(int spell_id, int chance) +$npc->AddRangedProc(int spell_id, int chance) +$npc->AssignWaypoints(uint32 grid_id) +$npc->CalculateNewWaypoint() +$npc->ChangeLastName(string name) +$npc->CheckNPCFactionAlly(int32 faction_id) +$npc->ClearItemList() +$npc->ClearLastName() +$npc->CountLoot() +$npc->DisplayWaypointInfo(client* target) +$npc->DoClassAttacks(mob* target) +$npc->GetAccuracyRating() +$npc->GetAttackDelay() +$npc->GetAttackSpeed() +$npc->GetAvoidanceyRating() +$npc->GetCombatState() +$npc->GetCopper() +$npc->GetGold() +$npc->GetGrid() +$npc->GetGuardPointX() +$npc->GetGuardPointY() +$npc->GetGuardPointZ() +$npc->GetLoottableID() +$npc->GetMaxDMG() +$npc->GetMaxDamage(uint8 target_level) +$npc->GetMaxWp() +$npc->GetMinDMG() +$npc->GetNPCFactionID() +$npc->GetNPCHate(mob* entity) +$npc->GetNPCSpellsID() +$npc->GetPetSpellID() +$npc->GetPlatinum() +$npc->GetPrimSkill() +$npc->GetPrimaryFaction() +$npc->GetScore() +$npc->GetSecSkill() +$npc->GetSilver() +$npc->GetSlowMitigation() +$npc->GetSp2() +$npc->GetSpawnKillCount() +$npc->GetSpawnPointH() +$npc->GetSpawnPointID() +$npc->GetSpawnPointX() +$npc->GetSpawnPointY() +$npc->GetSpawnPointZ() +$npc->GetSpellFocusDMG() +$npc->GetSpellFocusHeal() +$npc->GetSwarmOwner() +$npc->GetSwarmTarget() +$npc->GetWaypointMax() +$npc->IsAnimal() +$npc->IsGuarding() +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->NextGuardPosition() +$npc->PauseWandering(int pause_time) +$npc->PickPocket(client* thief) +$npc->RemoveAISpell(int spell_id) +$npc->RemoveCash() +$npc->RemoveDefensiveProc(int spell_id) +$npc->RemoveFromHateList(mob* target) +$npc->RemoveItem(uint32 item_id, [uint16 quantity = 0], [uint16 slot_id = 0]) +$npc->RemoveMeleeProc(int spell_id) +$npc->RemoveRangedProc(int spell_id) +$npc->ResumeWandering() +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetCopper(uint32 copper_amount) +$npc->SetGold(uint32 gold_amount) +$npc->SetGrid(int32 grid_id) +$npc->SetNPCFactionID(int32 faction_id) +$npc->SetPetSpellID(uint16 amount) +$npc->SetPlatinum(uint32 platinum_amount) +$npc->SetPrimSkill(int skill_id) +$npc->SetSaveWaypoint(uint16 waypoint) +$npc->SetSecSkill(int skill_id) +$npc->SetSilver(uint32 silver_amount) +$npc->SetSp2(uint32 set_spawn_group_id) +$npc->SetSpellFocusDMG(int new_spell_focus_dmg) +$npc->SetSpellFocusHeal(int32 new_spell_focus_heal) +$npc->SetSwarmTarget(int target_id) +$npc->SetTaunting(bool toggle) +$npc->SetWaypointPause() +$npc->SignalNPC(int signal_id) +$npc->StartSwarmTimer(uint32 duration) +$npc->StopWandering() +$npc->UpdateWaypoint(int wp_index)# Triggered when a mob respawns. sub EVENT_SAY # Triggered when a mob is targeted and the player types something. sub EVENT_SCALE_CALC # Triggered when an item is equipped to scale the item. sub EVENT_SIGNAL # Triggered by a call to quest::signal() or quest::signalwith(). @@ -1199,23 +1358,95 @@ $mob->WipeHateList() # NPC ```perl -$npc->AI_SetRoambox(iDist, iMaxX, iMinX, iMaxY, iMinY, iDelay) -$npc->AddAISpell(priority, spell_id, type, mana_cost, recast_delay, resist_adjust) -$npc->AddCash(in_copper, in_silver, in_gold, in_platinum) -$npc->AddItem(itemid, charges, equipitem) -$npc->AddLootTable() -$npc->AddDefensiveProc(spellid, chance)    -$npc->AddMeleeProc(spellid, chance) -$npc->AddRangedProc(spellid, chance) -$npc->AssignWaypoints(grid) -$npc->CalculateNewWaypoint() +$npc->ChangeLastName(string name) $npc->CheckNPCFactionAlly(other_faction) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(identifier, newvalue) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetCopper(amt) +$npc->SetGold(amt) +$npc->SetPrimSkill(skill_id) +$npc->SetSilver(amt) +$npc->SetSwarmTarget(target_id) +$npc->SetTaunting(bool toggle) +$npc->SignalNPC(_signal_id) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc | grep -v "int" | grep -v "()" +Opening 'zone/perl_npc.cpp' +$npc->ChangeLastName(string name) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetPrimSkill(skill_id) +$npc->SetSwarmTarget(target_id) +$npc->SetTaunting(bool toggle) +$npc->SignalNPC(_signal_id) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc | grep -v "int" | grep -v "()" +Opening 'zone/perl_npc.cpp' +$npc->ChangeLastName(string name) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetTaunting(bool toggle) +$npc->SignalNPC(_signal_id) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc | grep -v "int" | grep -v "()" +Opening 'zone/perl_npc.cpp' +$npc->ChangeLastName(string name) +$npc->DoClassAttacks(mob* target) +$npc->GetNPCHate(mob* entity) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) +$npc->PickPocket(client* thief) +$npc->RemoveFromHateList(mob* target) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetTaunting(bool toggle) + +eqemu on  master [⇡!] +➜ perl ./utils/scripts/perl-doc-parser.pl npc +Opening 'zone/perl_npc.cpp' +$npc->AI_SetRoambox(float distance, float max_x, float min_x, float max_y, float min_y, [uint32 max_delay = 2500], [uint32 min_delay = 2500]) +$npc->AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust) +$npc->AddCash(uint16 copper, uint16 silver, uint16 gold, uint16 platinum) +$npc->AddDefensiveProc(int spell_id, int chance) +$npc->AddItem(uint32 item_id, [uint16 charges = 0], [bool equip_item = true], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint32 aug6 = 0]) +$npc->AddLootTable([uint32 loottable_id]) +$npc->AddMeleeProc(int spell_id, int chance) +$npc->AddRangedProc(int spell_id, int chance) +$npc->AssignWaypoints(uint32 grid_id) +$npc->CalculateNewWaypoint() +$npc->ChangeLastName(string name) +$npc->CheckNPCFactionAlly(int32 faction_id) $npc->ClearItemList() +$npc->ClearLastName() $npc->CountLoot() -$npc->DisplayWaypointInfo(to) -$npc->DoClassAttacks(target) +$npc->DisplayWaypointInfo(client* target) +$npc->DoClassAttacks(mob* target) $npc->GetAccuracyRating() +$npc->GetAttackDelay() $npc->GetAttackSpeed() +$npc->GetAvoidanceyRating() +$npc->GetCombatState() $npc->GetCopper() $npc->GetGold() $npc->GetGrid() @@ -1224,23 +1455,24 @@ $npc->GetGuardPointY() $npc->GetGuardPointZ() $npc->GetLoottableID() $npc->GetMaxDMG() -$npc->GetMaxDamage(tlevel) +$npc->GetMaxDamage(uint8 target_level) $npc->GetMaxWp() -$npc->GetMerchantProbability() $npc->GetMinDMG() $npc->GetNPCFactionID() -$npc->GetNPCHate(in_ent) +$npc->GetNPCHate(mob* entity) $npc->GetNPCSpellsID() $npc->GetPetSpellID() $npc->GetPlatinum() $npc->GetPrimSkill() $npc->GetPrimaryFaction() +$npc->GetScore() $npc->GetSecSkill() $npc->GetSilver() $npc->GetSlowMitigation() $npc->GetSp2() +$npc->GetSpawnKillCount() $npc->GetSpawnPointH() -$npc->GetSpawnPointID() # Returns spawn2 id +$npc->GetSpawnPointID() $npc->GetSpawnPointX() $npc->GetSpawnPointY() $npc->GetSpawnPointZ() @@ -1251,42 +1483,41 @@ $npc->GetSwarmTarget() $npc->GetWaypointMax() $npc->IsAnimal() $npc->IsGuarding() -$npc->IsOnHatelist(p) -$npc->ModifyNPCStat(identifier, newValue) -$npc->MoveTo(mtx, mty, mtz, mth, saveguard) +$npc->IsOnHatelist(mob* target) +$npc->ModifyNPCStat(string key, string value) +$npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false]) $npc->NextGuardPosition() -$npc->PauseWandering(pausetime) -$npc->PickPocket(thief) -$npc->RemoveAISpell(spell_id) +$npc->PauseWandering(int pause_time) +$npc->PickPocket(client* thief) +$npc->RemoveAISpell(int spell_id) $npc->RemoveCash() -$npc->RemoveFromHateList(mob) -$npc->RemoveItem(item_id, quantity, slot) -$npc->RemoveMeleeProc(spell_id) -$npc->RemoveDefensiveProc(spell_id) -$npc->RemoveDefensiveProc(spell_id) +$npc->RemoveDefensiveProc(int spell_id) +$npc->RemoveFromHateList(mob* target) +$npc->RemoveItem(uint32 item_id, [uint16 quantity = 0], [uint16 slot_id = 0]) +$npc->RemoveMeleeProc(int spell_id) +$npc->RemoveRangedProc(int spell_id) $npc->ResumeWandering() -$npc->SaveGuardSpot(iClearGuardSpot) -$npc->SetCopper(amt) -$npc->SetGold(amt) -$npc->SetGrid(grid_) -$npc->SetMerchantProbability(amt) -$npc->SetNPCFactionID(in) -$npc->SetPetSpellID(amt) -$npc->SetPlatinum(amt) -$npc->SetPrimSkill(skill_type) -$npc->SetSaveWaypoint(waypoint) -$npc->SetSecSkill(skill_type) -$npc->SetSilver(amt) -$npc->SetSp2(sg2) -$npc->SetSpellFocusDMG() -$npc->SetSpellFocusHeal() -$npc->SetSwarmTarget() -$npc->SetTaunting(tog) +$npc->SaveGuardSpot([bool clear_guard_spot = false]) +$npc->SetCopper(uint32 copper_amount) +$npc->SetGold(uint32 gold_amount) +$npc->SetGrid(int32 grid_id) +$npc->SetNPCFactionID(int32 faction_id) +$npc->SetPetSpellID(uint16 amount) +$npc->SetPlatinum(uint32 platinum_amount) +$npc->SetPrimSkill(int skill_id) +$npc->SetSaveWaypoint(uint16 waypoint) +$npc->SetSecSkill(int skill_id) +$npc->SetSilver(uint32 silver_amount) +$npc->SetSp2(uint32 set_spawn_group_id) +$npc->SetSpellFocusDMG(int new_spell_focus_dmg) +$npc->SetSpellFocusHeal(int32 new_spell_focus_heal) +$npc->SetSwarmTarget(int target_id) +$npc->SetTaunting(bool toggle) $npc->SetWaypointPause() -$npc->SignalNPC(signal_id) -$npc->StartSwarmTimer(duration) +$npc->SignalNPC(int signal_id) +$npc->StartSwarmTimer(uint32 duration) $npc->StopWandering() -$npc->UpdateWaypoint(wp_index) +$npc->UpdateWaypoint(int wp_index) ``` # Quest Items