I have 2 scripts (2 levers) and I want 16 (identical to real), the last lever will remover 2 stones and after 30 minutes the stones will reappear.
I want it in a way that all levers will stay in one script.
here's one script:
second one..
Of course I'll rep the helper
Thanks!
I want it in a way that all levers will stay in one script.
here's one script:
LUA:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 3001 and item.itemid == 1945 then
doPlayerSay(cid, "You flipped the first lever. Hurry up and find the next one.", 16)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 3001 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
doDecayItem(item.uid)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
second one..
LUA:
function onUse(cid, item, frompos, item2, topos)
dzwignia1_pos = {x=1338, y=1234, z=12, stackpos=1}
dzwignia1 = getThingfromPos(dzwignia1_pos)
if item.uid == 3002 and item.itemid == 1945 and dzwignia1.itemid == 1946 then
doPlayerSay(cid, "You flipped the second lever. Hurry up and find the next one.", 16)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 3002 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
Of course I'll rep the helper
Thanks!