Ir para conteúdo
  • Cadastre-se

(Resolvido)Como que resolvo esse erro?


Ir para solução Resolvido por roriscrave,

Posts Recomendados

local combat = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, 215)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 253)

function onGetFormulaValues(cid, level)
local skill = getPlayerSkill(cid, 2) -- "2" é o ID DA SKILL
local min = -((level*skill*00.1)+0) -- O DANO MINIMO DA ARMA É O LEVEL DO JOGADOR * A SKILL DO JOGADOR * 10 + 2500
local max = -((level*skill*00.1)+0) -- O DANO MINIMO DA ARMA É O LEVEL DO JOGADOR * A SKILL DO JOGADOR * 10 + 5000
    return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
    local skillmin = 20 -- MINIMO DE SKILL PRA LANÇAR A MAGIA
    if getPlayerSkillLevel(cid, skill) < skillmin then
        return doPlayerSendCancel(cid, "You must have at least ".. skillmin .." of sword skill to use this spell.")
    end
    return doCombat(cid, combat, var)
end


local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end

function onCastSpell(cid, var)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
local parameters = {cid = cid, var = var, combat = combat}


for k = 1, 5 do
    addEvent(function()
        if isCreature(cid) then
            addEvent(onCastSpell1, 0, parameters)
            doSendMagicEffect(position1, 173)
        end
    end, 1 + ((k-1) * 300))
end
return true
end


image.png.b58c422a5238cfa380db4496238cbd4e.png

 

Link para o post
Compartilhar em outros sites
  • Solução
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_HITCOLOR, 215)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 253)

function onGetFormulaValues(cid, level)
local skill = getPlayerSkill(cid, 2) -- "2" é o ID DA SKILL
local min = -((level*skill*00.1)+0) -- O DANO MINIMO DA ARMA É O LEVEL DO JOGADOR * A SKILL DO JOGADOR * 10 + 2500
local max = -((level*skill*00.1)+0) -- O DANO MINIMO DA ARMA É O LEVEL DO JOGADOR * A SKILL DO JOGADOR * 10 + 5000
    return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
    local skillmin = 20 -- MINIMO DE SKILL PRA LANÇAR A MAGIA
    if getPlayerSkillLevel(cid, skill) < skillmin then
        return doPlayerSendCancel(cid, "You must have at least ".. skillmin .." of sword skill to use this spell.")
    end
    return doCombat(cid, combat, var)
end


local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end

function onCastSpell(cid, var)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
local parameters = {cid = cid, var = var, combat = combat}


for k = 1, 5 do
    addEvent(function()
        if isCreature(cid) then
            addEvent(onCastSpell1, 0, parameters)
            doSendMagicEffect(position1, 173)
        end
    end, 1 + ((k-1) * 300))
end
return true
end

 

Link para o post
Compartilhar em outros sites

Na segunda linha do script troque combat1 por combat

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

Link para o post
Compartilhar em outros sites
12 horas atrás, roriscrave disse:

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_HITCOLOR, 215)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 253)

function onGetFormulaValues(cid, level)
local skill = getPlayerSkill(cid, 2) -- "2" é o ID DA SKILL
local min = -((level*skill*00.1)+0) -- O DANO MINIMO DA ARMA É O LEVEL DO JOGADOR * A SKILL DO JOGADOR * 10 + 2500
local max = -((level*skill*00.1)+0) -- O DANO MINIMO DA ARMA É O LEVEL DO JOGADOR * A SKILL DO JOGADOR * 10 + 5000
    return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
    local skillmin = 20 -- MINIMO DE SKILL PRA LANÇAR A MAGIA
    if getPlayerSkillLevel(cid, skill) < skillmin then
        return doPlayerSendCancel(cid, "You must have at least ".. skillmin .." of sword skill to use this spell.")
    end
    return doCombat(cid, combat, var)
end


local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end

function onCastSpell(cid, var)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
local parameters = {cid = cid, var = var, combat = combat}


for k = 1, 5 do
    addEvent(function()
        if isCreature(cid) then
            addEvent(onCastSpell1, 0, parameters)
            doSendMagicEffect(position1, 173)
        end
    end, 1 + ((k-1) * 300))
end
return true
end

 

Obrigado!

12 horas atrás, Yan Liima disse:

Na segunda linha do script troque combat1 por combat

Verdade, vim ver isso agora. Muito obrigado também.

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo