Code:
function eventual(cid, item, wallpos)
doCreateItem(3139,1,wallpos[1])
doTransformItem(item.uid,item.itemid-2730)
end
function onUse(cid, item, frompos, item2, topos)
wallpos = {
{x=1313, y=964, z=7, stackpos=1}
}
getwalls = {
getThingfromPos(wall1)
}
if item.uid == 7002 and item.itemid == 2060 then
doRemoveItem(getwalls[1].uid,1)
doTransformItem(item.uid,item.itemid+2730)
doCreatureSay(cid, "You just opened a secret passage!", TALKTYPE_ORANGE_1)
addEvent(eventual, 10000, cid, item, wallpos)
elseif item.uid == 7002 and item.itemid == 2061 then
doPlayerSendCancel(cid,"You can't use this yet.")
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
I'm trying to make a "down stair tile" every-time a player pulls the the torch on the wall.