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

Firestorm Event | Tfs 1.2

Well done, a Capture the Flag script would be loved and welcome as well, thank you.

Kind Regards,
Eldin.
 
Does it also works for TFS 1.1? That would be great! :)
 
Not working properly for me. When the event does launch, people in the event get hitted but never dies/are sent to temple.
No errors in console, I'm using tfs 1.2

EDIT:

I've made the arena in no pvp zone, thats can be the problem?

EDIT2:
Okay there are 2 problems.
1. If protection level in config is set to 100, then lower levels if they join to the event they are invicible because they cant die. (So to fix that there should be an level requirement to join the event)

2. If somone is hitted others get white skull
 
Last edited:
@Scrappy Coco, thanks for the event.
About the map, do you still have it?
Will someday release the CTF? Really want it for 1.x
 
Is anyone having trouble with the Teleporter spawning? I get the message "Firestorm event has started" but no entry portal and no console errors.
 
Is anyone having trouble with the Teleporter spawning? I get the message "Firestorm event has started" but no entry portal and no console errors.

yeah had same error culdnt find a sulution

I think it's because Game.getStorageValue(fsStartedGlobalStorage) is returning nil and you can't compare a number with nil so I would try this on line 4 of the globalevents script:

Lua:
if not Game.getStorageValue(fsStartedGlobalStorage) or Game.getStorageValue(fsStartedGlobalStorage) < 1 then
 
I think it's because Game.getStorageValue(fsStartedGlobalStorage) is returning nil and you can't compare a number with nil so I would try this on line 4 of the globalevents script:

Lua:
if not Game.getStorageValue(fsStartedGlobalStorage) or Game.getStorageValue(fsStartedGlobalStorage) < 1 then
can change the Game.getStorageValue function itself to work like normal storage values and return -1 if it doesn't find the value
Lua:
function Game.getStorageValue(key)
    return globalStorageTable[key] or -1
end
 
data/firestorm_event.lua
add this instead of that one in the script because it wasn't killing the players
Lua:
-- firestorm Variables
fsJoinedCountGlobalStorage = 18900 --Player joined event count / recuento de players.
fsJoinStorage = 18901 --player join storage / storage del jugador a unirse.
fsMinPlayers = 2 --min players needed when time runout / minimo de players necesarios para comenzar el evento.
fsMaxPlayers = 20 --max players to join / maximo de players.
fsTrophy = 7369 --trophy itemid / itemid del premio(que no sea stackable).
fsEventCountGlobalStorage = 18902 --firestorm Count (no move/no moverle).
fsWaitMinutes = 1 --when event has opened, how long until it starts? / cuantos minutos tarde el evento en empezar.
fsWaitingRoomPos = Position(1508, 657, 7) --middle of waiting room / punto medio de el cuarto de espera.
fsArena = Position(1510, 628, 7) --when even start where should player be teleported in the arena? / punto donde seran transportados los players.
fsArenaFromPosition = Position(1505, 619, 7) --pos of top left corner / posicion de esquina superior izquierda.
fsArenaToPosition = Position(1523, 636, 7) --pos of bottom right corner /posicion de esquina inferior derecha.
fsMiddleEventArena = Position(1514, 628, 7) --Middle pos of the arena / punto medio de la arena
fsWaitingRoomRadiusX = 13 --depends how big the waiting room is 20sqm to x / depende de lo grande la sala de espera en x
fsWaitingRoomRadiusY = 7 --depends how big the waiting room is 20sqm to y / depende de lo grande la sala de espera en y
fsEventArenaRadiusX = 19 --Depends how big the firestorm arena is 50sqm to x / depende de lo grande de la arena en x
fsEventArenaRadiusY = 18 --Depends how big the firestorm arena is 50sqm to y / depende de lo grande de la arena en y
fsStartedGlobalStorage = 18903 -- Value: 0 == false, 1 == true, 2 == started --State of the event
fsCreateTeleportPosition = Position(1428, 999, 7) --Where should the teleport be created? / posicion donde sera creado el teleport?
function startfirestorm()
    local specs = Game.getSpectators(fsWaitingRoomPos, false, true, 0, fsWaitingRoomRadiusX, 0, fsWaitingRoomRadiusY)
    if Game.getStorageValue(fsJoinedCountGlobalStorage) <= fsMinPlayers then
        for i = 1, #specs do
            specs[i]:teleportTo(specs[i]:getTown():getTemplePosition(), false)
            specs[i]:setStorageValue(fsJoinStorage, 0)
        end
        resetfsVariables()
        Game.broadcastMessage('firestorm Event failed to start, because of to little players joined the event!', MESSAGE_STATUS_WARNING)
        return true
    end
    for i = 1, #specs do
        local rX, rY, rZ
        rX = math.random(fsArenaFromPosition.x, fsArenaToPosition.x)
        rY = math.random(fsArenaFromPosition.y, fsArenaToPosition.y)
        rZ = math.random(fsArenaFromPosition.z, fsArenaToPosition.z)
        specs[i]:teleportTo(Position(rX, rY, rZ))
    end
    Game.broadcastMessage("firestorm Event has started, good luck to all participant.", MESSAGE_STATUS_WARNING)
    Game.setStorageValue(fsStartedGlobalStorage, 2)
    doStartfirestorm()
