• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ movement script and function in 1 item

  • Thread starter Thread starter Tibia Demon
  • Start date Start date
T

Tibia Demon

Guest
its right to add item like this or there better way because i need item with script and with items.xml attribute too
XML:
<movevent event="Equip" itemid="xxxx" slot="armor" script="myscript.lua" function="onEquipItem" />
if i add only this it no read items.xml attribute
XML:
<movevent event="Equip" itemid="xxxx" slot="armor" script="myscript.lua"/>
if i add only this it no read my script
XML:
<movevent event="Equip" itemid="xxxx" slot="armor" function="onEquipItem" />
if i add 2 time like this i get error Duplicate move event found: xxxx
XML:
<movevent event="Equip" itemid="xxxx" slot="armor" script="myscript.lua"/>
XML:
<movevent event="Equip" itemid="xxxx" slot="armor" function="onEquipItem" />
 
?
you mean i cant use function and script in 1 item and i need add condition instead of attribute?
<movevent event="Equip" itemid="2036" slot="ring" function="onEquipItem" />
<movevent event="DeEquip" itemid="2036" slot="ring" function="onDeEquipItem" />
onEquipItem
onDeEquipItem
u gey doubel u use 2 >Equip
Equip/DeEquip
2 function to attribute items xml work
I don't know what script you want to add
 
i know how to add item in movements
i ask if its safe to add onEquipItem function and script too in same line
XML:
script="myscript.lua" function="onEquipItem"
 
<movevent event="Equip" itemid="2506" slot="head" function="onEquipItem" script="myscript.lua" />
<movevent event="DeEquip" itemid="2506" slot="head" function="onDeEquipItem" script="myscript.lua" />
test
What will your Script do??
If the text can go to the actions, it would be better if you did not succeed in the movements
i ask if its safe to add onEquipItem function and script too in same line
maybe yes
i'm poor in Lua
 
still need help. myscript.lua only add storage and effect but the item have attributes in items.xml that is why i use this
XML:
script="myscript.lua" function="onEquipItem"
function and script in 1 line to add attributes and script in 1 item. its safe or there is better way because i cant find other scripts using 2
 
Back
Top