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

Action The Annihilator Quest (Map and Script)

Did you find this script by searching?

  • Yes, and I'm glad I found it.

  • No, but I appreciate the release.


Results are only viewable after voting.

J.Dre

Unity Games
Joined
May 18, 2011
Messages
2,647
Solutions
3
Reaction score
648
Location
United States
Information:
This is my latest version of the Anni that I have tracked and coded. I thought since we all love the Annihilator quest, I would share it with you. This is what the actual Annihilator quest is like in Tibia! Tested and working on TFS 0.3.7 & 1.0. May not work for TFS 0.2, but it should be fairly easy to make it work.

How does it work?
Pretty sure we all know how the Annihilator works... If not, you need to read up on it! However, this is slightly different (some may even say, "more advanced") than the average Annihilator. As you can see from the image below, there are rocks blocking walkable tiles, and a wall where the door should be. No worries! When you pull the lever for the first time, the rocks will be removed and Demon's will be placed inside the quest chamber, and the wall magically transform into a door. What happens if you want to go again? Good question! As long as nobody is inside the quest, pull the lever again and it will reset the quest back to how it appears in the image below! Pretty cool, huh? Enjoy. :D

Have questions, concerns or need assistance?
Post here and I may be able to help. Be sure to "tag" my name using the "@" symbol to notify me.

Update Log:

    • v1.0: Initial release.
    • * The initial release of the script.
    • v1.1: New release & update.
    • * Updated to work with TFS 1.0.

Before:
16gg8rr.png


After:
208fryp.png


The Map:

MediaFire (Download)

The script included in this download is for TFS 1.x ONLY! See below for other versions.


The Script:

data/actions/actions.xml
Code:
<action actionid="5000" event="script" value="quests/anni.lua"/>
data/actions/scripts/anni.lua

[Lua] Annihilator Quest - Pastebin.com (https://pastebin.com/xXZ4w0xY)

WARNING! TFS 0.3.6: You must change the following in the script:
Code:
doCreateMonster("Demon", pos)

qye4oz.jpg
 
Last edited by a moderator:
Well done, script looking good, but i don't understand what are the advantages of those stones? I read your "How does it work" section like 5 times and i still don't understand why are those stones necessary.
 
Well done, script looking good, but i don't understand what are the advantages of those stones? I read your "How does it work" section like 5 times and i still don't understand why are those stones necessary.

I didn't add them myself, if that's what you're implying.

Long story, somewhat short: On my way to track the Inquisition quest, after the server save, the map tracker caught a few of the stones... At that point I realized the quest is exactly like the picture I posted right after the game-world restarts. :confused: Therefore, I decided to make it exactly how it is on Tibia. If you think about it, the Annihilator we all know and love has never been accurate up to this point because when people went to track the Annihilator, it had either already been done. Or they had to pull the lever and complete the quest to get in. With this script, I provide a glimpse of the before and after.

Other than that, they serve no purpose, except perhaps the fulfillment of my need for accuracy. ;)
 
Last edited:
Woah, So real tibia annihilator works that way? :D Had no idea
 
Soo, that same anni.lua goea in creaturescripts and actions??
Edit: also map is no longer hosted
 
Soo, that same anni.lua goea in creaturescripts and actions??
Edit: also map is no longer hosted

Nope, this goes in actions.

I've updated the main post with a script for TFS 1.0, and I've also updated the download link. Enjoy. ;)
 
Super script thanks for the release =)

But does it also work on 0.3.6?

getting this error several times, seems it doesn't find the stones. >.<

[26/12/2014 14:36:59] [Error - Action Interface]
[26/12/2014 14:36:59] data/actions/scripts/quests/annihilator.lua:eek:nUse
[26/12/2014 14:36:59] Description:
[26/12/2014 14:36:59] (luaDoRemoveItem) Item not found

@J.Dre any idea? :)

PS: forgot to mention, I use the lever once and nothing happens. When I use it again it teleports me into the room with the stones still there.
 
Had problems at first, but J.Dre took his time to help me figure out the problem and it is now working just fine.
Very good script I recommend it.
 
@blixt22

You're welcome. Glad you like it. The chest script above should work, but I didn't test it.

