Reference library

Lua functions

612 matching entries. Names and bindings reflect this WorldServer checkout. Historical parameter details are under review.

Lua script modules

Shared helpers defined by Lua scripts, available after explicitly loading their modules.

NPCModule → NPC initialization, orc clan appearances, and common orc equipment presets.

DialogModule → NPC conversations, response callbacks, voiceovers, emotes, and player requirements.

MovementModule → Waypoint routes, formation following, and location-based random movement.

NPC appearance examples: Bloodskull(NPC) and OrcArmorCommon(NPC).

FunctionHistorical signatureCurrent bindingExample review
CompleteTransmuteCompleteTransmute(…) via current bindingEQ2Emu_lua_CompleteTransmuteChecked call
CopySpawnAppearanceCopySpawnAppearance(…) via current bindingEQ2Emu_lua_CopySpawnAppearanceChecked call
CreateChoiceWindowCreateChoiceWindow(npc, spawn, windowTextPrompt, acceptText, acceptCommand, declineText, declineCommand, time, textBox, textBoxRequired, maxLength)EQ2Emu_lua_CreateChoiceWindowChecked call
CreateConversationCreateConversation()EQ2Emu_lua_CreateConversationChecked call
CreateOptionWindowCreateOptionWindow(…) via current bindingEQ2Emu_lua_CreateOptionWindowChecked call
CreatePersistedRespawnCreatePersistedRespawn(location_id, spawn_type, respawn_time, zone_id)EQ2Emu_lua_CreatePersistedRespawnUnder review
CreateWidgetRegionCreateWidgetRegion(zone, version, region_name, env_name, grid_id, widget_id, dist)EQ2Emu_lua_CreateWidgetRegionChecked call
CureByControlEffectCureByControlEffect(cure_count, cure_type, cure_name, cure_level, target)EQ2Emu_lua_CureByControlEffectChecked call
CureByTypeCureByType(cure_count, cure_type, cure_name, cure_level, target, caster)EQ2Emu_lua_CureByTypeChecked call
DamageEquippedItemsDamageEquippedItems(spawn, damage_amount)EQ2Emu_lua_DamageEquippedItemsUnder review
DamageSpawnDamageSpawn(attacker, victim, type, dmg_type, low_damage, high_damage, spell_name, crit_mod)EQ2Emu_lua_DamageSpawnChecked call
DeleteAllQuestsDeleteAllQuests(…) via current bindingEQ2Emu_lua_DeleteAllQuestsUnder review
DeleteDBShardIDDeleteDBShardID(ShardID)EQ2Emu_lua_DeleteDBShardIDChecked call
DeleteQuestDeleteQuest(…) via current bindingEQ2Emu_lua_DeleteQuestChecked call
DeleteSpellBookDeleteSpellBook(player, type_selection)EQ2Emu_lua_DeleteSpellBookChecked call
DespawnDespawn(spawn, delay)EQ2Emu_lua_DespawnChecked call
DespawnByLocationIDDespawnByLocationID(zone, location_id, delay)EQ2Emu_lua_DespawnByLocationIDUnder review
DismissPetDismissPet(Spawn)EQ2Emu_lua_DismissPetChecked call
DisplayTextDisplayText(player, type, text)EQ2Emu_lua_DisplayTextChecked call
EmoteEmote(spawn, message, spawn2, player)EQ2Emu_lua_EmoteChecked call
EnableGameEventEnableGameEvent(player, event_name, enabled)EQ2Emu_lua_EnableGameEventUnder review
EndAutoMountEndAutoMount(Spawn)EQ2Emu_lua_EndAutoMountChecked call
EvacEvac(player, x, y, z, heading)EQ2Emu_lua_EvacUnder review
FaceTargetFaceTarget(spawn, target, reset_action_state)EQ2Emu_lua_FaceTargetChecked call
FlashWindowFlashWindow(player, window_name, flash_seconds)EQ2Emu_lua_FlashWindowChecked call
FormationFollowFormationFollow(…) via current bindingEQ2Emu_lua_FormationFollowChecked call
GateGate(spell)EQ2Emu_lua_GateChecked call
GetAAInfoGetAAInfo(spawn, type)EQ2Emu_lua_GetAAInfoUnder review
GetAggroRadiusGetAggroRadius(spawn)EQ2Emu_lua_GetAggroRadiusUnder review
GetAgiGetAgi(spawn)EQ2Emu_lua_GetAgiChecked call
GetAgiBaseGetAgiBase(spawn)EQ2Emu_lua_GetAgiBaseUnder review
GetAlignmentGetAlignment(Player)EQ2Emu_lua_GetAlignmentChecked call
GetArchetypeNameGetArchetypeName(spawn)EQ2Emu_lua_GetArchetypeNameChecked call
GetArrowColorGetArrowColor(player, level)EQ2Emu_lua_GetArrowColorUnder review
GetBaseAggroRadiusGetBaseAggroRadius(spawn)EQ2Emu_lua_GetBaseAggroRadiusUnder review
GetBaseSocialRadiusGetBaseSocialRadius(…) via current bindingEQ2Emu_lua_GetBaseSocialRadiusUnder review
GetBotAccessModeGetBotAccessMode(…) via current bindingEQ2Emu_lua_GetBotAccessModeUnder review
GetBotCountGetBotCount(…) via current bindingEQ2Emu_lua_GetBotCountUnder review
GetBoundZoneIDGetBoundZoneID(spawn)EQ2Emu_lua_GetBoundZoneIDChecked call
GetCanBindGetCanBind(spawn)EQ2Emu_lua_GetCanBindChecked call
GetCanEvacGetCanEvac(spawn)EQ2Emu_lua_GetCanEvacChecked call
GetCanGateGetCanGate(spawn)EQ2Emu_lua_GetCanGateChecked call
GetCasterSpellLevelGetCasterSpellLevel(spell)EQ2Emu_lua_GetCasterSpellLevelChecked call
GetCharacterFlagGetCharacterFlag(player, flag_id)EQ2Emu_lua_GetCharacterFlagUnder review
GetCharacterIDGetCharacterID(spawn)EQ2Emu_lua_GetCharacterIDChecked call
GetCharmedPetGetCharmedPet(Spawn)EQ2Emu_lua_GetCharmedPetChecked call
GetChoiceSpawnIDGetChoiceSpawnID(spawn, commandMatch, declineValue)EQ2Emu_lua_GetChoiceSpawnIDUnder review
GetClassGetClass(spawn)EQ2Emu_lua_GetClassChecked call
GetClassNameGetClassName(spawn)EQ2Emu_lua_GetClassNameUnder review
GetClientVersionGetClientVersion(Spawn)EQ2Emu_lua_GetClientVersionChecked call
GetCoinMessageGetCoinMessage(total_coins)EQ2Emu_lua_GetCoinMessageChecked call
GetCosmeticPetGetCosmeticPet(Spawn)EQ2Emu_lua_GetCosmeticPetChecked call
GetCurrentHPGetCurrentHP(spawn)EQ2Emu_lua_GetCurrentHPChecked call
GetCurrentPowerGetCurrentPower(spawn)EQ2Emu_lua_GetCurrentPowerUnder review
GetCurrentZoneSafeLocationGetCurrentZoneSafeLocation(spawn)EQ2Emu_lua_GetCurrentZoneSafeLocationUnder review
GetDeityGetDeity(spawn)EQ2Emu_lua_GetDeityChecked call
GetDeityPetGetDeityPet(spawn)EQ2Emu_lua_GetDeityPetChecked call
GetDifficultyGetDifficulty(spawn)EQ2Emu_lua_GetDifficultyChecked call
GetDistanceGetDistance(spawn, spawn2, include_radius)EQ2Emu_lua_GetDistanceChecked call
GetEncounterGetEncounter(spawn)EQ2Emu_lua_GetEncounterChecked call
GetEncounterSizeGetEncounterSize(spawn)EQ2Emu_lua_GetEncounterSizeUnder review
GetEquippedItemByIDGetEquippedItemByID(…) via current bindingEQ2Emu_lua_GetEquippedItemByIDChecked call
GetEquippedItemBySlotGetEquippedItemBySlot(…) via current bindingEQ2Emu_lua_GetEquippedItemBySlotChecked call
GetExpRequiredByLevelGetExpRequiredByLevel(…) via current bindingEQ2Emu_lua_GetExpRequiredByLevelChecked call
GetFactionAmountGetFactionAmount(player, faction_id)EQ2Emu_lua_GetFactionAmountChecked call
GetFactionIDGetFactionID(spawn)EQ2Emu_lua_GetFactionIDChecked call
GetFollowTargetGetFollowTarget(Spawn)EQ2Emu_lua_GetFollowTargetUnder review
GetGenderGetGender(spawn)EQ2Emu_lua_GetGenderChecked call
GetGroupGetGroup(Spawn)EQ2Emu_lua_GetGroupChecked call
GetHateListGetHateList(spawn)EQ2Emu_lua_GetHateListUnder review
GetHeadingGetHeading(spawn)EQ2Emu_lua_GetHeadingChecked call
GetHouseCharacterIDGetHouseCharacterID(…) via current bindingEQ2Emu_lua_GetHouseCharacterIDUnder review
GetHPGetHP(…) via current bindingEQ2Emu_lua_GetCurrentHPChecked call
GetIDGetID(spawn)EQ2Emu_lua_GetIDChecked call
GetInfoStructFloatGetInfoStructFloat(spawn, field)EQ2Emu_lua_GetInfoStructFloatChecked call
GetInfoStructSIntGetInfoStructSInt(spawn, field)EQ2Emu_lua_GetInfoStructSIntChecked call
GetInfoStructStringGetInfoStructString(spawn, field)EQ2Emu_lua_GetInfoStructStringChecked call
GetInfoStructUIntGetInfoStructUInt(spawn, field)EQ2Emu_lua_GetInfoStructUIntChecked call
GetIntGetInt(spawn)EQ2Emu_lua_GetIntChecked call
GetIntBaseGetIntBase(spawn)EQ2Emu_lua_GetIntBaseUnder review
GetItemByIDGetItemByID(…) via current bindingEQ2Emu_lua_GetItemByIDUnder review
GetItemCountGetItemCount(item)EQ2Emu_lua_GetItemCountChecked call
GetItemEffectTypeGetItemEffectType(item)EQ2Emu_lua_GetItemEffectTypeUnder review
GetItemIDGetItemID(item)EQ2Emu_lua_GetItemIDChecked call
GetItemSkillReqGetItemSkillReq(item, type)EQ2Emu_lua_GetItemSkillReqChecked call
GetItemTypeGetItemType(item)EQ2Emu_lua_GetItemTypeChecked call
GetLevelGetLevel(spawn)EQ2Emu_lua_GetLevelChecked call
GetLootCoinGetLootCoin(spawn)EQ2Emu_lua_GetLootCoinUnder review
GetLootDropTypeGetLootDropType(spawn)EQ2Emu_lua_GetLootDropTypeUnder review
GetLootTierGetLootTier(spawn)EQ2Emu_lua_GetLootTierUnder review
GetMaxHPGetMaxHP(spawn)EQ2Emu_lua_GetMaxHPChecked call
GetMaxHPBaseGetMaxHPBase(spawn)EQ2Emu_lua_GetMaxHPBaseUnder review
GetMaxPowerGetMaxPower(spawn)EQ2Emu_lua_GetMaxPowerChecked call
GetMaxPowerBaseGetMaxPowerBase(spawn)EQ2Emu_lua_GetMaxPowerBaseChecked call
GetModelTypeGetModelType(spawn)EQ2Emu_lua_GetModelTypeChecked call
GetMostHatedGetMostHated(NPC)EQ2Emu_lua_GetMostHatedChecked call
GetMountGetMount(spawn)EQ2Emu_lua_GetMountChecked call
GetNameGetName(spawn)EQ2Emu_lua_GetNameChecked call
GetOrigXGetOrigX(Spawn)EQ2Emu_lua_GetOrigXChecked call
GetOrigYGetOrigY(Spawn)EQ2Emu_lua_GetOrigYUnder review

Current source: WorldServer/Lua/LuaInterface.cpp.