Erikas Kontenis
Excellent OT User
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local gatePosition = {x=1107, y=846, z=7, stackpos=1}
local getGate = getThingFromPos(gatePosition)
if(item.uid == 5005) then
if(item.itemid == 1945 and getGate.itemid == 1546) then
doRemoveItem(getGate.uid, 1)
doTransformItem(item.uid, item.itemid+1)
addEvent(onTimer4, 1*60*1000)
elseif(item.itemid == 1946 and getGate.itemid == 0) then
doTransformItem(item.uid, item.itemid-1)
doCreateItem(1546, 1, gatePosition)
else
doPlayerSendCancel(cid, "Sorry not possible.")
end
end
return 1
end
function onTimer4()
wallnewpos = {x=1107, y=846, z=7}
doCreateItem(1546,1,wallnewpos)
end
Can Someone Can Just Try TO Fix it? Its a easy script i know but im just learning a lua