function onUse(cid, item, frompos, item2, topos)
local switchUniqueID = 3004 -- uniqueID of switch
local switchID = 2180 -- id of switch
local wallid = 1111 -- id of wall
local wallpos = {x=1114, y=1334, z=7, stackpos=1}
local wallchk = getThingfromPos(wallpos)
if item.uid == switchUniqueID and item.itemid == switchID and wallchk.itemid == wallid then
doSendMagicEffect(wallchk,10)
doRemoveItem(wallchk.uid,1)
addEvent(onTimer1, 60*1000)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You Have 60 second To Enter The pass the wall.")
end
return 1
end
function onTimer1()
local wallid = 1111 -- id of wall
wallnewpos = {x=1114, y=1334, z=7}
doCreateItem(wallid,1,wallnewpos)
end