Registration

File Location: data/actions/actions.xml

Structure

  • itemid: Number containing the item id to register the script to.

  • uniqueid: A single unique id to register the script to.

  • actionid: An action id to register the script to, will affect all items containing the defined action id in-game.

  • fromid ; toid: Range of item ids to register the script to (both inclusive values)

  • fromuid ; touid: Range of unique ids to register the script to (both inclusive values)

  • fromaid ; toaid: Range of action ids to register the script to (both inclusive values)

  • allowfaruse: Values (1 or 0), if 1, allows the item to be used anywhere on the screen, rather than 1sqm, otherwise, sends an error message to the player (You are too far away.).

  • Default: false (0)

  • blockwalls: Values (1 or 0), if 1, runs a check if there are any walls blocking the path to the target before executing, if there is, it sends an error message to the player (You cannot throw there.).

  • Default: true (1)

  • checkfloor: Values (1 or 0), if 1, checks if the target is on a different floor and sends an error message depending on the floor level in relation to the player (You must first go upstairs/downstairs.)

  • Default: true (1)

  • script: Lua script file name & location (base directory is data/actions/scripts)

Examples

<!-- Register item id 1234 to example.lua -->
<action itemid="1234" script="example.lua" />

<!-- Register item ids from 1234 to 1337 to example.lua -->
<action fromid="1234" toid="1337" script="example.lua" />

<!-- Register unique id 1000 to example.lua -->
<action uniqueid="1000" script="example.lua" />

<!-- Register unique ids from 1000 to 1500 to example.lua -->
<action fromuid="1000" touid="1500" script="example.lua" />

<!-- Register action id 1000 to example.lua -->
<action actionid="1000" script="example.lua" />

<!-- Register action ids from 1000 to 1500 to example.lua -->
<action fromaid="1000" toaid="1500" script="example.lua" />

Last updated