arturhaddad
Member
- Joined
- Aug 14, 2010
- Messages
- 217
- Reaction score
- 8
Guys, I've seen this GlobalEvent script:
It would be awesome if we could modify it to work with monsters, and at XX:XX hours, like:
Monday, 14:00 - Rat spawns at x=2222, y=3333, z=14
Thursday, 14:00 - Deer spawns at somewhere
etc etc
Would be nice, eh?
eace:
eace:
Lua:
function getDayName()
local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
return days[os.date("*t")["wday"]]
end
local config =
{
respawnPlaces =
{
["Sunday"] = {x =, y = , z =},
["Monday"] = {x =, y = , z =},
["Tuesday"] = {x =, y = , z =},
["Wednesday"] = {x =, y = , z =},
["Thursday"] = {x =, y = , z =},
["Friday"] = {x =, y = , z =},
["Saturday"] = {x =, y = , z =}
},
npcName = "Rashid"
}
function onStartup()
doCreateNpc(config.npcName, config.respawnPlaces[getDayName()])
return true
end
Lua:
<globalevent name="npcCreate" type="startup" event="script" value="npcCreate.lua"/>
It would be awesome if we could modify it to work with monsters, and at XX:XX hours, like:
Monday, 14:00 - Rat spawns at x=2222, y=3333, z=14
Thursday, 14:00 - Deer spawns at somewhere
etc etc
Would be nice, eh?