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

Error on GlobalEvents::think

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
549
Solutions
1
Reaction score
58
Location
Lo Mochis, Sinaloa
error.png

it was the best thing i did to add some random animations to my temple, and everything runs normally but it annoys me that my console throws this error every time the globalevent runs

Lua:
local items1  = 8641
local items2  = 8672
local items3  = 8649
local items4  = 8645
local items5  = 8643
local items6  = 8642
local items7  = 8653
local items8  = 8646
local items9  = 8647

local items11  = 8673
local items12  = 8650
local items13  = 8652
local items14  = 37842
local items15  = 37816

local items16  = 8654
local items17  = 8656
local items18  = 37841
local items19  = 37814

local pos1 = {x = 994, y = 997, z = 7}
local pos2 = {x = 994, y = 998, z = 7}
local pos3 = {x = 994, y = 998, z = 7}
local pos4 = {x = 994, y = 999, z = 7}
local pos5 = {x = 994, y = 1000, z = 7}

local pos6 = {x = 995, y = 997, z = 7}
local pos7 = {x = 996, y = 997, z = 7}
local pos8 = {x = 997, y = 997, z = 7}
local pos9 = {x = 995, y = 1000, z = 7}

local flame1 = {x = 1006, y = 997, z = 7}
local flame2 = {x = 1006, y = 998, z = 7}
local flame3 = {x = 1006, y = 999, z = 7}
local flame4 = {x = 1006, y = 1000, z = 7}
local flame5 = {x = 1006, y = 1001, z = 7}
local flame6 = {x = 1006, y = 1002, z = 7}
local flame7 = {x = 1006, y = 1003, z = 7}
local flame8 = {x = 1005, y = 1000, z = 7}
local flame9 = {x = 1004, y = 1000, z = 7}
local flame10 = {x = 1003, y = 1000, z = 7}
local flame11 = {x = 1002, y = 1000, z = 7}
local flame12 = {x = 1001, y = 1000, z = 7}
local flame13 = {x = 1000, y = 1000, z = 7}

