Ir para conteúdo

Featured Replies

Postado

Ola galera, to com problema aqui no meu script. Esta apresentando erros quando vem a 3º onda do azerus, segue o script que uso e os erros no distro

Spoiler

local BlindField = {x=664, y=1394, z=9, stackpos=1}

function mapArea(fromPos, toPos, stack)
        local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z}
        return function()
                if (pos.y < toPos.y) then
                        pos.y = pos.y+1
                elseif (pos.x <= toPos.x) then
                        pos.y = fromPos.y
                        pos.x = pos.x+1
                else
                        pos.x = fromPos.x
                        pos.y = fromPos.y
                        pos.z = pos.z+1
                end
                if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then
                        if (stack == nil) then
                                return pos
                        else
                                pos.stackpos = stack
                                --return pos, getTileThingByPos(pos)
                                return pos, getThingfromPos(pos)
                        end
                end
        end
end

function getMonstersfromArea(fromPos, toPos)
        local monsters = {}    
        for _, thing in mapArea(fromPos, toPos, 253) do
                if isMonster(thing.uid) == TRUE then
                        table.insert(monsters, thing.uid)
            end

        end
          local bfm = getThingfromPos(BlindField)
            if isMonster(bfm.uid) == TRUE then
            table.insert(monsters, bfm.uid)
            end
        return monsters
end

function onUse(cid, item, fromPosition, itemEx, toPosition)

local topLeft = {x=659, y=1395, z=9}
local buttomRight = {x=675, y=1413, z=9}

local monsters = getMonstersfromArea(topLeft, buttomRight)
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

local tp = {x=666, y=1412, z=9}

local glo = {x=666, y=1403, z=9}


--Config-->
local statue_pos = {x = 666, y = 1403, z = 9}
local portal_quest01_pos = {x = 666, y = 1412, z = 9, stackpos = 2}
local portal_quest02_pos = {x = 667, y = 1414, z = 8, stackpos = 2}
local new_portal_pos = {x = 664, y = 1394, z = 9, stackpos = 1}
local new_pos = {x = 621, y = 1408, z = 9}
--End Config-->
function Potwory1()
if math.random (1,8) == 4 then
doSummonCreature('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory2, 20 * 1000)
else
doSummonCreature('Azerus1', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory2, 30 * 1000)
end
end
 
function Potwory2()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature('Azerus2', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
addEvent(Potwory3, 30 * 1000)
end
 
function Potwory3()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature('Azerus3', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory4, 30 * 1000)
end
 
function Potwory4()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
doSummonCreature('Azerus2', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
addEvent(Potwory5, 120 * 1000)
end

function Potwory5()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
doSummonCreature('Azerus3', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
addEvent(Potwory6, 120 * 1000)
end

function Potwory6()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
doSummonCreature('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doSummonCreature('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
addEvent(NewPortal, 120 * 1000)
end
 
function NewPortal()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
doCreateTeleport(1387, new_pos, new_portal_pos)
addEvent(RemoveAll, 60 * 1000)
end
 
function RemoveAll()
doRemoveItem(getThingfromPos(portal_quest01_pos).uid,2)
doRemoveItem(getThingfromPos(portal_quest02_pos).uid,2)
doRemoveItem(getThingfromPos(new_portal_pos).uid,2)
end
 
if item.uid == 1968 and getThingfromPos(portal_quest01_pos).itemid ~= 9772 then
doCreateItem(9772,1,portal_quest01_pos)
doCreateItem(9772,1,portal_quest02_pos)
addEvent(Potwory1, 0)
else
doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1)
end
return TRUE
end

 

 

 

Spoiler

imagemm 2.jpg

 

 

Spoiler

imagemm.jpg

 

Editado por patrick323 (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo