1
0

Some LUA Functions Documented..

This commit is contained in:
Emagi 2025-05-13 22:57:49 -04:00
parent 8ad25150a2
commit ca901574a6
46 changed files with 514 additions and 574 deletions

View File

@ -1,17 +1,14 @@
### Function: AddIconValue(Spawn, Value) Function: AddIconValue(Spawn, Value)
**Description:** Description: Add an icon value to the Spawn (this is not confirmed functional).
Add an icon value to the Spawn.
**Parameters:** Parameters:
- `Spawn`: Spawn - The spawn or entity involved. Spawn: Spawn - The spawn or entity involved.
- `Value`: UInt32 - icon value to be added. Value: UInt32 - icon value to be added.
**Returns:** Boolean: True if successful, otherwise False.. Returns: Boolean: True if successful, otherwise False..
**Example:** Example:
```lua
-- Example usage -- Example usage
AddIconValue(Spawn, Value) AddIconValue(Spawn, Value)
```

View File

@ -1,17 +1,14 @@
### Function: AddQuestPrereqClass(param1, param2) Function: AddQuestPrereqClass(Quest: quest, Int8: ClassID)
**Description:** Description: Add a pre requirement class to the Quest.
Placeholder description.
**Parameters:** Parameters:
- `param1`: unknown - Unknown type. quest: Quest - Quest to apply the class pre req.
- `param2`: int8 - Small integer or boolean flag. ClassID: Int8 - class id from the classes ID's.
**Returns:** None. Returns: None.
**Example:** Example:
```lua -- Example usage: Restricts Quest to Inquisitor(14) class.
-- Example usage AddQuestPrereqClass(Quest, 14)
AddQuestPrereqClass(..., ...)
```

View File

@ -1,21 +1,18 @@
### Function: AddQuestStepFailureAction(param1, param2, param3, param4, param5, param6) Function: AddQuestStepFailureAction(Quest, Step, FunctionName)
**Description:** Description: Associates a Lua function (by name) to be called if the specified quest step fails. This allows custom script handling when a steps failure condition is met (e.g., timer runs out).
Placeholder description.
**Parameters:** Parameters:
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: int32 - Integer value.
- `param6`: string - String value.
**Returns:** None. Quest: Quest The quest object.
**Example:** Step: Int32 The step number to attach the failure action to.
```lua FunctionName: String The name of a Lua function to call on failure.
-- Example usage
AddQuestStepFailureAction(..., ..., ..., ..., ..., ...) Returns: None.
```
Example:
-- Example usage (if step 2 fails, call "OnStealthFail" in the quest script)
AddQuestStepFailureAction(Quest, 2, "OnStealthFail")

View File