I took a "screen shot" of it so people learn how to code - they're forced to type it themselves, lol. :D
 
Had problems at first, but J.Dre took his time to help me figure out the problem and it is now working just fine.
Very good script I recommend it.
You know it could actully be pretty neat if you shared what your problem was and what did solve it for you so others might be able to solve it too in case they stumble upon the same problem...


@Topic, in annilever.lua what does the "
room = {
{x = 33218, y = 31656, z = 13},
{x = 33225, y = 31662, z = 13}"

mean? What are those coordinations for?
 
  1. room = {
  2. {x = 33218, y = 31656, z = 13},
  3. {x = 33225, y = 31662, z = 13}
  4. },
is this from/to in the waiting room or the quest room? @J.Dre
 
Last edited:
And another huge bump!

@J.Dre

Trying to make this work on OTHire 7.72 map

The positions is correct but the lever just goes from left to right with no errors at all, and no lua errors.

I changed the unique id to 30015 for the lever and even gave it the same action id.

Here's the actions.xml
Lua:
<!-- Annihilator Quest -->
    <action actionid="30015" event="script" value="anni.lua"/>

And here's the anni.lua
Code:
local config = {
    daily = "no", -- allow only one team to enter per day? (like in global)
    level = 100,
    storage = 30015,
    room = {
        {x = 33218, y = 31656, z = 13},
        {x = 33225, y = 31662, z = 13}
    },
    stand = {
        {x = 33225, y = 31671, z = 13},
        {x = 33224, y = 31671, z = 13},
        {x = 33223, y = 31671, z = 13},
        {x = 33222, y = 31671, z = 13}
    },
    destination = {
        {x = 33222, y = 31659, z = 13},
        {x = 33221, y = 31659, z = 13},
        {x = 33220, y = 31671, z = 13},
        {x = 33219, y = 31671, z = 13}
    },
    wall = {
        {x = 33225, y = 31659, z = 13}
    },
    rocks = {
        {x = 33219, y = 31657, z = 13},
        {x = 33221, y = 31657, z = 13},
        {x = 33219, y = 31659, z = 13},
        {x = 33220, y = 31659, z = 13},
        {x = 33221, y = 31659, z = 13},
        {x = 33222, y = 31659, z = 13},
        {x = 33223, y = 31659, z = 13},
        {x = 33224, y = 31659, z = 13},
        {x = 33220, y = 31661, z = 13},
        {x = 33222, y = 31661, z = 13}
    },
    demons = {
        {x = 33219, y = 31657, z = 13},
        {x = 33221, y = 31657, z = 13},
        {x = 33223, y = 31659, z = 13},
        {x = 33224, y = 31659, z = 13},
        {x = 33220, y = 31661, z = 13},
        {x = 33222, y = 31661, z = 13}
    }
}

local function areaCheck(area)
    local monsters, players = {}, {}
    for x = config.room[1].x, config.room[2].x do
        for y = config.room[1].y, config.room[2].y do
            local t = getThingFromPos({x=x, y=y, z=config.room[1].z, stackpos=253})
            if t.uid > 0 then
                if isPlayer(t.uid) then
                    table.insert(players, t.uid)
                elseif isMonster(t.uid) then
                    table.insert(monsters, t.uid)
                end
            end
        end
    end
    return monsters, players
end

config.daily = getBooleanFromString(config.daily)
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.itemid == 1945) then
        if(config.daily) then
            return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
        else
            local monsters, players = areaCheck(config.room)
            if #players > 0 then
                return doPlayerSendCancel(cid, "There are players inside, please be patient.")
            elseif #monsters > 0 then
                for _, k in pairs(monsters) do
                    doRemoveThing(k)
                end
            end

            for _, v in ipairs(config.rocks) do
                doCreateItem(1285, 1, v)
            end

            local closed, open = getTileItemById(config.wall[1], 5108), getTileItemById(config.wall[1], 5109)
            if(closed.uid > 0) then
                doTransformItem(closed.uid, 1025)
            elseif(open.uid > 0) then
                doTransformItem(open.uid, 1025)
            end

            doTransformItem(item.uid, item.itemid + 1)
        end
        return true
    end

    if(item.itemid ~= 1946) then
        return true
    end

    local players = {}
    for _, position in ipairs(config.stand) do
        local pid = getTopCreature(position).uid
        if(pid == 0 or not isPlayer(pid)) then
            return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
        elseif(getCreatureStorage(pid, config.storage) > 0) then
            return doPlayerSendCancel(cid, "Someone has already completed this quest.")
        elseif(getPlayerLevel(pid) < config.level) then
            return doPlayerSendCancel(cid, "Someone is below level 100.")
        end

        table.insert(players, pid)
    end

   

    for _, pos in ipairs(config.demons) do
        doCreateMonster("Demon", pos) --TFS 0.3.6 -> [ doCreateMonster("Demon", pos) ]
        doSendMagicEffect(pos, CONST_ME_ENERGYAREA)
    end

    for i, pid in ipairs(players) do
        doSendMagicEffect(config.stand[i], CONST_ME_POFF)
        doTeleportThing(pid, config.destination[i], false)
        doSendMagicEffect(config.destination[i], CONST_ME_TELEPORT)
    end

    doTransformItem(item.uid, item.itemid - 1)
    return true
