Ir para conteúdo
  • 0

Spell Complicada Cima, Baixo, Direita, Esquerda


IsaqueTeixeira

Pergunta

Gente vou mostrar umas ss aqui de como é +ou - essa spell ok, vamos lá

Para Baixo:

baixonh.png

Para esquerda:

esquerdat.png

para cima:

cimah.png

Para direita:

direital.png

 

 

 

 

QUADRADOS VERMELHOS: Local de onde saira o effect, no caso o que eu tenho aqui são aqueles effects direcionados

QUADRADOS PRETOS: Local do dano da spell

Vlw espero que entendam, demorou pra fazer isso uheheuhe.

Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0

As fórmulas estavam certas apenas no combat 1, as do combat2 e combat3 tavam desreguladas.

 

Tenta assim:

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 74)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 39)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -7.0, 0, -7.5, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 74)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 39)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -7.0, 0, -7.5, 0)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 74)

setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 39)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -7.0, 0, -7.5, 0)

 

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

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

end

 

Link para o comentário
Compartilhar em outros sites

  • 0

blz, sabe essa spell aqui aquela que você tinha me passado?

 

local tempo = 60 -- tempo em segundos.

local effect = {68} -- effect no player, caso queira apenas 1, basta remover os outros numeros.

local delay = 0.5 -- segundos de delay, 1 = 1 segundos, 0.5 = 0.5 segundos.

local ml = 30 -- quantos ira aumentar o skill de ML

local skillfist = 0 -- quantos ira aumentar o skill de Fist

local skillsword = 0 -- quantos ira aumentar o skill de Sword

local skillaxe = 0 -- quantos ira aumentar o skill de Axe

local skillclub = 0 -- quantos ira aumentar o skill de Club

local skilldistance = 0 -- quantos ira aumentar o skill de Distance

local skillshield = 0 -- quantos ira aumentar o skill de Shield

local health = 30 -- A cada 1 segundo quantos aumentar de vida

local ppos = getPlayerPosition(cid)

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)

setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)

setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)

setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe)

setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)

setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)

setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)

setCombatCondition(combat, condition)

local condition = createConditionObject(CONDITION_HASTE)

setConditionParam(condition, CONDITION_PARAM_SPEED, 250)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setCombatCondition(combat, condition)

local condition = createConditionObject(CONDITION_REGENERATION)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)

setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)

setCombatCondition(combat, condition)

function magicEffect3(cid)

if (isCreature(cid)) then

if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then

for i=1, #effect do

local position = {x=ppos.x, y=ppos.y, z=ppos.z}

doSendMagicEffect(position, effect)

end

end

end

end

function onCastSpell(cid, var)

if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then

doCombat(cid, combat, var)

tempo2 = 0

while (tempo2 ~= (tempo*1000)) do

addEvent(magicEffect3, tempo2, cid)

tempo2 = tempo2 + (delay*1000)

end

setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.

posit = {x=ppos.x+2, y=ppos.y, z=ppos.z}

doSendMagicEffect(posit, 130)

else

doPlayerSendCancel(cid, "Sorry, you are transformed.")

end

end

 

Ta dando esse error:

 

[06/08/2012 21:04:38] [Error - Spell Interface]

[06/08/2012 21:04:38] In a timer event called from:

[06/08/2012 21:04:38] data/spells/scripts/naruto/Kyuubi Furie.lua:onCastSpell

[06/08/2012 21:04:38] Description:

[06/08/2012 21:04:38] data/spells/scripts/naruto/Kyuubi Furie.lua:46: attempt to index upvalue 'ppos' (a boolean value)

[06/08/2012 21:04:38] stack traceback:

[06/08/2012 21:04:39] data/spells/scripts/naruto/Kyuubi Furie.lua:46: in function <data/spells/scripts/naruto/Kyuubi Furie.lua:42>

[06/08/2012 21:04:39] [Error - Spell Interface]

[06/08/2012 21:04:39] In a timer event called from:

[06/08/2012 21:04:39] data/spells/scripts/naruto/Kyuubi Furie.lua:onCastSpell

[06/08/2012 21:04:39] Description:

[06/08/2012 21:04:39] data/spells/scripts/naruto/Kyuubi Furie.lua:46: attempt to index upvalue 'ppos' (a boolean value)

[06/08/2012 21:04:39] stack traceback:

