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

spawn fromx with spawnByDay

skovdoto

New Member
Joined
Oct 17, 2018
Messages
7
Reaction score
0
Hello guys, good?
this is a raid in oramond factory west,south,east, I'm trying to do something different inside a spawn file.
I don't know if this is possible, but I wanted to understand a way to do it, and help if I'm doing it correctly.
Please feel free to give me ideas for improvement, I'm just a beginner.
So let's go, this script will be a startup on the server, according to the day, and it will load the map and spawn, but the way I want to spawn is not each monster in its position.I want to do the same as a raid of invasions. I am trying to use spawn from/to
My doubt is, is it possible to do this without being a raid, but a normal spawn?
XML:
<spawns>  <spawn fromx="33571" fromy="31951" fromz="13" tox="33682" toy="31944" toz="13">
        <monster name="Minotaur Hunter" amount="70" spawntime="1800" />
        </spawn>
</spawn>

Startup
Lua:
local config = {
    ['Monday'] = 'south',
    ['Tuesday'] = 'west',
    ['Friday'] = 'east',
    ['Thursday'] = 'south',
    ['Wednesday'] = 'west',
    ['Saturday'] = 'east',
}
 
local spawnByDay = true

function onStartup()
    local str = ""
    if spawnByDay then
        str = '>> [Oramond Factory] loaded map '.. config[os.date("%A")] ..'.'
        Game.loadMap('data/world/worldchanges/oramondfactory/' .. config[os.date("%A")] ..'.otbm')
        addEvent(function()
            Game.loadSpawnFile('data/world/worldchanges/oramondfactory/' .. config[os.date("%A")] ..'-spawn.xml')
            str = str .. " (with respawn)"      
        end, 2*1000)
        print(str)
    else
         print('>> Oramond Factory: not today')
    end
    return true
end
 
Back
Top