Ir para conteúdo
  • Cadastre-se

(Resolvido)SPELL TARGET - IMPOSSIVEL?


Ir para solução Resolvido por Rusherzin,

Posts Recomendados

Tenho uma spell de health no meu OT, como se fosse o exura sio "fulano

 

Só que essa magia tem o intuito de ser usada APENAS para healar outros players e não a si próprio. 

 

Como faço pra deixar ela healando SOMENTE a outros players e não poder ser usada em mim?

 

Já tentei de tudo mas não consigo.

 

 

(Ps. a magia é grande assim mesmo, ela heala várias vezes seguidas o player.)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat1, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat1, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat2, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat3, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat3, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat4, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat4, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat5, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat5, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat6, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat6, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat6, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat7, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat7, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat7, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat8 = createCombatObject()
setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat8, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat8, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat8, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat9 = createCombatObject()
setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat9, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat9, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat9, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat10, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat10, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat11 = createCombatObject()
setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat11, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat11, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat11, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat12 = createCombatObject()
setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat12, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat12, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat12, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat13 = createCombatObject()
setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat13, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat13, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat13, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat13, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat14 = createCombatObject()
setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat14, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat14, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat14, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat14, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat15 = createCombatObject()
setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat15, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat15, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat15, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat15, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat16 = createCombatObject()
setCombatParam(combat16, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat16, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat16, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat16, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat16, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat17 = createCombatObject()
setCombatParam(combat17, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat17, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat17, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat17, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat17, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat18 = createCombatObject()
setCombatParam(combat18, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat18, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat18, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat18, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat18, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat19 = createCombatObject()
setCombatParam(combat19, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat19, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat19, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat19, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat19, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat20, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat20, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat20, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat21 = createCombatObject()
setCombatParam(combat21, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat21, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat21, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat21, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat21, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat22 = createCombatObject()
setCombatParam(combat22, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat22, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat22, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat22, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat22, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

local combat23 = createCombatObject()
setCombatParam(combat23, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat23, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat23, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat23, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat23, COMBAT_FORMULA_LEVELMAGIC, 0.6, -0, 0.7, -0)

arr1 = {
{3}
}

arr2 = {
{3}
}

arr3 = {
{3}
}

arr4 = {
{3}
}

arr5 = {
{3}
}

arr6 = {
{3}
}

arr7 = {
{3}
}

arr8 = {
{3}
}

arr9 = {
{3}
}

arr10 = {
{3}
}

arr11 = {
{3}
}

arr12 = {
{3}
}

arr13 = {
{3}
}

arr14 = {
{3}
}

arr15 = {
{3}
}

arr16 = {
{3}
}

arr17 = {
{3}
}

arr18 = {
{3}
}

arr19 = {
{3}
}

arr20 = {
{3}
}

arr21 = {
{3}
}

arr22 = {
{3}
}

arr23 = {
{3}
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
local area7 = createCombatArea(arr7)
local area8 = createCombatArea(arr8)
local area9 = createCombatArea(arr9)
local area10 = createCombatArea(arr10)
local area11 = createCombatArea(arr11)
local area12 = createCombatArea(arr12)
local area13 = createCombatArea(arr13)
local area14 = createCombatArea(arr14)
local area15 = createCombatArea(arr15)
local area16 = createCombatArea(arr16)
local area17 = createCombatArea(arr17)
local area18 = createCombatArea(arr18)
local area19 = createCombatArea(arr19)
local area20 = createCombatArea(arr20)
local area21 = createCombatArea(arr21)
local area22 = createCombatArea(arr22)
local area23 = createCombatArea(arr23)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)
setCombatArea(combat6, area6)
setCombatArea(combat7, area7)
setCombatArea(combat8, area8)
setCombatArea(combat9, area9)
setCombatArea(combat10, area10)
setCombatArea(combat11, area11)
setCombatArea(combat12, area12)
setCombatArea(combat13, area13)
setCombatArea(combat14, area14)
setCombatArea(combat15, area15)
setCombatArea(combat16, area16)
setCombatArea(combat17, area17)
setCombatArea(combat18, area18)
setCombatArea(combat19, area19)
setCombatArea(combat20, area20)
setCombatArea(combat21, area21)
setCombatArea(combat22, area22)
setCombatArea(combat23, area23)

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

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

local function onCastSpell4(parameters)
    doCombat(parameters.cid, parameters.combat4, parameters.var)
end

local function onCastSpell5(parameters)
    doCombat(parameters.cid, parameters.combat5, parameters.var)
end

local function onCastSpell6(parameters)
    doCombat(parameters.cid, parameters.combat6, parameters.var)
end

local function onCastSpell7(parameters)
    doCombat(parameters.cid, parameters.combat7, parameters.var)
end

local function onCastSpell8(parameters)
    doCombat(parameters.cid, parameters.combat8, parameters.var)
end

local function onCastSpell9(parameters)
    doCombat(parameters.cid, parameters.combat9, parameters.var)
end

local function onCastSpell10(parameters)
    doCombat(parameters.cid, parameters.combat11, parameters.var)
end

local function onCastSpell11(parameters)
    doCombat(parameters.cid, parameters.combat11, parameters.var)
end

local function onCastSpell12(parameters)
    doCombat(parameters.cid, parameters.combat12, parameters.var)
end

local function onCastSpell13(parameters)
    doCombat(parameters.cid, parameters.combat13, parameters.var)
end

local function onCastSpell14(parameters)
    doCombat(parameters.cid, parameters.combat14, parameters.var)
end

local function onCastSpell15(parameters)
    doCombat(parameters.cid, parameters.combat15, parameters.var)
end

local function onCastSpell16(parameters)
    doCombat(parameters.cid, parameters.combat16, parameters.var)
end

local function onCastSpell17(parameters)
    doCombat(parameters.cid, parameters.combat17, parameters.var)
end

local function onCastSpell18(parameters)
    doCombat(parameters.cid, parameters.combat18, parameters.var)
end

local function onCastSpell19(parameters)
    doCombat(parameters.cid, parameters.combat19, parameters.var)
end

local function onCastSpell20(parameters)
    doCombat(parameters.cid, parameters.combat20, parameters.var)
end

local function onCastSpell21(parameters)
    doCombat(parameters.cid, parameters.combat21, parameters.var)
end

local function onCastSpell22(parameters)
    doCombat(parameters.cid, parameters.combat22, parameters.var)
end

local function onCastSpell23(parameters)
    doCombat(parameters.cid, parameters.combat23, parameters.var)
end

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10, combat11 = combat11, combat12 = combat12, combat13 = combat13, combat14 = combat14, combat15 = combat15, combat16 = combat16, combat17 = combat17, combat18 = combat18, combat19 = combat19, combat20 = combat20, combat21 = combat21, combat22 = combat22, combat23 = combat23 }
addEvent(onCastSpell1, 100, parameters) 
addEvent(onCastSpell2, 500, parameters) 
addEvent(onCastSpell3, 900, parameters) 
addEvent(onCastSpell4, 1300, parameters)
addEvent(onCastSpell5, 1700, parameters)
addEvent(onCastSpell6, 2100, parameters)
addEvent(onCastSpell7, 2500, parameters)
addEvent(onCastSpell8, 2900, parameters)
addEvent(onCastSpell9, 3300, parameters)
addEvent(onCastSpell10, 3700, parameters)
addEvent(onCastSpell11, 4100, parameters)
addEvent(onCastSpell12, 4500, parameters)
addEvent(onCastSpell13, 4900, parameters)
addEvent(onCastSpell14, 5300, parameters)
addEvent(onCastSpell15, 5700, parameters)
addEvent(onCastSpell16, 6100, parameters)
addEvent(onCastSpell17, 6500, parameters)
addEvent(onCastSpell18, 6900, parameters)
addEvent(onCastSpell19, 7300, parameters)
addEvent(onCastSpell20, 7700, parameters)
addEvent(onCastSpell21, 8100, parameters)
addEvent(onCastSpell22, 8500, parameters)
addEvent(onCastSpell23, 8900, parameters)

end

 

Editado por Infused (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
14 minutos atrás, Sttorm disse:

Se não tiver essas tags na XML da spell , adicione


aggressive="0" needtarget="1" params="1"

 

Ja tem Sttorm essa tag

23 minutos atrás, Infused disse:

Ja tem Sttorm essa tag

tem outra ideia @Sttorm ?

2 horas atrás, Infused disse:

Ja tem Sttorm essa tag

tem outra ideia @Sttorm ?

Alguem poderia me ajudar?

Link para o post
Compartilhar em outros sites

@Infused, tenta colocar isso depois de function onCastSpell(cid, var)
 

local healed = getCreatureByName(var.string)

if(healed == cid) then
    doPlayerSendTextMessage(cid, 27, "Não pode usar em si mesmo.")
    return false
end

 

                                                                     Ajudei? De nada \o/                                            Att Rusherzin

Link para o post
Compartilhar em outros sites
26 minutos atrás, Rusherzin disse:

@Infused, tenta colocar isso depois de function onCastSpell(cid, var)
 


local healed = getCreatureByName(var.string)

if(healed == cid) then
    doPlayerSendTextMessage(cid, 27, "Não pode usar em si mesmo.")
    return false
end

 

Continua usando em si mesmo ainda cara :\ não deu nenhum erro

Link para o post
Compartilhar em outros sites
30 minutos atrás, Rusherzin disse:

@Infused, tenta colocar isso depois de function onCastSpell(cid, var)
 


local healed = getCreatureByName(var.string)

if(healed == cid) then
    doPlayerSendTextMessage(cid, 27, "Não pode usar em si mesmo.")
    return false
end

 

realmente @Rusherzin , nao apresenta erro mas também nao deu certo :/ acho que sotten também ta procurando esse script

Link para o post
Compartilhar em outros sites

Pode me mandar a tag que está usando no XML? Eu testei aqui e deu certo.

                                                                     Ajudei? De nada \o/                                            Att Rusherzin

Link para o post
Compartilhar em outros sites
10 minutos atrás, Rusherzin disse:

Pode me mandar a tag que está usando no XML? Eu testei aqui e deu certo.

<instant name="Heal Friend" words="exura tempo sio" lvl="10" maglv="200" manapercent="5" soul="16" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="700" needlearn="0" script="tempo sio.lua">
                <vocation name="Druid" />
                <vocation name="Elder Druid" />
                <vocation name="Slayer Druid" />
        </instant>

Link para o post
Compartilhar em outros sites
  • Solução

Aaaah, okay. Usa assim então:
 

local healed = var.number
if(healed == cid) then
    doPlayerSendTextMessage(cid, 27, "Não pode usar em si mesmo.")
    return false
end

 

                                                                     Ajudei? De nada \o/                                            Att Rusherzin

Link para o post
Compartilhar em outros sites
48 minutos atrás, Rusherzin disse:

Aaaah, okay. Usa assim então:
 


local healed = var.number
if(healed == cid) then
    doPlayerSendTextMessage(cid, 27, "Não pode usar em si mesmo.")
    return false
end

 

cara, vc é foda deu certo

 

valeu REP+

Editado por Infused (veja o histórico de edições)
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.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo