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

Lua Summoning boss

marcos16

Falkhonn
Joined
May 4, 2012
Messages
224
Reaction score
1
Hello! I am using the following globalevents.
His duty is to summon a boss every x time, but he is with an error, he is summoning 4 boss.
I want you to try to summon only 1, and if that boss is already alive try another who is not and summon him ...
Thanks in advance.

Tfs 0.4.

Code:
function onThink(interval, lastExecution)

    local mName = 'none'
    local pos = {x=0,y=0,z=0}
    local dice = 1
    local thing = 0
    local certo = 1
    local try = 5
  
    while certo == 1 and try > 1 do
      
        try = try -1
      
        dice = math.random(4) 
      
        if dice == 1 then
            mName = 'morgaroth'
            pos = {x=980, y=866, z=12}
        elseif dice == 2 then
            mName = 'infernatil'
            pos = {x=955, y=369, z=8}
        elseif dice == 3 then
            mName = 'apocalypse'
            pos = {x=1651, y=615, z=12}
        elseif dice == 4 then
            mName = 'ferumbras'
            pos = {x=331, y=390, z=8}
        else
            mName = 'Bazir
            pos = {x=1387, y=1504, z=11}
        end
      
        thing = getCreatureByName(mName)
      
        if thing == nil then
            print('BOSS: '..mName)
            doSummonCreature(mName, pos)
            certo = 1
        else
            print('Already exist trying another')
        end
    end
  
    return TRUE
end
 
@Delusion

definetely i won
in dominando style

thx for remind me that you are a xeraphus, a guy who scored his first 2k posts with mostly garbage where you were trying to help by using 1.0 functions in scripts for 0.3 and 0.4. And in these days 1.0 wasn't even public. You may still don't know but almost all of them never ever worked. We all forgot it, but you reminding it with your 'haha' alerts and shown that you renamed your nick from xeraphus.

We all forgot. But you are digging with your 'haha' alerts.

Im out. After 10 years you will notice how nub you were.

so 7y left and stop digging 3y posts with your "haha", im not the only one who you annoying with it.
Sorry but I had to post this,I'm not the only one who got 10 alerts in one day with his haha
 
Last edited:
Back
Top