Kippetjee
Member
Hello
im using this script for removing a stone and it get back in 3 minutes
but can some one make when the stone is back that it give a msg
"The stone in the sewers have been placed back. If you didn't get out you are locked in."
im using this script for removing a stone and it get back in 3 minutes
but can some one make when the stone is back that it give a msg
"The stone in the sewers have been placed back. If you didn't get out you are locked in."
LUA:
local gatepos = {x=949, y=1133, z=8, stackpos=1}
local newstone = 0
function onUse(cid, item, frompos, item2, topos)
local getgate = getThingfromPos(gatepos)
if(item.uid == 10200) then
if(item.itemid == 1945 and getgate.itemid == 1355) then
doRemoveItem(getgate.uid, 1)
doTransformItem(item.uid, 1946)
newstone = addEvent(recreateStone, 1000*60, {pos = gatepos, item = item})
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The stone in the sewers have been moved. You have exactly three minutes to enter the dungeon, get your reward and get the hell out of there before you get locked in.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
elseif(item.itemid == 1946 and getgate.itemid == 0) then
doCreateItem(1353,1,gatepos)
doTransformItem(item.uid, 1945)
stopEvent(newstone)
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end
function recreateStone(param)
doCreateItem(1355, 1, param.pos)
doTransformItem(param.item.uid, 1945)
newstone = 0
end