Ir para conteúdo

Featured Replies

Postado

[22:35:00.384] [Error - CreatureScript Interface]
[22:35:00.384] data/creaturescripts/scripts/passive/gotenks.lua:onStatsChange
[22:35:00.384] Description:
[22:35:00.384] data/creaturescripts/scripts/passive/gotenks.lua:10: attempt to call global 'doCreatureCastSpell' <a nil value>
[22:35:00.384] stack traceback:
[22:35:00.384] data/creaturescripts/scripts/passive/gotenks.lua:10: in function<data/creaturescripts/scripts/passive/gotenks.lua:7>

 

data/creaturescripts/scripts/passive/gotenks.lua

Spoiler

local config = {
    vocations = {72,73,74,75,76,77,78,79,80,81,82,83,84,85,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350},     --IDs das vocações.
    time = 1,                       --Exhaust, em minutos.
    hpPercent = 50,                 --Porcentagem de vida.
    spell = "passivagotenks"
}   
function onStatsChange(cid, attacker, type, combat, value)
    if type == STATSCHANGE_HEALTHLOSS and isPlayer(cid) and isInArray(config.vocations, getPlayerVocation(cid)) then
        if getPlayerStorageValue(cid, 18182) < os.time() and getCreatureHealth(cid) <= getCreatureMaxHealth(cid) * config.hpPercent / 100 then
        doCreatureCastSpell(cid, config.spell) 
            setPlayerStorageValue(cid, 18182, os.time() + config.time * 60)
        end
    end
    return true
end

 

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