Hello!
I've been trying to get this to work without no results, my lua skills is simply not enough. So I turn to you, the professionals!
What I want is a lever which will remove 2 walls when being pulled. That's exactly what the script does, but I'd like to add a time-limit to it, so it goes back to its standard position after 10 seconds (both the lever and the walls).
If you manage to help me, I'll gladly give you reputation points!
And talking about reputation, thanks apsivaflines for the script in the first place. Now only thing left is for someone to advance it.
Thanks in advance!
Chrippe
I've been trying to get this to work without no results, my lua skills is simply not enough. So I turn to you, the professionals!
What I want is a lever which will remove 2 walls when being pulled. That's exactly what the script does, but I'd like to add a time-limit to it, so it goes back to its standard position after 10 seconds (both the lever and the walls).
LUA:
function onUse(cid, item, frompos, item2, topos)
wall1 = {x=505, y=598, z=8, stackpos=1}
wall2 = {x=505, y=599, z=8, stackpos=1}
getwall1 = getThingfromPos(wall1)
getwall2 = getThingfromPos(wall2)
if item.uid == 7002 and item.itemid == 1945 then
doRemoveItem(getwall1.uid,1)
doRemoveItem(getwall2.uid,1)
doTransformItem(item.uid,item.itemid+1)
doCreatureSay(cid, "You just opened a secret passage!", TALKTYPE_ORANGE_1)
elseif item.uid == 7002 and item.itemid == 1946 then
doCreateItem(1025,1,wall1)
doCreateItem(1025,1,wall2)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
If you manage to help me, I'll gladly give you reputation points!
And talking about reputation, thanks apsivaflines for the script in the first place. Now only thing left is for someone to advance it.
Thanks in advance!
Chrippe