• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

damage in spell

Drs1705

Member
Joined
Dec 26, 2011
Messages
69
Reaction score
14
Hi,

How do I put this damage
Code:
function onGetFormulaValues(cid, level)
min = -(level * 1.60) / 1.0
max = -(level * 2.50) / 1.0
        return min, max
end

And add as axhaust whom received damage?
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)

In this spell
Code:
local config = {
walks = 10, -- qnts passos irá dar
delay = 750, -- tempo entre 1 passo e outro
speed = 100, --- velocidade do passo
delaycast = 100, -- delay pra carregar (200 milisegundos por cada 10% da spell)
effect = 63, -- efeito que sai enquanto carrega
key = 61728, -- storage q fica salvo se o channeling foi realizado com sucesso
storagCooldown = 61729, -- storage que salva o cooldown da spell
cooldown = 30 -- tempo entre 1 uso e outro da spell
}

function onCastSpell(cid, var)

if getPlayerStorageValue(cid, config.storagCooldown) - os.time() <= 0 then
    setPlayerStorageValue(cid, config.storagCooldown, os.time() + config.cooldown)
else
    doPlayerSendCancel(cid, "Preparando habilidade, aguarde ".. getPlayerStorageValue(cid, config.storagCooldown) - os.time() .." segundo(s).")
    return false
end
local time = onCastChannel(cid, getCreatureTarget(cid), config.delaycast, config.effect, config.key)
addEvent(function()
    if isCreature(cid) and getPlayerStorageValue(cid, config.key) == 11 then         
        Taunt(cid, variantToNumber(var), config.delay, config.walks)
        doCreatureSay(variantToNumber(var), "I WILL KILL YOU!", 20, false, 0, getCreaturePosition(variantToNumber(var)))
        doCreatureSay(cid, "COME AT ME BRO", 20)
        doChangeSpeed(variantToNumber(var), (config.speed - getCreatureBaseSpeed(variantToNumber(var))))
        addEvent(function()
            if isCreature(variantToNumber(var)) then
                doChangeSpeed(variantToNumber(var), (-config.speed + getCreatureBaseSpeed(variantToNumber(var))))
            end
        end, config.delay * (config.walks + 1))
    elseif isCreature(cid) then
        doPlayerSendCancel(cid, "You broke the channeling spell so the cast was canceled.")
    end
end, time)
return true
end
 
Back
Top