E
Evil Puncker
Guest
svoled
Last edited by a moderator:
how does it even know which lever itsbeing used by?
dont you need like if item.uid == xxxx ?
local e = 0
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
doRemoveItem(getTileItemById({x=195, y=99, z=11}, 1353).uid)
e = addEvent(doCreateItem, 60000, 1353, 1, {x=747, y=1043, z=7})
else
stopEvent(e)
e = 0
doCreateItem(1353, 1, {x=195, y=99, z=11})
end
return 1, doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
return 1
function onUse(cid, item, fromPosition, itemEx, toPosition)
local wallchk = getTileItemById({x=195, y=99, z=11}, 1353).uid
if item.itemid == 1945 and wallchk > 0 then
doRemoveItem(wallchk)
doTransformItem(item.uid, 1946)
addEvent(doCreateItem, 5 * 60 * 1000, 1353, 1,{x=195, y=99, z=11})
elseif item.itemid == 1946 then
doTransformItem(item.uid, 1945)
else
doPlayerSendCancel(cid, 'XXXXXXWRITEXXXXXX.')
end
return true
end
<action uniqueid="lever-uniqueid" script="scriptname.lua" />
Maybe wrong pos :/ check pls@up
don't work, don't even remove the stone =/
already did it, right position =/Maybe wrong pos :/ check pls