[06/08/2012 21:04:39] data/spells/scripts/naruto/Kyuubi Furie.lua:46: in function <data/spells/scripts/naruto/Kyuubi Furie.lua:42>

[06/08/2012 21:04:39] [Error - Spell Interface]

[06/08/2012 21:04:39] In a timer event called from:

[06/08/2012 21:04:39] data/spells/scripts/naruto/Kyuubi Furie.lua:onCastSpell

[06/08/2012 21:04:39] Description:

[06/08/2012 21:04:39] data/spells/scripts/naruto/Kyuubi Furie.lua:46: attempt to index upvalue 'ppos' (a boolean value)

[06/08/2012 21:04:39] stack traceback:

[06/08/2012 21:04:39] data/spells/scripts/naruto/Kyuubi Furie.lua:46: in function <data/spells/scripts/naruto/Kyuubi Furie.lua:42>

 

 

 

 

EDIT---------

e nessa spell

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 74)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 39)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -7.0, 0, -7.5, 0)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 74)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 39)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -7.0, 0, -7.5, 0)

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 74)

setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 39)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -7.0, 0, -7.5, 0)

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

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

end

 

 

ta dando esse error aqui:

 

[06/08/2012 21:11:13] [Error - Spell Interface]

[06/08/2012 21:11:13] In a timer event called from:

[06/08/2012 21:11:13] data/spells/scripts/sasuke/Katon Housenka No Jutsu.lua:onCastSpell

[06/08/2012 21:11:13] Description:

[06/08/2012 21:11:13] (luaDoCombat) Combat not found

[06/08/2012 21:11:18] [Error - Spell Interface]

[06/08/2012 21:11:18] In a timer event called from:

[06/08/2012 21:11:18] data/spells/scripts/sasuke/Katon Housenka No Jutsu.lua:onCastSpell

[06/08/2012 21:11:18] Description:

[06/08/2012 21:11:18] (luaDoCombat) Combat not found

[06/08/2012 21:11:18] [Error - Spell Interface]

[06/08/2012 21:11:18] In a timer event called from:

[06/08/2012 21:11:18] data/spells/scripts/sasuke/Katon Housenka No Jutsu.lua:onCastSpell

[06/08/2012 21:11:18] Description:

[06/08/2012 21:11:18] (luaDoCombat) Combat not found

[06/08/2012 21:11:19] [Error - Spell Interface]

[06/08/2012 21:11:19] In a timer event called from:

[06/08/2012 21:11:19] data/spells/scripts/sasuke/Katon Housenka No Jutsu.lua:onCastSpell

[06/08/2012 21:11:19] Description:

[06/08/2012 21:11:19] (luaDoCombat) Combat not found

 

Editado por isaque555
Link para o comentário
Compartilhar em outros sites

  • 0

 

local tempo = 60 -- tempo em segundos.

local effect = {68} -- effect no player, caso queira apenas 1, basta remover os outros numeros.

local delay = 0.5 -- segundos de delay, 1 = 1 segundos, 0.5 = 0.5 segundos.

local ml = 30 -- quantos ira aumentar o skill de ML

local skillfist = 0 -- quantos ira aumentar o skill de Fist

local skillsword = 0 -- quantos ira aumentar o skill de Sword

local skillaxe = 0 -- quantos ira aumentar o skill de Axe

local skillclub = 0 -- quantos ira aumentar o skill de Club

local skilldistance = 0 -- quantos ira aumentar o skill de Distance

local skillshield = 0 -- quantos ira aumentar o skill de Shield

local health = 30 -- A cada 1 segundo quantos aumentar de vida

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)

setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)

setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)

setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe)

setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)

setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)

setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)

setCombatCondition(combat, condition)

 

local condition = createConditionObject(CONDITION_HASTE)

setConditionParam(condition, CONDITION_PARAM_SPEED, 250)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setCombatCondition(combat, condition)

 

local condition = createConditionObject(CONDITION_REGENERATION)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)

setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)

setCombatCondition(combat, condition)

 

function magicEffect3(cid)

if (isCreature(cid)) then

if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then

for i=1, #effect do

local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}

doSendMagicEffect(position, effect)

end

end

end

end

 

function onCastSpell(cid, var)

if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then

doCombat(cid, combat, var)

tempo2 = 0

while (tempo2 ~= (tempo*1000)) do

