The attribute staff command works with the attributes of the targeted players'
characters: /attribute set <player> <attribute> <value> sets the level of an attribute,
/attribute boost <player> <attribute> <value> <duration> gives a boost of that many levels
for a duration such as 30 (minutes) or 2 hours, or until it is removed with a duration
such as perma, /attribute clearboosts <player> [attribute] removes the boosts of one
attribute or of all of them, and /attribute list <player> shows the caller every
attribute, with its level and boosts, and every skill, with its rank, hidden ones included:
a player gets them in a window, the server console as lines of text. The attribute is typed
as its ID. Listing needs the 'attribute_list' permission, the other subcommands the
'attribute' one.
Summary
Subcommands
Subcommands
Returns the translated description with every registered attribute ID listed.
Returns
- String
boost:on_run(actor, targets, attribute_text, value, duration)
shared plugins/stats/plugin/commands/sh_attribute.lua:104Gives every target a boost to an attribute, then notifies the targets and staff. A duration of 0 gives a boost that does not expire. Rejects invalid values, durations and attributes that are not boostable.
Parameters
- actor Player the player who ran the command
- targets List<Player> players matched by the first command argument
- attribute_text String ID of the attribute to boost
- value String number of levels to add, parsed with tonumber
- duration String boost length as read by Bolt:interpret_ban_time, e.g. '30' (minutes), '2 hours' or 'perma'
Returns the translated description with every registered attribute ID listed.
Returns
- String
clearboosts:on_run(actor, targets, attribute_text)
shared plugins/stats/plugin/commands/sh_attribute.lua:166Removes the boosts of one attribute, or of every attribute, from every target, then notifies staff and the targets that lost any.
Parameters
- actor Player the player who ran the command, or an invalid entity for the console
- targets List<Player> players matched by the first command argument
- attribute_text String optional, defaults to
nilID of the attribute to clear; every attribute if omitted
Sends the attributes and skills of the target's character to the caller, or prints them when the command is run from the server console.
Parameters
- actor Player the player who ran the command, or an invalid entity for the console
- targets List<Player> matched players; only the first one is used
Returns the translated description with every registered attribute ID listed.
Returns
- String
set:on_run(actor, targets, attribute_text, value)
shared plugins/stats/plugin/commands/sh_attribute.lua:51Sets the level of an attribute for every target, then notifies the targets and staff.
Parameters
- actor Player the player who ran the command
- targets List<Player> players matched by the first command argument
- attribute_text String ID of the attribute to set
- value String new level, parsed with tonumber