Adorius Black
Advanced OT User
- Joined
- Mar 31, 2020
- Messages
- 301
- Solutions
- 3
- Reaction score
- 180
1.) Cyber Combo
(Formula: Exori Con)
(Formula: Exori Con)
XML:
<!-- 40 level-->
<instant group="attack" spellid="122" name="Cyber Combo" words="exori cyber con" lvl="40" mana="20" prem="1" range="7" needtarget="1" needlearn="0" blockwalls="1" exhaustion="2000" groupcooldown="2000" script="custom/cyber_combo.lua">
<vocation name="Necromancer" />
<vocation name="Cyber Necromancer" />
</instant>
Lua:
local combat = Combat()
local time_between_hits = 0.7 --seconds
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)
function onGetFormulaValues(player, attack, factor)
local skillTotal = 2 * player:getEffectiveSkillLevel(SKILL_DISTANCE)
local levelTotal = player:getLevel() / 5
return -(((skillTotal + attack / 3500) * 0.35) + (levelTotal) + 0), -(((skillTotal + attack / 3125) * 0.5) + (levelTotal) + 5)
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, var)
combat:execute(creature, var)
addEvent(function() combat:execute(creature, var) end, time_between_hits * 1000)
return true
end
========================================================================
2.) Necro Wave
(Formula: Exevo Vis Hur)
2.) Necro Wave
(Formula: Exevo Vis Hur)
XML:
<!-- 38 level-->
<instant group="attack" spellid="23" name="Necro Wave" words="exevo necro hur" lvl="38" mana="170" prem="0" direction="1" exhaustion="7000" groupcooldown="2000" needlearn="0" script="custom/necro_wave.lua">
<vocation name="Necromancer" />
<vocation name="Cyber Necromancer" />
</instant>
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
AREA_NECRO_WAVE = {
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 3, 0, 0},
{0, 1, 0, 1, 0}
}
combat:setArea(createCombatArea(AREA_NECRO_WAVE))
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 4.5) + 20
local max = (level / 5) + (maglevel * 7.6) + 48
return -min, -max
end
function onTargetTile(creature, position)
if creature then
creature:getPosition():sendDistanceEffect(position, CONST_ANI_DEATH)
end
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
========================================================================
3.) Cyber Hole
(Formula: Exevo Gran Mas Frigo)
3.) Cyber Hole
(Formula: Exevo Gran Mas Frigo)
XML:
<!-- 60 level-->
<instant group="attack" spellid="28" name="Cyber Hole" words="exevo gran black hole" lvl="60" mana="800" prem="0" selftarget="1" exhaustion="25000" groupcooldown="3000" needlearn="0" script="custom/cyber_hole.lua">
<vocation name="Necromancer" />
<vocation name="Cyber Necromancer" />
</instant>
Lua:
-- Delay between animations.
local animationDelay = 200
local combat = {}
-- Frames (1 = Area, 2 = Player, 3 = Player + Self Damaging)
local area = {
{
{0,0,0,1,1,1,0,0,0},
{0,0,1,1,0,1,1,0,0},
{0,1,1,0,0,0,1,1,0},
{1,1,0,0,0,0,0,1,1},
{1,0,0,0,2,0,0,0,1},
{1,1,0,0,0,0,0,1,1},
{0,1,1,0,0,0,1,1,0},
{0,0,1,1,0,1,1,0,0},
{0,0,0,1,1,1,0,0,0}
},
{
{0,0,0,1,0,0,0},
{0,0,1,0,1,0,0},
{0,1,0,0,0,1,0},
{1,0,0,2,0,0,1},
{0,1,0,0,0,1,0},
{0,0,1,0,1,0,0},
{0,0,0,1,0,0,0}
},
{
{0,0,1,0,0},
{0,1,0,1,0},
{1,0,2,0,1},
{0,1,0,1,0},
{0,0,1,0,0}
},
{
{0,1,0},
{1,2,1},
{0,1,0}
},
{
{3}
}
}
for i = 1, #area do
combat[i] = Combat()
combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
end
for x, _ in ipairs(area) do
combat[x]:setArea(createCombatArea(area[x]))
end
function executeCombat(p, i)
if not p.player then
return false
end
if not p.player:isPlayer() then
return false
end
p.combat[i]:execute(p.player, p.var)
end
function onCastSpell(player, var)
local p = {player = player, var = var, combat = combat}
-- Damage formula
local level = player:getLevel()
local maglevel = player:getMagicLevel()
local min = (level / 5) + (maglevel * 5.5) + 25
local max = (level / 5) + (maglevel * 11) + 50
for i = 1, #area do
combat[i]:setFormula(COMBAT_FORMULA_LEVELMAGIC, 0, -min, 0, -max)
if i == 1 then
combat[i]:execute(player, var)
else
addEvent(executeCombat, (animationDelay * i) - animationDelay, p, i)
end
end
return true
end
If you know how to make this code more easy, stable, correct or you are just bored and you have created nice modification of this code please post it here. OTLand users will be grateful.
Last edited: