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:** Description: Generates a random integer between the specified minimum and maximum values (inclusive).
Placeholder description.
**Parameters:** Parameters:
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
**Returns:** None. Min: Int32 The minimum value.
**Example:** Max: Int32 The maximum value.
```lua Returns: Int32 A random integer N where Min ≤ N ≤ Max.
-- Example usage
MakeRandomInt(..., ...) 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:** 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.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: bool - Boolean value (true/false).
**Returns:** None. DoorSpawn: Spawn The door object to open (must be a door interactive spawn).
**Example:** Returns: None.
```lua Example:
-- Example usage
OpenDoor(..., ..., ...) -- 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:** 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.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
**Returns:** None. Spawn: Spawn The NPC to pause.
**Example:** DurationMS: Int32 How long to pause movement, in milliseconds.
```lua Returns: None.
-- Example usage
PauseMovement(..., ...) 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:** Description: Toggles an entitys invulnerability. When set to true, the spawn will not take damage from any source.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: bool - Boolean value (true/false).
**Returns:** None. Spawn: Spawn The entity to modify.
**Example:** Enable: Boolean true to make invulnerable; false to remove invulnerability.
```lua Returns: None.
-- Example usage
SetInvulnerable(..., ...) 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:** 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.
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`: int8 - Small integer or boolean flag.
**Returns:** None. Player: Spawn The player whose level to change.
**Example:** Level: Int32 The new level to set.
```lua Returns: None.
-- Example usage
SetPlayerLevel(..., ..., ..., ..., ..., ...) 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:** Description: Toggles an NPCs ability to see hidden/stealthed entities on or off. “Hide” usually refers to stealth as opposed to magical invisibility.
Placeholder description.
**Parameters:** 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.
**Returns:** None. Spawn: Spawn The NPC in question.
**Example:** Enable: Boolean true to grant see-stealth; false to remove it.
```lua Returns: None.
-- Example usage
SetSeeHide(..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...) 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:** Description: Toggles an NPCs ability to see invisible on or off.
Placeholder description.
**Parameters:** Parameters:
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int8 - Small integer or boolean flag.
**Returns:** None. Spawn: Spawn The NPC whose invis detection to set.
**Example:** Enable: Boolean true to grant see-invis; false to revoke it.
```lua Returns: None.
-- Example usage
SetSeeInvis(..., ...) 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:** 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.
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. Originator: Spawn The entity whose target will be changed.
**Example:** Target: Spawn The entity to set as the new target.
```lua Returns: None.
-- Example usage
SetTarget(..., ..., ..., ...) 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.