• 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!

Simple count down function

Doggynub

LUA / C++
Joined
Sep 28, 2008
Messages
2,541
Reaction score
186
Donno maybe somone could need it. :p
countDown(number, pos, effect, msgonend, effectonend)
Lua:
function countDown(number, pos, effect, msgonend, effectonend)
  local n = number
       for i = 1, number do
           addEvent(doSendAnimatedText,i* 1000, pos, n > 1 and n.."" or msgonend .."", n < 6 and TEXTCOLOR_RED or TEXTCOLOR_GREEN)
		   addEvent(doSendMagicEffect,i* 1000, pos, n > 1 and effect or effectonend )
              n = n -1
	   end
      n = number
return true
end

f.e
Code:
countDown(50, toPosition, 5, "end", 2)
This will make a count down from number <<50>> in the pos <<toPosition>>
with <<fire effect(5)>> , <<end>> & << poff effect(2)>> will appear on countdown end
 
can you please help me make a simple script of when player's StepOn tile = count down starts (countdown of 25 minutes),
and when the time is over, it teleports the player to X location (even if he is offline)..

thanks..
 
Back
Top