1
0

Additional LUA Doc and slash commands

This commit is contained in:
Emagi 2025-05-15 09:50:31 -04:00
parent 9c7c1f317a
commit 7602666b86
10 changed files with 117 additions and 113 deletions

View File

@ -1,17 +1,17 @@
### Function: MakeRandomInt(param1, param2)
Function: MakeRandomInt(Min, Max)
**Description:**
Placeholder description.
Description: Generates a random integer between the specified minimum and maximum values (inclusive).
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
Parameters:
**Returns:** None.
Min: Int32 The minimum value.
**Example:**
Max: Int32 The maximum value.
```lua
-- Example usage
MakeRandomInt(..., ...)
```
Returns: Int32 A random integer N where Min ≤ N ≤ Max.
Example:
-- Example usage (roll a random amount of coin to reward)
local reward = MakeRandomInt(100, 500) -- between 100 and 500 copper
AddCoin(Player, reward)

View File

@ -1,18 +1,14 @@
### Function: OpenDoor(param1, param2, param3)
Function: OpenDoor(DoorSpawn)
**Description:**
Placeholder description.
Description: Opens a door spawn in the world. This will play the doors open animation and typically allow passage. The door remains open until closed by script or by its own auto-close timer if any.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: bool - Boolean value (true/false).
Parameters:
**Returns:** None.
DoorSpawn: Spawn The door object to open (must be a door interactive spawn).
**Example:**
Returns: None.
```lua
-- Example usage
OpenDoor(..., ..., ...)
```
Example:
-- Example usage (open a secret door when puzzle is solved)
OpenDoor(SecretDoor)

View File

@ -1,17 +1,16 @@
### Function: PauseMovement(param1, param2)
Function: PauseMovement(Spawn, DurationMS)
**Description:**
Placeholder description.
Description: Pauses the given NPCs movement for the specified duration (in milliseconds). The NPC will stop moving along waypoints or patrols, and then resume after the pause.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
Parameters:
**Returns:** None.
Spawn: Spawn The NPC to pause.
**Example:**
DurationMS: Int32 How long to pause movement, in milliseconds.
```lua
-- Example usage
PauseMovement(..., ...)
```
Returns: None.
Example:
-- Example usage (stop a guard for 5 seconds when hailed)
PauseMovement(GuardNPC, 5000)

View File

@ -1,17 +1,16 @@
### Function: SetInvulnerable(param1, param2)
Function: SetInvulnerable(Spawn, Enable)
**Description:**
Placeholder description.
Description: Toggles an entitys invulnerability. When set to true, the spawn will not take damage from any source.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: bool - Boolean value (true/false).
Parameters:
**Returns:** None.
Spawn: Spawn The entity to modify.
**Example:**
Enable: Boolean true to make invulnerable; false to remove invulnerability.
```lua
-- Example usage
SetInvulnerable(..., ...)
```
Returns: None.
Example:
-- Example usage (make an NPC invulnerable during a dialogue scene)
SetInvulnerable(QuestNPC, true)

View File

@ -1,21 +1,16 @@
### Function: SetPlayerLevel(param1, param2, param3, param4, param5, param6)
Function: SetPlayerLevel(Player, Level)
**Description:**
Placeholder description.
Description: Sets the players adventure level to the specified value. This is an administrative function (normally level changes by experience gain), allowing GM or script to directly change level.
**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`: int8 - Small integer or boolean flag.
Parameters:
**Returns:** None.
Player: Spawn The player whose level to change.
**Example:**
Level: Int32 The new level to set.
```lua
-- Example usage
SetPlayerLevel(..., ..., ..., ..., ..., ...)
```
Returns: None.
Example:
-- Example usage (GM tool leveling a player to 50)
SetPlayerLevel(Player, 50)

View File

@ -1,27 +1,16 @@
### Function: SetSeeHide(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12)
Function: SetSeeHide(Spawn, Enable)
**Description:**
Placeholder description.
Description: Toggles an NPCs ability to see hidden/stealthed entities on or off. “Hide” usually refers to stealth as opposed to magical invisibility.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved.
- `param3`: Spawn - The spawn or entity involved.
- `param4`: Spawn - The spawn or entity involved.
- `param5`: int8 - Small integer or boolean flag.
- `param6`: Spawn - The spawn or entity involved.
- `param7`: int32 - Integer value.
- `param8`: string - String value.
- `param9`: string - String value.
- `param10`: string - String value.
- `param11`: int8 - Small integer or boolean flag.
- `param12`: int8 - Small integer or boolean flag.
Parameters:
**Returns:** None.
Spawn: Spawn The NPC in question.
**Example:**
Enable: Boolean true to grant see-stealth; false to remove it.
```lua
-- Example usage
SetSeeHide(..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...)
```
Returns: None.
Example:
-- Example usage (guards become alert and can see stealth during an alarm event)
SetSeeHide(GuardNPC, true)

View File

@ -1,17 +1,16 @@
### Function: SetSeeInvis(param1, param2)
Function: SetSeeInvis(Spawn, Enable)
**Description:**
Placeholder description.
Description: Toggles an NPCs ability to see invisible on or off.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int8 - Small integer or boolean flag.
Parameters:
**Returns:** None.
Spawn: Spawn The NPC whose invis detection to set.
**Example:**
Enable: Boolean true to grant see-invis; false to revoke it.
```lua
-- Example usage
SetSeeInvis(..., ...)
```
Returns: None.
Example:
-- Example usage (temporarily allow a boss to see invis during a phase)
SetSeeInvis(BossNPC, true)

View File

@ -1,19 +1,17 @@
### Function: SetTarget(param1, param2, param3, param4)
Function: SetTarget(Originator, Target)
**Description:**
Placeholder description.
Description: Forces one spawn (Originator) to target another (Target). This can make an NPC switch targets mid-combat or cause a players target to change under certain conditions.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: Spawn - The spawn or entity involved.
Parameters:
**Returns:** None.
Originator: Spawn The entity whose target will be changed.
**Example:**
Target: Spawn The entity to set as the new target.
```lua
-- Example usage
SetTarget(..., ..., ..., ...)
```
Returns: None.
Example:
-- Example usage (boss switches target to a healer)
SetTarget(BossNPC, HealerNPC)
SetInfoFlag(BossNPC) -- assures we send the changes out immediately versus waiting for process loop

View File

@ -0,0 +1,13 @@
### Command: /invite name
**Handler Macro:** COMMAND_GROUPINVITE
**Handler Value:** 15
**Required Status:** 0
**Arguments:**
- `arg[0]`: `string name`
**Notes:**
- Invites a target player to group or otherwise uses the `name` argument to invite a character of the name.

View File

@ -0,0 +1,16 @@
### Command: /invulnerable val
**Handler Macro:** COMMAND_INVULNERABLE
**Handler Value:** 93
**Required Status:** 10
**Arguments:**
- `arg[0]`: `int val`
**Usage Examples:**
- `/invulnerable [0/1]");`
**Notes:**
- GM Command to make you invulnerable to damage physical and atmospheric.