• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Item infinite and the same id with decay time

silveralol

Advanced OT User
Joined
Mar 16, 2010
Messages
1,484
Solutions
9
Reaction score
217
Hello folks, I'm with an idea, I need create a infinite version of an item and with the same id I need create with timer ... with movement script to handle with the skills attr...
exemple:
when you equip the item ID (1000) it will transform into item ID (2000)
the item ID (2000) has two types, one infinite that will never decay and a version with timer, how I can handle with decay time with that ?
my first idea is just use some name to check if the item is infinite or not
item ID (2000) infinite
Code:
you see a weapon (infinite)
item ID (2000) with decay time
Code:
you see a weapon, that will expire in 3 hours and 59 minutes.
also, how I can use a movement tag with script equip dequip
Code:
<movevent event="Equip" itemid="2000"  slot="ring" function="onEquipItem" />
<movevent event="DeEquip" itemid="2000" slot="ring" function="onDeEquipItem" />
also I need an exemple of the lua script with the correct usage of the tag
sorry for my bad english, I'm trying do my best
 
bump... I have an idea, I will make it in the sources...
in every
Code:
item->startDecaying();
but I need check if in the name contains the words "infinite" how I make it in c++ ?
Code:
if (string.find(infinite)) {
 ---
};
of course, this code don't work, I don't know how put it in c++ files ...
so, if someone can help me, i'll be happy
 
Back
Top