rafaeru
Active Member
Hello, i use TFS 0.3.6 and i cant get the idea for increment action id of item by item.
The problem is itemEx is taked only on first loop on script.
Ex. I have 20 items ( this item increment action id ) in stack and 1 item with aid = 200 ( armor ) when i use 20 items in to armor i get armor with aid = 201 instead 220.
EDIT: SOLVED
The problem is itemEx is taked only on first loop on script.
Ex. I have 20 items ( this item increment action id ) in stack and 1 item with aid = 200 ( armor ) when i use 20 items in to armor i get armor with aid = 201 instead 220.
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = item.type, 1, -1
do
level = itemEx.actionid
doItemSetAttribute(itemEx.uid, "aid", level+1)
end
return true
end
EDIT: SOLVED
Last edited: