• 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

mmm yeah the position is my doubt, those positions i mentioned earlier, are the one that shoot the fire? like the towers position?
Yup

@Thorn forgot to tell you there is local randfire in this script edit it to the corners position top left bottom right , good luck :D

NVM it was another script just edit those 2
 
Last edited by a moderator:
Nice scripting/programming job. But how can it be fun? Never played this event and it looks like its a random-winner-event.
 
I have error, i have 2 players in event and its dont start, and no show error in console.

16:33 Luna has joined the Firestorm Event! [2/5].
16:34 Welcome to vip area. Enjoy!
16:34 firestorm Event failed to start, because of to little players joined the event!
 
I have error, i have 2 players in event and its dont start, and no show error in console.

16:33 Luna has joined the Firestorm Event! [2/5].
16:34 Welcome to vip area. Enjoy!
16:34 firestorm Event failed to start, because of to little players joined the event!
look at this message ?
16:34 Welcome to vip area. Enjoy!
it seems like you are using the same action id for VIP checking on stepin and in firestorm stepin which mean movement event so change the actionid of the firestorm event and try again
 
look at this message ?
16:34 Welcome to vip area. Enjoy!
it seems like you are using the same action id for VIP checking on stepin and in firestorm stepin which mean movement event so change the actionid of the firestorm event and try again
I have error, i have 2 players in event and its dont start, and no show error in console.

16:33 Luna has joined the Firestorm Event! [2/5].
16:34 Welcome to vip area. Enjoy!
16:34 firestorm Event failed to start, because of to little players joined the event!

the 16:33 message clearly says that you have only 2 OUT OF THE 5 necessary players to start the event 🤔
and the 16:34 message CLEARLY says why the event did not started o_O
 
the 16:33 message clearly says that you have only 2 OUT OF THE 5 necessary players to start the event 🤔
and the 16:34 message CLEARLY says why the event did not started o_O
lol yeah, didn't see pay attention to this, never though this may be his issue.
Code:
[LIST=1]
[*]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.
[/LIST]
The event can be start with 2 player min or 5 player max, so i can start event with 2 player.
Post automatically merged:

look at this message ?
16:34 Welcome to vip area. Enjoy!
it seems like you are using the same action id for VIP checking on stepin and in firestorm stepin which mean movement event so change the actionid of the firestorm event and try again
This message show to me when i teleport temple, because event dont start.
 
check min players in fs.lua in lib files
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.

I alredy change to min 2 max 2, same error. No have player enough to start event.
 
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.

I alredy change to min 2 max 2, same error. No have player enough to start event.
i think its about the operation there is nothing wrong. FsMinPlayers = 2 means if player[count] > 2 start else don't start so you need to write 1 and let 2 players enter or write 2 and let minimum 3 players enter or change the function that is responsible for this from player[count] > FsMinPlayers to player[count] >= FsMinPlayers
 
Player can't die does not take damage :( help me pls i use TFS 1.2 8.6 client
 
tfs 1.3 ,8.6 client
everything working fine, as soon as you enter there is fire, and then it stops and error pops outs:


Lua:
Lua script error : [Main Interface]
in a timer event called from:
<Unkown scriptfile>
data/firestorm_event.lua:40: attempt to call global 'dostartfirestorm' <a nil value>
stack traceback:
[c]: in function 'dostartfirestorm'
data/firestorm.lua:40: in function <data/firestorm.lua:20>
here is my script:-

Code:
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()
[/CODE]
 
Last edited:
Hi Otland today I bring you the event FireStorm for those unfamiliar with the event here a video of the demonstration
We begin installing the library.

