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

Solved Boss Event

keccish

New Member
Joined
Sep 16, 2010
Messages
33
Reaction score
1
Is there any way to make this script start every 2-3 [HOURS]
Code:
<?xml version="1.0" encoding="UTF-8"?>
<raid>

<announce delay="0" type="warning" message="Zugurosh is coming our way..." />
<announce delay="10000" type="event" message="Zugurosh has come again to destroy the world!" />

<singlespawn delay="12000" name="zugurosh" x="1000" y="1006" z="7" />

<announce delay="13000" type="warning" message="WE HAVE TO KILL HIM FAST!" />
<areaspawn delay="13000" fromx="1165" fromy="890" fromz="7" tox="1159" toy="860" toz="7">
</areaspawn>

</raid>

-- Thanks in advance ;)
 
Well hopefully you don't mind sorting it out I'd greatly appreciate it:
globalevents.xml:
Code:
    <globalevent name="raid" interval="6" event="script" value="raid.lua"/>
globalevents/scripts/raid.lua:

Code:
local storage = 1344
local raids = {
    "Morgaroth",
    "Ghazbaran",
    "Undead Jester",
    "goblin",
    "Dryads",
    "Halloweenhare",
    "Hornedfox",
    "Necropharus",
    "Wolfsraid",
    "UndeadArmy",
    "UndeadDarashia",
    "The Old Widow",
    "Scarabs",
    "Rats",
    "Quara",
    "Pirates",
    "Orshabaal",
    "OrcsThais",
    "Ferumbras",
    "Elfs",
    "Demodras",
    "Barbarian"
}
function onThink(interval, lastExecution, thinkInterval)
    if getGlobalStorageValue(storage) == -1 or getGlobalStorageValue(storage) < os.time() then
        executeRaid(raids[math.random(1, #raids)])
        setGlobalStorageValue(storage, os.time() + 9 * 60 * 60)
    end
    return TRUE
end

The 6 was just testing it and it seems to work but not like it should time wise its extremely random time wise from a few minutes up to a day, and not steady which kills me at the end; if you could help I really would appreciate it @dominique120 thank you ahead of time.

~Sin
 
As I predicted:
22:46 Frost OT has been online for: 2 hours and 20 minutes.
I set my globalevent.xml to:
Code:
    <globalevent name="raid" interval="7200" event="script" value="raid.lua"/>

I edited it to 7200 then I did my restart after words (the events do work I can trigger them by cmd at any time, and at random they will start when my interval is low just extremely random times)

Any ideas Mr. @dominique120 or anyone else who wants to give it a go? TFS 0.3.6
Thanks ahead of time and thanks for reading guy's
~Sin
 

Similar threads

Back
Top