Script on switch & wall
In my spare time I wrote this script.
Description script:
Use the switch and it push the wall disappears automatically after 2minutes this wall back.
In my spare time I wrote this script.
Description script:
Use the switch and it push the wall disappears automatically after 2minutes this wall back.
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
wall_pos = {x=617, y=647, z=12, stackpos=1}
wall = getThingfromPos(wall_pos)
if item.itemid == 1945 and wall.itemid == 1034 then
doSendMagicEffect(wall_pos, 10)
doRemoveItem(wall.uid, 1)
doTransformItem(item.uid, 1946)
addEvent(createWall, 3 * 1000)
elseif item.itemid == 1946 then
doTransformItem(item.uid, 1945)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end
function createWall()
doCreateItem(1034, wall_pos)
doSendMagicEffect(wall_pos, 10)
end
Last edited: