[10.77+ - TFS 1.2] The Forgotten [WAR] Server v1.1 (UPDATED 17/12/15)

Discussion in 'Data Packs' started by mdwilliams, Jul 12, 2015.

Tags:
  1. xLosT

    xLosT Active Member

    Joined:
    Jan 11, 2010
    Messages:
    1,034
    Likes Received:
    11
    Best Answers:
    0
    @mdwilliams sorry, received level, not skills
     
  2. mdwilliams

    mdwilliams Premium User Premium User

    Joined:
    Nov 15, 2007
    Messages:
    557
    Likes Received:
    94
    Best Answers:
    0
    @xLosT
    I haven't tested this, but it looks like it's just a case-sensitivity issue in one of the variables.

    - Open your war_login.lua
    - Find "KnightMeleeUp1 = 110"
    - Change to "knightMeleeUp1 = 110"
    - Save & Close

    I hope this helps
    Merry Christmas & Happy New Year!
     
    xLosT likes this.
  3. mdwilliams

    mdwilliams Premium User Premium User

    Joined:
    Nov 15, 2007
    Messages:
    557
    Likes Received:
    94
    Best Answers:
    0
    A bug was reported in my frag reward script, here is the new one:

    Code (Text):
    1.  
    2. dofile("war_config.lua")
    3.  
    4. -- CREDIT TO NINJA @ OTLAND FOR THE BASE SCRIPT
    5. -- REF: https://otland.net/threads/tfs-1-0-experience-from-killing-higher-level-players.212691/#post-2039964
    6.  
    7. function onKill(cid, target, lastHit)
    8.  
    9.     local attackPlayer = Player(target)
    10.  
    11.     local reward = {
    12.             item = rewardItem,
    13.             count = rewardCount
    14.             }
    15.  
    16.     if not attackPlayer then
    17.         return true
    18.     end
    19.  
    20.     for id, damage in pairs(attackPlayer:getDamageMap()) do
    21.         local player = Player(id)
    22.         if player then
    23.             if player:getIp() ~= target:getIp() then
    24.                 local experience = attackPlayer:getExperience()
    25.                 local expFormula = (experience * expMultiplier)
    26.                 local bonusExpFormula = (experience * bonusExpMultiplier)
    27.  
    28.                 if player:getLevel() <= maximumLevel then
    29.                     player:addExperience(math.floor(expFormula), true)
    30.                     if player:getStorageValue(extraExpStor) >= 1 then
    31.                         player:addExperience(math.floor(bonusExpFormula), true)
    32.                         player:setStorageValue(extraExpStor, player:getStorageValue(extraExpStor) - 1)
    33.                         player:sendTextMessage(MESSAGE_INFO_DESCR, "Bonus frag EXP added! " .. player:getStorageValue(extraExpStor) .. " bonus frags remaining!")
    34.                     end
    35.                 end
    36.    
    37.                 player:addItem(reward.item, reward.count)
    38.                 player:setStorageValue(fragStor, player:getStorageValue(fragStor) + 1)
    39.  
    40.                 if player:getStorageValue(doubleFragRewardStor) >= 1 then
    41.                     player:addItem(reward.item, reward.count)
    42.                     player:setStorageValue(doubleFragRewardStor, player:getStorageValue(doubleFragRewardStor) -1)
    43.                     player:sendTextMessage(MESSAGE_INFO_DESCR, "Bonus frag reward added! " .. player:getStorageValue(doubleFragRewardStor) .. " bonus frags remaining!")
    44.                 end
    45.             end
    46.         end
    47.     end
    48. end
    49.  
     

Share This Page

Loading...