• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

GlobalEvent Hunt day/night 1.0

viniciusturko

New Member
Joined
Jun 23, 2009
Messages
94
Reaction score
2
Location
Brasil
Hello everybody !

I'm new in this forum, and I think you down't know me, but I'm scripter, and I will guive you a piece of my work =D...
This function maybe work in all TFS version, but if in your case it don't work well, post here, I'll help you ^^...
Well, this system work how a Raid, but has some differences... You have to config a real hour that you want to something happens, for example, "you want to appear a dragon in that position at 22:00 o'clock(real time)" You can ! =D

The instructions are in the script =D :

Lua:
--Script by Viniciusturko
local pos = {x= 1032,y= 1039,z= 7} -- Positions where the monsters will appear.
local hora = function()
	local rawdate = os.date("%H:%M")
	local hours, minutes = rawdate:match("(%d+) : (%d+)")
	return tonumber(hours), tonumber(minutes)
end

onThink = function()
	local hours, minutes = hora()
	if not (hours == 20 and minutes == 00) then -- hora(real) em que o(s) monstro(s) aparecerá(ão), no caso 08 horas da noite. 
		doCreateMonster("Dragon", pos, 1) -- Monster that will be created in the position.	
		doBroadcastMessage("When night falls, shadowy creatures come to attack", 22) -- Message in the time.
		return true
	end
	return true
end
Xml line :
XML:
<globalevent name="name" interval="60" script="scriptname.lua"/>

See ya ! =D
 
It would be so easy x_x

When I was doing this script, I was not thinking in make the most easyer solution, but try my knowledge and make a different action system x_x
 
It would be so easy x_x

When I was doing this script, I was not thinking in make the most easyer solution, but try my knowledge and make a different action system x_x

Little ego, no?

Easy solutions is smart solution! the technology advances to micro, not for macro ;)
 
Back
Top