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

TFS 1.X+ Event Fire stormTfs 1.2

abdala ragab

Veteran OT User
Joined
Aug 18, 2018
Messages
461
Solutions
11
Reaction score
340
Location
gamelaot.sytes.net
hello guys I'm using this event and everything is working fine
But there is one problem that the fire attacks do not send the player to the temple
What is the solution,
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 = 5 --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 = 2 --when event has opened, how long until it starts? / cuantos minutos tarde el evento en empezar.
fsWaitingRoomPos = Position(677, 1077, 6) --middle of waiting room / punto medio de el cuarto de espera.
fsArena = Position(976, 917, 7) --when even start where should player be teleported in the arena? / punto donde seran transportados los players.
fsArenaFromPosition = Position(966, 907, 7) --pos of top left corner / posicion de esquina superior izquierda.
fsArenaToPosition = Position(987, 929, 7) --pos of bottom right corner /posicion de esquina inferior derecha.
fsMiddleEventArena = Position(976, 917, 7) --Middle pos of the arena / punto medio de la arena
fsWaitingRoomRadiusX = 8 --depends how big the waiting room is 20sqm to x / depende de lo grande la sala de espera en x
fsWaitingRoomRadiusY = 8 --depends how big the waiting room is 20sqm to y / depende de lo grande la sala de espera en y
fsEventArenaRadiusX = 15 --Depends how big the firestorm arena is 50sqm to x / depende de lo grande de la arena en x
fsEventArenaRadiusY = 15 --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(999, 1000, 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(998, 925, 7), randfire, 4)
        doSendDistanceShoot(Position(984, 935, 7), randfire, 4)
        doAreaCombatHealth(creature.uid, COMBAT_HOLYDAMAGE, randfire,randfire, -9999, -1000000,7)
                end
                end

            addEvent(doStartfirestorm, 500)
        end
end

function resetfsVariables()
        Game.setStorageValue(fsEventCountGlobalStorage, 0)
        Game.setStorageValue(fsJoinedCountGlobalStorage, 0)
        Game.setStorageValue(fsStartedGlobalStorage, 0)
end
 
hello guys I'm using this event and everything is working fine
But there is one problem that the fire attacks do not send the player to the temple
What is the solution,
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 = 5 --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 = 2 --when event has opened, how long until it starts? / cuantos minutos tarde el evento en empezar.
fsWaitingRoomPos = Position(677, 1077, 6) --middle of waiting room / punto medio de el cuarto de espera.
fsArena = Position(976, 917, 7) --when even start where should player be teleported in the arena? / punto donde seran transportados los players.
fsArenaFromPosition = Position(966, 907, 7) --pos of top left corner / posicion de esquina superior izquierda.
fsArenaToPosition = Position(987, 929, 7) --pos of bottom right corner /posicion de esquina inferior derecha.
fsMiddleEventArena = Position(976, 917, 7) --Middle pos of the arena / punto medio de la arena
fsWaitingRoomRadiusX = 8 --depends how big the waiting room is 20sqm to x / depende de lo grande la sala de espera en x
fsWaitingRoomRadiusY = 8 --depends how big the waiting room is 20sqm to y / depende de lo grande la sala de espera en y
fsEventArenaRadiusX = 15 --Depends how big the firestorm arena is 50sqm to x / depende de lo grande de la arena en x
fsEventArenaRadiusY = 15 --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(999, 1000, 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(998, 925, 7), randfire, 4)
        doSendDistanceShoot(Position(984, 935, 7), randfire, 4)
        doAreaCombatHealth(creature.uid, COMBAT_HOLYDAMAGE, randfire,randfire, -9999, -1000000,7)
                end
                end

            addEvent(doStartfirestorm, 500)
        end
end

function resetfsVariables()
        Game.setStorageValue(fsEventCountGlobalStorage, 0)
        Game.setStorageValue(fsJoinedCountGlobalStorage, 0)
        Game.setStorageValue(fsStartedGlobalStorage, 0)
end
fires.png

As you can see in the picture, the fire strikes do not remove the player or kill him
 
I used a new system and ran into this problem cant join event !fire join
i use> Fire Storm Event TFS 1.2 (https://otland.net/threads/fire-storm-event-tfs-1-2.250931/#post-2435459)
Code:
 dofile('data/lib/events/firestorm_event.lua')
function onSay(player, words, param)   
if Game.getStorageValue(configFireStormEvent.storages.joining) ~= 1 then
    player:sendCancelMessage('Fire Storm Event hasn\'t started yet.')
    return false
elseif param == '' then
    player:sendCancelMessage('Command param required (say: "!fire join" or "!fire leave.").')
    return false
elseif player:getLevel() < configFireStormEvent.players.minLevel then
    player:sendCancelMessage('You can\'t join to the event if you don\'t have a require '..configFireStormEvent.players.minLevel..' level.')
    return false
elseif getTileInfo(player:getPosition()).protection ~= true then
    player:sendCancelMessage('You can\'t join to the event if you aren\'t in protection zone.')
    return false
elseif player.getExhaustion(player, configFireStormEvent.storages.exhaust) > 0 then
    player:sendCancelMessage('You must wait '..player.getExhaustion(player, configFireStormEvent.storages.exhaust)..' seconds to use this command again.')
    return false
end

if param == 'join' then
    if player:getStorageValue(configFireStormEvent.storages.player) > 0 then
        player:sendCancelMessage('You have arleady joined to event. Wait patiently for start.')
    return false
    elseif doCountPlayersFireStormEvent() == configFireStormEvent.players.max then
        player:sendCancelMessage('Max players in the event have been reached.')
    return false
    end

    player:setMoveLocked(player, true)
    player:popupFYI(configFireStormEvent.text)
    player:setStorageValue(configFireStormEvent.storages.player, 1)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have joined to Fire Storm Event. You can\'t move until event don\'t start. Wait patiently for the event start.')
    player:sendTextMessage(MESSAGE_EVENT_ORANGE, 'You have joined to Fire Storm Event.')
elseif param == 'leave' then
    if player:getStorageValue(configFireStormEvent.storages.player) == 1 then
        player:setMoveLocked(false)
        player:setStorageValue(configFireStormEvent.storages.player, -1)
        player:sendTextMessage(MESSAGE_EVENT_ORANGE, 'You have left from the Fire Storm Event.')
    else
        player:sendCancelMessage('Command param required (say: "!fire join").')
        return false
    end
  
end
    player.setExhaustion(player, configFireStormEvent.storages.exhaust,5)
    return false
end


Lua:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/firestorm_start.lua:onSay
data/talkactions/scripts/firestorm_start.lua:15: attempt to call field 'getExhaustion' (a nil value)
stack traceback:
        [C]: in function 'getExhaustion'
        data/talkactions/scripts/firestorm_start.lua:15: in function <data/talkactions/scripts/firestorm_start.lua:2>
This is the text inside the problem
 
Back
Top