Firestorm Event | Tfs 1.2

Discussion in 'GlobalEvents, Spells & CreatureEvents' started by Scrappy Coco, Oct 6, 2015.

  1. Zippiex

    Zippiex Member

    Joined:
    Nov 4, 2015
    Messages:
    252
    Likes Received:
    19
    Best Answers:
    2
    Wow i like it, good job man.
     
    Scrappy Coco likes this.
  2. Eldin

    Eldin Eldin Projects

    Joined:
    Jun 12, 2008
    Messages:
    1,301
    Likes Received:
    533
    Best Answers:
    0
    Well done, a Capture the Flag script would be loved and welcome as well, thank you.

    Kind Regards,
    Eldin.
     
    Scrappy Coco likes this.
  3. Hugofasima

    Hugofasima Website: thenosegang.servegame.com

    Joined:
    Jun 24, 2015
    Messages:
    206
    Likes Received:
    23
    Best Answers:
    0
    Does it also works for TFS 1.1? That would be great! :)
     
  4. froie

    froie Expert Mapper

    Joined:
    May 27, 2013
    Messages:
    194
    Likes Received:
    5
    Best Answers:
    0
    Does this work on tfs 1.0?
     
  5. Kalima Online

    Kalima Online New Member

    Joined:
    Mar 8, 2009
    Messages:
    22
    Likes Received:
    1
    Best Answers:
    0
    I get an error when a player die those who have died are made pk
     
  6. Acrenactive

    Acrenactive ★Designer★

    Joined:
    Mar 21, 2013
    Messages:
    224
    Likes Received:
    53
    Best Answers:
    0
    @Scrappy Coco the event work, but people dont die or take damge why ?
     
  7. Kubakos

    Kubakos Banned User

    Joined:
    Mar 3, 2010
    Messages:
    744
    Likes Received:
    27
    Best Answers:
    0
    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: Jan 26, 2017
  8. Sp0tl3ss

    Sp0tl3ss Nestalia.org

    Joined:
    Jul 19, 2014
    Messages:
    253
    Likes Received:
    10
    Best Answers:
    0
    can i trigger this event manualy?
     
  9. DukeeH

    DukeeH Active Member

    Joined:
    Dec 6, 2010
    Messages:
    496
    Likes Received:
    25
    Best Answers:
    1
    @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
     
  10. aalqaq2

    aalqaq2 Trying to help, but I'm not too good at it.

    Joined:
    Apr 10, 2017
    Messages:
    83
    Likes Received:
    3
    Best Answers:
    3
    Is anyone having trouble with the Teleporter spawning? I get the message "Firestorm event has started" but no entry portal and no console errors.
     
  11. Sp0tl3ss

    Sp0tl3ss Nestalia.org

    Joined:
    Jul 19, 2014
    Messages:
    253
    Likes Received:
    10
    Best Answers:
    0
    yeah had same error culdnt find a sulution
     
  12. Apollos

    Apollos Dude who does stuff

    Joined:
    Apr 22, 2009
    Messages:
    388
    Likes Received:
    215
    Best Answers:
    21
    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:

    Code (Lua):
    1. if not Game.getStorageValue(fsStartedGlobalStorage) or Game.getStorageValue(fsStartedGlobalStorage) < 1 then
    2.  
     
  13. Vulcan_

    Vulcan_ Support Team Support Team

    Joined:
    Feb 14, 2015
    Messages:
    3,813
    Likes Received:
    1,706
    Best Answers:
    283
    can change the Game.getStorageValue function itself to work like normal storage values and return -1 if it doesn't find the value
    Code (Lua):
    1. function Game.getStorageValue(key)
    2.     return globalStorageTable[key] or -1
    3. end
     
    Apollos likes this.
  14. wafuboe

    wafuboe Member

    Joined:
    Dec 24, 2010
    Messages:
    722
    Likes Received:
    9
    Best Answers:
    1
    works for 1,3?
     
  15. Shadow_

    Shadow_ CarcooIzx.org ( Soon )

    Joined:
    Jun 2, 2018
    Messages:
    104
    Likes Received:
    13
    Best Answers:
    0
    data/firestorm_event.lua
    add this instead of that one in the script because it wasn't killing the players
    Code (Lua):
    1. -- firestorm Variables
    2. fsJoinedCountGlobalStorage = 18900 --Player joined event count / recuento de players.
    3. fsJoinStorage = 18901 --player join storage / storage del jugador a unirse.
    4. fsMinPlayers = 2 --min players needed when time runout / minimo de players necesarios para comenzar el evento.
    5. fsMaxPlayers = 20 --max players to join / maximo de players.
    6. fsTrophy = 7369 --trophy itemid / itemid del premio(que no sea stackable).
    7. fsEventCountGlobalStorage = 18902 --firestorm Count (no move/no moverle).
    8. fsWaitMinutes = 1 --when event has opened, how long until it starts? / cuantos minutos tarde el evento en empezar.
    9. fsWaitingRoomPos = Position(1508, 657, 7) --middle of waiting room / punto medio de el cuarto de espera.
    10. fsArena = Position(1510, 628, 7) --when even start where should player be teleported in the arena? / punto donde seran transportados los players.
    11. fsArenaFromPosition = Position(1505, 619, 7) --pos of top left corner / posicion de esquina superior izquierda.
    12. fsArenaToPosition = Position(1523, 636, 7) --pos of bottom right corner /posicion de esquina inferior derecha.
    13. fsMiddleEventArena = Position(1514, 628, 7) --Middle pos of the arena / punto medio de la arena
    14. fsWaitingRoomRadiusX = 13 --depends how big the waiting room is 20sqm to x / depende de lo grande la sala de espera en x
    15. fsWaitingRoomRadiusY = 7 --depends how big the waiting room is 20sqm to y / depende de lo grande la sala de espera en y
    16. fsEventArenaRadiusX = 19 --Depends how big the firestorm arena is 50sqm to x / depende de lo grande de la arena en x
    17. fsEventArenaRadiusY = 18 --Depends how big the firestorm arena is 50sqm to y / depende de lo grande de la arena en y
    18. fsStartedGlobalStorage = 18903 -- Value: 0 == false, 1 == true, 2 == started --State of the event
    19. fsCreateTeleportPosition = Position(1428, 999, 7) --Where should the teleport be created? / posicion donde sera creado el teleport?
    20. function startfirestorm()
    21.     local specs = Game.getSpectators(fsWaitingRoomPos, false, true, 0, fsWaitingRoomRadiusX, 0, fsWaitingRoomRadiusY)
    22.     if Game.getStorageValue(fsJoinedCountGlobalStorage) <= fsMinPlayers then
    23.         for i = 1, #specs do
    24.             specs[i]:teleportTo(specs[i]:getTown():getTemplePosition(), false)
    25.             specs[i]:setStorageValue(fsJoinStorage, 0)
    26.         end
    27.         resetfsVariables()
    28.         Game.broadcastMessage('firestorm Event failed to start, because of to little players joined the event!', MESSAGE_STATUS_WARNING)
    29.         return true
    30.     end
    31.     for i = 1, #specs do
    32.         local rX, rY, rZ
    33.         rX = math.random(fsArenaFromPosition.x, fsArenaToPosition.x)
    34.         rY = math.random(fsArenaFromPosition.y, fsArenaToPosition.y)
    35.         rZ = math.random(fsArenaFromPosition.z, fsArenaToPosition.z)
    36.         specs[i]:teleportTo(Position(rX, rY, rZ))
    37.     end
    38.     Game.broadcastMessage("firestorm Event has started, good luck to all participant.", MESSAGE_STATUS_WARNING)
    39.     Game.setStorageValue(fsStartedGlobalStorage, 2)
    40.     doStartfirestorm()
    41. end
    42. function doStartfirestorm()
    43.         if  Game.getStorageValue(fsJoinedCountGlobalStorage) > fsMaxPlayers then return false end
    44.                 if Game.getStorageValue(fsStartedGlobalStorage) == 2 then
    45.                 local specs = Game.getSpectators(fsArena, false, true, 0, 10, 0, 10)
    46.                  for i = 1, #specs do
    47.         local randX, randY, randZ
    48.         randX = math.random(fsArenaFromPosition.x, fsArenaToPosition.x)
    49.         randY = math.random(fsArenaFromPosition.y, fsArenaToPosition.y)
    50.         randZ = math.random(fsArenaFromPosition.z, fsArenaToPosition.z)
    51.                 local randfire = Position(randX, randY, randZ)
    52.                  local randX1, randY1, randZ1
    53.         randX1 = math.random(fsArenaFromPosition.x, fsArenaToPosition.x)
    54.         randY1 = math.random(fsArenaFromPosition.y, fsArenaToPosition.y)
    55.         randZ1 = math.random(fsArenaFromPosition.z, fsArenaToPosition.z)
    56.                 local randfire1 = Position(randX1, randY1, randZ1)
    57.             local creature, players = nil, Game.getPlayers()
    58.                                                  for i = 1, #players do
    59.                                                  creature = players[i]
    60.                 doSendDistanceShoot(fsArenaFromPosition, randfire, 4)
    61.                 doSendDistanceShoot(fsArenaToPosition, randfire, 4)
    62.                 doSendDistanceShoot(Position(1523, 619, 7), randfire, 4)
    63.                 doSendDistanceShoot(Position(1505, 636, 7), randfire, 4)
    64.                 doSendMagicEffect(randfire, 7)
    65.            local target = Tile(randfire):getBottomCreature()
    66.            local MaxHealth = target:getMaxHealth()
    67.              if target then
    68.                 Creature(target):addHealth(-MaxHealth)
    69.              end
    70.                 end
    71.                                 end
    72.             addEvent(doStartfirestorm, 500)
    73.         end
    74. end
    75. function resetfsVariables()
    76.         Game.setStorageValue(fsEventCountGlobalStorage, 0)
    77.         Game.setStorageValue(fsJoinedCountGlobalStorage, 0)
    78.         Game.setStorageValue(fsStartedGlobalStorage, 0)
    79. end
     
  16. Thorn

    Thorn Well-Known Member

    Joined:
    Sep 24, 2012
    Messages:
    2,033
    Likes Received:
    807
    Best Answers:
    0
    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!

     
    Last edited by a moderator: Jul 10, 2018
  17. Shadow_

    Shadow_ CarcooIzx.org ( Soon )

    Joined:
    Jun 2, 2018
    Messages:
    104
    Likes Received:
    13
    Best Answers:
    0
    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
     
  18. Thorn

    Thorn Well-Known Member

    Joined:
    Sep 24, 2012
    Messages:
    2,033
    Likes Received:
    807
    Best Answers:
    0
    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?
     
  19. Shadow_

    Shadow_ CarcooIzx.org ( Soon )

    Joined:
    Jun 2, 2018
    Messages:
    104
    Likes Received:
    13
    Best Answers:
    0
    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
     
  20. Thorn

    Thorn Well-Known Member

    Joined:
    Sep 24, 2012
    Messages:
    2,033
    Likes Received:
    807
    Best Answers:
    0
    mmm yeah the position is my doubt, those positions i mentioned earlier, are the one that shoot the fire? like the towers position?
     

Share This Page

Loading...