end
 
Sorted it out. Had to use this code to make it work.

Lua:
-- annihilator

function onUse(cid, item, frompos, item2, topos)

       if item.uid == 30015 and item.itemid == 1945 then
        player1pos = {x=33225, y=31671, z=13, stackpos=253}
        player1 = getThingfromPos(player1pos)

        player2pos = {x=33224, y=31671, z=13, stackpos=253}
        player2 = getThingfromPos(player2pos)

        player3pos = {x=33223, y=31671, z=13, stackpos=253}
        player3 = getThingfromPos(player3pos)

        player4pos = {x=33222, y=31671, z=13, stackpos=253}
        player4 = getThingfromPos(player4pos)


        if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
            queststatus1 = getPlayerStorageValue(player1.uid,7000)
            queststatus2 = getPlayerStorageValue(player2.uid,7000)
            queststatus3 = getPlayerStorageValue(player3.uid,7000)
            queststatus4 = getPlayerStorageValue(player4.uid,7000)

            if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
                            demon1pos = {x=33219, y=31657, z=13} 
                            demon2pos = {x=33221, y=31657, z=13} 
                            demon3pos = {x=33220, y=31661, z=13} 
                            demon4pos = {x=33222, y=31661, z=13} 
                            demon5pos = {x=33223, y=31659, z=13} 
                            demon6pos = {x=33224, y=31659, z=13} 
                            doSummonCreature("Demon", demon1pos)
                            doSummonCreature("Demon", demon2pos)
                            doSummonCreature("Demon", demon3pos)
                            doSummonCreature("Demon", demon4pos)
                            doSummonCreature("Demon", demon5pos)
                            doSummonCreature("Demon", demon6pos)
                nplayer1pos = {x=33222, y=31659, z=13}
                nplayer2pos = {x=33221, y=31659, z=13}
                nplayer3pos = {x=33220, y=31659, z=13}
                nplayer4pos = {x=33219, y=31659, z=13}

                doSendMagicEffect(player1pos,2)
                doSendMagicEffect(player2pos,2)
                doSendMagicEffect(player3pos,2)
                doSendMagicEffect(player4pos,2)

                doTeleportThing(player1.uid,nplayer1pos)
                doTeleportThing(player2.uid,nplayer2pos)
                doTeleportThing(player3.uid,nplayer3pos)
                doTeleportThing(player4.uid,nplayer4pos)

                doSendMagicEffect(nplayer1pos,10)
                doSendMagicEffect(nplayer2pos,10)
                doSendMagicEffect(nplayer3pos,10)
                doSendMagicEffect(nplayer4pos,10)

                
       doTransformItem(item.uid,item.itemid+1)
            else
                doPlayerSendCancel(cid,"There is already a team in the quest room.")
            end
        else
            doPlayerSendCancel(cid,"You need 4 players to do this quest.")
        end

    elseif item.uid == 8000 and item.itemid == 1946 then
        if getPlayerAccess(cid) > 0 then
            doTransformItem(item.uid,item.itemid-1)
        else
            doPlayerSendCancel(cid,"Sorry, not possible.")
        end
    else
        return 0
    end

    return 1
end
 
Back
Top