addEvent(magicEffect3, tempo2, cid)

tempo2 = tempo2 + (delay*1000)

end

setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.

posit = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}

doSendMagicEffect(posit, 130)

else

doPlayerSendCancel(cid, "Sorry, you are transformed.")

end

end

 

 

Tá ai.

Link para o comentário
Compartilhar em outros sites

  • 0

Tenta assim:

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 74)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 39)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -7.0, 0, -7.5, 0)

 

local function onCastSpell1(parameters)

doCombat(parameters.cid, parameters.combat1, parameters.var)

end

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell1, 300, parameters)

addEvent(onCastSpell1, 600, parameters)

end

 

Link para o comentário
Compartilhar em outros sites

  • 0

Manin sabe essas spells que tem essa Tag aqui:

 

local position = {x=getPlayerPosition(target).x+1, y=getPlayerPosition(target).y+1, z=getPlayerPosition(target).z}

 

 

 

aparece isso sempre que eu uso, não seria alguma coisa na function do serve?:

 

[06/08/2012 22:45:44] [Error - Spell Interface]

[06/08/2012 22:45:44] data/spells/scripts/sasuke/Corrupt Chidori.lua:onCastSpell

[06/08/2012 22:45:44] Description:

[06/08/2012 22:45:44] (luaGetThingPosition) Thing not found

[06/08/2012 22:45:44] [Error - Spell Interface]

[06/08/2012 22:45:45] data/spells/scripts/sasuke/Corrupt Chidori.lua:onCastSpell

[06/08/2012 22:45:45] Description:

[06/08/2012 22:45:45] data/spells/scripts/sasuke/Corrupt Chidori.lua:11: attempt to index a boolean value

[06/08/2012 22:45:45] stack traceback:

[06/08/2012 22:45:45] data/spells/scripts/sasuke/Corrupt Chidori.lua:11: in function <data/spells/scripts/sasuke/Corrupt Chidori.lua:9>

 

Link para o comentário
Compartilhar em outros sites

  • 0

Olha ai.

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 0.28 + maglevel * 1.48) * 1.4

max = -(level * 0.34 + maglevel * 2.34) * 1.4

return min, max

end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)

target = getCreatureTarget(cid)

local position = {x=getPlayerPosition(target).x+1, y=getPlayerPosition(target).y+1, z=getPlayerPosition(target).z}

doSendMagicEffect(position, 138)

return doCombat(cid, combat, var)

end

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

Vai em spells.xml, procura essa spell, e coloca depois disso:

 

name="Nome" words="palavras" lvl="100"

 

Isso:

 

needtarget="1"

 

Ficando assim:

 

name="Nome" words="palavras" lvl="100" needtarget="1"

 

Vo dormir, se não funcionar, amanhã eu olho isso melhor.

Link para o comentário
Compartilhar em outros sites

  • 0

Mano malz ae sou muito burro, é que quando coloca aquela tag, não se pode colocar isso

casterOrDirection="1"

 

EDIT---

uma duvida tu sabe onde eu altero o effect de first attack por que ta com um effect que aparece, e eu quero colocar um em branco.

 

EDIT2--

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 79)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -20.0, 0, -20.5, 0)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 79)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -15.0, 0, -15.5, 0)

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 79)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -10.0, 0, -10.5, 0)

 

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

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3}

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

end

 

 

e adiconar aquela velha tag pra os tres effects

 

local position = {x=getPlayerPosition(target).x+1, y=getPlayerPosition(target).y+1, z=getPlayerPosition(target).z}

 

Editado por isaque555
Link para o comentário
Compartilhar em outros sites

  • 0

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -20.0, 0, -20.5, 0)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -15.0, 0, -15.5, 0)

 

local function onCastSpell1(parameters)

doCombat(parameters.cid, parameters.combat1, parameters.var)

end

local function onCastSpell2(parameters)

doCombat(parameters.cid, parameters.combat2, parameters.var)

target = getCreatureTarget(cid)

local position = {x=getPlayerPosition(target).x+1, y=getPlayerPosition(target).y+1, z=getPlayerPosition(target).z}

doSendMagicEffect(position, 79)

end

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell2, 600, parameters)

end

 

 

Não entendi muito bem essa spell, então fiz o que achei mais adequado. Se tiver errado, posta uma SS dela.

Editado por LuckOake
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...