LucasFerraz
Systems Analyst
I made this lever of Banshee Quest, why this 'addevent' don't works?
LUA:
function onUse(cid, item, frompos, item2, topos)
pausa = 10
pausa1 = 11
wall0 = {x=32259, y=31891, z=10, stackpos=1}
getwall0 = getThingfromPos(wall0)
wall1 = {x=32259, y=31890, z=10, stackpos=1}
getwall1 = getThingfromPos(wall1)
if item.itemid == 1945 and getwall0.itemid == 1498 then
doRemoveItem(getwall0.uid,1)
doTransformItem(item.uid,1946)
addEvent(wait1,pausa,getwall0pos)
addEvent(wait1,pausa1,getwall1pos)
elseif item.itemid == 1946 then
doTransformItem(item.uid,1945)
end
return 0
end