Ir para conteúdo
  • 0

Novo Spell para Knight


delalana

Pergunta

Estou a procura de uma nova magia para knights !

 

A Magia Tem que ter a seguinte área:

 

 

1

1 1 1

1 1 0 1 1

1 1 1

1

 

Gostaria também que a magia tivesse o efeito z=53, e o nome da spell Master Exori Gran.

Espero que me ajudem, Valendo REP++

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

data/spells/scripts, crie um arquivo chamado meg.lua e adicione dentro:

 

 

local combat0_meg = createCombatObject()
setCombatParam(combat0_meg, COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH)
setCombatParam(combat0_meg, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat0_meg, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_meg,createCombatArea({{0, 0, 1, 0, 0},
{0, 1, 3, 1, 0},
{1, 1, 0, 1, 1},
{0, 1, 1, 1, 0},
{0, 0, 1, 0, 0}}))
function getDmg_meg(cid, level, maglevel)
return (500)*-1,(2000)*-1
end
setCombatCallback(combat0_meg, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_meg")
local dfcombat0_meg = {CONST_ANI_ENERGY,0,1,-1,0,0,-1,1,0,0,2,1,1,-1,1,2,0,-2,0,1,-1,-1,-1,0,-2}

-- Areas/Combat for 300ms
local combat3_meg = createCombatObject()
setCombatParam(combat3_meg, COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH)
setCombatParam(combat3_meg, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat3_meg, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat3_meg,createCombatArea({{0, 0, 1, 0, 0},
{0, 1, 1, 1, 0},
{1, 0, 2, 0, 1},
{0, 0, 1, 0, 0},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0},
{0, 0, 1, 0, 0}}))
function getDmg_meg(cid, level, maglevel)
return (500)*-1,(2000)*-1
end
setCombatCallback(combat3_meg, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_meg")
local dfcombat3_meg = {CONST_ANI_ENERGY,-1,2,-2,1,1,2,2,1,2,-1,1,-2,-1,-2,-2,-1,0,3,0,-2,0,-3,0,0,0,2}

-- Areas/Combat for 500ms
local combat5_meg = createCombatObject()
setCombatParam(combat5_meg, COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH)
setCombatParam(combat5_meg, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat5_meg, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat5_meg,createCombatArea({{0, 3, 0},
{1, 0, 1},
{0, 1, 0}}))
function getDmg_meg(cid, level, maglevel)
return (500)*-1,(2000)*-1
end
setCombatCallback(combat5_meg, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_meg")
local dfcombat5_meg = {CONST_ANI_ENERGY,1,0,0,1,-1,0,0,-1}

local function RunPart(c,cid,var,dirList,dirEmitPos,startDir) -- Part
if (isCreature(cid)) then
doCombat(cid, c, var)
if (dirList ~= nil) then -- Emit distance effects
local i = 2;
while (i < #dirList) do
if (startDir == 0) then -- N
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
elseif (startDir == 2) then -- S
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x+dirList[i],y=dirEmitPos.y+dirList[i+1],z=dirEmitPos.z},dirList[1])
elseif (startDir == 1) then -- E
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x+dirList[i+1],y=dirEmitPos.y+dirList[i],z=dirEmitPos.z},dirList[1])
else -- W / Something weird happened
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i+1],y=dirEmitPos.y-dirList[i],z=dirEmitPos.z},dirList[1])
end
i = i + 2
end
end
end
end

function onCastSpell(cid, var)
local startPos = getCreaturePosition(cid)
local startDir = getCreatureLookDirection(cid)
RunPart(combat0_meg,cid,var,dfcombat0_meg,startPos,startDir)
addEvent(RunPart,300,combat3_meg,cid,var,dfcombat3_meg,startPos,startDir)
addEvent(RunPart,500,combat5_meg,cid,var,dfcombat5_meg,startPos,startDir)
return true
end

 

 

Em spells.xml adicione essa tag:

 

<instant name="Master Exori Gran" words="master exori gran" lvl="20" maglv="2" mana="250" exhaustion="1000" prem="1" needlearn="0" casterTargetOrDirection="1" blockwalls="0" aggressive="1" event="script" value="meg.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>

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

  • 0

testa ai:

data/spells/scripts, e cria 1 arquivo e coloca nome de MEG.lua e adicione dentro:

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 53)

setCombatParam(combat, COMBAT_PARAM_USECHARGES, TRUE)

setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1.4, 0, 1.0, 0)

 

local area = createCombatArea

{

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

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

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

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

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

}

setCombatArea(combat, area)

 

function onCastSpell(cid, var)

return doCombat(cid, combat, var)

end

 

 

ou

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 53)

setCombatParam(combat, COMBAT_PARAM_USECHARGES, TRUE)

function onGetFormulaValues(cid, level, skill, attack, factor)

local skillTotal, levelTotal = skill + attack, level / 5

return -(skillTotal * 0.5 + levelTotal), -(skillTotal * 1.5 + levelTotal)

end

 

local area = createCombatArea

{

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

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

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

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

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

}

setCombatArea(combat, area)

 

function onCastSpell(cid, var)

return doCombat(cid, combat, var)

end

 

 

 

ai em spells.xml adiciona

 

 

</instant>

<instant name="master exori gran" words="master exori gran" lvl="100" mana="150" prem="0" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="MEG.lua">

<vocation id="4"/>

<vocation id="8"/>

</instant>

 

 

@edited

esqueci de adicionar a tag.

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

×
×
  • Criar Novo...