arturhaddad
Member
- Joined
- Aug 14, 2010
- Messages
- 217
- Reaction score
- 8
Hello i need a script that do it:
*Player steps in a tile, stone appears.
*After x time stone automaticly desappears.
I have the on step create wall script:
And the on step stone disappear timer script:
I wish to combine them, or if someone have a better script post it please.
Thanks
EDIT
SOLUTION, credits: tosuxo
*Player steps in a tile, stone appears.
*After x time stone automaticly desappears.
I have the on step create wall script:
LUA:
function onStepIn(cid, item, frompos, item2, topos)
wall1 = {x=32946, y=32103, z=7, stackpos=1}
getwall1 = getThingfromPos(wall1)
if item.uid == 14987 then
doCreateItem(1355,1,wall1)
end
end
And the on step stone disappear timer script:
LUA:
function onStepIn(cid, item, fromPosition, itemEx, toPosition)
local time
local stone, stone_pos = 1355, { x = 32946, y = 32103, z = 7 }
time = 10 -- Seconds until stone is removed.
return addEvent(function() doRemoveItem(getTileItemById(stone_pos, stone).uid) end, time * 1000)
end
I wish to combine them, or if someone have a better script post it please.
Thanks
EDIT
SOLUTION, credits: tosuxo
LUA:
local seconds = 1 --how long after standing in until it removes the rock
local stonepos = {x = 32946, y = 32103, z = 7, stackpos=1}
function onStepIn(cid, item, frompos, item2, topos)
local getwall1 = getThingfromPos(stonepos)
if item.uid == 14987 then
doCreateItem(1355,1,stonepos)
addEvent(removerock, seconds * 1000)
end
end
function removerock()
doRemoveItem(getThingFromPos(stonepos,1).uid,1)
end
Last edited: