Dae galera... .o/
Pessoal esse é meu 1º post, estão postem para dizer se gostaram. E se não gostaram, me deêm dicas :wink:
Então vamos ao que enteressa...
Bom, essa é a 1ª magia que eu criei ( :smiling: ), espero que não seja a última também... Essa magia possui um campo de ataque que parece um "alvo" (em breve ponho um Screen Shot). Os rates dela são: mindmg (900), maxdmg (1200), lvl (30) e ml (45).
Vamos começar:
1º Vá em ot/data/spells/instant, então copie um arquivo qualquer e renomeio para "target.lua" e cole isso dentro:
area = { {1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1}, {0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0}, {0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0}, {1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1}, {1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1}, {1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}, {1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1}, {1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1}, {0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0}, {0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0}, {1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1}, } attackType = 4 needDirection = false areaEffect = 9 animationEffect = 10 hitEffect = 17 damageEffect = 0 animationColor = 255 offensive = true drawblood = true UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0) function onCast(cid, creaturePos, level, maglv, var) centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z} n = tonumber(var) -- try to convert it to a number if n ~= nil then -- bugged -- ultimateExplosionObject.minDmg = var+0 -- UltimateExplosionObject.maxDmg = var+0 UltimateExplosionObject.minDmg = 900 UltimateExplosionObject.maxDmg = 1200 else UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 2.6 - 30 UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 3.0 end return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered()) end
2º Após isso, vá em ot/data/spells/spells.xml e cole logo abaixo de onde diz: "<!--// Instant \\-->"
<spell name="Target" words="target" maglv="45" mana="30" enabled="1"><vocation id="1" /></spell>
E é isso galera... Se gostaram, postem! Se não gostaram, postem também!!!