end
function doStartfirestorm()
        if  Game.getStorageValue(fsJoinedCountGlobalStorage) > fsMaxPlayers then return false end
                if Game.getStorageValue(fsStartedGlobalStorage) == 2 then
                local specs = Game.getSpectators(fsArena, false, true, 0, 10, 0, 10)
                 for i = 1, #specs do
        local randX, randY, randZ
        randX = math.random(fsArenaFromPosition.x, fsArenaToPosition.x)
        randY = math.random(fsArenaFromPosition.y, fsArenaToPosition.y)
        randZ = math.random(fsArenaFromPosition.z, fsArenaToPosition.z)
                local randfire = Position(randX, randY, randZ)
                 local randX1, randY1, randZ1
        randX1 = math.random(fsArenaFromPosition.x, fsArenaToPosition.x)
        randY1 = math.random(fsArenaFromPosition.y, fsArenaToPosition.y)
        randZ1 = math.random(fsArenaFromPosition.z, fsArenaToPosition.z)
                local randfire1 = Position(randX1, randY1, randZ1)
            local creature, players = nil, Game.getPlayers()
                                                 for i = 1, #players do
                                                 creature = players[i]
                doSendDistanceShoot(fsArenaFromPosition, randfire, 4)
                doSendDistanceShoot(fsArenaToPosition, randfire, 4)
                doSendDistanceShoot(Position(1523, 619, 7), randfire, 4)
                doSendDistanceShoot(Position(1505, 636, 7), randfire, 4)
                doSendMagicEffect(randfire, 7)
           local target = Tile(randfire):getBottomCreature()
           local MaxHealth = target:getMaxHealth()
             if target then
                Creature(target):addHealth(-MaxHealth)
             end
                end
                                end
            addEvent(doStartfirestorm, 500)
        end
end
function resetfsVariables()
        Game.setStorageValue(fsEventCountGlobalStorage, 0)
        Game.setStorageValue(fsJoinedCountGlobalStorage, 0)
        Game.setStorageValue(fsStartedGlobalStorage, 0)
end
 
hey buddy could you explain to me 2 things plz?

1) what are these?

doSendDistanceShoot(Position(1523, 619, 7), randfire, 4)
doSendDistanceShoot(Position(1505, 636, 7), randfire, 4)

i dont know what coordenates to put there

2) where should i put the actionid from movements? also what actionid should i put in the towers?

thanks!

hey buddy could you explain to me 2 things plz?

1) what are these?

doSendDistanceShoot(Position(1523, 619, 7), randfire, 4)
doSendDistanceShoot(Position(1505, 636, 7), randfire, 4)

i dont know what coordenates to put there

2) where should i put the actionid from movements? also what actionid should i put in the towers?
3) why does the reward item have to be non stackable? :O

thanks!
 
Last edited by a moderator:
hey buddy could you explain to me 2 things plz?

1) what are these?

doSendDistanceShoot(Position(1523, 619, 7), randfire, 4)
doSendDistanceShoot(Position(1505, 636, 7), randfire, 4)

i dont know what coordenates to put there

2) where should i put the actionid from movements? also what actionid should i put in the towers?

thanks!
okay look first these sending effect randomly on the floor and where the effect hits it will kill the player to be disqualified from the event just edit the position ( the top left corner and the bottom right corner ) any action id but be sure its not used by any another script + towers aren't using action id because you aready added doSendDistanceShoot() which makes the distance effect without using aid sorry for being late if you found it hard just msg me and i will give you my discord.
Good luck
 
okay look first these sending effect randomly on the floor and where the effect hits it will kill the player to be disqualified from the event just edit the position ( the top left corner and the bottom right corner ) any action id but be sure its not used by any another script + towers aren't using action id because you aready added doSendDistanceShoot() which makes the distance effect without using aid sorry for being late if you found it hard just msg me and i will give you my discord.
Good luck
uhmmm so those positions are from where the fires come from? so i should put the towers in those position? oh and the actionid from movements, where does that go?
 
uhmmm so those positions are from where the fires come from? so i should put the towers in those position? oh and the actionid from movements, where does that go?
you are using the action id to set it in the tp which will be created when the event start just add it and don't do anything with it ( copy exactly the whole script for the thread and only take my file and edit the positions nothing more and good luck again
 
you are using the action id to set it in the tp which will be created when the event start just add it and don't do anything with it ( copy exactly the whole script for the thread and only take my file and edit the positions nothing more and good luck again
mmm yeah the position is my doubt, those positions i mentioned earlier, are the one that shoot the fire? like the towers position?
 
Back
Top