function onStepIn(cid, item, position, fromPosition)
telpDelay = 30
koniec = addEvent(koniecrob,telpDelay*1000*60, cid)
koncowka = addEvent(koncowkarob,telpDelay*1000*60-1000*60, cid)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have started Your training. You have "..telpDelay.." minutes left.")
end
function onStepOut(cid, item, position, fromPosition)
stopEvent(koniec)
stopEvent(koncowka)
doPlayerSendCancel(cid, MESSAGE_EVENT_ADVANCE, "Your timer has been stopped. You can start again.")
end
function koncowkarob(cid)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "After 1 minute you will be teleported. You can move to restart timer!")
end
function koniecrob(cid)
pozycja={x=167, y=53, z=7}
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Its end of your training.")
doTeleportThing(cid,pozycja,FALSE)
doSendMagicEffect(pozycja,NM_ME_LOSE_ENERGY)
end