data/firestorm_event.lua
firestorm library - Pastebin.com (http://pastebin.com/AdCw0gT9)

continue with Creaturescripts/scripts

Code:
dofile('data/firestorm_event.lua')
function onPrepareDeath(player, killer)
    local winner = 0
    if player:getStorageValue(fsJoinStorage) >= 1 then
       Game.setStorageValue(fsJoinedCountGlobalStorage, Game.getStorageValue(fsJoinedCountGlobalStorage)-1)
        player:teleportTo(player:getTown():getTemplePosition())
        player:setStorageValue(fsJoinStorage, 0)
        player:addHealth(player:getMaxHealth())

        if Game.getStorageValue(fsJoinedCountGlobalStorage) <= 1 then --Event ended, someone won!
         local pla, play = nil, Game.getPlayers()
         for i = 1, #play do
        pla = play[i]
              if pla:getStorageValue(fsJoinStorage) == 1 then
            winner = pla:getId()
            break
            end
            end
            winner = Player(winner)
             if winner then
                winner:teleportTo(winner:getTown():getTemplePosition())
                winner:addHealth(winner:getMaxHealth())
                local trophy = winner:addItem(fsTrophy, 1)
                if trophy then
                    trophy:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, '['.. winner:getName() ..'] has won the firestorm Event.')
                end
                 Game.broadcastMessage(string.format('%s is the winner of firestorm Event', winner:getName()), MESSAGE_STATUS_WARNING)
            end
            resetfsVariables()
        end
        return false
    end
    return true
end

Creaturescripts.xml

Code:
<!-- firestorm -->
    <event type="prepareDeath" name="fire_event" script="xxxx.lua"/>

Add this in your login
Code:
player:registerEvent("fire_event")

Continue with Globalevents/scripts

Code:
dofile('data/firestorm_event.lua')
function onThink(interval, lastExecution, thinkInterval)
resetfsVariables()
if Game.getStorageValue(fsStartedGlobalStorage) < 1 then
  local teleport = doCreateItem(11796,1,fsCreateTeleportPosition)
  if teleport then
   doSetItemActionId(teleport, 5499)
  doSendMagicEffect(fsCreateTeleportPosition, CONST_ME_TELEPORT)
end
local r_tp = Tile(fsCreateTeleportPosition):getItemById(11796)
addEvent(function() r_tp:remove() getTileItemById(fsCreateTeleportPosition, 11796) end, 60 * 1000)
addEvent(function() doSendMagicEffect(fsCreateTeleportPosition, CONST_ME_TELEPORT) end, 60 * 1000)
  end
  Game.setStorageValue(fsStartedGlobalStorage,1)
  print('firestorm Event has started & waiting for players to join! Min: '.. fsMinPlayers ..'/'.. fsMaxPlayers ..'.')
  Game.broadcastMessage('The firestorm Event has started! You have '.. fsWaitMinutes ..' minutes to join!', MESSAGE_STATUS_WARNING)
  addEvent(startfirestorm, fsWaitMinutes * 60 * 1000)
        return true
        end

Globalevents.xml

Code:
<!-- FireStorm-->
    <globalevent name="firestorm_event" interval="72000000" script="xxxx.lua"/>

You can edit this part to run it according to your need
interval="72000000"

the last Movements/scripts
Code:
dofile('data/firestorm_event.lua')
      function onStepIn(creature, item, position, fromPosition)
         local player = creature:getPlayer()
        if Game.getStorageValue(fsStartedGlobalStorage) == 2 then
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Firestorm Event has already started.')
            player:teleportTo(fromPosition, true)
            return false
        end
        if Game.getStorageValue(fsStartedGlobalStorage) == 0 then
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Firestorm Event has not started yet.')
            player:teleportTo(fromPosition, true)
            return false
        end
       if Game.getStorageValue(fsJoinedCountGlobalStorage) >= fsMaxPlayers then
            player:teleportTo(fromPosition, true)
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Firestorm Event is already full! ['.. Game.getStorageValue(fsJoinedCountGlobalStorage) ..'/'.. fsMaxPlayers ..']')
            return false
        end
        player:teleportTo(fsWaitingRoomPos)
        Game.setStorageValue(fsJoinedCountGlobalStorage, Game.getStorageValue(fsJoinedCountGlobalStorage) + 1)
        Game.broadcastMessage(string.format('%s has joined the Firestorm Event! [%s/'.. fsMaxPlayers ..'].', player:getName(), Game.getStorageValue(fsJoinedCountGlobalStorage)), MESSAGE_STATUS_WARNING)
        player:setStorageValue(fsJoinStorage, 1)
        return true
        end

