Ir para conteúdo
  • 0

Ajuda Spell


EduziTow

Pergunta

Galera,Meu Script Quando Se Solta A Magia,Ele So Solta Uma Assassin Star E Chega Até O Alvo,Eu Queria Que Quando Soltace A Magia,Tipo Ao Invez De Sair Só Uma Assassin Star,Sair 3 E Ir Abrindo Até Chegar Ao Alvo,Meu Script É Esse

 

 

local combat = createCombatObject()
local meteor = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -8.10, -280, -8.40, -280)
combat_arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local combat_area = createCombatArea(combat_arr)
setCombatArea(meteor, combat_arr)
function onTargetTile(cid, pos)
local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ME_18)
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat})
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

 

Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0

 

local combat = createCombatObject()

local meteor = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -8.10, -280, -8.40, -280)

combat_arr = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

}

 

local combat2 = createCombatObject()

local meteor2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 18)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 49)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -8.10, -280, -8.40, -280)

combat_arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

}

local combat_area = createCombatArea(combat_arr)

setCombatArea(meteor, combat_arr)

function onTargetTile(cid, pos)

local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}

doSendDistanceShoot(newpos, pos, CONST_ME_18)

addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat})

end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

 

local combat_area2 = createCombatArea(combat_arr2)

setCombatArea(meteor2, combat_arr2)

function onTargetTile(cid, pos)

local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}

doSendDistanceShoot(newpos, pos, CONST_ME_18)

addEvent(meteorCast, 100, {cid = cid,pos = pos, combat2 = combat2})

end

setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

 

function onCastSpell(cid, var)

return doCombat(cid, combat, var)

end

 

Link para o comentário
Compartilhar em outros sites

  • 0

 

local combat = createCombatObject()

local meteor = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -8.10, -280, -8.40, -280)

combat_arr = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

}

 

local combat2 = createCombatObject()

local meteor2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 18)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 49)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -8.10, -280, -8.40, -280)

combat_arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

}

local combat_area = createCombatArea(combat_arr)

setCombatArea(meteor, combat_arr)

function onTargetTile(cid, pos)

local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}

doSendDistanceShoot(newpos, pos, CONST_ME_18)

addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat})

end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

 

local combat_area2 = createCombatArea(combat_arr2)

setCombatArea(meteor2, combat_arr2)

function onTargetTile(cid, pos)

local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}

doSendDistanceShoot(newpos, pos, CONST_ME_18)

addEvent(meteorCast, 100, {cid = cid,pos = pos, combat2 = combat2})

end

setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

 

function onCastSpell(cid, var)

return doCombat(cid, combat, var)

end

 

Como Eu Posso Te Falar,Continua A mesma Coisa é para otserver 9.81

Link para o comentário
Compartilhar em outros sites

  • 0

Saindo 5 stars, e hita na área em volta:

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, -20, 0.5, 0)

local area = createCombatArea(AREA_CROSS1X1)
setCombatArea(combat, area)

function onCastSpell(cid, var)
   return doCombat(cid, combat, var)
end

 

Não entendi quase nada que tu disse, fiz baseado no que o Roksas tentou, só que bem simplificado.

Link para o comentário
Compartilhar em outros sites

  • 0

Assim esta bom?

 

B0DUZ96A[/pastebin]

To Vendo Você è Fan De Sobrenatural kk tbm sou

 

intao cara a magia é assim sabe a star que o player taca eu quero que junto com ela saia 3 entende a que estão saindo de traz

Link para o comentário
Compartilhar em outros sites

  • 0

Deu Erro No Distro

 

[27/4/2013 1:31:43] [Error - LuaInterface::loadFile] data/spells/scripts/attack/holy star.lua:15: ')' expected near 'getThingPos'

[27/4/2013 1:31:43] [Error - Event::checkScript] Cannot load script (data/spells/scripts/attack/holy star.lua)

[27/4/2013 1:31:43] data/spells/scripts/attack/holy star.lua:15: ')' expected near 'getThingPos'

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...