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

How to check day and hour?

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
Hello, i got this script. It check if is Sunday (onStartup), how can I check day and hour?(How will I use it? onThink?)
LUA:
	if os.date('%A') == "Sunday" then
		doCreateNpc("Rashid", {x = 32343, y = 31795, z = 7})
	end
 
Hello, i got this script. It check if is Sunday (onStartup), how can I check day and hour?(How will I use it? onThink?)
LUA:
	if os.date('%A') == "Sunday" then
		doCreateNpc("Rashid", {x = 32343, y = 31795, z = 7})
	end

LUA:
function onTime(interval)
if os.date('%A') == "Sunday" and os.date('%H') == "05" then
		doCreateNpc("Rashid", {x = 32343, y = 31795, z = 7})
end
	return TRUE
end
XML:
<globalevent name="rashid" time="05:00" event="script" value="rashid.lua"/>
This will spawn the npc Rashid on sunday at 5 AM.
 
Back
Top