Movements. xml

Code:
<!-- firestorm -->
    <movevent event="StepIn" actionid="5499" script="xxxx.lua"/>






Note that in the library He comes his configuaracion in English and Spanish anything do not hesitate to consult in this post.
That would all hope they serve and feel free to comment accept comments good and bad and worse .



Perhaps also soon release Capture The Flag and Zombie Event for tfs 1.2

Special Thanks :
@GodSuimty - (Blacktibia editing, video capture and testing )
Printer(take as a basis an event he did for TFS 1.0)

Lua Script Error: [Test Interface]
data/movements/scripts/firestorm.lua
data/firestorm_event.lua:81: unexpected symbol near '['
[Warning - Event::checkScript] Can not load script: scripts/firestorm.lua


Lua Script Error: [Test Interface]
data/creaturescripts/scripts/fire_event.lua
data/firestorm_event.lua:81: unexpected symbol near '['
[Warning - Event::checkScript] Can not load script: scripts/fire_event.lua


Lua Script Error: [Test Interface]
data/globalevents/scripts/firestorm.lua
data/firestorm_event.lua:81: unexpected symbol near '['
[Warning - Event::checkScript] Can not load script: scripts/firestorm.lua

I hope someone can help me
i use tfs 1.2
 
Hi Otland today I bring you the event FireStorm for those unfamiliar with the event here a video of the demonstration
We begin installing the library.

data/firestorm_event.lua
firestorm library - Pastebin.com (http://pastebin.com/AdCw0gT9)

continue with Creaturescripts/scripts

Code:
dofile('data/firestorm_event.lua')
function onPrepareDeath(player, killer)
    local winner = 0
    if player:getStorageValue(fsJoinStorage) >= 1 then
       Game.setStorageValue(fsJoinedCountGlobalStorage, Game.getStorageValue(fsJoinedCountGlobalStorage)-1)
        player:teleportTo(player:getTown():getTemplePosition())
        player:setStorageValue(fsJoinStorage, 0)
        player:addHealth(player:getMaxHealth())

        if Game.getStorageValue(fsJoinedCountGlobalStorage) <= 1 then --Event ended, someone won!
         local pla, play = nil, Game.getPlayers()
         for i = 1, #play do
        pla = play[i]
              if pla:getStorageValue(fsJoinStorage) == 1 then
            winner = pla:getId()
            break
            end
            end
            winner = Player(winner)
             if winner then
                winner:teleportTo(winner:getTown():getTemplePosition())
                winner:addHealth(winner:getMaxHealth())
                local trophy = winner:addItem(fsTrophy, 1)
                if trophy then
                    trophy:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, '['.. winner:getName() ..'] has won the firestorm Event.')
                end
                 Game.broadcastMessage(string.format('%s is the winner of firestorm Event', winner:getName()), MESSAGE_STATUS_WARNING)
            end
            resetfsVariables()
        end
        return false
    end
    return true
end

Creaturescripts.xml

Code:
<!-- firestorm -->
    <event type="prepareDeath" name="fire_event" script="xxxx.lua"/>

Add this in your login
Code:
player:registerEvent("fire_event")

Continue with Globalevents/scripts

Code:
dofile('data/firestorm_event.lua')
function onThink(interval, lastExecution, thinkInterval)
resetfsVariables()
if Game.getStorageValue(fsStartedGlobalStorage) < 1 then
  local teleport = doCreateItem(11796,1,fsCreateTeleportPosition)
  if teleport then
   doSetItemActionId(teleport, 5499)
  doSendMagicEffect(fsCreateTeleportPosition, CONST_ME_TELEPORT)
