Boss script (Forgottenl) TFS 1.2

Joined
Dec 27, 2014
Messages
60
Best answers
0
Likes
7
Location
Sweden
#1
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 ^^
 
Joined
Dec 9, 2018
Messages
7
Best answers
0
Likes
1
#2
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 :(
 
Top