Updated Lua NPC (markdown)

KimLS
2014-09-27 14:39:53 -07:00
parent bc3f80f5c5
commit 8309c22b2b
+104 -102
@@ -1,103 +1,105 @@
NPC is a class exported to Lua that represent the NPC object from EQEmu. All NPC are also [Mob](Lua-Mob). NPC is a class exported to Lua that represent the NPC object from EQEmu. All NPC are also [Mob](Lua-Mob).
[Return to the Lua API](Lua-API) [Return to the Lua API](Lua-API)
### Properties ### Properties
``` ```
npc.null -- Returns true if this object is null npc.null -- Returns true if this object is null
npc.valid -- Returns true if this object is not null npc.valid -- Returns true if this object is not null
``` ```
### Member Functions ### Member Functions
``` ```
NPC() -- Creates a null NPC NPC() -- Creates a null NPC
Void Signal(Integer id); Void Signal(Integer id);
Integer CheckNPCFactionAlly(Integer faction); Integer CheckNPCFactionAlly(Integer faction);
Void AddItem(Integer item_id, Integer charges); Void AddItem(Integer item_id, Integer charges);
Void AddItem(Integer item_id, Integer charges, Boolean equip); Void AddItem(Integer item_id, Integer charges, Boolean equip);
Void AddLootTable(); Void AddLootTable();
Void AddLootTable(Integer id); Void AddLootTable(Integer id);
Void RemoveItem(Integer item_id); Void RemoveItem(Integer item_id);
Void RemoveItem(Integer item_id, Integer quantity); Void RemoveItem(Integer item_id, Integer quantity);
Void RemoveItem(Integer item_id, Integer quantity, Integer slot); Void RemoveItem(Integer item_id, Integer quantity, Integer slot);
Void ClearItemList(); Void ClearItemList();
Void AddCash(Integer copper, Integer silver, Integer gold, Integer platinum); Void AddCash(Integer copper, Integer silver, Integer gold, Integer platinum);
Void RemoveCash(); Void RemoveCash();
Integer CountLoot(); Integer CountLoot();
Integer GetLoottableID(); Integer GetLoottableID();
Integer GetCopper(); Integer GetCopper();
Integer GetSilver(); Integer GetSilver();
Integer GetGold(); Integer GetGold();
Integer GetPlatinum(); Integer GetPlatinum();
Void SetCopper(Integer amt); Void SetCopper(Integer amt);
Void SetSilver(Integer amt); Void SetSilver(Integer amt);
Void SetGold(Integer amt); Void SetGold(Integer amt);
Void SetPlatinum(Integer amt); Void SetPlatinum(Integer amt);
Void SetGrid(Integer grid); Void SetGrid(Integer grid);
Void SetSaveWaypoint(Integer wp); Void SetSaveWaypoint(Integer wp);
Void SetSp2(Integer sg2); Void SetSp2(Integer sg2);
Integer GetWaypointMax(); Integer GetWaypointMax();
Integer GetGrid(); Integer GetGrid();
Integer GetSp2(); Integer GetSp2();
Integer GetNPCFactionID(); Integer GetNPCFactionID();
Integer GetPrimaryFaction(); Integer GetPrimaryFaction();
Integer GetNPCHate(Mob ent); Integer GetNPCHate(Mob ent);
Boolean IsOnHatelist(Mob ent); Boolean IsOnHatelist(Mob ent);
Void SetNPCFactionID(Integer id); Void SetNPCFactionID(Integer id);
Integer GetMaxDMG(); Integer GetMaxDMG();
Integer GetMinDMG(); Integer GetMinDMG();
Boolean IsAnimal(); Boolean IsAnimal();
Integer GetPetSpellID(); Integer GetPetSpellID();
Void SetPetSpellID(Integer id); Void SetPetSpellID(Integer id);
Integer GetMaxDamage(Integer level); Integer GetMaxDamage(Integer level);
Void SetTaunting(Boolean t); Void SetTaunting(Boolean t);
Void PickPocket(Client thief); Void PickPocket(Client thief);
Void StartSwarmTimer(Integer duration); Void StartSwarmTimer(Integer duration);
Void DoClassAttacks(Mob target); Void DoClassAttacks(Mob target);
Integer GetMaxWp(); Integer GetMaxWp();
Void DisplayWaypointInfo(Client to); Void DisplayWaypointInfo(Client to);
Void CalculateNewWaypoint(); Void CalculateNewWaypoint();
Void AssignWaypoints(Integer grid); Void AssignWaypoints(Integer grid);
Void SetWaypointPause(); Void SetWaypointPause();
Void UpdateWaypoint(Integer wp); Void UpdateWaypoint(Integer wp);
Void StopWandering(); Void StopWandering();
Void ResumeWandering(); Void ResumeWandering();
Void PauseWandering(Integer pause_time); Void PauseWandering(Integer pause_time);
Void MoveTo(Real x, Real y, Real z, Real h, Boolean save); Void MoveTo(Real x, Real y, Real z, Real h, Boolean save);
Void NextGuardPosition(); Void NextGuardPosition();
Void SaveGuardSpot(); Void SaveGuardSpot();
Void SaveGuardSpot(Boolean clear); Void SaveGuardSpot(Boolean clear);
Boolean IsGuarding(); Boolean IsGuarding();
Void AI_SetRoambox(Real dist, Real max_x, Real min_x, Real max_y, Real min_y); Void AI_SetRoambox(Real dist, Real max_x, Real min_x, Real max_y, Real min_y);
Void AI_SetRoambox(Real dist, Real max_x, Real min_x, Real max_y, Real min_y, Integer delay); Void AI_SetRoambox(Real dist, Real max_x, Real min_x, Real max_y, Real min_y, Integer delay);
Integer GetNPCSpellsID(); Integer GetNPCSpellsID();
Integer GetSpawnPointID(); Integer GetSpawnPointID();
Real GetSpawnPointX(); Real GetSpawnPointX();
Real GetSpawnPointY(); Real GetSpawnPointY();
Real GetSpawnPointZ(); Real GetSpawnPointZ();
Real GetSpawnPointH(); Real GetSpawnPointH();
Real GetGuardPointX(); Real GetGuardPointX();
Real GetGuardPointY(); Real GetGuardPointY();
Real GetGuardPointZ(); Real GetGuardPointZ();
Void SetPrimSkill(Integer skill_id); Void SetPrimSkill(Integer skill_id);
Void SetSecSkill(Integer skill_id); Void SetSecSkill(Integer skill_id);
Integer GetPrimSkill(); Integer GetPrimSkill();
Integer GetSecSkill(); Integer GetSecSkill();
Integer GetSwarmOwner(); Integer GetSwarmOwner();
Integer GetSwarmTarget(); Integer GetSwarmTarget();
Void SetSwarmTarget(Integer target); Void SetSwarmTarget(Integer target);
Void ModifyNPCStat(String stat, String value); Void ModifyNPCStat(String stat, String value);
Void AddAISpell(Integer priority, Integer spell_id, Integer type, Integer mana_cost, Integer recast_delay, Integer resist_adjust); Void AddAISpell(Integer priority, Integer spell_id, Integer type, Integer mana_cost, Integer recast_delay, Integer resist_adjust);
Void RemoveAISpell(Integer spell_id); Void RemoveAISpell(Integer spell_id);
Void SetSpellFocusDMG(Integer focus); Void SetSpellFocusDMG(Integer focus);
Void SetSpellFocusHeal(Integer focus); Void SetSpellFocusHeal(Integer focus);
Real GetSlowMitigation(); Integer GetSpellFocusDMG();
Real GetAttackSpeed(); Integer GetSpellFocusHeal();
Integer GetAccuracyRating(); Real GetSlowMitigation();
Integer GetSpawnKillCount(); Real GetAttackSpeed();
Integer GetScore(); Integer GetAccuracyRating();
Void MerchantOpenShop(); Integer GetSpawnKillCount();
Void MerchantCloseShop(); Integer GetScore();
Integer GetMerchantProbability(); Void MerchantOpenShop();
Void SetMerchantProbability(Integer new_item_spawn_probability); Void MerchantCloseShop();
Integer GetMerchantProbability();
Void SetMerchantProbability(Integer new_item_spawn_probability);
``` ```