Why isn't this working?
What i want this to do is to:
o,x,z,t,z,o
o,c,z,d,z,o
x= lever
t= teleport
d= stone that will be removed
c= position of corpse
The one who helps me will have som REP++ waiting for 'em.
(I'm using TFS 0.3.5)
PHP:
function onUse(cid, item, frompos, item2, topos)
local gatepos = {x=(item.x+2), y=(item.y+1), z=(item.z), stackpos=1}
local corpsepos = {x=(item.x), y=(item.y+1), z=(item.z), stackpos=1}
local newstone = 0
local getgate = getThingfromPos(gatepos)
local getcorpse = getThingfromPos(corpsepos)
if(item.actionid == 13000) then
if(item.itemid == 1945 and getcorpse.itemid == 5527) then
doRemoveItem(getcorpse.uid, 1)
doRemoveItem(getgate.uid, 1)
doTransformItem(item.uid, 1946)
newstone = addEvent(recreateStone, 1000*30, {pos = gatepos})
elseif(item.itemid == 1946) then
doTransformItem(item.uid, 1945)
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end
function recreateStone(param)
doCreateItem(1285, 1, param.pos)
newstone = 0
end
What i want this to do is to:
o,x,z,t,z,o
o,c,z,d,z,o
x= lever
t= teleport
d= stone that will be removed
c= position of corpse
The one who helps me will have som REP++ waiting for 'em.
(I'm using TFS 0.3.5)