Zombie Event BETA! [Tfs 1.0] Vers: 0.5

Discussion in 'GlobalEvents, Spells & CreatureEvents' started by Printer, Apr 24, 2014.

  1. Codinablack

    Codinablack Dreamer

    Joined:
    Dec 26, 2013
    Messages:
    1,215
    Likes Received:
    370
    Best Answers:
    4
    You aren't using 1.0

    The problem should be fixed by changing
    Code (Text):
    1. function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
    2.     local monster = Monster(cid)
    to

    Code (Text):
    1. function onDeath(monster, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
    2.  
    3.  
     
  2. darkjav

    darkjav Senior Developer

    Joined:
    Apr 29, 2008
    Messages:
    196
    Likes Received:
    12
    Best Answers:
    0
    @Codinablack, i have the same error :/

    EDIT:
    I trying:

    Code (Text):
    1. function onDeath(monster, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
    to

    Code (Text):
    1. function onDeath(monster, corpse, killer, mostDamageKiller, unjustified, mostDamage_unjustified)
    and the same :(
     
    Last edited: May 24, 2015
  3. Codinablack

    Codinablack Dreamer

    Joined:
    Dec 26, 2013
    Messages:
    1,215
    Likes Received:
    370
    Best Answers:
    4
    Are you using 1.0 1.1 or 1.2?
     
  4. darkjav

    darkjav Senior Developer

    Joined:
    Apr 29, 2008
    Messages:
    196
    Likes Received:
    12
    Best Answers:
    0
    @Codinablack, is TFS 1.0 and I fixed changing:

    Code (Text):
    1. function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
    2. local monster = Monster(cid)
    to

    Code (Text):
    1. function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
    2.   local monster = Creature(cid)
    SOLVED :D
     
    Codinablack likes this.
  5. Hugofasima

    Hugofasima Website: thenosegang.servegame.com

    Joined:
    Jun 24, 2015
    Messages:
    206
    Likes Received:
    23
    Best Answers:
    0
    My TFS is 1.1

    Error onSay and Onthink:
    Code (Text):
    1. data/talkactions/scripts/events/zombie_join.lua:11: attempt to compare nil with
    2. number
    and
    Code (Text):
    1. data/globalevents/scripts/events/zombie_think.lua:4: attempt to compare nil with
    2. number
    How can I solve it?
     
  6. Sir Islam

    Sir Islam Never Give Up

    Joined:
    Jun 6, 2008
    Messages:
    500
    Likes Received:
    116
    Best Answers:
    1
    for talkactions
    Code (Text):
    1. dofile('data/zombie_system.lua')
    2.  
    3. function onSay(cid, words, param)
    4.     local player = Player(cid)
    5.  
    6.     if tonumber(Game.getStorageValue(102))  == 2 then
    7.         player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Zombie Event has already started.')
    8.         return false
    9.     end
    10.  
    11.    if tonumber(Game.getStorageValue(102)) < 1 then
    12.         player:sendTextMessage(MESSAGE_INFO_DESCR, "The Zombie Event has not started yet.")
    13.         return false
    14.     end
    15.  
    16.     if tonumber(Game.getStorageValue(100))  > zeMaxPlayers then
    17.         player:sendTextMessage(MESSAGE_INFO_DESCR, 'The Zombie Event is already full! ['.. tonumber(Game.getStorageValue(zeJoinedCountGlobalStorage)) ..'/'.. zeMaxPlayers ..']')
    18.         return false
    19.     end
    20.  
    21.     if player:isPzLocked() then
    22.         player:sendCancelMessage('You can\'t join the zombie while you are in a fight!')
    23.         return false
    24.     end
    25.  
    26.     player:teleportTo(zeWaitingRoomPos)
    27.     if not player:getGroup():getAccess() then
    28.         Game.setStorageValue(100, tonumber(Game.getStorageValue(zeJoinedCountGlobalStorage)) + 1)
    29.         Game.broadcastMessage(string.format('%s has joined the Zombie Event! [%s/'.. zeMaxPlayers ..'].', player:getName(), Game.getStorageValue(zeJoinedCountGlobalStorage)), MESSAGE_STATUS_WARNING)
    30.         player:setStorageValue(zeJoinStorage, 1)
    31.     end
    32.     return false
    33. end

    for onThink
    Code (Text):
    1.  
    2. dofile('data/zombie_system.lua')
    3.  
    4. function onThink(interval, lastExecution, thinkInterval)
    5.   if tonumber(Game.getStorageValue(102)) < 1 then
    6.   local teleport = Game.createItem(1387, 1, zeCreateTeleportPosition)
    7.   if teleport then
    8.   teleport:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 7000)
    9.   end
    10.   Game.setStorageValue(tonumber(102),1)
    11.   print('Zombie Event has started & waiting for players to join! Min: '.. zeMinPlayers ..'/'.. zeMaxPlayers ..'.')
    12.   Game.broadcastMessage('The Zombie Event has started! You have '.. zeWaitMinutes ..' minutes to join!', MESSAGE_STATUS_WARNING)
    13.   addEvent(startZombie, zeWaitMinutes * 60 * 1000)
    14.   end
    15.   return true
    16. end
    17.  
     
    Last edited: Jul 30, 2015
    Hugofasima likes this.
  7. Hugofasima

    Hugofasima Website: thenosegang.servegame.com

    Joined:
    Jun 24, 2015
    Messages:
    206
    Likes Received:
    23
    Best Answers:
    0
    Still the same error Sir Islam!

    Code (Text):
    1. Lua Script Error: [GlobalEvent Interface]
    2. data/globalevents/scripts/events/zombie_think.lua:onThink
    3. data/globalevents/scripts/events/zombie_think.lua:4: attempt to compare nil with
    4. number
    5. stack traceback:
    6.         [C]: in function '__lt'
    7.         data/globalevents/scripts/events/zombie_think.lua:4: in function <data/g
    8. lobalevents/scripts/events/zombie_think.lua:3>
    9. [Error - GlobalEvents::think] Failed to execute event: zombie
     
  8. Sir Islam

    Sir Islam Never Give Up

    Joined:
    Jun 6, 2008
    Messages:
    500
    Likes Received:
    116
    Best Answers:
    1
    update my reply recopy
     
    Hugofasima likes this.
  9. FLE

    FLE Member

    Joined:
    Oct 5, 2008
    Messages:
    424
    Likes Received:
    25
    Best Answers:
    0
    Using TFS 1.1 -

    Hello, I am having some problems.. I will do my best too explain.

    1 .
    When first player enters the event it says 0/15..
    the event is not supposed too start unless 3 people have joined,
    but i just went thru the portal 3x..
    and for some reason the 1st time I went thru the tp, it said 5/15?
    --
    05:53 The Zombie Event has started! You have 4 minutes to join!
    05:54 Martin has joined the Zombie Event! [5/15].
    05:54 Martin has joined the Zombie Event! [6/15].
    05:54 Martin has joined the Zombie Event! [7/15].

    2 .
    The portal does not disappear when the event starts..
    instead -
    06:18 The Zombie Event has already started.

    3 .
    nobody wins when its over?

    ----------------------------------------------------
    No errors in console, I installed everything properly (i think)

    umm ya....

    I think its some storage value problem?

    If you can help me, please let me know what scripts you need too see!

    Thanks,
    -Martin
     
  10. Hugofasima

    Hugofasima Website: thenosegang.servegame.com

    Joined:
    Jun 24, 2015
    Messages:
    206
    Likes Received:
    23
    Best Answers:
    0
    Still the same Sir Islam!! I made it @Sir Islam
    dofile('data/zombie_system.lua')

    function onThink(interval, lastExecution, thinkInterval)

    if Game.getStorageValue(zeStartedGlobalStorage) ~= 1 then
    local teleport = Game.createItem(1387, 1, zeCreateTeleportPosition)
    teleport:setDestination(zeWaitingRoomPos)
    Game.setStorageValue(zeStartedGlobalStorage, 1)
    print('Zombie Event has started & waiting for players to join! Min: '.. zeMinPlayers ..'/'.. zeMaxPlayers ..'.')
    Game.broadcastMessage('The Zombie Event has started! You have '.. zeWaitMinutes ..' minutes to join!', MESSAGE_STATUS_WARNING)
    addEvent(startZombie, zeWaitMinutes * 60 * 1000)
    end
    return true
    end

    I'm trying to puzzle this storage configuration too @FLE.. I'm completely lost xD
    How did you solve this problem
    Code (Text):
    1. Lua Script Error: [Main Interface]
    2. in a timer event called from:
    3. (Unknown scriptfile)
    4. data/zombie_system.lua:49: attempt to compare number with nil
    5. stack traceback:
    6.         [C]: in function '__lt'
    7.         data/zombie_system.lua:49: in function 'doSummonZombie'
    8.         data/zombie_system.lua:62: in function 'doStartZombieEvasion'
    9.         data/zombie_system.lua:45: in function <data/zombie_system.lua:28>
    This attempt to compare number with nil is annoying me!!!
     
    Last edited: Jul 30, 2015
  11. RazorBlade

    RazorBlade Snek

    Joined:
    Nov 7, 2009
    Messages:
    2,012
    Likes Received:
    602
    Best Answers:
    0

    Change
    zeJoinedCountGlobalStorage = 101 --Zombie spawned Count
    to
    zeZombieCountGlobalStorage = 101 --Zombie spawned Count

    Just a small typo. Can you update that in post 2 @Printer
     
    Hugofasima likes this.
  12. Lava Titan

    Lava Titan High Exp OTS Developer

    Joined:
    Jul 25, 2009
    Messages:
    1,449
    Likes Received:
    56
    Best Answers:
    0
    any1 else got this?

    Code (Text):
    1. Lua Script Error: [GlobalEvent Interface]
    2. data/globalevents/scripts/events/zombie/zombie_think.lua:onThink
    3. data/globalevents/scripts/events/zombie/zombie_think.lua:4: attempt to compare n
    4. il with number
    5. stack traceback:
    6.         [C]: in function '__lt'
    7.         data/globalevents/scripts/events/zombie/zombie_think.lua:4: in function
    8. <data/globalevents/scripts/events/zombie/zombie_think.lua:3>
    9. [Error - GlobalEvents::think] Failed to execute event: zombie
     
  13. Awesomedudei

    Awesomedudei My BFF is outside closet

    Joined:
    Jan 20, 2010
    Messages:
    211
    Likes Received:
    39
    Best Answers:
    0
    Getting this [​IMG]
     
  14. vininadin

    vininadin New Member

    Joined:
    Jul 1, 2009
    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
  15. VitorNM

    VitorNM New Member

    Joined:
    Sep 18, 2015
    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    any map to this event??????
     
  16. Gram

    Gram New Member

    Joined:
    Nov 19, 2016
    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Helpme
    [​IMG]
     
  17. bybbzan

    bybbzan Active Member

    Joined:
    Aug 4, 2012
    Messages:
    688
    Likes Received:
    54
    Best Answers:
    1
    Same problem as Gram.. :/ Using tfs 1.2
     
  18. bybbzan

    bybbzan Active Member

    Joined:
    Aug 4, 2012
    Messages:
    688
    Likes Received:
    54
    Best Answers:
    1
    Omg, i'm so stupid. You didn't choose the correct path to the zombie_system file.
    This is how every file starts
    Code (Text):
    1. dofile('data/zombie_system.lua')
    Which means that your zombie_system.lua file just has to be in the data folder.
    But if you placed the file for example in data/lib it should be like this
    Code (Text):
    1. dofile('data/lib/zombie_system.lua')
     

Share This Page

Loading...