end
local r_tp = Tile(fsCreateTeleportPosition):getItemById(11796)
addEvent(function() r_tp:remove() getTileItemById(fsCreateTeleportPosition, 11796) end, 60 * 1000)
addEvent(function() doSendMagicEffect(fsCreateTeleportPosition, CONST_ME_TELEPORT) end, 60 * 1000)
  end
  Game.setStorageValue(fsStartedGlobalStorage,1)
  print('firestorm Event has started & waiting for players to join! Min: '.. fsMinPlayers ..'/'.. fsMaxPlayers ..'.')
  Game.broadcastMessage('The firestorm Event has started! You have '.. fsWaitMinutes ..' minutes to join!', MESSAGE_STATUS_WARNING)
  addEvent(startfirestorm, fsWaitMinutes * 60 * 1000)
        return true
        end

Globalevents.xml

Code:
<!-- FireStorm-->
    <globalevent name="firestorm_event" interval="72000000" script="xxxx.lua"/>

You can edit this part to run it according to your need
interval="72000000"

the last Movements/scripts
Code:
dofile('data/firestorm_event.lua')
      function onStepIn(creature, item, position, fromPosition)
         local player = creature:getPlayer()
        if Game.getStorageValue(fsStartedGlobalStorage) == 2 then
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Firestorm Event has already started.')
            player:teleportTo(fromPosition, true)
            return false
        end
        if Game.getStorageValue(fsStartedGlobalStorage) == 0 then
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Firestorm Event has not started yet.')
            player:teleportTo(fromPosition, true)
            return false
        end
       if Game.getStorageValue(fsJoinedCountGlobalStorage) >= fsMaxPlayers then
            player:teleportTo(fromPosition, true)
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Firestorm Event is already full! ['.. Game.getStorageValue(fsJoinedCountGlobalStorage) ..'/'.. fsMaxPlayers ..']')
            return false
        end
        player:teleportTo(fsWaitingRoomPos)
        Game.setStorageValue(fsJoinedCountGlobalStorage, Game.getStorageValue(fsJoinedCountGlobalStorage) + 1)
        Game.broadcastMessage(string.format('%s has joined the Firestorm Event! [%s/'.. fsMaxPlayers ..'].', player:getName(), Game.getStorageValue(fsJoinedCountGlobalStorage)), MESSAGE_STATUS_WARNING)
        player:setStorageValue(fsJoinStorage, 1)
        return true
        end

Movements. xml

Code:
<!-- firestorm -->
    <movevent event="StepIn" actionid="5499" script="xxxx.lua"/>






Note that in the library He comes his configuaracion in English and Spanish anything do not hesitate to consult in this post.
That would all hope they serve and feel free to comment accept comments good and bad and worse .



Perhaps also soon release Capture The Flag and Zombie Event for tfs 1.2

Special Thanks :
@GodSuimty - (Blacktibia editing, video capture and testing )
Printer(take as a basis an event he did for TFS 1.0)
Lua Script Error: [Test Interface]
data/movements/scripts/firestorm_event.lua
data/firestorm_event.lua:81: unexpected symbol near '['
stack traceback:
[C]: at 0x7ff7879fc6a0
[C]: in function 'dofile'
data/movements/scripts/firestorm_event.lua:1: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/firestorm_event.lua
Post automatically merged:

why fire no attack pllayer?
 
Last edited:
with TFS 1.5 and after entering the teleport nothing happens

anyone know how to fix it? there are no errors in the console
 
otx 10.98 the event does not kill players //script from main post
I used code 1 from users and I got a different error and still nothing
Lua:
Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
data/firestorm_event.lua:67: attempt to index local 'target' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/firestorm_event.lua:67: in function 'doStartfirestorm'
        data/firestorm_event.lua:41: in function <data/firestorm_event.lua:21>
Any help?

EDIT: I did what my friend did
the system won't be present, but does anyone have time for skulls?
 
Last edited:
Back
Top