Lua API Reference: NPC (165 methods)

Browse the complete Lua API documentation for the NPC class. Search through 165 methods and 247 events to find the exact function signatures, parameters, and usage examples you need for your EQ-Emulator scripts.

Methods

npc:AI_SetRoambox(dist, max_x, min_x, max_y, min_y, delay, mindelay) # void
npc:AI_SetRoambox(dist, max_x, min_x, max_y, min_y) # void
npc:AddAISpell(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, min_hp, max_hp) # void
npc:AddAISpell(priority, spell_id, type, mana_cost, recast_delay, resist_adjust) # void
npc:AddAISpellEffect(spell_effect_id, base_value, limit_value, max_value) # void
npc:AddCash(copper, silver, gold, platinum) # void
npc:AddItem(item_id, charges, equip, aug1) # void
npc:AddItem(item_id, charges, equip, aug1, aug2, aug3, aug4) # void
npc:AddItem(item_id, charges, equip, aug1, aug2, aug3, aug4, aug5) # void
npc:AddItem(item_id, charges, equip, aug1, aug2, aug3, aug4, aug5, aug6) # void
npc:AddItem(item_id, charges) # void
npc:AddItem(item_id, charges, equip) # void
npc:AddItem(item_id, charges, equip, aug1, aug2) # void
npc:AddItem(item_id, charges, equip, aug1, aug2, aug3) # void
npc:AddLootTable(id) # void
npc:AddLootTable() # void
npc:AssignWaypoints(grid) # void
npc:CalculateNewWaypoint() # void
npc:ChangeLastName(last_name) # void
npc:CheckHandin() # bool
npc:CheckNPCFactionAlly(faction) # int
npc:ClearItemList() # void
npc:ClearLastName() # void
npc:CountItem(item_id) # uint32
npc:CountLoot() # int
npc:DeleteBucket(bucket_name) # void
npc:DescribeSpecialAbilities(c) # void
npc:DisplayWaypointInfo(client) # void
npc:DoClassAttacks(target) # void
npc:GetAccuracyRating() # int
npc:GetAttackDelay() # int
npc:GetAttackSpeed() # float
npc:GetAvoidanceRating() # int
npc:GetBucket(bucket_name) # std::string
npc:GetBucketExpires(bucket_name) # std::string
npc:GetBucketRemaining(bucket_name) # std::string
npc:GetCopper() # uint32
npc:GetFirstSlotByItemID(item_id) # uint16
npc:GetFollowCanRun() # bool
npc:GetFollowDistance() # int
npc:GetFollowID() # int
npc:GetGold() # uint32
npc:GetGrid() # int
npc:GetGuardPointX() # float
npc:GetGuardPointY() # float
npc:GetGuardPointZ() # float
npc:GetHealScale() # float
npc:GetItemIDBySlot(loot_slot) # uint32
npc:GetKeepsSoldItems() # bool
npc:GetLDoNLockedSkill() # uint16
npc:GetLDoNTrapSpellID() # uint16
npc:GetLDoNTrapType() # uint8
npc:GetLootList() # Lua_NPC_Loot_List
npc:GetLoottableID() # int
npc:GetMaxDMG() # uint32
npc:GetMaxDamage(level) # uint32
npc:GetMaxWp() # int
npc:GetMinDMG() # uint32
npc:GetNPCAggro() # bool
npc:GetNPCFactionID() # int
npc:GetNPCHate(ent) # int64
npc:GetNPCSpellsEffectsID() # uint32
npc:GetNPCSpellsID() # uint32
npc:GetNPCStat(stat) # float
npc:GetNPCTintIndex() # uint32
npc:GetPetSpellID() # int
npc:GetPlatinum() # uint32
npc:GetPrimSkill() # int
npc:GetPrimaryFaction() # int
npc:GetRawAC() # int
npc:GetScore() # int
npc:GetSecSkill() # int
npc:GetSilver() # uint32
npc:GetSlowMitigation() # float
npc:GetSp2() # uint32
npc:GetSpawn() # Lua_Spawn
npc:GetSpawnKillCount() # int
npc:GetSpawnPointH() # float
npc:GetSpawnPointID() # int
npc:GetSpawnPointX() # float
npc:GetSpawnPointY() # float
npc:GetSpawnPointZ() # float
npc:GetSpellFocusDMG() # int
npc:GetSpellFocusHeal() # int
npc:GetSpellScale() # float
npc:GetSwarmOwner() # int
npc:GetSwarmTarget() # int
npc:GetWaypointMax() # int
npc:HasAISpellEffect(spell_effect_id) # bool
npc:HasItem(item_id) # bool
npc:HasSpecialAbilities() # bool
npc:IsAnimal() # bool
npc:IsGuarding() # bool
npc:IsLDoNLocked() # bool
npc:IsLDoNTrapDetected() # bool
npc:IsLDoNTrapped() # bool
npc:IsMultiQuestEnabled() # bool
npc:IsOnHatelist(ent) # bool
npc:IsRaidTarget() # bool
npc:IsRareSpawn() # bool
npc:IsResumedFromZoneSuspend() # bool
npc:IsTaunting() # bool
npc:IsUnderwaterOnly() # bool
npc:MerchantCloseShop() # void
npc:MerchantOpenShop() # void
npc:ModifyNPCStat(stat, value) # void
npc:MoveTo(x, y, z, h, save) # void
npc:MultiQuestEnable() # void
npc:NextGuardPosition() # void
npc:PauseWandering(pause_time) # void
npc:PickPocket(thief) # void
npc:RecalculateSkills() # void
npc:ReloadSpells() # void
npc:RemoveAISpell(spell_id) # void
npc:RemoveAISpellEffect(spell_effect_id) # void
npc:RemoveCash() # void
npc:RemoveItem(item_id, quantity) # void
npc:RemoveItem(item_id) # void
npc:RemoveItem(item_id, quantity, slot) # void
npc:ResumeWandering() # void
npc:ReturnHandinItems(c) # void
npc:SaveGuardSpot() # void
npc:SaveGuardSpot(clear) # void
npc:SaveGuardSpot(x, y, z, heading) # void
npc:ScaleNPC(npc_level) # void
npc:ScaleNPC(npc_level, override_special_abilities) # void
npc:SendPayload(payload_id) # void
npc:SendPayload(payload_id, payload_value) # void
npc:SetBucket(bucket_name, bucket_value, expiration) # void
npc:SetBucket(bucket_name, bucket_value) # void
npc:SetCopper(amt) # void
npc:SetFollowCanRun(v) # void
npc:SetFollowDistance(dist) # void
npc:SetFollowID(id) # void
npc:SetGold(amt) # void
npc:SetGrid(grid) # void
npc:SetKeepsSoldItems(keeps_sold_items) # void
npc:SetLDoNLocked(is_locked) # void
npc:SetLDoNLockedSkill(skill_value) # void
npc:SetLDoNTrapDetected(is_detected) # void
npc:SetLDoNTrapSpellID(spell_id) # void
npc:SetLDoNTrapType(trap_type) # void
npc:SetLDoNTrapped(is_trapped) # void
npc:SetNPCAggro(in_npc_aggro) # void
npc:SetNPCFactionID(id) # void
npc:SetNPCTintIndex(index) # void
npc:SetPetSpellID(id) # void
npc:SetPlatinum(amt) # void
npc:SetPrimSkill(skill_id) # void
npc:SetSaveWaypoint(wp) # void
npc:SetSecSkill(skill_id) # void
npc:SetSilver(amt) # void
npc:SetSimpleRoamBox(box_size, move_distance, move_delay) # void
npc:SetSimpleRoamBox(box_size, move_distance) # void
npc:SetSimpleRoamBox(box_size) # void
npc:SetSp2(sg2) # void
npc:SetSpellFocusDMG(focus) # void
npc:SetSpellFocusHeal(focus) # void
npc:SetSwarmTarget(target) # void
npc:SetTaunting(t) # void
npc:SetWaypointPause() # void
npc:Signal(signal_id) # void
npc:StartSwarmTimer(duration) # void
npc:StopWandering() # void
npc:UpdateWaypoint(wp) # void