Additional LUA function docs
This commit is contained in:
parent
804f9c3103
commit
7427396a02
16
docs/lua_functions/RemovePrimaryEntityCommand.md
Normal file
16
docs/lua_functions/RemovePrimaryEntityCommand.md
Normal file
@ -0,0 +1,16 @@
|
||||
Function: RemovePrimaryEntityCommand(Spawn, CommandString)
|
||||
|
||||
Description: Removes a previously added primary entity command from the specified spawn entirely. Players will no longer see that option when interacting with the spawn.
|
||||
|
||||
Parameters:
|
||||
|
||||
Spawn: Spawn – The entity from which to remove the command.
|
||||
|
||||
CommandString: String – The name of the command to remove.
|
||||
|
||||
Returns: None.
|
||||
|
||||
Example:
|
||||
|
||||
-- Example usage (Remove hail from command list)
|
||||
RemovePrimaryEntityCommand(QuestNPC, "hail")
|
@ -1,18 +1,14 @@
|
||||
### Function: ResetCharacterTitlePrefix(param1, param2, param3)
|
||||
Function: ResetCharacterTitlePrefix(Player)
|
||||
|
||||
**Description:**
|
||||
Placeholder description.
|
||||
Description: Clears the player’s current prefix title, so no prefix is shown before their name.
|
||||
|
||||
**Parameters:**
|
||||
- `param1`: Spawn - The spawn or entity involved.
|
||||
- `param2`: unknown - Unknown type.
|
||||
- `param3`: unknown - Unknown type.
|
||||
Parameters:
|
||||
|
||||
**Returns:** None.
|
||||
Player: Spawn – The player whose prefix to clear.
|
||||
|
||||
**Example:**
|
||||
Returns: None.
|
||||
|
||||
```lua
|
||||
-- Example usage
|
||||
ResetCharacterTitlePrefix(..., ..., ...)
|
||||
```
|
||||
Example:
|
||||
|
||||
-- Example usage (player relinquishes a bestowed noble title)
|
||||
ResetCharacterTitlePrefix(Player)
|
@ -1,18 +1,14 @@
|
||||
### Function: ResetCharacterTitleSuffix(param1, param2, param3)
|
||||
Function: ResetCharacterTitleSuffix(Player)
|
||||
|
||||
**Description:**
|
||||
Placeholder description.
|
||||
Description: Removes any suffix title currently displayed on the player, resetting it to none.
|
||||
|
||||
**Parameters:**
|
||||
- `param1`: Spawn - The spawn or entity involved.
|
||||
- `param2`: unknown - Unknown type.
|
||||
- `param3`: unknown - Unknown type.
|
||||
Parameters:
|
||||
|
||||
**Returns:** None.
|
||||
Player: Spawn – The player whose suffix title to clear.
|
||||
|
||||
**Example:**
|
||||
Returns: None.
|
||||
|
||||
```lua
|
||||
-- Example usage
|
||||
ResetCharacterTitleSuffix(..., ..., ...)
|
||||
```
|
||||
Example:
|
||||
|
||||
-- Example usage (player chooses to hide their suffix title)
|
||||
ResetCharacterTitleSuffix(Player)
|
@ -1,19 +1,20 @@
|
||||
### Function: SendUpdateDefaultCommand(param1, param2, param3, param4)
|
||||
Function: SendUpdateDefaultCommand(Spawn, Distance, CommandString, Player)
|
||||
|
||||
**Description:**
|
||||
Placeholder description.
|
||||
Description: Updates the default highlighted command for an entity, as seen on hover or target window. This is often used after changing accessible commands to ensure the correct default action (usually the first allowed command) is highlighted.
|
||||
|
||||
**Parameters:**
|
||||
- `param1`: Spawn - The spawn or entity involved.
|
||||
- `param2`: float - Floating point value.
|
||||
- `param3`: string - String value.
|
||||
- `param4`: Spawn - The spawn or entity involved.
|
||||
Parameters:
|
||||
|
||||
**Returns:** None.
|
||||
Spawn: Spawn – The entity to update.
|
||||
|
||||
**Example:**
|
||||
Distance: Float – The maximum distance the command can be used.
|
||||
|
||||
```lua
|
||||
-- Example usage
|
||||
SendUpdateDefaultCommand(..., ..., ..., ...)
|
||||
```
|
||||
CommandString: String – The command to provide access.
|
||||
|
||||
Player: Spawn – The player whom has access to the command (optional to specify a specific Player).
|
||||
|
||||
Returns: None.
|
||||
|
||||
Example:
|
||||
|
||||
-- Example usage (after toggling commands on an NPC, refresh its default action)
|
||||
SendUpdateDefaultCommand(NPC, 10.0, "hail")
|
20
docs/lua_functions/SetAccessToEntityCommand.md
Normal file
20
docs/lua_functions/SetAccessToEntityCommand.md
Normal file
@ -0,0 +1,20 @@
|
||||
Function: SetAccessToEntityCommand(Spawn, Player, CommandString, Allowed)
|
||||
|
||||
Description: Controls whether a particular primary entity command (right-click option) is enabled for a given spawn. You can use this to enable or disable specific interactions dynamically.
|
||||
|
||||
Parameters:
|
||||
|
||||
Spawn: Spawn – The entity whose command access to modify.
|
||||
|
||||
Player: Spawn – The Player who will receive access to the command.
|
||||
|
||||
CommandString: String – The name of the command (same as used in AddPrimaryEntityCommand).
|
||||
|
||||
Allowed: UInt8 – `1` to allow players to use this command on the spawn; `0` to remove it.
|
||||
|
||||
Returns: Return's true if successfully adding access to the entity command.
|
||||
|
||||
Example:
|
||||
|
||||
-- Example usage (disable the 'Buy' option on a merchant after shop closes)
|
||||
SetAccessToEntityCommand(MerchantNPC, "Buy", 0)
|
20
docs/lua_functions/SetAccessToEntityCommandByCharID.md
Normal file
20
docs/lua_functions/SetAccessToEntityCommandByCharID.md
Normal file
@ -0,0 +1,20 @@
|
||||
Function: SetAccessToEntityCommandByCharID(Spawn, CharID, CommandString, Allowed)
|
||||
|
||||
Description: Similar to SetAccessToEntityCommand, but targets a specific player (by character ID) and spawn. It toggles a command’s availability for that one player on the given spawn.
|
||||
|
||||
Parameters:
|
||||
|
||||
Spawn: Spawn – The entity offering the command.
|
||||
|
||||
CharID: Int32 – The character ID of the player whose access to adjust.
|
||||
|
||||
CommandString: String – The command name.
|
||||
|
||||
Allowed: UInt8 – `1` to allow that player to use the command; `0` to deny them.
|
||||
|
||||
Returns: If successful at setting permission to the entity command, function return's true.
|
||||
|
||||
Example:
|
||||
|
||||
-- Example usage (allow only a specific player to use a secret door’s “Open” command)
|
||||
SetAccessToEntityCommandByCharID(SecretDoor, PlayerCharID, "Open", 1)
|
Loading…
x
Reference in New Issue
Block a user