• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Damage Increase Potion tfs 1.3

Brasilingos

New Member
Joined
Oct 25, 2020
Messages
13
Reaction score
0
Hello Guys,
I have script for dmg boost potion, but he is not working correctly.
After player use potion - there is nothing changes he is not attacking more. Can someone help me?
Lua:
local DMGboostpotion = Action()

local DMGboostpotions = CreatureEvent("DMGboostpotions")

function DMGboostpotion.onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if player:getStorageValue(18060) >= os.time() then
        player:say('You already have +10% dmg deals!', TALKTYPE_MONSTER_SAY)
        return true
    end

    player:setStorageValue(18060, os.time() + 86400)
    Item(item.uid):remove(1)
    player:say('Your 24 hours of +10% dmg deals has started!', TALKTYPE_MONSTER_SAY)
    return true
end


    function DMGboostpotions.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    if attacker:getStorageValue(18060) >= os.time() then
        return primaryDamage * 1000, primaryType, secondaryDamage, secondaryType
    end

    return primaryDamage, primaryType, secondaryDamage, secondaryType
end


DMGboostpotion:id(12544)
DMGboostpotion:register()
DMGboostpotions:register()
 
Top