Hooks hooks
Part of RolePlay Commands
Hooks called by RolePlay Commands
Summary
Hooks
roll command, for example to add a situational bonus.Hooks
No documentation available.
Arguments
actortextteam_chat
Called from
Call sites
No documentation available.
Arguments
actortextteam_chat
Called from
Call sites
No documentation available.
Arguments
actortextteam_chat
Called from
Call sites
Lets plugins replace the name a player is shown under in the local OOC chat, for example to keep the members of a faction anonymous. Called on the server for every message a player sends to the LOOC chat; by default the line shows the name of the player's character.
Parameters
- actor Player the player who writes
Returns
- String the name to show instead
Called from
Call sites
Lets plugins adjust a roll made with the roll command, for example to add a
situational bonus. Called on the server once for every roll: once for a plain roll, and
for a versus roll once for the player who ran the command and once for their opponent.
Every handler can change the roll, so return nothing.
Parameters
- roller Player the player the roll is for
- roll_data Map the roll: result (Map the result of
Dice.roll; change its total in place, a total that is not a number is put back), formula (String the formula that was rolled, or the ID of the stat or the skill) and opponent (Player the other player of a versus roll, nil for a plain roll)
Called from
adjust_roll
Call sites
Decides whether a player may say something in character. Called on the server for
every phrase that is about to become in character speech or an action, which includes
the me, whisper and yell commands; out of character chat does not ask it.
Parameters
- actor Player the speaker
- text String the phrase as it was typed, with its markup:
*action*,(whisper)andyell!!
Returns
- Boolean return false to refuse the phrase (the handler should tell the player why), true to allow it even for a dead or knocked out player. When nothing is returned, players who are dead or knocked out are refused
Called from
Call sites
Decides whether a player may use the out of character chats. Called on the server before a message is sent to the OOC or the LOOC chat, ahead of the cooldown check. The plugin's own handler refuses players with an OOC mute, who are told how long it still lasts; any other handler that refuses should tell the player why.
Parameters
- actor Player the player who writes
- kind String 'ooc' for the chat that everyone reads, 'looc' for the local one
- text String the message without its prefix
Returns
- Boolean return false to refuse the message