• 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!

Need some help with a script.

Aauron

Hueón.
Joined
Mar 8, 2009
Messages
21
Reaction score
0
Hi, I need some help with this..
I dont know if I will explain it very well (cuz im spain), but i'll try.

Code:
local stonepos = {x=1606, y=1559, z=9, stackpos=1} 
function onUse(cid, item, fromPos, item2, toPos)
    if item.itemid == 1945 then 
        doRemoveItem(getThingfromPos(stonepos).uid, 1)
        doTransformItem(item.uid,1946)   
        addEvent(onTimer5, 10) 
    end
return true
end

function onTimer5() --creates wall back
    doTransformItem(getThingFromPos({x=1599, y=1559, z=9, stackpos=1}).uid, 1945)
    doCreateItem(1304,1,{x=1606, y=1559, z=9})-- Stone pos
end

the script makes dissapear a stone when u use a lever, and after a time, stone and lever gets back to normal status
the problem? the turnback of lever and stone isn't working.

pd. if someone fix it, i would like to make it delay 6 seconds of pull the lever and turnback the stone.
like addEvent(onTimer5, (6 seconds))


i'll wait for some help,
ty a lot.
 
Last edited:
I used this now:

Code:
local stonepos = {x=1606, y=1559, z=9, stackpos=1} 
function onUse(cid, item, fromPos, item2, toPos)
if item.itemid == 1945 then 
doRemoveItem(getThingfromPos(stonepos).uid, 1)
doTransformItem(item.uid,1946) 
addEvent(onTimer5, 4*1000) 
end
return true
end

function onTimer5() --creates wall back
doTransformItem(getThingFromPos({x=1599, y=1559, z=9, stackpos=1}).uid, 1945)
doCreateItem(1304,1,{x=1606, y=1559, z=9})-- Stone pos
end

but I have this error after 4 segs.

zxfczx.png
 
Code:
local stonepos = {x=1606, y=1559, z=9, stackpos=1} 
function onUse(cid, item, fromPos, item2, toPos)
if item.itemid == 1945 then 
doRemoveItem(getThingfromPos(stonepos).uid, 1)
doTransformItem(item.uid,1946) 
addEvent(onTimer5, 6*1000) 
end
return true
end

function onTimer5() --creates wall back
doTransformItem([COLOR="#0000FF"]UNIQUE ID OF LEVER HERE[/COLOR], 1945)
doCreateItem(1304,1,{x=1606, y=1559, z=9})-- Stone pos
end
 
Back
Top