📓
TFS Guide
  • Preface
  • Progress
  • Unique TFS Concepts
  • Interface - Actions
    • Registration
    • Scripting
    • Revscriptsys
  • Interface - Chatchannels
    • Registration
    • Scripting
  • Interface - Creaturescripts
    • Registration
    • Scripting
    • Revscriptsys
  • Interface - Events
    • Registration
    • Scripting
  • Interface - Globalevents
    • Registration
    • Scripting
    • Revscriptsys
  • Interface - Monster
    • Registration
    • Scripting
    • Revscriptsys
  • Interface - Movements
    • Registration
    • Scripting
    • Revscriptsys
  • Interface - NPC
    • Registration
    • Scripting
  • Interface - Spells
    • Registration
    • Scripting
  • Interface - Talkactions
    • Registration
    • Scripting
  • Interface - Weapons
    • Registration
    • Scripting
  • Source Editing
    • Creating new events
    • Creating new Lua functions
  • Function Documentation
    • Game
Powered by GitBook
On this page
  • Structure
  • Examples

Was this helpful?

  1. Interface - Movements

Registration

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)

  • position: Position where the move event will be triggered.

  • level: Level restriction to equip the item.

  • maglevel: Magic level restriction to equip the item.

  • premium: Premium restriction to equip the item (1 for true, 0 for false).

  • vocation: Vocation restriction to equip the item.

  • name: Vocation name

    showInDescription: If 1, the vocation's name will show in the item description, otherwise if 0, it will not.

  • slot: Slot restriction to equip the item to.

  • head

    armor

    legs

    feet

    ring

    ammo

    left

    right

    backpack

    necklace

  • event: Type of event to handle.

  • EquipItem

    DeEquipItem

    StepIn

    StepOut

    AddItem

    RemoveItem

  • function: Default c++ function to execute:

  • onEquipItem

    onDeEquipItem

    onStepInField

    onStepOutField

    onAddField

    onRemoveField

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

Examples

<movement event="StepIn" itemid="1234" script="1234_stepin.lua" />

<movement event="StepOut" itemid="1234" script="1234_stepout.lua" />
PreviousRevscriptsysNextScripting

Last updated 5 years ago

Was this helpful?