• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Request] Trainers area with time limit

Galgula

New Member
Joined
Nov 15, 2007
Messages
28
Reaction score
0
Since my players dont stop bot and im not always there to stop them then i tough if there is a possibale script that can take time limit for the training area..

I tough about NPC that you need to pay him 1k for 1 hour(for exmple)


If you guys can make it it will be awsome xD
 
Heh, i have on my server this script, but i have some errors.

Code:
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

Btw, its movement. So you need add in movements.xml line, and next in map editor set actionid
 
Last edited:
Heh, i have on my server this script, but i have some errors.

Code:
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

Btw, its movement. So you need add in movements.xml line, and next in map editor set actionid

could u show me what for error's it gives?
 
I removed it, and thinking about new version.

Errors was somethink like:

DoPlayerSendTextMessage - Player not found.

And sometimes when you leaved training room, i don't know why, but player was teleported after 30 min to temple, so i quess StopEvent didn't worked here or what?
 
Back
Top Bottom