Ir para conteúdo

[Ajuda] Spell com direção.


diarmaint

Posts Recomendados

Galera, to tentando fazer uma spell aqui sem sucesso, baixei o spell creator e piorou, muito confuso esse programa, pegei uns gifs pra melhor compreensão.

http://imgur.com/utMQq9x

http://imgur.com/WXqsrEw

http://imgur.com/IOmCVPk

http://imgur.com/NrlM8fP

Desde já obrigado!

 

 

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

Tipo, eu peguei como base uma aqui, que o poder é tipo esse, ele só n tem esse esquema de avançar e dar dano, eu "conseguir" fazer ela certa pra um só lado, mas ele continua pra todos os lados, não é isso que quero kk



local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 20)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr1 = {

{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, 2, 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},
}

local area1 = createCombatArea(arr1)

setCombatArea(combat1, area1)

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 20)
setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr10 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 2, 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},
}

local area10 = createCombatArea(arr10)

setCombatArea(combat10, area10)

local combat100 = createCombatObject()
setCombatParam(combat100, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat100, COMBAT_PARAM_EFFECT, 20)
 
setCombatFormula(combat100, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr100 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 2, 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},
}

local area100 = createCombatArea(arr100)

setCombatArea(combat100, area100)


local combat1000 = createCombatObject()
setCombatParam(combat1000, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat1000, COMBAT_PARAM_EFFECT, 20)
 
setCombatFormula(combat1000, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr1000 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 2, 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},
}

local area1000 = createCombatArea(arr1000)

setCombatArea(combat1000, area1000)


local combat10000 = createCombatObject()
setCombatParam(combat10000, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat10000, COMBAT_PARAM_EFFECT, 131)
 
setCombatFormula(combat10000, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr10000 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 2, 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},
}

local area10000 = createCombatArea(arr10000)

setCombatArea(combat10000, area10000)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 171)
 
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local arr2 = {
{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, 2, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
}

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 131)
 
setCombatFormula(combat20, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr20 = {
{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, 1, 1, 1, 1},
{2, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 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},
}

local area20 = createCombatArea(arr20)

setCombatArea(combat20, area20)

local combat200 = createCombatObject()
setCombatParam(combat200, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat200, COMBAT_PARAM_EFFECT, 131)
 
setCombatFormula(combat200, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr200 = {
{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},
{2, 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 area200 = createCombatArea(arr200)

setCombatArea(combat200, area200)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 172)
 
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)


local arr3 = {
{0, 0, 0, 0, 0, 0, 0, 1, 2, 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, 0, 0},

}

local area3 = createCombatArea(arr3)

setCombatArea(combat3, area3)

local combat30 = createCombatObject()

setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 131)
 
setCombatFormula(combat30, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr30 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 2, 0, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 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},
}

local area30 = createCombatArea(arr30)

setCombatArea(combat30, area30)


local combat300 = createCombatObject()
setCombatParam(combat300, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat300, COMBAT_PARAM_EFFECT, 131)
 
setCombatFormula(combat300, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr300 = {
{0, 0, 2, 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 area300 = createCombatArea(arr300)

setCombatArea(combat300, area300)


local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT,173)
 
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local arr4 = {
{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, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 2, 0},

}

local area4 = createCombatArea(arr4)

setCombatArea(combat4, area4)

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 131)
 
setCombatFormula(combat40, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr40 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 2, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}


local area40 = createCombatArea(arr40)

setCombatArea(combat40, area40)


local combat400 = createCombatObject()
setCombatParam(combat400, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat400, COMBAT_PARAM_EFFECT, 131)
 
setCombatFormula(combat400, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr400 = {
{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, 2, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area400 = createCombatArea(arr400)

setCombatArea(combat400, area400)


function raiden(cid)
if getPlayerLookDir(cid) == 1 then   
                
doCombat(cid, combat1, numberToVariant(cid))
doCombat(cid, combat10, numberToVariant(cid))
doCombat(cid, combat100, numberToVariant(cid))
doCombat(cid, combat1000, numberToVariant(cid))
doCombat(cid, combat10000, numberToVariant(cid))

end
end


function onCastSpell(cid, var)
local waittime = 3 -- Tempo de exhaustion
local storage = 115828
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, 26, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end

      addEvent(raiden,0,cid)
exhaustion.set(cid, storage, waittime)
doPlayerSay(cid, 'Raiden!', TALKTYPE_ORANGE_1) 
return true
end

@nociam entendeu como funciona?

 

Link para o comentário
Compartilhar em outros sites

@nociam

Eu consegui fazer a spell, porém eu gostaria que ela fosse avançando, igual esse vídeo.

00:50

 




local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 225)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local arr1 = {
{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},
{0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 2},
{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 area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 131)
setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr10 = {
{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, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 2},
{1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
}

local area10 = createCombatArea(arr10)
setCombatArea(combat10, area10)

local combat100 = createCombatObject()
setCombatParam(combat100, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat100, COMBAT_PARAM_EFFECT, 54)
setCombatFormula(combat100, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local arr100 = {
{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, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 2},
{1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
}

local area100 = createCombatArea(arr100)
setCombatArea(combat100, area100)


local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 225)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local 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},
{0, 0, 0, 0, 0, 0, 0},
{3, 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 area2 = createCombatArea(arr2)
setCombatArea(combat2, area2)

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 131)
setCombatFormula(combat20, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr20 = {
{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, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1},
{2, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area20 = createCombatArea(arr20)
setCombatArea(combat20, area20)

local combat200 = createCombatObject()
setCombatParam(combat200, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat200, COMBAT_PARAM_EFFECT, 54)
setCombatFormula(combat200, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local arr200 = {
{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, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 0},
{3, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
}

local area200 = createCombatArea(arr200)
setCombatArea(combat200, area200)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 225)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)


local arr3 = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 2, 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, 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 area3 = createCombatArea(arr3)

setCombatArea(combat3, area3)

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat30, COMBAT_PARAM_EFFECT, 131)
setCombatFormula(combat30, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr30 = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 2, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 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},
}

local area30 = createCombatArea(arr30)
setCombatArea(combat30, area30)


local combat300 = createCombatObject()
setCombatParam(combat300, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat300, COMBAT_PARAM_EFFECT, 54)
setCombatFormula(combat300, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local arr300 = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 2, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 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},
}

local area300 = createCombatArea(arr300)
setCombatArea(combat300, area300)


local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 225)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)


local arr4 = {
{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, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 2, 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 area4 = createCombatArea(arr4)
setCombatArea(combat4, area4)

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 131)
setCombatFormula(combat40, COMBAT_FORMULA_LEVELMAGIC, -8.0, 0, -8.1, 0)

local arr40 = {
{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, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 0, 2, 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 area40 = createCombatArea(arr40)
setCombatArea(combat40, area40)


local combat400 = createCombatObject()
setCombatParam(combat400, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat400, COMBAT_PARAM_EFFECT, 54)
setCombatFormula(combat400, COMBAT_FORMULA_LEVELMAGIC, -0.0, 0, -0.0, 0)

local arr400 = {
{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, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 0, 2, 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 area400 = createCombatArea(arr400)
setCombatArea(combat400, area400)

function harete(cid)
if getPlayerLookDir(cid) == 1 then   
                
doCombat(cid, combat1, numberToVariant(cid))
doCombat(cid, combat10, numberToVariant(cid))
doCombat(cid, combat100, numberToVariant(cid))
doPlayerSay(cid, '', TALKTYPE_ORANGE_1) 

elseif getPlayerLookDir(cid) == 2 then   
               
         doCombat(cid, combat4, numberToVariant(cid))
doCombat(cid, combat40, numberToVariant(cid))
doCombat(cid, combat400, numberToVariant(cid))
doPlayerSay(cid, '', TALKTYPE_ORANGE_1) 

elseif getPlayerLookDir(cid) == 3 then   
                 
         doCombat(cid, combat2, numberToVariant(cid))
doCombat(cid, combat20, numberToVariant(cid))
doCombat(cid, combat200, numberToVariant(cid))
doPlayerSay(cid, '', TALKTYPE_ORANGE_1) 

elseif getPlayerLookDir(cid) == 0 then   
                 
         doCombat(cid, combat3, numberToVariant(cid))
doCombat(cid, combat30, numberToVariant(cid))
doCombat(cid, combat300, numberToVariant(cid))
  doPlayerSay(cid, '', TALKTYPE_ORANGE_1) 
      end
end


function onCastSpell(cid, var)
local waittime = 3 -- Tempo de exhaustion
local storage = 115826
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, 26, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end
 
harete(cid)
  doPlayerSay(cid, 'Okamaitachi!', TALKTYPE_ORANGE_1) 
        exhaustion.set(cid, storage, waittime)
return true
end

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...