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

{Unsolved} Summon 60 seconds after room is clear of monsters.

You have to use it in globalevents, not in creatureevents.

Code:
local config = {
    globalStorageRange = 53470, -- reserved storage from 53470 to (53470 + amount of areas)
}

local areas = {
    [1] = {raidname = "name1", playersNeed = 1, from = {x=1609, y=1533, z=10}, to = {x=1616, y=1538, z=10}},
    [2] = {raidname = "name1", playersNeed = 1, from = {x=1609, y=1533, z=10}, to = {x=1616, y=1538, z=10}}
}

function onThink(interval, lastExecution, thinkInterval)
    local check = {}
    for i = 1, #areas do
        check[i] = 0
        setGlobalStorageValue(config.globalStorageRange + i, 0)
        for _, cid in ipairs(getPlayersOnline()) do
            if isInRange(getCreaturePosition(cid), areas[i].from, areas[i].to) == true then
                check[i] = check[i] + 1
                setGlobalStorageValue(config.globalStorageRange + i, check[i])
            end
        end
        if getGlobalStorageValue(config.globalStorageRange + i) >= areas[i].playersNeed then
            doExecuteRaid(areas[i].raidname) -- continue your script in raids, prefered
        end
    end
    return true
end

Recomended raid system:
http://otland.net/threads/tm-boss-raid-system-v1-3-0-release-updated.86641/
 
Last edited:
Sorry, I forgot to add that I am using 0.2.15
"doExecuteRaid" is not a function, but other than that I like what you did with it.
 
i don't know about the execute thing, but maybie if you ask the code of the function and install it you can solve your problem.

I mean, in other post, of course. ;)
 
Im not even sure about globalevents.xml, as I rarely use that folder.
If I had an example for 0.2.15 then I would be set.
 
Back
Top