Updated Perl API (markdown)

Chris Miles
2018-07-01 20:19:34 -05:00
parent 590c0685e8
commit b264d7be8a
+279 -48
@@ -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_PLAYER_PICKUP # Triggered when a player picks up an object from the ground.
sub EVENT_POPUPRESPONSE # Used with quest::popup. 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_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_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_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(). sub EVENT_SIGNAL # Triggered by a call to quest::signal() or quest::signalwith().
@@ -1199,23 +1358,95 @@ $mob->WipeHateList()
# NPC # NPC
```perl ```perl
$npc->AI_SetRoambox(iDist, iMaxX, iMinX, iMaxY, iMinY, iDelay) $npc->ChangeLastName(string name)
$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->CheckNPCFactionAlly(other_faction) $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->ClearItemList()
$npc->ClearLastName()
$npc->CountLoot() $npc->CountLoot()
$npc->DisplayWaypointInfo(to) $npc->DisplayWaypointInfo(client* target)
$npc->DoClassAttacks(target) $npc->DoClassAttacks(mob* target)
$npc->GetAccuracyRating() $npc->GetAccuracyRating()
$npc->GetAttackDelay()
$npc->GetAttackSpeed() $npc->GetAttackSpeed()
$npc->GetAvoidanceyRating()
$npc->GetCombatState()
$npc->GetCopper() $npc->GetCopper()
$npc->GetGold() $npc->GetGold()
$npc->GetGrid() $npc->GetGrid()
@@ -1224,23 +1455,24 @@ $npc->GetGuardPointY()
$npc->GetGuardPointZ() $npc->GetGuardPointZ()
$npc->GetLoottableID() $npc->GetLoottableID()
$npc->GetMaxDMG() $npc->GetMaxDMG()
$npc->GetMaxDamage(tlevel) $npc->GetMaxDamage(uint8 target_level)
$npc->GetMaxWp() $npc->GetMaxWp()
$npc->GetMerchantProbability()
$npc->GetMinDMG() $npc->GetMinDMG()
$npc->GetNPCFactionID() $npc->GetNPCFactionID()
$npc->GetNPCHate(in_ent) $npc->GetNPCHate(mob* entity)
$npc->GetNPCSpellsID() $npc->GetNPCSpellsID()
$npc->GetPetSpellID() $npc->GetPetSpellID()
$npc->GetPlatinum() $npc->GetPlatinum()
$npc->GetPrimSkill() $npc->GetPrimSkill()
$npc->GetPrimaryFaction() $npc->GetPrimaryFaction()
$npc->GetScore()
$npc->GetSecSkill() $npc->GetSecSkill()
$npc->GetSilver() $npc->GetSilver()
$npc->GetSlowMitigation() $npc->GetSlowMitigation()
$npc->GetSp2() $npc->GetSp2()
$npc->GetSpawnKillCount()
$npc->GetSpawnPointH() $npc->GetSpawnPointH()
$npc->GetSpawnPointID() # Returns spawn2 id $npc->GetSpawnPointID()
$npc->GetSpawnPointX() $npc->GetSpawnPointX()
$npc->GetSpawnPointY() $npc->GetSpawnPointY()
$npc->GetSpawnPointZ() $npc->GetSpawnPointZ()
@@ -1251,42 +1483,41 @@ $npc->GetSwarmTarget()
$npc->GetWaypointMax() $npc->GetWaypointMax()
$npc->IsAnimal() $npc->IsAnimal()
$npc->IsGuarding() $npc->IsGuarding()
$npc->IsOnHatelist(p) $npc->IsOnHatelist(mob* target)
$npc->ModifyNPCStat(identifier, newValue) $npc->ModifyNPCStat(string key, string value)
$npc->MoveTo(mtx, mty, mtz, mth, saveguard) $npc->MoveTo(float x, float y, float z, [float heading], [bool save_guard_location = false])
$npc->NextGuardPosition() $npc->NextGuardPosition()
$npc->PauseWandering(pausetime) $npc->PauseWandering(int pause_time)
$npc->PickPocket(thief) $npc->PickPocket(client* thief)
$npc->RemoveAISpell(spell_id) $npc->RemoveAISpell(int spell_id)
$npc->RemoveCash() $npc->RemoveCash()
$npc->RemoveFromHateList(mob) $npc->RemoveDefensiveProc(int spell_id)
$npc->RemoveItem(item_id, quantity, slot) $npc->RemoveFromHateList(mob* target)
$npc->RemoveMeleeProc(spell_id) $npc->RemoveItem(uint32 item_id, [uint16 quantity = 0], [uint16 slot_id = 0])
$npc->RemoveDefensiveProc(spell_id) $npc->RemoveMeleeProc(int spell_id)
$npc->RemoveDefensiveProc(spell_id) $npc->RemoveRangedProc(int spell_id)
$npc->ResumeWandering() $npc->ResumeWandering()
$npc->SaveGuardSpot(iClearGuardSpot) $npc->SaveGuardSpot([bool clear_guard_spot = false])
$npc->SetCopper(amt) $npc->SetCopper(uint32 copper_amount)
$npc->SetGold(amt) $npc->SetGold(uint32 gold_amount)
$npc->SetGrid(grid_) $npc->SetGrid(int32 grid_id)
$npc->SetMerchantProbability(amt) $npc->SetNPCFactionID(int32 faction_id)
$npc->SetNPCFactionID(in) $npc->SetPetSpellID(uint16 amount)
$npc->SetPetSpellID(amt) $npc->SetPlatinum(uint32 platinum_amount)
$npc->SetPlatinum(amt) $npc->SetPrimSkill(int skill_id)
$npc->SetPrimSkill(skill_type) $npc->SetSaveWaypoint(uint16 waypoint)
$npc->SetSaveWaypoint(waypoint) $npc->SetSecSkill(int skill_id)
$npc->SetSecSkill(skill_type) $npc->SetSilver(uint32 silver_amount)
$npc->SetSilver(amt) $npc->SetSp2(uint32 set_spawn_group_id)
$npc->SetSp2(sg2) $npc->SetSpellFocusDMG(int new_spell_focus_dmg)
$npc->SetSpellFocusDMG() $npc->SetSpellFocusHeal(int32 new_spell_focus_heal)
$npc->SetSpellFocusHeal() $npc->SetSwarmTarget(int target_id)
$npc->SetSwarmTarget() $npc->SetTaunting(bool toggle)
$npc->SetTaunting(tog)
$npc->SetWaypointPause() $npc->SetWaypointPause()
$npc->SignalNPC(signal_id) $npc->SignalNPC(int signal_id)
$npc->StartSwarmTimer(duration) $npc->StartSwarmTimer(uint32 duration)
$npc->StopWandering() $npc->StopWandering()
$npc->UpdateWaypoint(wp_index) $npc->UpdateWaypoint(int wp_index)
``` ```
# Quest Items # Quest Items