FutureProg functions

setmagicresource

Magiccomputer function, computer program, standard futureprog

Overload 1

setmagicresource overload 1

Number setmagicresource(MagicResourceHaver thing, Number resourceId, Number amount)
Available in
  • computer function
  • computer program
  • standard futureprog
Sets the specified magic resource on a character, item, or room and returns the resulting clamped amount.
ParameterTypeDescription
thing MagicResourceHaver The character, item, or room whose magic resource level should be altered
resourceId Number The id of the magic resource to alter
amount Number The amount to set, add, or subtract

Overload 2

setmagicresource overload 2

Number setmagicresource(MagicResourceHaver thing, Text resource, Number amount)
Available in
  • computer function
  • computer program
  • standard futureprog
Sets the specified magic resource on a character, item, or room and returns the resulting clamped amount.
ParameterTypeDescription
thing MagicResourceHaver The character, item, or room whose magic resource level should be altered
resource Text The name or id of the magic resource to alter
amount Number The amount to set, add, or subtract