-- Made by knightfire
function onUse(cid, item, frompos, item2, topos)
player1pos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}
player1 = getThingfromPos(player1pos)
target = player1.uid
if player1.itemid > 0 then
jail = {x=730, y=596, z=7}
unjail = {x=703, y=600, z=7}
doTeleportThing(target,jail)
doPlayerSendTextMessage(target,22,"You have been sent to jail for 3 minutes then you will be executed.")
doSendMagicEffect(frompos,2)
local a = {cid=cid, target=target, jail=jail, unjail=unjail}
addEvent(onTime,3*60*1000,a)
end
end
function onTime(a)
doTeleportThing(a.target,a.unjail)
end