LUA Group | LUA Function Name | Description / Arguments |
Spawn | PlayFlavor |
Allows a Spawn to speak (via mp3), say (text string) and perform emote action PlayFlavor(Spawn, mp3_string, text_string, emote_string, key1, key2, [player], [language]) Note: When player is nil or not specified, function broadcasts to players in radius |
Spawn | PlaySound |
Play a non-encrypted/non-keyed MP3 sound effect on a Spawn. PlaySound(Spawn, sound_string, x, y, z, [player]) Note: When Player is nil or not specified, function broadcasts to players in radius |
Spawn | SetRequiredQuest |
Sets required quests to access the Spawn. SetRequiredQuest(Spawn, quest_id, quest_step, [private_spawn], [continued_access], [flag_override])
|
Spawn | SpawnSetByDistance |
Issue a SpawnSet on all spawns within the distance of the specified Spawn SpawnSetByDistance(Spawn, max_distance, variable_string, value_string)
|
Player | PerformCameraShake |
Camera shake a players screen with intensity (float) and direction ( PerformCameraShake(Player, intensity, [direction])
Note: direction is only supported for clients newer than DoF. |
Spawn | KillSpawn |
Kill the spawn specified as ‘dead_spawn’. KillSpawn(dead_spawn, [attacker_spawn], [send_packet])
|
Spawn | KillSpawnByDistance |
Kill all spawns in radius of specified Spawn. KillSpawnByDistance(Spawn, max_distance, [include_players], [send_packet])
|
Spawn | Despawn |
Remove spawn from the gameworld Despawn(Spawn, [delay])
|
Spawn | ChangeHandIcon |
Sets the spawn hand icon to the value specified. ChangeHandIcon(Spawn, hand_icon_value)
|
Spawn | SetVisualFlag |
Set Spawn visual flag to true and force visual update to players. SetVisualFlag(Spawn) |
Spawn | SetInfoFlag |
Set Spawn info flag to true and force info update to players SetInfoFlag(Spawn) |
Spawn | SendStateCommand |
Send an action state (animation) to clients for the Spawn specified. SendStateCommand(Spawn, new_state, [player])
|
Spawn | SpawnSet |
Allows setting various features of a Spawn SpawnSet(Spawn, variable_string, value_string, [no_update], [temporary_flag])
|
Spawn | GetSpawn |
Finds closest spawn to the Spawn specified with the spawn_id. Spawn = GetSpawn(Spawn, spawn_id) |
Spawn | GetSpawnFromList |
Gets a return Spawn from a vector of spawn entries at the position specified Spawn = GetSpawnFromList(vector_of_spawns, position)
|
Spawn | GetSpawnListSize |
Returns the count of spawns in the spawn list vector size = GetSpawnListSize(vector_of_spawns)
|
Spawn | CreateSpawnList |
Creates a vector array to include new spawns spawn_array = CreateSpawnList() |
Spawn | AddSpawnToSpawnList |
Adds a spawn to a previously created spawn list AddSpawnToSpawnList(spawn_array, Spawn) |
Spawn | RemoveSpawnFromSpawnList |
Remove a spawn from an existing spawn list RemoveSpawnFromSpawnList(spawn_array, Spawn) |
Spawn | GetSpawnListBySpawnID |
Returns an array of Spawns based on the spawn id based on the zone of the Spawn specified. spawn_array = GetSpawnListBySpawnID(Spawn, spawn_id) |
World | GetVariableValue |
Retrieves from the variables table or alternatively with the function SetServerVariable var_value_string = GetVariableValue(variable_name_string) |
Loot | GetCoinMessage |
Creates a string in the total of platinum, gold, silver, copper based on the input total_value_copper coin_message_string = GetCoinMessage(total_value_copper) |
Spawn | GetSpawnByGroupID |
Retrieves the first spawn on the spawn list by the spawn group id. Spawn = GetSpawnByGroupID(Zone, group_id) |
Spawn | GetSpawnByLocationID |
Retrieves the first spawn on the spawn list by location id. Spawn = GetSpawnByLocationID(Zone, location_id) |
Spawn | GetSpawnID |
Retrieves the database id of the provided Spawn spawn_database_id = GetSpawnID(Spawn) |
Spawn | GetSpawnGroupID |
Retrieves the spawn group id of the provided Spawn spawn_group_id = GetSpawnGroupID(Spawn) |
Spawn | SetSpawnGroupID |
Set the spawn group id of the provided Spawn set_boolean = SetSpawnGroupID(Spawn, group_id) |
Spawn | AddSpawnToGroup |
Puts the provided Spawn into the spawn group list based on the group_id specified set_boolean = AddSpawnToGroup(Spawn, group_id) |
Spawn | GetSpawnLocationID |
Get the location id of the specified Spawn spawn_location_id = GetSpawnLocationID(Spawn) |
Spawn | GetSpawnLocationPlacementID |
Get the location placement id of the specified Spawn location_placement_id = GetSpawnLocationPlacementID(Spawn) |
Player | GetFactionAmount |
Gets the faction value (integer) of the specified Player (Spawn) faction_value = GetFactionAmount(Player, faction_id) |
Spawn | SetFactionID |
Sets the faction id of the specified Spawn SetFactionID(Spawn, faction_id) |
Spawn | GetFactionID |
Gets the faction id of the specified Spawn faction_id = GetFactionID(Spawn) |
Spawn | GetGender |
Gets the gender of the specified Spawn gender = GetGender(Spawn) |
Entity | GetTarget |
Gets the target of the specified Entity Spawn = GetTarget(Entity) |
Spawn | PlayVoice |
Plays the voice (mp3_string) specified, key1 and key2 optionally set the encryption keys (two parts of the 64-bit key). PlayVoice(Spawn, mp3_string, [key1], [key2], [Player]) Note: When Player is nil or not specified, function broadcasts to players in radius |
Spawn | GetCurrentZoneSafeLocation |
Gets the current zone safe location, supposed to return 3 floats (??) float x,y,z = GetCurrentZoneSafeLocation(Spawn) |
Spawn | HasLootItem |
Check if the Spawn has the loot item by the item id specified. has_item_boolean = HasLootItem(Spawn, item_id) |
Spawn | AddLootItem |
Adds the specified item to the Spawns loot table, charges are optional and defaults to 1 if not included. AddLootItem(Spawn, item_id, [charges]) |
Spawn | RemoveLootItem |
Removes the specified item from the Spawns loot table, if there is a quantity it will remove all. RemoveLootItem(Spawn, item_id) |
Spawn | AddLootCoin |
Add coin (copper) to the loot table of the Spawn specified AddLootCoin(Spawn, coin_in_copper) |
Spawn | GiveLoot |
Adds the specified coin to the entity. Items are pushed to the players pending loot list. GiveLoot(Entity, Player, [coin], [item_id1], [item_id2], [item_id3], …) |
Spawn | HasPendingLootItem |
Returns true if there is a pending loot item between the Entity and Player per GiveLoot has_pending_item_bool = HasPendingLootItem(Entity, Player, item_id) |
Spawn | HasPendingLoot |
Returns true if the Player has any pending loot items from Entity pending_items_bool = HasPendingLoot(Entity, Player) |
Item/Spawn | CreateConversation |
Required for developing a conversation via LUA functions conversation = CreateConversation() |
Item/Spawn | AddConversationOption |
Add a conversation option to a previously existing conversation from CreateConversation. AddConversationOption(Conversation, text_display, function_call) |
Player | CloseConversation |
Closes a previously existing conversation from CreateConversation to a Spawn. CloseConversation(Spawn, Player) |
Item | CloseItemConversation |
Closes a previously existing conversation from CreateConversation to an Item. CloseItemConversation(Item, Player) |
Item/Spawn | StartDialogConversation |
Start a conversation after it has been created and conversation options added. Fields key1 and key2 optionally set the encryption keys (two parts of the 64-bit key). StartDialogConversation(Conversation, type, [Spawn/Item], Player, text_string, mp3_string, [key1], [key2])
|
Player | HasCoin |
HasCoin(Player, Coinstocheck) will return 1 if true 0 if false Example: HasCoin(Player, 1000000) This will check for 100 Plat. |
Spawn | ClearRunback |
This will prevent an NPC from running back to its spawn location. For example after using SetPosition. ClearRunback(NPC) |
Player | Evac | Can be used in 2 ways. evac() will take you to the zones safe location. evac(x,y,z,h) (h=heading) will take you to the desired location. |
Player | ChangeFaction |
Permits increasing or decreasing a players faction with selected ID. + or - Numbers taken Examples: Changefaction(Player, 33, -45000) This will SUBTRACT 45k from “city rats” faction. Changefaction(Player, 33, 45000) This will ADD 45k to the “city rats” faction. ChangeFaction(Player, <faction id>, <faction change +/- values>) |