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

Problem with yalaharian quest final room

Spiritt Blood

New Member
Joined
Dec 16, 2009
Messages
276
Reaction score
2
Location
Brazil
ok guys i have some problem with my yalaharian when i turn on my server its work but when i finish the the azerus teleport never gone and the normal room tp dont work anymore
ps; sorry my english

PHP:
local BlindField = {x=32782, y=31175, z=10, 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=32783, y=31159, z=10}
local buttomRight = {x=32783, y=31166, z=10}

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

local tp = {x=32783, y=31175, z=10}

local glo = {x=32783, y=31166, z=10}

function FirstWave()
    doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z})

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z})

    doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z})
end

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

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z})

    doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z})

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z})
end
function ThirdWave()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z})

    doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z})
end

function ThirdWave1()

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z})

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z})
end

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

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z})

    doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z})

    doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z})

end

function Glllobe()
item1 = getTileItemById(glo,9767)
doSetItemActionId(item1.uid, 58261)
end

if item.actionid == 58261 then
doSetItemActionId(item.uid, 58263)
local monsters = getMonstersfromArea(topLeft, buttomRight)
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

if getTileItemById(tp,1387).itemid == 1387 then
doRemoveItem(getTileItemById(tp,1387).uid)
end

addEvent(FirstWave, 0)
addEvent(SecondWave, 10000)
addEvent(ThirdWave, 20000)
addEvent(ThirdWave1, 24000)
addEvent(FourthWave, 38000)
addEvent(Glllobe, 900000)

elseif item.actionid == 58263 then
doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1)
end

return TRUE
end
 
8.6 is a client version, not a server version.
Explain your problem better, what should happen, what is wrong and what are the errors in your console.
 
my server is tfs 0.4 dev++ and error in my console is

Code:
[11:6:57.266] [C]: in function 'doTeleportThing' [11:6:57.266] data/movements/scripts/azerus.lua:47: in function <data/movements/scripts/azerus.lua:1>
 
movement script
Code:
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 = 32778, y = 31160, z = 10, stackpos = 253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x = 32788, y = 31172, 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
 
Back
Top