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

GlobalEvent Rashid at a given time have come and gone...

Nurn

Member
Joined
Dec 30, 2012
Messages
239
Reaction score
11
NPC Rashid at a given time have come and gone... sorry for bad english.
Tested 0.4 , 0.3.6

globalevents.xml
Code:
<globalevent name="rashid" time="00:00" event="script" value="rashid.lua"/>
rashid.lua
Code:
function getDayName()
local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
return days[os.date("*t")["wday"]]
end
local config =
{
respawnPlaces = {
["Sunday"] = {x=1000,y=1000,z=7}, -- # Carlin
["Monday"] = {x=1000,y=1000,z=7}, -- # Svargrond
["Tuesday"] = {x=1000,y=1000,z=7}, -- # Liberty Bay
["Wednesday"] = {x=1000,y=1000,z=7}, -- # Port Hope
["Thursday"] = {x=1000,y=1000, z=7}, -- # Ankrahmun
["Friday"] = {x=1000,y=1000,z=7}, -- # Darashia
["Saturday"] = {x=1005,y=1005,z=7} -- # Edron
},
npcName = "Rashid" }
function onTime(interval)
doRemoveCreature(getCreatureByName(config.npcName) )
doCreateNpc(config.npcName, config.respawnPlaces[getDayName()])
return true
end
 
Back
Top