local Animationss = GlobalEvent("Animationss")
function Animationss.onThink(interval)

    local aleaa = math.random(1, 3)
        print(aleaa)
        if aleaa == 1 then
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=997, z=7, stackpos=1}).uid, 1) end, 1000)
            addEvent(function() Game.createItem(items1, 1, pos1) end, 1000)
            addEvent(function() Game.createItem(items2, 1, pos2) end, 2000)
            addEvent(function() Game.createItem(items11, 1, pos6) end, 2000)
            addEvent(function() doRemoveItem(getThingfromPos({x=995, y=997, z=7, stackpos=1}).uid, 1) end, 3000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=998, z=7, stackpos=1}).uid, 1) end, 3000)
            addEvent(function() Game.createItem(items3, 1, pos3) end, 3000)
            addEvent(function() Game.createItem(items12, 1, pos6) end, 3000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=999, z=7, stackpos=1}).uid, 1) end, 4000)
            addEvent(function() doRemoveItem(getThingfromPos({x=996, y=997, z=7, stackpos=1}).uid, 1) end, 4000)
            addEvent(function() doRemoveItem(getThingfromPos({x=996, y=997, z=7, stackpos=1}).uid, 1) end, 4000)
            addEvent(function() Game.createItem(items4, 1, pos4) end, 4000)
            addEvent(function() Game.createItem(8667, 1, pos7) end, 4000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=1000, z=7, stackpos=1}).uid, 1) end, 5000)
            addEvent(function() doRemoveItem(getThingfromPos({x=997, y=997, z=7, stackpos=1}).uid, 1) end, 5000)
            addEvent(function() doRemoveItem(getThingfromPos({x=997, y=997, z=7, stackpos=1}).uid, 1) end, 5000)
            addEvent(function() doRemoveItem(getThingfromPos({x=997, y=997, z=7, stackpos=1}).uid, 1) end, 5000)
            addEvent(function() Game.createItem(19752, 1, pos8) end, 5000)
            addEvent(function() Game.createItem(items5, 1, pos5) end, 5000)
            addEvent(function() Game.createItem(items13, 1, pos8) end, 5000)
            addEvent(function() Game.createItem(items14, 1, pos8) end, 5000)
            addEvent(function() doRemoveItem(getThingfromPos({x=995, y=1000, z=7, stackpos=1}).uid, 1) end, 5000)
            addEvent(function() Game.createItem(37816, 1, pos9) end, 5000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=997, z=7, stackpos=1}).uid, 1) end, 25000)
            addEvent(function() Game.createItem(items6, 1, pos1) end, 25000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=998, z=7, stackpos=1}).uid, 1) end, 26000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=998, z=7, stackpos=1}).uid, 1) end, 26000)
            addEvent(function() doRemoveItem(getThingfromPos({x=995, y=997, z=7, stackpos=1}).uid, 1) end, 26000)
            addEvent(function() doRemoveItem(getThingfromPos({x=995, y=997, z=7, stackpos=1}).uid, 1) end, 26000)
            addEvent(function() Game.createItem(items7, 1, pos3) end, 26000)
            addEvent(function() Game.createItem(items16, 1, pos6) end, 26000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=999, z=7, stackpos=1}).uid, 1) end, 27000)
            addEvent(function() doRemoveItem(getThingfromPos({x=996, y=997, z=7, stackpos=1}).uid, 1) end, 27000)
            addEvent(function() doRemoveItem(getThingfromPos({x=996, y=997, z=7, stackpos=1}).uid, 1) end, 27000)
            addEvent(function() Game.createItem(items8, 1, pos4) end, 27000)
            addEvent(function() Game.createItem(8661, 1, pos7) end, 27000)
            addEvent(function() doRemoveItem(getThingfromPos({x=994, y=1000, z=7, stackpos=1}).uid, 1) end, 28000)
            addEvent(function() doRemoveItem(getThingfromPos({x=997, y=997, z=7, stackpos=1}).uid, 1) end, 28000)
            addEvent(function() doRemoveItem(getThingfromPos({x=997, y=997, z=7, stackpos=1}).uid, 1) end, 28000)
            addEvent(function() doRemoveItem(getThingfromPos({x=997, y=997, z=7, stackpos=1}).uid, 1) end, 28000)
            addEvent(function() doRemoveItem(getThingfromPos({x=995, y=1000, z=7, stackpos=1}).uid, 1) end, 28000)
            addEvent(function() Game.createItem(19752, 1, pos8) end, 28000)
            addEvent(function() Game.createItem(items9, 1, pos5) end, 28000)
            addEvent(function() Game.createItem(items17, 1, pos8) end, 28000)
            addEvent(function() Game.createItem(items18, 1, pos8) end, 28000)
            addEvent(function() Game.createItem(items19, 1, pos9) end, 28000)
        elseif aleaa == 2 then
            addEvent(function() doSendMagicEffect(flame1, CONST_ME_TELEPORT) end, 1000)
            addEvent(function() doSendMagicEffect(flame7, CONST_ME_TELEPORT) end, 1000)
            addEvent(function() doSendMagicEffect(flame2, CONST_ME_TELEPORT) end, 2000)
            addEvent(function() doSendMagicEffect(flame6, CONST_ME_TELEPORT) end, 2000)
            addEvent(function() doSendMagicEffect(flame3, CONST_ME_TELEPORT) end, 3000)
            addEvent(function() doSendMagicEffect(flame5, CONST_ME_TELEPORT) end, 3000)
            addEvent(function() doSendMagicEffect(flame4, CONST_ME_TELEPORT) end, 4000)
            addEvent(function() doSendMagicEffect(flame8, CONST_ME_LOSEENERGY) end, 5000)
            addEvent(function() doSendMagicEffect(flame8, CONST_ME_ENERGYHIT) end, 5750)
            addEvent(function() doSendMagicEffect(flame8, CONST_ME_TELEPORT) end, 6500)
            addEvent(function() doSendMagicEffect(flame8, CONST_ME_MAGIC_BLUE) end, 7250)
            addEvent(function() doSendMagicEffect(flame8, CONST_ME_STUN) end, 8000)
            addEvent(function() doSendMagicEffect(flame8, CONST_ME_FIREWORK_BLUE) end, 8750)
            addEvent(function() doSendMagicEffect(flame8, 191) end, 9500)
            addEvent(function() doSendMagicEffect(flame9, CONST_ME_HITBYFIRE) end, 11750)
            addEvent(function() doSendMagicEffect(flame10, CONST_ME_HITBYFIRE) end, 12000)
            addEvent(function() doSendMagicEffect(flame11, CONST_ME_HITBYFIRE) end, 12250)
            addEvent(function() doSendMagicEffect(flame12, CONST_ME_HITBYFIRE) end, 12500)
            addEvent(function() doSendMagicEffect(flame13, CONST_ME_HITBYFIRE) end, 12750)
        else
            local messages = {
                "[DONATES]: write your message here",
                "[COMMANDS]: write your message here "
            }
            Game.broadcastMessage(messages[math.random(#messages)], MESSAGE_EVENT_ADVANCE)
        end
end

Animationss:interval(30000)
Animationss:register()
 
Back
Top