hello friends help me solve a problem ..
globalevents.xml
invasao.lua
But the monster is summoned, only this error appears on the console .. any idea how to solve this problem?
Code:
[0:33:02.791] [Error - GlobalEvents::think] Couldn't execute event: monstersummo
nraid
[0:33:07.800] [Error - GlobalEvents::think] Couldn't execute event: monstersummo
nraid
[0:33:12.807] [Error - GlobalEvents::think] Couldn't execute event: monstersummo
nraid
[0:33:17.808] [Error - GlobalEvents::think] Couldn't execute event: monstersummo
nraid
[0:33:22.809] [Error - GlobalEvents::think] Couldn't execute event: monstersummo
nraid
globalevents.xml
Code:
<globalevent name="monstersummonraid" interval="5000" event="script" value="invasao.lua"/>
invasao.lua
Code:
function onThink(interval)
monsters = {"Demon", "Dragon" }
map_2 = {
{x=205, y=220, z=7},
{x=216, y=220, z=7}
}
if getWorldCreatures(0) == 0 then
print ("[MAP] No players online, aborting summon!")
else
RDM = math.random(#monsters)
RDP2 = math.random(#map_2)
end
for _, tid in ipairs(getPlayersOnline()) do
doPlayerSendChannelMessage(tid, "", "Summoning the " ..monsters[RDM].. " in the map.", TALKTYPE_CHANNEL_Y, 99)
if getGlobalStorageValue(3454) == 2 then
doCreateMonster(monsters[RDM], map_2[RDP2])
return false
end
return true
end
end
But the monster is summoned, only this error appears on the console .. any idea how to solve this problem?