Este é o meu primeiro tutorial de script
Vou ensinar a fazer 8 magias de ataque e mais algumas de support..(8.5)
Primeiro abra a sua pasta do ot /spells/attack
Copie qualquer arquivo e cole na mesma pasta.
Coloque o nome dele de Death Wave.
Abra ele delete tudo o que ha dentro e cole isso dentro
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DEATHAREA)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) * 6.5)
local formula_max = -((lv*0.25 + maglv*3) * 6.7)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local area = createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)
setCombatArea(combat, area)
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Nos números que estiverem em VERMELHO podem ser mudados
Mas não aumente muito porque os mages vão hitar muito.
Salve e feche o arquivo.
Abra o arquivo na pasta /spells chamado spells (lol)
Procure as magias instantâneas no meu ot há uma separação [<!-- Attack Spells -->]
E coloque embaixo:
<instant name="Death Wave" words="exevo mort hur" lvl="125" mana="800" direction="1" exhaustion="2000" needlearn="0" script="attack/death wave.lua">
<vocation name="Druid"/>
<vocation name="Elder Druid"/>
<vocation name="Sorcerer"/>
<vocation name="Master Sorcerer"/>
</instant>
Salve e feche, pra soltar a magia é exevo mort hur, é um vis hur de death.
Próxima magia:
Copie e cole um arquivo
E faça o mesmo processo acima mas invés de colocar o nome de death wave coloque de Fear Of The Dark.
Cole isso dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_CONST_ME_MORTAREA)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) * 7.5)
local formula_max = -((lv*0.25 + maglv*3) * 7.7)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
Se quiser mudar também, mude oque estiver em vermelho, SEMPRE ESTARÁ EM VERMELHO!
Abra o spells.xml e ache as magias instantâneas , depois cole isso:
<instant name="fear of the dark" words="exevo gran mas mort" lvl="125" mana="1200" selftarget="1" prem="1" exhaustion="2000" needlearn="0" script="attack/fear of the dark.lua">
<vocation name="Sorcerer"/>
<vocation name="Master Sorcerer"/>
<vocation name="Druid"/>
<vocation name="Elder Druid"/>
</instant>
Feche e salve.
Essa é um exevo gran mas vis de death, pra usá-la é exevo gran mas mort
Próxima:
Bom pra faze a magia você sabe que copia e cola um arquivo e não vou ficar repetindo então mude o nome para Kill Everybody cole isso dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
function getSpellDamage(cid, weaponSkill, weaponAttack)
damage_min = (weaponSkill * weaponAttack / 30) * 8.6 damage_max = (weaponSkill * weaponAttack / 30) * 8.99
if(damage_max < damage_min) then
local tmp = damage_max
damage_max = damage_min
damage_min = tmp
end
return -damage_min, -damage_max
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
e você também sabe q pode mudar o damge_min e o damage_max.
Abra o spells.xml e cole isso:
<instant name="Kill Everybody" words="Exori Mas Mort" lvl="125" mana="400" prem="1" needweapon="1" exhaustion="2000" needlearn="0" script="attack/kill everybody.lua">
<vocation name="Knight"/>
<vocation name="Elite Knight"/>
</instant>
Salve e feche.
Pra usar a magia é exori mas mort.
Próxima:
Coloque o nome de um arquivo de Holy Wave
E cole isso dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) * 5.9)
local formula_max = -((lv*0.25 + maglv*3) * 6.7)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local area = createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)
setCombatArea(combat, area)
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
salve e feche.
Abra o spells.xml
e cole isso lá na parte das magias instantâneas:
<instant name="Holy Wave" words="exevo divine hur" lvl="145" mana="700" direction="1" exhaustion="2000" needlearn="0" script="attack/holy wave.lua">
<vocation name="Paladin"/>
<vocation name="Royal Paladin"/>
</instant>
Salve e feche, pra usar a magia é Exevo divine hur.
Próxima:
Coloque um nome de arquivo de :
EXORI FIRE.
E cole isso dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength )
damage_min = (weaponSkill * weaponAttack * attackStrength / 30) * 6.5)
damage_max = (weaponSkill * weaponAttack * attackStrength / 30) * 6.7)
if(damage_max < damage_min) then
local tmp = damage_max
damage_max = damage_min
damage_min = tmp
end
return -damage_min, -damage_max
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")
local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Salve e feche.
Abra o Spells.XML e cole isso(você sabe aonde)
<instant name="Fire Exori" words="exori fire" lvl="100" mana="200" prem="1" needweapon="1" exhaustion="2000" needlearn="0" script="attack/exori fire.lua">
<vocation name="Knight"/>
<vocation name="Elite Knight"/>
</instant>
Salve e feche, para usar ela é exori fire.
Outra, depois dessa só mais duas de ataque.
Coloque o nome dela de :
Rage of the gods.
E cole isso dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) * 9.5)
local formula_max = -((lv*0.25 + maglv*3) * 10.7)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Salve e feche, abra o spells.XML e cole isso:
<instant name="rage of the gods" words="exevo gran mas san" lvl="200" mana="1000" selftarget="1" prem="1" exaustion="2000" needlearn="0" script="attack/rage of the gods.lua">
<vocation name="Paladin"/>
<vocation name="Royal Paladin"/>
</instant>
Salve e feche.
Pra usa-la é exevo gran mas san.
Proxima:
Coloque o nome de Ultimate energy explosion.
E cole isso:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) * 8.6)
local formula_max = -((lv*0.25 + maglv*3) * 8.99)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
salve e feche abra o spells.xml e cole isso dentro:
<instant name="rage of the energy" words="exevo gran mas eletrecity" lvl="200" mana="1300" selftarget="1" prem="1" exaustion="2000" needlearn="0" script="attack/ultimate energy explosion.lua">
<vocation name="Sorcerer"/>
<vocation name="Master Sorcerer"/>
</instant>
Salve e feche.
A ultima de ataque:
Coloque o nome de Ultimate ice explosion e cole isso dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*0.25 + maglv*3) *8.6)
local formula_max = -((lv*0.25 + maglv*3) *8.99)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
salve e feche, abra o spells.xml e cole isso:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
function getCombatFormulas(cid, lv, maglv)
local formula_min = ((lv*0.25 + maglv*3) * 6.0)
local formula_max = ((lv*0.25 + maglv*3) * 6.2)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Não aconselho mudar nada.
Salve e feche, abra o spells.xml e cole isso dentro:
<instant name="Ultra Healing" words="exura mas" lvl="100" mana="210" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" script="healing/ultra healing.lua">
<vocation name="Sorcerer"/>
<vocation name="Druid"/>
<vocation name="Paladin"/>
<vocation name="Master Sorcerer"/>
<vocation name="Elder Druid"/>
<vocation name="Royal Paladin"/>
<vocation name="Knight"/>
<vocation name="Elite Knight"/>
</instant>
Salve e feche, pra usar ela é exura mas.
Próxima:
Abra a pasta de support, copie um arquivo cole e coloque isso dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 22000)
setConditionFormula(condition, 0.9, -60, 0.9, -60)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
salve e feche.
Abra o spells.xml e cole isso lá:
<instant name="Mega Haste" words="utani metal hur" lvl="100" mana="200" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" script="support/mega haste.lua">
<vocation name="Sorcerer"/>
<vocation name="Druid"/>
<vocation name="Master Sorcerer"/>
<vocation name="Elder Druid"/>
<vocation name="Knight"/>
<vocation name="Elite Knight"/>
<vocation name="Royal Paladin"/>
<vocation name="Paladin"/>
</instant>
Por inquanto é só isso mesmo mas quando eu for criando mais eu vou postando pra vocês.
Créditos
100% MEU pela criação e pelo post das magias.