@ -1,25 +1,18 @@
### Function: AddThreatTransfer(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) Function: AddThreatTransfer(Originator, Target, Percent)
**Description:** Description: Establishes a hate (threat) transfer link from the originator to the target. A percentage of hate generated by the originator will be transferred to the target. Typically used by abilities where one character siphons or shares aggro with another (e.g., a hate transfer from scout to tank).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: unknown - Unknown type.
- `param6`: unknown - Unknown type.
- `param7`: unknown - Unknown type.
- `param8`: unknown - Unknown type.
- `param9`: Spawn - The spawn or entity involved.
- `param10`: float - Floating point value.
**Returns:** None. Originator: Spawn The entity whose threat will be partially transferred.
**Example:** Target: Spawn The entity receiving the threat.
```lua Percent: Int32 The percentage of hate to transfer (e.g., 25 for 25% transfer).
-- Example usage
AddThreatTransfer(..., ..., ..., ..., ..., ..., ..., ..., ..., ...) Returns: None.
```
Example:
-- Example usage (a buff that transfers 30% of a scout's hate to the tank)
AddThreatTransfer(ScoutPlayer, TankPlayer, 30)

View File

@ -1,17 +1,14 @@
### Function: AddToWard(param1, param2) Function: AddToWard(AdditionalAmount)
**Description:** Description: Used inside a Spell Script. Increases the strength of an existing ward on the target(s) of the spell by the specified amount. If the target(s) has this ward active, this tops it up.
Placeholder description.
**Parameters:** Parameters:
- `param1`: int32 - Integer value.
- `param2`: unknown - Unknown type.
**Returns:** None. AdditionalAmount: Int32 How much to increase the wards remaining absorption by.
**Example:** Returns: None.
```lua Example:
-- Example usage
AddToWard(..., ...) -- Example usage (reinforce a companions ward during battle)
``` AddToWard(200)

View File

@ -1,11 +1,11 @@
### Function: Attack(param1, param2) ### Function: Attack(NPC, Target)
**Description:** **Description:**
Placeholder description. NPC will attack its target (NPC/Player/Bot).
**Parameters:** **Parameters:**
- `param1`: Spawn - The spawn or entity involved. - `NPC`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved. - `Target`: Spawn - The spawn or entity involved.
**Returns:** None. **Returns:** None.
@ -13,5 +13,5 @@ Placeholder description.
```lua ```lua
-- Example usage -- Example usage
Attack(..., ...) Attack(NPC, Target)
``` ```

View File

@ -1,20 +1,16 @@
### Function: BreatheUnderwater(param1, param2, param3, param4, param5) Function: BreatheUnderwater(Spawn, Allow)
**Description:** Description: Toggles the underwater breathing ability for the given spawn (typically a player). When allowed, the spawn can breathe indefinitely underwater (no drowning). This is usually triggered by buffs or items like water-breathing spells. When ran in a Spell Script applies to all Targets of the spell. Otherwise it will apply only to the Spawn specified, Spawn is required.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: bool - Boolean value (true/false).
**Returns:** None. Spawn: Spawn The character whose underwater breathing is being set.
**Example:** Allow: Boolean true to grant underwater breathing; false to require normal breath (drowning applies).
```lua Returns: None.
-- Example usage
BreatheUnderwater(..., ..., ..., ..., ...) Example:
```
-- Example usage:
BreatheUnderwater(Player, true)

View File

@ -1,21 +1,17 @@
### Function: CanHarvest(param1, param2, param3, param4, param5, param6) Function: CanHarvest(Player, GroundSpawn)
**Description:** Description: Determines if the specified spawn (which should be a player) is currently able to harvest resources (i.e., not in combat and has the required skill/tool). This function checks general conditions for harvesting.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: unknown - Unknown type.
- `param6`: Spawn - The spawn or entity involved.
**Returns:** None. Player: Spawn The player to check.
GroundSpawn: Spawn The groundspawn to apply the check on.
**Example:** Returns: Boolean true if the player can harvest at the moment; false if something prevents harvesting (lacking skill).
```lua Example:
-- Example usage
CanHarvest(..., ..., ..., ..., ..., ...) -- Example usage (before starting an auto-harvest routine, verify the player can harvest)
``` if CanHarvest(Player, GroundSpawn) then
Harvest(Player, GroundSpawn)
end

View File

@ -1,17 +1,17 @@
### Function: CanSeeInvis(param1, param2) Function: CanSeeInvis(Player, Target)
**Description:** Description: Checks if the given NPC or player can see invisible entities. Some NPCs have see-invis or see-stealth abilities, which this would indicate.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved.
**Returns:** None. Player/Entity: Spawn The Player/Entity to check for see-invisibility capability.
Target: Spawn The entity to check if Player can see them.
**Example:** Returns: Boolean true if this spawn can detect invisible targets; false if not.
```lua Example:
-- Example usage
CanSeeInvis(..., ...) -- Example usage (NPC will attack stealthed players only if it can see invis)
``` if IsPlayer(Target) or CanSeeInvis(NPC, Target) then
Attack(NPC, Target)
end

View File

@ -1,19 +1,12 @@
### Function: CancelSpell(param1, param2, param3, param4) Function: CancelSpell()
**Description:** Description: Cancels the current spell in the script being ran.
Placeholder description.
**Parameters:** Parameters: None.
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
**Returns:** None. Returns: None.
**Example:** Example:
```lua -- Example usage (Inside a Spell Script)
-- Example usage CancelSpell()
CancelSpell(..., ..., ..., ...)
```

View File

@ -1,19 +1,16 @@
### Function: Charm(param1, param2, param3, param4) Function: Charm(Spawn, Target)
**Description:** Description: Must be used inside a Spell Script. Sets the Target to become a Pet of the Spawn (Owner).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: Spawn - The spawn or entity involved.
**Returns:** None. Spawn: Spawn The entity casting the charm (e.g., a player or NPC that will become the controller).
**Example:** Target: Spawn The NPC to be charmed.
```lua Returns: None.
-- Example usage
Charm(..., ..., ..., ...) Example:
```
-- Example usage (NPC charms another NPC during an encounter)
Charm(NPC, EnemyNPC)

View File

@ -1,17 +1,18 @@
### Function: CheckLOS(param1, param2) Function: CheckLOS(Origin, Target)
**Description:** Description: Checks line-of-sight between two spawns. Returns true if Origin can “see” Target (no significant obstacles in between), false if line of sight is blocked.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved.
**Returns:** None. Origin: Spawn The entity from whose perspective to check line of sight.
**Example:** Target: Spawn The entity to check if visible.
```lua Returns: Boolean true if there is line-of-sight; false if something blocks the view between origin and target.
-- Example usage
CheckLOS(..., ...) Example:
```
-- Example usage (sniper NPC only shoots if it has line of sight to the player)
if CheckLOS(SniperNPC, Player) then
CastSpell(SniperNPC, SNIPER_SHOT_ID, 1, Player)
end

View File

@ -1,19 +1,22 @@
### Function: CheckLOSByCoordinates(param1, param2, param3, param4) Function: CheckLOSByCoordinates(Origin, X, Y, Z)
**Description:** Description: Checks line-of-sight from a spawn to a specific point in the world coordinates. Useful for verifying a locations visibility (for example, whether a ground target spell can reach a point).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: float - Floating point value.
- `param3`: float - Floating point value.
- `param4`: float - Floating point value.
**Returns:** None. Origin: Spawn The entity from which to check LOS.
**Example:** X: Float X coordinate of the target point.
```lua Y: Float Y coordinate of the target point.
-- Example usage
CheckLOSByCoordinates(..., ..., ..., ...) Z: Float Z coordinate of the target point.
```
Returns: Boolean true if the line from Origin to (X,Y,Z) is clear; false if its obstructed.
Example:
-- Example usage (check if a spot is reachable by ranged attack)
if CheckLOSByCoordinates(Player, targetX, targetY, targetZ) then
LaunchProjectile(Player, targetX, targetY, targetZ)
end

View File

@ -1,19 +1,18 @@
### Function: CheckRaceType(param1, param2, param3, param4) Function: CheckRaceType(Spawn, RaceTypeID)
**Description:** Description: Checks if the given spawns race matches a specific race type category (such as “Undead,” “Giant,” “Animal,” etc.). This is used in quests or abilities that target categories of creatures.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int16 - Short integer value.
**Returns:** None. Spawn: Spawn The entity whose race to check.
**Example:** RaceTypeID: Int32 The ID of the race type category to compare against.
```lua Returns: Boolean true if the spawn belongs to that race type; false otherwise.
-- Example usage
CheckRaceType(..., ..., ..., ...) Example:
```
-- Example usage (quest update if target is of the Gnoll race type)
if CheckRaceType(TargetNPC, RACE_TYPE_GNOLL) then
UpdateQuestStep(Player, QuestID, Step)
end

View File

@ -1,18 +1,14 @@
### Function: ClearEncounter(param1, param2, param3) Function: ClearEncounter(Spawn)
**Description:** Description: Clears the encounter association for the given spawn. In EQ2, NPCs engaged in combat are part of an “encounter” group. This function removes the spawn from any encounter, effectively resetting its fight grouping.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The NPC or player whose encounter to clear.
**Example:** Returns: None.
```lua Example:
-- Example usage
ClearEncounter(..., ..., ...) -- Example usage (after battle ends, remove any leftover encounter tags)
``` ClearEncounter(NPC)

View File

@ -1,18 +1,14 @@
### Function: ClearRunback(param1, param2, param3) Function: ClearRunback(NPC)
**Description:** Description: Stops the NPC from trying to return to its “runback” point (the spot it was originally at or a designated safe point). Often used when you want to stop an NPC from automatically fleeing back or resetting.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
**Returns:** None. NPC: Spawn The NPC to clear runback for.
**Example:** Returns: None.
```lua Example:
-- Example usage
ClearRunback(..., ..., ...) -- Example usage (prevent an NPC from running back to spawn point after combat)
``` ClearRunback(NPC)

View File

@ -1,19 +1,18 @@
### Function: CompareSpawns(param1, param2, param3, param4) Function: CompareSpawns(SpawnA, SpawnB)
**Description:** Description: Compares two spawn objects to determine if they refer to the same actual entity in the world.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: Spawn - The spawn or entity involved.
**Returns:** None. SpawnA: Spawn The first spawn to compare.
**Example:** SpawnB: Spawn The second spawn to compare.
```lua Returns: Boolean true if both SpawnA and SpawnB represent the same spawn (same entity); false if they are different.
-- Example usage
CompareSpawns(..., ..., ..., ...) Example:
```
-- Example usage (make sure a target hasnt changed before proceeding)
if CompareSpawns(CurrentTarget, GetTarget(Player)) then
-- proceed assuming target remains the same
end

View File

@ -1,18 +1,14 @@
### Function: CompleteTransmute(param1, param2, param3) Function: CompleteTransmute(Player)
**Description:** Description: Finalizes a transmuting action for the player, typically yielding the transmuted components. This would be called after StartTransmute once the process should complete (if not automatic).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
**Returns:** None. Player: Spawn The player finishing transmuting.
**Example:** Returns: None.
```lua Example:
-- Example usage
CompleteTransmute(..., ..., ...) -- Example usage (complete the transmuting process after a delay or confirmation)
``` CompleteTransmute(Player)

View File

@ -1,19 +1,16 @@
### Function: CopySpawnAppearance(param1, param2, param3, param4) Function: CopySpawnAppearance(SourceSpawn, TargetSpawn)
**Description:** Description: Copies the appearance (race, gender, outfit, etc.) from one spawn to another. This effectively makes the target look identical to the source. Often used for illusion or clone effects.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: Spawn - The spawn or entity involved.
**Returns:** None. SourceSpawn: Spawn The entity whose appearance to copy.
**Example:** TargetSpawn: Spawn The entity that will receive the appearance.
```lua Returns: None.
-- Example usage
CopySpawnAppearance(..., ..., ..., ...) Example:
```
-- Example usage (make a decoy NPC look like the player)
CopySpawnAppearance(Player, DecoyNPC)

View File

@ -0,0 +1,15 @@
Function: CreateOptionWindow()
Description: Creates a new custom option selection window. This window can hold multiple options (buttons) that the script can present to the player, usually as part of a custom UI or dialogue.
Parameters: None (after creation, use other functions to add options).
Returns: OptionWindow A handle or reference to the newly created option window object.
Example:
-- Example usage (creating an option window with choices)
local window = CreateOptionWindow()
AddOptionWindowOption(window, "Accept Quest", "Do you accept the quest?")
AddOptionWindowOption(window, "Decline Quest", "Maybe later.")
SendOptionWindow(window, Player)

View File

@ -1,16 +1,16 @@
### Function: DeleteDBShardID(param1) Function: DeleteDBShardID(ShardID)
**Description:** Description: Removes the database record for a given spirit shard, effectively deleting the shard (often after its been collected or expired).
Placeholder description.
**Parameters:** Parameters:
- `param1`: int32 - Integer value.
**Returns:** None. ShardID: Int32 The ID of the shard to delete.
**Example:** Returns: Boolean true if a shard record was found and deleted; false if not.
```lua Example:
-- Example usage
DeleteDBShardID(...) -- Example usage (clean up a shard after player retrieves it)
``` if DeleteDBShardID(shardID) then
SendMessage(Player, "You feel whole again as your spirit shard dissipates.", "white")
end

View File

@ -1,18 +1,14 @@
### Function: DismissPet(param1, param2, param3) Function: DismissPet(Spawn)
**Description:** Description: Dismisses (despawns) the specified players active pet. This works for combat pets, cosmetic pets, deity pets, etc., causing them to vanish as if the player dismissed them manually.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The player whose pet should be dismissed.
**Example:** Returns: None.
```lua Example:
-- Example usage
DismissPet(..., ..., ...) -- Example usage (dismissing a pet at the end of an event)
``` DismissPet(Player)

View File

@ -1,19 +1,14 @@
### Function: EndAutoMount(param1, param2, param3, param4) Function: EndAutoMount(Spawn)
**Description:** Description: Dismounts a player who was auto-mounted via StartAutoMount. Typically called at the end of an automated travel route or upon leaving the area where auto-mount is enforced.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The player to dismount.
**Example:** Returns: None.
```lua Example:
-- Example usage
EndAutoMount(..., ..., ..., ...) -- Example usage (dismount the player after griffon flight ends)
``` EndAutoMount(Player)

View File

@ -1,18 +1,20 @@
### Function: GetAlignment(param1, param2, param3) Function: GetAlignment(Player)
**Description:** Description: Returns the alignment of the player character typically Good, Neutral, or Evil in EQ2. Alignment often affects starting city and some quest options.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
**Returns:** None. Player: Spawn The player to query.
**Example:** Returns: Int32 An alignment value (e.g., 0=Neutral, 1=Good, 2=Evil as commonly used).
```lua Example:
-- Example usage
GetAlignment(..., ..., ...) -- Example usage (greet players differently by alignment)
``` if GetAlignment(Player) == 1 then
Say(NPC, "Well met, friend of Qeynos.")
elseif GetAlignment(Player) == 0 then
Say(NPC, "I smell the stench of Freeport on you.")
elseif GetAlignment(Player) == 2 then
Say(NPC, "Neutrality you say?")
end

View File

@ -1,16 +1,17 @@
### Function: GetCharmedPet(param1) Function: GetCharmedPet(Spawn)
**Description:** Description: Returns the NPC that the given player or NPC has charmed, if any. When a player charms an NPC (through a spell), that NPC becomes a pet under their control — this function retrieves it.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
**Returns:** None. Spawn: Spawn The entity (usually a player) who may have a charmed pet.
**Example:** Returns: Spawn The charmed pet NPC if one exists, or nil if there is no active charmed pet.
```lua Example:
-- Example usage
GetCharmedPet(...) -- Example usage (checking if player currently has a charmed creature)
``` local charmed = GetCharmedPet(Player)
if charmed ~= nil then
Say(charmed, "I am under your control...")
end

View File

@ -1,16 +1,16 @@
### Function: GetClientVersion(param1) Function: GetClientVersion(Spawn)
**Description:** Description: Retrieves the game client version of the specified player (useful if the server supports multiple client versions). This can determine differences in available features or UI.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
**Returns:** None. Spawn: Spawn The player whose client version to get.
**Example:** Returns: Int32 The client version number (for example, corresponding to certain expansions or patches).
```lua Example:
-- Example usage
GetClientVersion(...) -- Example usage (check if players client supports a feature)
``` if GetClientVersion(Player) < REQUIRED_CLIENT_VERSION then
SendMessage(Player, "Please update your client for the best experience.", "yellow")
end

View File

@ -1,16 +1,17 @@
### Function: GetCosmeticPet(param1) Function: GetCosmeticPet(Spawn)
**Description:** Description: Returns the cosmetic pet (fun pet) entity of the given player if one is currently summoned.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
**Returns:** None. Spawn: Spawn The player whose cosmetic pet to retrieve.
**Example:** Returns: Spawn The cosmetic pet spawn if active, or nil if the player has no cosmetic pet out.
```lua Example:
-- Example usage
GetCosmeticPet(...) -- Example usage (pet-related quest checking if a particular pet is summoned)
``` local pet = GetCosmeticPet(Player)
if pet ~= nil and GetName(pet) == "Frostfell Elf" then
Say(NPC, "I see you have a festive friend with you!")
end

View File

@ -1,16 +1,16 @@
### Function: GetDeityPet(param1) Function: GetDeityPet(Spawn)
**Description:** Description: Retrieves the deity pet entity belonging to the specified player, if the deity pet is currently summoned.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
**Returns:** None. Spawn: Spawn The player whose deity pet to get.
**Example:** Returns: Spawn The deity pet spawn if it is currently active, or nil if no deity pet is out.
```lua Example:
-- Example usage
GetDeityPet(...) -- Example usage (check for deity pet presence)
``` if GetDeityPet(Player) ~= nil then
SendMessage(Player, "Your deity companion watches over you.", "white")
end

View File

@ -1,17 +1,17 @@
### Function: GetFollowTarget(param1, param2) Function: GetFollowTarget(Spawn)
**Description:** Description: Retrieves the current follow target of a given NPC or pet. If the spawn is following someone, this returns the entity being followed.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The NPC (or players pet) that might be following a target.
**Example:** Returns: Spawn The entity that Spawn is currently following, or nil if its not following anyone.
```lua Example:
-- Example usage
GetFollowTarget(..., ...) -- Example usage (check who an escort NPC is following)
``` local leader = GetFollowTarget(EscortNPC)
if leader == Player then
Say(EscortNPC, "I am right behind you!")
end

View File

@ -1,17 +1,19 @@
### Function: GetGroup(param1, param2) Function: GetGroup(Spawn)
**Description:** Description: Returns the group object that the given spawn (player or NPC) belongs to. This can be used to iterate over group members or to perform group-wide actions.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The entity whose group is requested (typically a Player).
**Example:** Returns: Group A group object or identifier that represents the spawns group. If the spawn is not in a group, this may return nil or an empty group reference.
```lua Example:
-- Example usage
GetGroup(..., ...) -- Example usage (send a message to all members of a player's group)
``` local group = GetGroup(Player)
if group ~= nil then
for _, member in ipairs(GetGroupMembers(group)) do
SendMessage(member, "A teammate has activated the device!")
end
end

View File

@ -1,18 +1,16 @@
### Function: GetHateList(param1, param2, param3) Function: GetHateList(NPC)
**Description:** Description: Returns a list of all spawns currently on the specified NPCs hate (aggro) list. This includes anyone who has attacked or otherwise generated hate on the NPC.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
**Returns:** None. NPC: Spawn The NPC whose hate list to retrieve.
**Example:** Returns: Table A list/array of spawns that the NPC currently hates, typically sorted by hate amount (highest first).
```lua Example:
-- Example usage
GetHateList(..., ..., ...) -- Example usage (apply an effect to all players an epic boss has aggro on)
``` for _, enemy in ipairs(GetHateList(EpicBoss)) do
CastSpell(EpicBoss, AOE_DEBUFF_ID, 1, enemy)
end

View File

@ -1,18 +1,16 @@
### Function: GetInfoStructFloat(param1, param2, param3) Function: GetInfoStructFloat(Spawn, FieldName)
**Description:** Description: Retrieves a floating-point field from a spawns info data. Could be used for precise position, speed multipliers, etc. if stored there.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: string - String value.
**Returns:** None. Spawn: Spawn The entity whose info to check.
**Example:** FieldName: String The name of the float field.
```lua Returns: Float The value of the field.
-- Example usage
GetInfoStructFloat(..., ..., ...) Example:
```
-- Example usage (get an entity's size scale factor)
local scale = GetInfoStructFloat(NPC, "size")

View File

@ -1,18 +1,16 @@
### Function: GetInfoStructSInt(param1, param2, param3) Function: GetInfoStructSInt(Spawn, FieldName)
**Description:** Description: Gets a signed integer field from the spawns info struct. Similar to GetInfoStructUInt but for fields that can be negative.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: string - String value.
**Returns:** None. Spawn: Spawn The entity to query.
**Example:** FieldName: String The field name to retrieve.
```lua Returns: Int32 The value of that field.
-- Example usage
GetInfoStructSInt(..., ..., ...) Example:
```
-- Example usage (get an NPC's faction alignment which could be negative or positive)
local faction = GetInfoStructSInt(NPC, "faction_id")

View File

@ -1,18 +1,16 @@
### Function: GetInfoStructString(param1, param2, param3) Function: GetInfoStructString(Spawn, FieldName)
**Description:** Description: Retrieves a string field from the spawns info data structure. The info struct contains various attributes of a spawn (like name, last name, guild, etc.). FieldName is the identifier of the string field.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: string - String value.
**Returns:** None. Spawn: Spawn The entity to query.
**Example:** FieldName: String The field to retrieve (e.g., "last_name", "guild_name").
```lua Returns: String The value of that field, or an empty string if not set.
-- Example usage
GetInfoStructString(..., ..., ...) Example:
```
-- Example usage (get a player's surname)
local surname = GetInfoStructString(Player, "last_name")

View File

@ -1,18 +1,18 @@
### Function: GetInfoStructUInt(param1, param2, param3) Function: GetInfoStructUInt(Spawn, FieldName)
**Description:** Description: Retrieves an unsigned integer field from a spawns info struct. This can include things like level, model type, gender, etc.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: string - String value.
**Returns:** None. Spawn: Spawn The entity in question.
**Example:** FieldName: String The name of the UInt field to get (e.g., "age", "race_id").
```lua Returns: Int32 The value of the field.
-- Example usage
GetInfoStructUInt(..., ..., ...) Example:
```
-- Example usage (check an NPC's model type for conditional behavior)
if GetInfoStructUInt(NPC, "model_type") == 3 then
-- model_type 3 (maybe indicating a mounted model)
end

View File

@ -1,18 +1,17 @@
### Function: GetMostHated(param1, param2, param3) Function: GetMostHated(NPC)
**Description:** Description: Retrieves the spawn that currently has the highest hate (aggro) on the specified NPCs hate list. This is usually the NPCs current primary target in combat.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
**Returns:** None. NPC: Spawn The NPC whose hate list to examine.
**Example:** Returns: Spawn The entity with top hate on the NPC (often the tank or highest damage dealer), or nil if the NPC has no hate list.
```lua Example:
-- Example usage
GetMostHated(..., ..., ...) -- Example usage (make the boss shout at whoever has top aggro)
``` local topAggro = GetMostHated(BossNPC)
if topAggro ~= nil then
Say(BossNPC, "I will destroy you, " .. GetName(topAggro) .. "!")
end

View File

@ -1,17 +1,14 @@
### Function: GetOrigX(param1, param2) Function: GetOrigX(Spawn)
**Description:** Description: Returns the original X coordinate of the specified spawns spawn point (where it was initially placed in the zone).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The entity to query.
**Example:** Returns: Float The X position of the spawns original location.
```lua Example:
-- Example usage
GetOrigX(..., ...) -- Example usage (see how far an NPC has moved from its spawn point on X axis)
``` local deltaX = math.abs(GetX(NPC) - GetOrigX(NPC))

View File

@ -1,17 +1,14 @@
### Function: GetOrigY(param1, param2) Function: GetOrigY(Spawn)
**Description:** Description: Returns the original Y coordinate (vertical position) of the spawns starting point in the zone.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The entity in question.
**Example:** Returns: Float The Y coordinate of its original spawn location.
```lua Example:
-- Example usage
GetOrigY(..., ...) -- Example usage (for debugging an NPC's elevation change)
``` print("NPC original Y: " .. GetOrigY(NPC) .. ", current Y: " .. GetY(NPC))

View File

@ -1,17 +1,14 @@
### Function: GetOrigZ(param1, param2) Function: GetOrigZ(Spawn)
**Description:** Description: Returns the original Z coordinate of where the spawn was initially placed.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The entity to check.
**Example:** Returns: Float The Z position of the spawns original location.
```lua Example:
-- Example usage
GetOrigZ(..., ...) -- Example usage (calculate how far NPC roamed from spawn point horizontally)
``` local distanceFromSpawn = math.sqrt((GetX(NPC)-GetOrigX(NPC))^2 + (GetZ(NPC)-GetOrigZ(NPC))^2)

View File

@ -1,16 +1,17 @@
### Function: GetPet(param1) Function: GetPet(Spawn)
**Description:** Description: Retrieves the pet entity of the given spawn, if one exists. For players, this returns their current summoned combat pet (summoner or necromancer pet, etc.), or for NPCs, a charmed pet or warder.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
**Returns:** None. Spawn: Spawn The owner whose pet we want to get.
**Example:** Returns: Spawn The pet entity of the owner, or nil if no pet is present.
```lua Example:
-- Example usage
GetPet(...) -- Example usage (command a player's pet to attack if it exists)
``` local pet = GetPet(Player)
if pet ~= nil then
Attack(pet, TargetNPC)
end

View File

@ -1,19 +1,20 @@
### Function: GetPlayerHistory(param1, param2, param3, param4) Function: GetPlayerHistory(Player, HistoryID)
**Description:** Description: Retrieves the value of a specific player history flag. This tells if a player has a certain historical event or choice recorded (and what value it is).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int32 - Integer value.
**Returns:** None. Player: Spawn The player to check.
**Example:** HistoryID: Int32 The history flag ID to retrieve.
```lua Returns: Int32 The value of that history entry for the player (commonly 0 or 1, but could be other integers if used as counters).
-- Example usage
GetPlayerHistory(..., ..., ..., ...) Example:
```
-- Example usage (branch dialog if player has a specific history flag)
if GetPlayerHistory(Player, ALLIED_WITH_GNOLLS_HISTORY_ID) == 1 then
Say(NPC, "Welcome, friend of the Gnolls!")
else
Say(NPC, "Stranger, tread carefully...")
end

View File

@ -1,17 +1,16 @@
### Function: GetPlayersInZone(param1, param2) Function: GetPlayersInZone(Zone)
**Description:** Description: Retrieves a list of all player spawns currently present in the specified zone.
Placeholder description.
**Parameters:** Parameters:
- `param1`: ZoneServer - The zone object.
- `param2`: unknown - Unknown type.
**Returns:** None. Zone: Zone The zone object or context to search in.
**Example:** Returns: Table A list (array) of player Spawn objects in that zone.
```lua Example:
-- Example usage
GetPlayersInZone(..., ...) -- Example usage (announce a message to all players in the zone)
``` for _, player in ipairs(GetPlayersInZone(GetZone(NPC))) do
SendMessage(player, "The dragon roars in the distance!", "red")
end

View File

@ -1,20 +1,19 @@
### Function: GetQuestCompleteCount(param1, param2, param3, param4, param5) Function: GetQuestCompleteCount(Spawn, QuestID)
**Description:** Description: Retrieves how many times the specified player (Spawn) has completed a particular quest (identified by QuestID). For non-repeatable quests this is usually 0 or 1; for repeatable quests it could be higher.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: int32 - Integer value.
**Returns:** None. Spawn: Spawn The player to check.
**Example:** QuestID: Int32 The quest ID to count completions of.
```lua Returns: Int32 The number of times the player has completed that quest.
-- Example usage
GetQuestCompleteCount(..., ..., ..., ..., ...) Example:
```
-- Example usage (give a different dialogue if the player has done a quest multiple times)
local timesDone = GetQuestCompleteCount(Player, 9001)
if timesDone > 0 then
Say(NPC, "Back again? You know the drill.")
end

View File

@ -1,17 +1,15 @@
### Function: GetQuestFlags(param1, param2) Function: GetQuestFlags(Quest)
**Description:** Description: Retrieves the bitwise flags set for a quest. These flags might denote various quest properties (such as hidden, completed, failed, etc.). This is more of an internal function for quest data management.
Placeholder description.
**Parameters:** Parameters:
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
**Returns:** None. Quest: Quest The quest object in question.
**Example:** Returns: Int32 The flags value for the quest.
```lua Example:
-- Example usage
GetQuestFlags(..., ...) -- Example usage (debugging quest state flags)
``` local flags = GetQuestFlags(Quest)
print("Quest flags: " .. flags)

View File

@ -1,17 +1,16 @@
### Function: GetRaceBaseType(param1, param2) Function: GetRaceBaseType(Spawn)
**Description:** Description: Returns the base race category of the spawn, which may be similar to GetRaceType but often refers to an even broader grouping (like “Player” vs “NPC” races or base model types).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The entity to check.
**Example:** Returns: Int32 An identifier for the base race category.
```lua Example:
-- Example usage
GetRaceBaseType(..., ...) -- Example usage (check if a target is a player character or an NPC by base type)
``` if GetRaceBaseType(Target) == BASE_RACE_PLAYER then
Say(NPC, "Greetings, adventurer.")
end

View File

@ -1,17 +1,16 @@
### Function: GetRaceType(param1, param2) Function: GetRaceType(Spawn)
**Description:** Description: Retrieves the race type category ID of the specified spawn. Instead of the specific race (human, elf, etc.), this returns a broader category (e.g., humanoid, animal, etc.).
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
**Returns:** None. Spawn: Spawn The entity whose race type to get.
**Example:** Returns: Int32 The race type ID of the spawn (corresponding to categories in game data).
```lua Example:
-- Example usage
GetRaceType(..., ...) -- Example usage (determine if NPC is animal-type for a charm spell)
``` if GetRaceType(NPC) == RACE_TYPE_ANIMAL then
SendMessage(Player, "This creature can be charmed by your spell.", "white")
end