Ir para conteúdo

Featured Replies

Postado
  • Solução

Atualizei, com level agora:

 

----------- Configurações Iniciais ---------------
local exhaust_time = 10 -- em segundos
local effect = 11 -- ID do Efeito
local mana = 20 -- Quantidade de Mana
local level = 20 -- Level minimo
local dano = {100, 500}
local delay = 5 -- em milésimos (meio segundo), tempo de um efeito para outro
local premmy = 'true' -- Precisa ser premium SIM (true) ou Não (false)
local strg_exh = 32321 -- Storage que salva Exhaust (Não precisa editar)
----------- FIM das Configurações -----------------

local eff1 = {
{0, 0, 0},
{1, 2, 0},
{0, 0, 0}
}

local eff2 = {
{0, 0, 0},
{0, 3, 0},
{0, 0, 0}
}

local eff3 = {
{0, 0, 0},
{0, 2, 1},
{0, 0, 0}
}

local eff4 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 1}
}

local eff5 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 0},
{0, 0, 1}
}

local eff6 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 0},
{0, 1, 0}
}

local eff7 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 0},
{1, 0, 0}
}

local eff8 = {
{0, 0, 0},
{0, 2, 0},
{1, 0, 0},
{0, 0, 0}
}

local tw1 = createCombatArea(eff1)
local tw2 = createCombatArea(eff2)
local tw3 = createCombatArea(eff3)
local tw4 = createCombatArea(eff4)
local tw5 = createCombatArea(eff5)
local tw6 = createCombatArea(eff6)
local tw7 = createCombatArea(eff7)
local tw8 = createCombatArea(eff8)

function onSay(cid, words, param, channel)

local hitmin = (getPlayerLevel(cid) + dano[1])
local hitmax = (getPlayerLevel(cid) + dano[2])

    if premmy == 'true' and isPremium(cid) then
        if exhaustion.get(cid, strg_exh) == false then
            if getPlayerLevel(cid) >= level then
                if getCreatureMana(cid) >= mana then
                    addEvent(doAreaCombatHealth, delay * 100, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw1, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 200, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw2, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 300, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw3, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 400, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw4, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 500, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw5, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 600, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw6, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 700, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw7, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 800, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw8, -hitmin, -hitmax, effect)
                    exhaustion.set(cid, strg_exh, exhaust_time)
                    doCreatureAddMana(cid, -mana)
                else
                    doPlayerSendCancel(cid, "Você precisa de "..mana.." para usar esta magia.")
                end
            else
                doPlayerSendCancel(cid, "Você precisa ser no mínimo "..level.." para usar esta magia.")
            end
        else
            doPlayerSendCancel(cid, "Precisa esperar "..exhaustion.get(cid, strg_exh).." segundos para usar novamente.")
        end
    else
        doPlayerSendCancel(cid, "Esta magia é somente para players Premium Account.")
    end
    
return true
end

 

Se não depende de Premium Account:

----------- Configurações Iniciais ---------------
local exhaust_time = 10 -- em segundos
local effect = 11 -- ID do Efeito
local mana = 20 -- Quantidade de Mana
local level = 20 -- Level minimo
local dano = {100, 500}
local delay = 5 -- em milésimos (meio segundo), tempo de um efeito para outro
local strg_exh = 32321 -- Storage que salva Exhaust (Não precisa editar)
----------- FIM das Configurações -----------------

local eff1 = {
{0, 0, 0},
{1, 2, 0},
{0, 0, 0}
}

local eff2 = {
{0, 0, 0},
{0, 3, 0},
{0, 0, 0}
}

local eff3 = {
{0, 0, 0},
{0, 2, 1},
{0, 0, 0}
}

local eff4 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 1}
}

local eff5 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 0},
{0, 0, 1}
}

local eff6 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 0},
{0, 1, 0}
}

local eff7 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 0},
{1, 0, 0}
}

local eff8 = {
{0, 0, 0},
{0, 2, 0},
{1, 0, 0},
{0, 0, 0}
}

local tw1 = createCombatArea(eff1)
local tw2 = createCombatArea(eff2)
local tw3 = createCombatArea(eff3)
local tw4 = createCombatArea(eff4)
local tw5 = createCombatArea(eff5)
local tw6 = createCombatArea(eff6)
local tw7 = createCombatArea(eff7)
local tw8 = createCombatArea(eff8)

function onSay(cid, words, param, channel)

local hitmin = (getPlayerLevel(cid) + dano[1])
local hitmax = (getPlayerLevel(cid) + dano[2])

        if exhaustion.get(cid, strg_exh) == false then
            if getPlayerLevel(cid) >= level then
                if getCreatureMana(cid) >= mana then
                    addEvent(doAreaCombatHealth, delay * 100, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw1, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 200, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw2, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 300, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw3, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 400, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw4, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 500, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw5, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 600, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw6, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 700, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw7, -hitmin, -hitmax, effect)
                    addEvent(doAreaCombatHealth, delay * 800, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw8, -hitmin, -hitmax, effect)
                    exhaustion.set(cid, strg_exh, exhaust_time)
                    doCreatureAddMana(cid, -mana)
                else
                    doPlayerSendCancel(cid, "Você precisa de "..mana.." para usar esta magia.")
                end
            else
                doPlayerSendCancel(cid, "Você precisa ser no mínimo "..level.." para usar esta magia.")
            end
        else
            doPlayerSendCancel(cid, "Precisa esperar "..exhaustion.get(cid, strg_exh).." segundos para usar novamente.")
        end
    
return true
end

 

Boa sorte.

Editado por Adriano SwaTT (veja o histórico de edições)

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

  • 2 weeks later...
  • Respostas 7
  • Visualizações 682
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Boa tarde.   Fiz em talkactions pois não curto muito spells, trabalhei muito pouco com.. Enfim, segue abaixo:     Boa sorte.

  • Atualizei, com level agora:     Se não depende de Premium Account:   Boa sorte.

Postado

Vlew, Adriano sempre ajudando, heiin <3 Rep + pro cê mano !!

Quando as pessoas ajudarem, além de clicar em "Gostei" lembre-se de clicar também em "Melhor Resposta" pra que o tópico fique como resolvido. 

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo