Ir para conteúdo
  • Cadastre-se

(Resolvido)Como mudar effect de um spell


Ir para solução Resolvido por xWhiteWolf,

Posts Recomendados

Fala galera estou tentando criar uma spell a parti de outras que ja tenho aqui e quero saber como faço para mudar o effect dele para não ficar igual ao da outra spell.

 

​E se possível me dizer onde eu acho os effects que tem no meu server..

 

script:

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -34.2, 1, -34.2, 1)
 
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -33.1, 1, -33.6, 1)
 
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -35.4, 1, -32.5, 1)
 
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -32.3, 1, -33.5, 1)
 
 
arr1 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}
 
arr2 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}
 
arr3 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}
 
arr4 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}
 
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
 
local function onCastSpell1(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end
 
local function onCastSpell2(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var)
end
 
local function onCastSpell3(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat3, parameters.var)
end
 
local function onCastSpell4(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat4, parameters.var)
end
 
function onCastSpell(cid, var)
local position1 = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}
local position2 = {x=getCreaturePosition(cid).x+2, y=getCreaturePosition(cid).y+2, z=getCreaturePosition(cid).z}
local position3 = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}
local position4 = {x=getCreaturePosition(cid).x+2, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell2, 400, parameters)
doSendMagicEffect(position1, 100)
doSendMagicEffect(position2, 101)
doSendMagicEffect(position3, 102)
doSendMagicEffect(position4, 103)
return TRUE
end

 
OBS:Eu ja tentei mudar aki onde esta 124 "setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 124)"
Editado por reglachek (veja o histórico de edições)

                                                       

 

 

                                                                                           5e1fc80227b414e178a2f7de00379363.jpg.fb527fa5863cba1c20b81b6ea6841da0.jpg                                                                                                  

Link para o post
Compartilhar em outros sites

Use essa aki é mais facil é de distance effect:

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 38)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -135.2, 1, -130.2, 1)

function onCastSpell(cid, var)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 174)
return doCombat(cid, combat, var)
end

Aonde esta setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 38) <-----  38 esta distance effectt

e Aonde esta doSendMagicEffect(position1, 174) <----- 174 ea effect de quanto a distance bater no target

                                                        

Link para o post
Compartilhar em outros sites

Porque tipo essa é um spell de área então não precisa ficar dando target no cara

 

@E amigo ficou a mesma coisa..

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

                                                       

 

 

                                                                                           5e1fc80227b414e178a2f7de00379363.jpg.fb527fa5863cba1c20b81b6ea6841da0.jpg                                                                                                  

Link para o post
Compartilhar em outros sites

Esta ai se quizer, essa é de target, utilizo ele para 90% de meus jutsus, se quizer ta ai ;D


Tente alterar 

doSendMagicEffect(position1, 100)
doSendMagicEffect(position2, 101)
doSendMagicEffect(position3, 102)
doSendMagicEffect(position4, 103)

Aonde estar 100,101,102,103

 

Tenta por nova effect,na sua script é ver se funciona

 

Boa sorte.

                                                        

Link para o post
Compartilhar em outros sites

Na script da minha spell ja tinha isso eu :P,mas tipo ele é de área ae eu queria que esse effect ficasse em kada área que ele ataca-se por exemplo:

 

4woZEf.png

 

 

Ele pega toda essa área ae queria que kada parte da área que a spell pega saisse o effect.Para não ficar o effect só em um canto e spell pegar toda essa área..

                                                       

 

 

                                                                                           5e1fc80227b414e178a2f7de00379363.jpg.fb527fa5863cba1c20b81b6ea6841da0.jpg                                                                                                  

Link para o post
Compartilhar em outros sites

Sim manow mas é o mesmo effect né kkk


Quero saber como colocar tal effect para a spell de área,pra que o effect ocupe todo o espaço da spell...

                                                       

 

 

                                                                                           5e1fc80227b414e178a2f7de00379363.jpg.fb527fa5863cba1c20b81b6ea6841da0.jpg                                                                                                  

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

era só adicionar a linha setCombatParam(combat, COMBAT_PARAM_EFFECT, 12) em cada um dos combats.. onde 12 é o efeito, fica assim:

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -34.2, 1, -34.2, 1)


local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -33.1, 1, -33.6, 1)


local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -35.4, 1, -32.5, 1)


local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 124)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -32.3, 1, -33.5, 1)




arr1 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}


arr2 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}


arr3 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}


arr4 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)


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


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


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


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


function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell2, 400, parameters)
return TRUE
end

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)

Link para o post
Compartilhar em outros sites

Norsa kkkk vlw manin aushuahs.

 

Só não vou dar rep porque atingi o limite de hoje,mas amanhã eu dou :P

                                                       

 

 

                                                                                           5e1fc80227b414e178a2f7de00379363.jpg.fb527fa5863cba1c20b81b6ea6841da0.jpg                                                                                                  

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