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

Solved CLOSE!

Status
Not open for further replies.
This is my movements
Azerus

PHP:
azerus in movements
[PHP]function onStepIn(cid, item, position, fromPosition)
--Config-->
local queststatus = getPlayerStorageValue(cid, 50001)
--EndConfig-->
    if item.actionid == 1974 and queststatus == -1 then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "It seems by defeating Azerus you have stoped this army from entering your world! Better leave this ghastly place forever.")
        setPlayerStorageValue(cid, 4765, 1)
    return TRUE
end
if item.actionid == 1973 and queststatus == -1 then
-- Here is the code start:
starting={x = 576, y = 560, z = 10, stackpos = 253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x = 586, y = 572, z = 10, stackpos = 253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
  if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters=totalmonsters+1
  monster[totalmonsters]=creature.uid
  end
end
checking.x=checking.x+1
  if checking.x>ending.x then
  checking.x=starting.x
  checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
trash= {x=33193, y=31689, z=15}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
end
-- Here is the end of it
doTeleportThing(cid, player_pos_entrada)
doSendMagicEffect(player_pos_entrada, 10)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você já terminou a quest!')
end
end
[/PHP]

Azerus Army in Movements

PHP:
function onStepIn(cid, item, position, fromPosition)
if item.actionid == 58262 then
if getPlayerStorageValue(cid,    102505) == 1  then       
doCreatureSay(cid, "It seems by defating Azerus you have stopped this army from entering your world! Better leave this ghastly place forever.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 102503, 3) -- Finishing Quest
setPlayerStorageValue(cid, 102500, 5)
elseif getPlayerStorageValue(cid,    102504) == 1 then       
doCreatureSay(cid, "It seems by defating Azerus you have stopped this army from entering your world! Better leave this ghastly place forever.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 102502, 3) -- Finishing Quest
setPlayerStorageValue(cid, 102500, 5)
else
doCreatureSay(cid, "It seems by defating Azerus you have stopped this army from entering your world! Better leave this ghastly place forever.", TALKTYPE_ORANGE_1)
end
end
return TRUE
end


Azerus Died this movement script
PHP:
function onStepIn(cid, item, position, fromPosition)

local yalahar = {x=747, y=1943, z=11, stackpos=253}

        if item.itemid == 9738 then
        doTeleportThing(cid, yalahar, TRUE)
        doSendMagicEffect(yalahar,12)
        end
   
    return TRUE
end
 
as you can see from my signature tfs 0.3.6 tibia 8.6


no console errors I simply can not use the thing in the middle of the room to start the quest
 
still not fixed yet have more erros now !

Code:
[26/09/2013 14:58:34] [Error - MoveEvents Interface]
[26/09/2013 14:58:34] data/movements/scripts/azerusarmy.lua:onStepIn
[26/09/2013 14:58:34] Description:
[26/09/2013 14:58:34] data/movements/scripts/azerusarmy.lua:3: attempt to call global 'doCreatureSetStorageValue' (a nil value)
[26/09/2013 14:58:34] stack traceback:
[26/09/2013 14:58:34]    data/movements/scripts/azerusarmy.lua:3: in function <data/movements/scripts/azerusarmy.lua:1>

PHP:
function onStepIn(cid, item, position, fromPosition)
    doCreatureSay(cid, "It seems since you have defeated Azerus his army stopped entering your world! Better leave this ghastly place forever....", TALKTYPE_ORANGE_1)
    doCreatureSetStorageValue(cid, 58266, 1) -- Finishing Quest
    return TRUE
end
 
When I use the ammilia Sphere in the middle of Yalahar Quest I get this error!
Code:
[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

this is my script!
PHP:
-- Config #1 -- 
local BlindField = {x=748, y=1921, z=10, stackpos=1}
local topLeft = {x=743, y=1923, z=10}
local buttomRight = {x=758, y=1940, z=10}
local tpin = {{x=751, y=1941, z=10}, {x=750, y=1939, z=10}}
local tpout = {{x=750, y=1939, z=10}, {x=751, y=1941, z=9}}
local glo = {x=750, y=1930, z=10}
local m_posi = {
{x= glo.x - 4,y=glo.y,z=glo.z},
{x= glo.x + 4,y=glo.y,z=glo.z},
{x=glo.x,y=glo.y + 4,z=glo.z},
{x=glo.x,y=glo.y - 4,z=glo.z},
{x=glo.x,y=glo.y + 5,z=glo.z},
{x=glo.x,y=glo.y - 5,z=glo.z}
}
ttime = {10, 30}
local isEvent = 58263;
-- end -- 

function getCreaturesFromArea(fromPos, toPos,checkFunction)
    local rarr = {};
    checkFunction = checkFunction or function(arg) return true; end;
    for fx = fromPos.x, toPos.x do
        for fy = fromPos.y, toPos.y do
            for fz = fromPos.z, toPos.z do
                local tmp = getTopCreature({x=fx,y=fy,z=fz}).uid;
                if(checkFunction(tmp))then
                    table.insert(rarr, tmp);
                end
            end
        end
    end
    local tmp = getTopCreature(BlindField).uid;
    if(checkFunction(tmp))then
        table.insert(rarr, tmp);
    end
    return rarr;
end

function getCreatureFromArea(fromPos, toPos,name)
    for fx = fromPos.x, toPos.x do
        for fy = fromPos.y, toPos.y do
            for fz = fromPos.z, toPos.z do
                local tmp = getTopCreature({x=fx,y=fy,z=fz}).uid;
                if(tmp > 0)then
                    if(string.lower(name) == string.lower(getCreatureName(tmp)))then
                        return tmp;
                    end
                end
            end
        end
    end
    local tmp = getTopCreature(BlindField).uid;
    if(tmp > 0)then
        if(string.lower(name) == string.lower(getCreatureName(tmp)))then
            return tmp;
        end
    end
    return 0;
end

local function FirstWave(count, spawnazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    spawnazerus = spawnazerus or false;
    if(spawnazerus)then
        doCreateMonster("Azerus", m_posi[math.random(1,#m_posi)], false, true);
        for _,pos in pairs(m_posi) do
            doCreateMonster("Rift Worm", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster("Rift Worm", m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(FirstWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end

local function SecondWave(count, replaceazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    replaceazerus = replaceazerus or false;
    if(replaceazerus)then
        local tmp = getCreatureByName("Azerus");
        if(tmp > 0)then
            doRemoveCreature(tmp);
        end
        doCreateMonster("Azerus1", m_posi[math.random(1,#m_posi)], false, true);
       
        for _,pos in pairs(m_posi) do
            doCreateMonster("Rift Brood", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster("Rift Brood", m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(SecondWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end

local function ThirdWave(count, replaceazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    replaceazerus = replaceazerus or false;
    if(replaceazerus)then
        local tmp = getCreatureByName("Azerus");
        if(tmp > 0)then
            doRemoveCreature(tmp);
        end
        doCreateMonster("Azerus2", m_posi[math.random(1,#m_posi)], false, true);
        for _,pos in pairs(m_posi) do
            doCreateMonster("Rift Scythe", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster("Rift Scythe", m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(ThirdWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end

local function FourthWave(count, replaceazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    if(replaceazerus)then
        local tmp = getCreatureByName("Azerus");
        if(tmp > 0)then
            doRemoveCreature(tmp);
        end
        tmp = doCreateMonster("Azerus3", m_posi[math.random(1,#m_posi)], false, true);
        registerCreatureEvent(tmp, "AzerusDeath");
       
        for _,pos in pairs(m_posi) do
            doCreateMonster("War Golem", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster("War Golem", m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(FourthWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end

local function fixGlobe()
    doItemSetAttribute(getTileItemById(glo, 9767).uid, "aid", 58261)
end

local function checkArea()
    if(getStorage(isEvent) > 0)then
        local players = getCreaturesFromArea(topLeft, buttomRight, isPlayer);
        if(#players < 1)then
            doSetStorage(isEvent,0);
            endAzerusFightA();
            addEvent(fixGlobe, 60*1000);
        else
            addEvent(checkArea, 10*1000);
        end
    end
end

function endAzerusFightA()
    local monsters = getCreaturesFromArea(topLeft,buttomRight,isMonster);
    while(#monsters > 0)do
        for _,m in pairs(monsters)do
            doRemoveCreature(m);
        end
        monsters = getCreaturesFromArea(topLeft,buttomRight,isMonster);
    end
    doCreateTeleport(1387, tpin[2],tpin[1]);
    doCreateTeleport(1387, tpout[2],tpout[1]);
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.actionid == 58261 then
        doItemSetAttribute(item.uid, "aid", 58263)
    else
        doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1)
        return;
    end

    local tp = getTileItemById(tpin[1],1387).uid;
    if(tp > 0)then
        doRemoveItem(tp)
    end
    tp = getTileItemById(tpout[1],1387).uid;
    if(tp > 0)then
        doRemoveItem(tp)
    end
   
    doSetStorage(isEvent,1);
    checkArea();
    FirstWave(0,true)
    addEvent(SecondWave, math.random(60,70)*1000,0,true)
    addEvent(ThirdWave, math.random(100,130)*1000,0,true)
    addEvent(FourthWave, math.random(190,210)*1000,0,true)
    return true
end
 
sorry i Posted the wrong script

this script make these problems
When I use the amphilla Sphere in the middle of YAlahar Quest
Code:
[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found
 
[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found
 
[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found
 
[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found
 
[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found
 
[27/09/2013 07:56:16] [Error - Action Interface]
[27/09/2013 07:56:16] data/actions/scripts/quests/azerus.lua:onUse
[27/09/2013 07:56:16] Description:
[27/09/2013 07:56:16] (luaDoCreateMonster) Monster with name '' not found

PHP:
-- Config #1 --
local BlindField = {x=748, y=1921, z=10, stackpos=1}
local topLeft = {x=743, y=1923, z=10}
local buttomRight = {x=758, y=1940, z=10}
local tpin = {{x=751, y=1941, z=10}, {x=750, y=1939, z=10}}
local tpout = {{x=750, y=1939, z=10}, {x=751, y=1941, z=9}}
local glo = {x=750, y=1930, z=10}
local m_posi = {
{x= glo.x - 4,y=glo.y,z=glo.z},
{x= glo.x + 4,y=glo.y,z=glo.z},
{x=glo.x,y=glo.y + 4,z=glo.z},
{x=glo.x,y=glo.y - 4,z=glo.z},
{x=glo.x,y=glo.y + 5,z=glo.z},
{x=glo.x,y=glo.y - 5,z=glo.z}
}
ttime = {10, 30}
local isEvent = 58263;
-- end --
 
function getCreaturesFromArea(fromPos, toPos,checkFunction)
    local rarr = {};
    checkFunction = checkFunction or function(arg) return true; end;
    for fx = fromPos.x, toPos.x do
        for fy = fromPos.y, toPos.y do
            for fz = fromPos.z, toPos.z do
                local tmp = getTopCreature({x=fx,y=fy,z=fz}).uid;
                if(checkFunction(tmp))then
                    table.insert(rarr, tmp);
                end
            end
        end
    end
    local tmp = getTopCreature(BlindField).uid;
    if(checkFunction(tmp))then
        table.insert(rarr, tmp);
    end
    return rarr;
end
 
function getCreatureFromArea(fromPos, toPos,name)
    for fx = fromPos.x, toPos.x do
        for fy = fromPos.y, toPos.y do
            for fz = fromPos.z, toPos.z do
                local tmp = getTopCreature({x=fx,y=fy,z=fz}).uid;
                if(tmp > 0)then
                    if(string.lower(name) == string.lower(getCreatureName(tmp)))then
                        return tmp;
                    end
                end
            end
        end
    end
    local tmp = getTopCreature(BlindField).uid;
    if(tmp > 0)then
        if(string.lower(name) == string.lower(getCreatureName(tmp)))then
            return tmp;
        end
    end
    return 0;
end
 
local function FirstWave(count, spawnazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    spawnazerus = spawnazerus or false;
    if(spawnazerus)then
        doCreateMonster('Azerus', m_posi[math.random(1,#m_posi)], false, true);
        for _,pos in pairs(m_posi) do
            doCreateMonster("Rift Worm", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster('Rift Worm', m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(FirstWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end
 
local function SecondWave(count, replaceazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    replaceazerus = replaceazerus or false;
    if(replaceazerus)then
        local tmp = getCreatureByName("Azerus");
        if(tmp > 0)then
            doRemoveCreature(tmp);
        end
        doCreateMonster("Azerus1", m_posi[math.random(1,#m_posi)], false, true);
      
        for _,pos in pairs(m_posi) do
            doCreateMonster("Rift Brood", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster("Rift Brood", m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(SecondWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end
 
local function ThirdWave(count, replaceazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    replaceazerus = replaceazerus or false;
    if(replaceazerus)then
        local tmp = getCreatureByName("Azerus");
        if(tmp > 0)then
            doRemoveCreature(tmp);
        end
        doCreateMonster("Azerus2", m_posi[math.random(1,#m_posi)], false, true);
        for _,pos in pairs(m_posi) do
            doCreateMonster("Rift Scythe", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster("Rift Scythe", m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(ThirdWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end
 
local function FourthWave(count, replaceazerus)
    if(getStorage(isEvent) < 1)then
        return;
    end
    if(replaceazerus)then
        local tmp = getCreatureByName("Azerus");
        if(tmp > 0)then
            doRemoveCreature(tmp);
        end
        tmp = doCreateMonster("Azerus3", m_posi[math.random(1,#m_posi)], false, true);
        registerCreatureEvent(tmp, "AzerusDeath");
      
        for _,pos in pairs(m_posi) do
            doCreateMonster("War Golem", pos, false, true);
        end
    else
        for i =1, count do
            doCreateMonster("War Golem", m_posi[math.random(1,#m_posi)], false, true);
        end
    end
    addEvent(FourthWave,math.random(ttime[1],ttime[2])*1000,math.random(1,#m_posi));
end
 
local function fixGlobe()
    doItemSetAttribute(getTileItemById(glo, 9767).uid, "aid", 58261)
end
 
local function checkArea()
    if(getStorage(isEvent) > 0)then
        local players = getCreaturesFromArea(topLeft, buttomRight, isPlayer);
        if(#players < 1)then
            doSetStorage(isEvent,0);
            endAzerusFightA();
            addEvent(fixGlobe, 60*1000);
        else
            addEvent(checkArea, 10*1000);
        end
    end
end
 
function endAzerusFightA()
    local monsters = getCreaturesFromArea(topLeft,buttomRight,isMonster);
    while(#monsters > 0)do
        for _,m in pairs(monsters)do
            doRemoveCreature(m);
        end
        monsters = getCreaturesFromArea(topLeft,buttomRight,isMonster);
    end
    doCreateTeleport(1387, tpin[2],tpin[1]);
    doCreateTeleport(1387, tpout[2],tpout[1]);
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.actionid == 58261 then
        doItemSetAttribute(item.uid, "aid", 58263)
    else
        doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1)
        return;
    end
 
    local tp = getTileItemById(tpin[1],1387).uid;
    if(tp > 0)then
        doRemoveItem(tp)
    end
    tp = getTileItemById(tpout[1],1387).uid;
    if(tp > 0)then
        doRemoveItem(tp)
    end
  
    doSetStorage(isEvent,1);
    checkArea();
    FirstWave(0,true)
    addEvent(SecondWave, math.random(60,70)*1000,0,true)
    addEvent(ThirdWave, math.random(100,130)*1000,0,true)
    addEvent(FourthWave, math.random(190,210)*1000,0,true)
    return true
end
 
Last edited:
Status
Not open for further replies.
Back
Top