Boss script (Forgottenl) TFS 1.2

Lucifer

Member
Joined
Dec 27, 2014
Messages
68
Reaction score
9
Location
Sweden
Searching for a script i remember in forgottenl server.
But the script need to be for tfs 1.2

U need to be 4 players to be teleported to the boss like in this picture.
(like anni but here can u be teleported 100 times without need to wait
and the lever will work every time.
bossblack.png

When u got teleported u will run to the boss and start attacking it, every player who attack that monster get something in they backpack.
When the monster die all will get teleported to the temple. And the monster will respawn after 15 min.

Maybe its to big request, but maybe someone can help me anyway ^^
 

Steve Albert

Banned User
Joined
Dec 9, 2018
Messages
267
Reaction score
100
Modified original script
otland/forgottenserver (https://github.com/otland/forgottenserver/blob/1.2/data/actions/scripts/quests/annihilator.lua)
Lua:
local playerPosition = {
    {x = 0, y = 0, z = 0},
    {x = 0, y = 0, z = 0},
    {x = 0, y = 0, z = 0},
    {x = 0, y = 0, z = 0}
}
local newPosition = {
    {x = 0, y = 0, z = 0},
    {x = 0, y = 0, z = 0},
    {x = 0, y = 0, z = 0},
    {x = 0, y = 0, z = 0}
}

local switch = {
    [1945] = 1946,
    [1946] = 1945
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if switch[item.itemid] then
        local players = {}
        for _, position in ipairs(playerPosition) do
            local topPlayer = Tile(position):getTopCreature()
            players[#players + 1] = topPlayer
        end

        for i, targetPlayer in ipairs(players) do
            Position(playerPosition[i]):sendMagicEffect(CONST_ME_POFF)
            targetPlayer:teleportTo(newPosition[i], false)
            targetPlayer:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA)
        end
        item:transform(switch[item.itemid])
    end
    return true
end
Sorry the rest you will have to figure out I only know how to edit code :(
 
OP
Lucifer

Lucifer

Member
Joined
Dec 27, 2014
Messages
68
Reaction score
9
Location
Sweden
Thanks for helping me but it's something wrong with this script.
I can use the lever only for 1 player, i need to make it for 4 players not only 1.
When i pull the lever just 1 player got tpd.

@Steve Albert
 
Top