NPC

Info

Also see Spire Quest API Explorer for latest definitions and Quest examples

Last generated 2022.05.11

$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->AddAISpellEffect(int spell_effect_id, int base_value, int limit_value, int max_value);
$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->CountItem(uint32 item_id);
$npc->CountLoot();
$npc->DisplayWaypointInfo(Client* client);
$npc->DoClassAttacks(Mob* target);
$npc->GetAccuracyRating();
$npc->GetAttackDelay();
$npc->GetAttackSpeed();
$npc->GetAvoidanceRating();
$npc->GetCombatState();
$npc->GetCopper();
$npc->GetFirstSlotByItemID(uint32 item_id);
$npc->GetGold();
$npc->GetGrid();
$npc->GetGuardPointX();
$npc->GetGuardPointY();
$npc->GetGuardPointZ();
$npc->GetHealScale();
$npc->GetItemIDBySlot(uint16 loot_slot);
$npc->GetLootList();
$npc->GetLoottableID();
$npc->GetMaxDMG();
$npc->GetMaxDamage(uint8 target_level);
$npc->GetMaxWp();
$npc->GetMinDMG();
$npc->GetNPCFactionID();
$npc->GetNPCHate(Mob* entity);
$npc->GetNPCSpellsID();
$npc->GetNPCStat(string key);
$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->GetSpellScale();
$npc->GetSwarmOwner();
$npc->GetSwarmTarget();
$npc->GetWaypointMax();
$npc->HasAISpellEffect(int spell_effect_id);
$npc->HasItem(uint32 item_id);
$npc->IsAnimal();
$npc->IsGuarding();
$npc->IsOnHatelist(Mob* target);
$npc->IsRaidTarget();
$npc->IsTaunting();
$npc->MerchantCloseShop();
$npc->MerchantOpenShop();
$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->RecalculateSkills();
$npc->RemoveAISpell(int spell_id);
$npc->RemoveAISpellEffect(int spell_effect_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(x, y, z, heading);
$npc->ScaleNPC(uint8 npc_level);
$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->SetSimpleRoamBox(box_size, move_distance, move_delay);
$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);

Info

Also see Spire Quest API Explorer for latest definitions and Quest examples

Last generated 2022.05.11

npc:AI_SetRoambox(float dist, float max_x, float min_x, float max_y, float min_y);
npc:AI_SetRoambox(float dist, float max_x, float min_x, float max_y, float min_y, uint32 delay, uint32 mindelay);
npc:AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust, int min_hp, int max_hp);
npc:AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust);
npc:AddAISpellEffect(int spell_effect_id, int base_value, int limit_value, int max_value);
npc:AddCash(int copper, int silver, int gold, int platinum);
npc:AddItem(int item_id, int charges, bool equip, int aug1, int aug2, int aug3, int aug4, int aug5, int aug6);
npc:AddItem(int item_id, int charges, bool equip, int aug1, int aug2, int aug3, int aug4);
npc:AddItem(int item_id, int charges, bool equip, int aug1, int aug2, int aug3, int aug4, int aug5);
npc:AddItem(int item_id, int charges, bool equip);
npc:AddItem(int item_id, int charges, bool equip, int aug1, int aug2, int aug3);
npc:AddItem(int item_id, int charges, bool equip, int aug1);
npc:AddItem(int item_id, int charges);
npc:AddItem(int item_id, int charges, bool equip, int aug1, int aug2);
npc:AddLootTable();
npc:AddLootTable(int id);
npc:AssignWaypoints(int grid);
npc:CalculateNewWaypoint();
npc:ChangeLastName(string lastname);
npc:CheckNPCFactionAlly(faction);
npc:ClearItemList();
npc:ClearLastName();
npc:CountItem(uint32 item_id);
npc:CountLoot();
npc:DisplayWaypointInfo(Client client);
npc:DoClassAttacks(Mob target);
npc:GetAccuracyRating();
npc:GetAttackDelay();
npc:GetAttackSpeed();
npc:GetAvoidanceRating();
npc:GetCopper();
npc:GetFirstSlotByItemID(uint32 item_id);
npc:GetFollowCanRun();
npc:GetFollowDistance();
npc:GetFollowID();
npc:GetGold();
npc:GetGrid();
npc:GetGuardPointX();
npc:GetGuardPointY();
npc:GetGuardPointZ();
npc:GetHealScale();
npc:GetItemIDBySlot(uint16 loot_slot);
npc:GetLootList(State* L);
npc:GetLoottableID();
npc:GetMaxDMG();
npc:GetMaxDamage(int level);
npc:GetMaxWp();
npc:GetMinDMG();
npc:GetNPCFactionID();
npc:GetNPCHate(Mob ent);
npc:GetNPCSpellsID();
npc:GetNPCStat(string* identifier);
npc:GetPetSpellID();
npc:GetPlatinum();
npc:GetPrimSkill();
npc:GetPrimaryFaction();
npc:GetRawAC();
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:GetSpellScale();
npc:GetSwarmOwner();
npc:GetSwarmTarget();
npc:GetWaypointMax();
npc:HasAISpellEffect(int spell_effect_id);
npc:HasItem(uint32 item_id);
npc:IsAnimal();
npc:IsGuarding();
npc:IsOnHatelist(Mob ent);
npc:IsRaidTarget();
npc:IsTaunting();
npc:MerchantCloseShop();
npc:MerchantOpenShop();
npc:ModifyNPCStat(string stat, string value);
npc:MoveTo(float x, float y, float z, float h, bool save);
npc:NextGuardPosition();
npc:PauseWandering(int pause_time);
npc:PickPocket(Client thief);
npc:RecalculateSkills();
npc:RemoveAISpell(int spell_id);
npc:RemoveAISpellEffect(int spell_effect_id);
npc:RemoveCash();
npc:RemoveItem(int item_id, int quantity, int slot);
npc:RemoveItem(int item_id, int quantity);
npc:RemoveItem(int item_id);
npc:ResumeWandering();
npc:SaveGuardSpot(float x, float y, float z, float heading);
npc:ScaleNPC(uint8 npc_level);
npc:SetCopper(uint32 amt);
npc:SetFollowCanRun(bool v);
npc:SetFollowDistance(int dist);
npc:SetFollowID(int id);
npc:SetGold(uint32 amt);
npc:SetGrid(int grid);
npc:SetNPCFactionID(int id);
npc:SetPetSpellID(int id);
npc:SetPlatinum(uint32 amt);
npc:SetPrimSkill(int skill_id);
npc:SetSaveWaypoint(int wp);
npc:SetSecSkill(int skill_id);
npc:SetSilver(uint32 amt);
npc:SetSimpleRoamBox(float box_size);
npc:SetSimpleRoamBox(float box_size, float move_distance, int move_delay);
npc:SetSimpleRoamBox(float box_size, float move_distance);
npc:SetSp2(int sg2);
npc:SetSpellFocusDMG(int focus);
npc:SetSpellFocusHeal(int focus);
npc:SetSwarmTarget(int target);
npc:SetTaunting(bool t);
npc:SetWaypointPause();
npc:Signal(int id);
npc:StartSwarmTimer(uint32 duration);
npc:StopWandering();
npc:UpdateWaypoint(int wp);