function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect)
--// Incase the creature disappears within 120-250ms time window
local creature = Creature(cid)
if not creature then
return
end
doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect)
end
local running = {}
local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
local player = Player(cid)
--// Player doesn't exist anymore
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
--// Maximum rounds complete
if i > j then
stopEvent(running[cid])
running[cid] = nil
return
end
local center = player:getPosition()
local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y)
--// Send effects and damage creatures within radius
local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect}
for i = 1, #specs do
if specs[i]:isMonster() then
local specPos = specs[i]:getPosition()
args[1] = specs[i]:getId()
args[4] = specPos
center:sendDistanceEffect(specPos, distanceEffect)
addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args))
end
end
addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
end
local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH}
local function sendEffects(cid, delay, areaEffect, distanceEffect)
local player = Player(cid)
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
local pos = player:getPosition()
--// Send distance effects (N/E/S/W) & area effect on player
for i = 1, #offsets do
local fromPos = pos:setDirectionOffset(offsets[i])
local fromPos = pos:setDirectionOffset(player:getPosition())
local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1])
fromPos:sendDistanceEffect(toPos, distanceEffect)
end
pos:sendMagicEffect(areaEffect)
running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect)
end
local config = {
damage = {min = -78, max = -124},
rounds = 30, -- number of times the spell loops (effects & damage)
delay = 320, -- ms
radius = {x = 5, y = 5}, -- sqm radius
damageType = COMBAT_DEATHDAMAGE,
areaEffect = CONST_ME_MORTAREA,
distanceEffect = CONST_ANI_DEATH,
}
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect)
--// Incase the creature disappears within 120-250ms time window
local creature = Creature(cid)
if not creature then
return
end
doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect)
end
local running = {}
local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
local player = Player(cid)
--// Player doesn't exist anymore
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
--// Maximum rounds complete
if i > j then
stopEvent(running[cid])
running[cid] = nil
return
end
local center = player:getPosition()
local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y)
--// Send effects and damage creatures within radius
local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect}
for i = 1, #specs do
if specs[i]:isMonster() then
local specPos = specs[i]:getPosition()
args[1] = specs[i]:getId()
args[4] = specPos
center:sendDistanceEffect(specPos, distanceEffect)
addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args))
end
end
addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
end
local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH}
local function sendEffects(cid, delay, areaEffect, distanceEffect)
local player = Player(cid)
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
local pos = player:getPosition()
--// Send distance effects (N/E/S/W) & area effect on player
for i = 1, #offsets do
local fromPos = pos:setDirectionOffset(offsets[i])
local fromPos = pos:setDirectionOffset(player:getPosition())
local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1])
fromPos:sendDistanceEffect(toPos, distanceEffect)
end
pos:sendMagicEffect(areaEffect)
running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect)
end
local config = {
damage = {min = -91, max = -166},
rounds = 30, -- number of times the spell loops (effects & damage)
delay = 320, -- ms
radius = {x = 5, y = 5}, -- sqm radius
damageType = COMBAT_ICEDAMAGE,
areaEffect = CONST_ME_ICETORNADO,
distanceEffect = CONST_ANI_SMALLICE,
}
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect)
--// Incase the creature disappears within 120-250ms time window
local creature = Creature(cid)
if not creature then
return
end
doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect)
end
local running = {}
local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
local player = Player(cid)
--// Player doesn't exist anymore
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
--// Maximum rounds complete
if i > j then
stopEvent(running[cid])
running[cid] = nil
return
end
local center = player:getPosition()
local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y)
--// Send effects and damage creatures within radius
local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect}
for i = 1, #specs do
if specs[i]:isMonster() then
local specPos = specs[i]:getPosition()
args[1] = specs[i]:getId()
args[4] = specPos
center:sendDistanceEffect(specPos, distanceEffect)
addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args))
end
end
addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
end
local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH}
local function sendEffects(cid, delay, areaEffect, distanceEffect)
local player = Player(cid)
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
local pos = player:getPosition()
--// Send distance effects (N/E/S/W) & area effect on player
for i = 1, #offsets do
local fromPos = pos:setDirectionOffset(offsets[i])
local fromPos = pos:setDirectionOffset(player:getPosition())
local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1])
fromPos:sendDistanceEffect(toPos, distanceEffect)
end
pos:sendMagicEffect(areaEffect)
running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect)
end
local config = {
damage = {min = -98, max = -219},
rounds = 30, -- number of times the spell loops (effects & damage)
delay = 320, -- ms
radius = {x = 5, y = 5}, -- sqm radius
damageType = COMBAT_PHYSICALDAMAGE,
areaEffect = CONST_ME_EXPLOSIONAREA,
distanceEffect = CONST_ANI_WHIRLWINDSWORD,
}
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect)
--// Incase the creature disappears within 120-250ms time window
local creature = Creature(cid)
if not creature then
return
end
doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect)
end
local running = {}
local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
local player = Player(cid)
--// Player doesn't exist anymore
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
--// Maximum rounds complete
if i > j then
stopEvent(running[cid])
running[cid] = nil
return
end
local center = player:getPosition()
local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y)
--// Send effects and damage creatures within radius
local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect}
for i = 1, #specs do
if specs[i]:isMonster() then
local specPos = specs[i]:getPosition()
args[1] = specs[i]:getId()
args[4] = specPos
center:sendDistanceEffect(specPos, distanceEffect)
addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args))
end
end
addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
end
local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH}
local function sendEffects(cid, delay, areaEffect, distanceEffect)
local player = Player(cid)
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
local pos = player:getPosition()
--// Send distance effects (N/E/S/W) & area effect on player
for i = 1, #offsets do
local fromPos = pos:setDirectionOffset(offsets[i])
local fromPos = pos:setDirectionOffset(player:getPosition())
local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1])
fromPos:sendDistanceEffect(toPos, distanceEffect)
end
pos:sendMagicEffect(areaEffect)
running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect)
end
local config = {
damage = {min = -136, max = -201},
rounds = 30, -- number of times the spell loops (effects & damage)
delay = 320, -- ms
radius = {x = 5, y = 5}, -- sqm radius
damageType = COMBAT_FIREDAMAGE,
areaEffect = CONST_ME_FIREATTACK,
distanceEffect = CONST_ANI_FIRE,
}
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect)
--// Incase the creature disappears within 120-250ms time window
local creature = Creature(cid)
if not creature then
return
end
doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect)
end
local running = {}
local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
local player = Player(cid)
--// Player doesn't exist anymore
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
--// Maximum rounds complete
if i > j then
stopEvent(running[cid])
running[cid] = nil
return
end
local center = player:getPosition()
local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y)
--// Send effects and damage creatures within radius
local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect}
for i = 1, #specs do
if specs[i]:isMonster() then
local specPos = specs[i]:getPosition()
args[1] = specs[i]:getId()
args[4] = specPos
center:sendDistanceEffect(specPos, distanceEffect)
addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args))
end
end
addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
end
local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH}
local function sendEffects(cid, delay, areaEffect, distanceEffect)
local player = Player(cid)
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
local pos = player:getPosition()
--// Send distance effects (N/E/S/W) & area effect on player
for i = 1, #offsets do
local fromPos = pos:setDirectionOffset(offsets[i])
local fromPos = pos:setDirectionOffset(player:getPosition())
local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1])
fromPos:sendDistanceEffect(toPos, distanceEffect)
end
pos:sendMagicEffect(areaEffect)
running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect)
end
local config = {
damage = {min = -70, max = -97},
rounds = 30, -- number of times the spell loops (effects & damage)
delay = 320, -- ms
radius = {x = 5, y = 5}, -- sqm radius
damageType = COMBAT_HOLYDAMAGE,
areaEffect = CONST_ME_HOLYAREA,
distanceEffect = CONST_ANI_SMALLHOLY,
}
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect)
--// Incase the creature disappears within 120-250ms time window
local creature = Creature(cid)
if not creature then
return
end
doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect)
end
local running = {}
local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
local player = Player(cid)
--// Player doesn't exist anymore
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
--// Maximum rounds complete
if i > j then
stopEvent(running[cid])
running[cid] = nil
return
end
local center = player:getPosition()
local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y)
--// Send effects and damage creatures within radius
local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect}
for i = 1, #specs do
if specs[i]:isMonster() then
local specPos = specs[i]:getPosition()
args[1] = specs[i]:getId()
args[4] = specPos
center:sendDistanceEffect(specPos, distanceEffect)
addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args))
end
end
addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
end
local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH}
local function sendEffects(cid, delay, areaEffect, distanceEffect)
local player = Player(cid)
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
local pos = player:getPosition()
--// Send distance effects (N/E/S/W) & area effect on player
for i = 1, #offsets do
local fromPos = pos:setDirectionOffset(offsets[i])
local fromPos = pos:setDirectionOffset(player:getPosition())
local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1])
fromPos:sendDistanceEffect(toPos, distanceEffect)
end
pos:sendMagicEffect(areaEffect)
running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect)
end
local config = {
damage = {min = -136, max = -201},
rounds = 30, -- number of times the spell loops (effects & damage)
delay = 320, -- ms
radius = {x = 5, y = 5}, -- sqm radius
damageType = COMBAT_ENERGYDAMAGE,
areaEffect = CONST_ME_BIGCLOUDS,
distanceEffect = CONST_ANI_ENERGY,
}
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect)
--// Incase the creature disappears within 120-250ms time window
local creature = Creature(cid)
if not creature then
return
end
doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect)
end
local running = {}
local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
local player = Player(cid)
--// Player doesn't exist anymore
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
--// Maximum rounds complete
if i > j then
stopEvent(running[cid])
running[cid] = nil
return
end
local center = player:getPosition()
local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y)
--// Send effects and damage creatures within radius
local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect}
for i = 1, #specs do
if specs[i]:isMonster() then
local specPos = specs[i]:getPosition()
args[1] = specs[i]:getId()
args[4] = specPos
center:sendDistanceEffect(specPos, distanceEffect)
addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args))
end
end
addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect)
end
local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH}
local function sendEffects(cid, delay, areaEffect, distanceEffect)
local player = Player(cid)
if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then
stopEvent(running[cid])
running[cid] = nil
return
end
local pos = player:getPosition()
--// Send distance effects (N/E/S/W) & area effect on player
for i = 1, #offsets do
local fromPos = pos:setDirectionOffset(offsets[i])
local fromPos = pos:setDirectionOffset(player:getPosition())
local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1])
fromPos:sendDistanceEffect(toPos, distanceEffect)
end
pos:sendMagicEffect(areaEffect)
running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect)
end
local config = {
damage = {min = -68, max = -136},
rounds = 30, -- number of times the spell loops (effects & damage)
delay = 320, -- ms
radius = {x = 5, y = 5}, -- sqm radius
damageType = COMBAT_EARTHDAMAGE,
areaEffect = CONST_ME_SMALLPLANTS,
distanceEffect = CONST_ANI_EARTH,
}
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect)
runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect)
return true
end
<instant group="attack" spellid="185" name="Great Energy Strike" words="exevo mas vis" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_energy_strike.lua">
<vocation name="Sorcerer" />
<vocation name="Master Sorcerer" />
</instant>
<instant group="attack" spellid="184" name="Great Brutal Strike" words="exori mas ico" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_brutal_strike.lua">
<vocation name="Knight" />
<vocation name="Elite Knight" />
</instant>
<instant group="attack" spellid="183" name="Great Holy Strike" words="exori mas san" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_holy_strike.lua">
<vocation name="Paladin" />
<vocation name="Royal Paladin" />
</instant>
<instant group="attack" spellid="182" name="Great Earth Strike" words="exevo mas tera" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_earth_strike.lua">
<vocation name="Druid" />
<vocation name="Elder Druid" />
</instant>
<instant group="attack" spellid="181" name="Great Flame Strike" words="exevo mas flam" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_flame_strike.lua">
<vocation name="Sorcerer" />
<vocation name="Master Sorcerer" />
</instant>
<instant group="attack" spellid="180" name="Great Frost Strike" words="exevo mas frigo" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_frost_strike.lua">
<vocation name="Druid" />
<vocation name="Elder Druid" />
</instant>
<instant group="attack" spellid="179" name="Great Death Strike" words="exevo mas mort" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_death_strike.lua">
<vocation name="Sorcerer" />
<vocation name="Master Sorcerer" />
<vocation name="Druid" />
<vocation name="Elder Druid" />
</instant>
both work just fineXML:<instant group="attack" spellid="185" name="Great Energy Strike" words="exevo mas vis" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_energy_strike.lua"> <vocation name="Sorcerer" /> <vocation name="Master Sorcerer" /> </instant> <instant group="attack" spellid="184" name="Great Brutal Strike" words="exori mas ico" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_brutal_strike.lua"> <vocation name="Knight" /> <vocation name="Elite Knight" /> </instant> <instant group="attack" spellid="183" name="Great Holy Strike" words="exori mas san" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_holy_strike.lua"> <vocation name="Paladin" /> <vocation name="Royal Paladin" /> </instant> <instant group="attack" spellid="182" name="Great Earth Strike" words="exevo mas tera" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_earth_strike.lua"> <vocation name="Druid" /> <vocation name="Elder Druid" /> </instant> <instant group="attack" spellid="181" name="Great Flame Strike" words="exevo mas flam" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_flame_strike.lua"> <vocation name="Sorcerer" /> <vocation name="Master Sorcerer" /> </instant> <instant group="attack" spellid="180" name="Great Frost Strike" words="exevo mas frigo" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_frost_strike.lua"> <vocation name="Druid" /> <vocation name="Elder Druid" /> </instant> <instant group="attack" spellid="179" name="Great Death Strike" words="exevo mas mort" lvl="80" mana="200" prem="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="custom/great_death_strike.lua"> <vocation name="Sorcerer" /> <vocation name="Master Sorcerer" /> <vocation name="Druid" /> <vocation name="Elder Druid" /> </instant>
Im not want hit more monsters, i want hit less monsters. If have 5 monsters around me i hit only 3. Understood?if you want to hit more monsters make the range bigger
got bored and wanted to try to make my first non-utility spell
only works on monsters, fully configurable (config is at the bottom)
demonstration: http://xera.s-ul.eu/C95HkX4x
Lua:--[[#######################################################################################]]-- function doAreaCombatDamage(cid, attacker, combatType, position, min, max, effect) --// Incase the creature disappears within 120-250ms time window local creature = Creature(cid) if not creature then return end doAreaCombatHealth(attacker, combatType, position, 0, min, max, effect) end local running = {} local function runSpell(cid, i, j, delay, radius, damage, damageType, areaEffect, distanceEffect) local player = Player(cid) --// Player doesn't exist anymore if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then stopEvent(running[cid]) running[cid] = nil return end --// Maximum rounds complete if i > j then stopEvent(running[cid]) running[cid] = nil return end local center = player:getPosition() local specs = Game.getSpectators(center, false, false, radius.x, radius.x, radius.y, radius.y) --// Send effects and damage creatures within radius local args = {nil, cid, damageType, nil, damage.min, damage.max, areaEffect} for i = 1, #specs do if specs[i]:isMonster() then local specPos = specs[i]:getPosition() args[1] = specs[i]:getId() args[4] = specPos center:sendDistanceEffect(specPos, distanceEffect) addEvent(doAreaCombatDamage, 120 + (center:getDistance(specPos) * 7), unpack(args)) end end addEvent(runSpell, delay, cid, i+1, j, delay, radius, damage, damageType, areaEffect, distanceEffect) end local offsets = {DIRECTION_WEST, DIRECTION_NORTH, DIRECTION_EAST, DIRECTION_SOUTH} local function sendEffects(cid, delay, areaEffect, distanceEffect) local player = Player(cid) if not player or Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) and bit.band(player:getGroup():getFlags(), PlayerFlag_IgnoreProtectionZone) == 0 then stopEvent(running[cid]) running[cid] = nil return end local pos = player:getPosition() --// Send distance effects (N/E/S/W) & area effect on player for i = 1, #offsets do local fromPos = pos:setDirectionOffset(offsets[i]) local toPos = pos:setDirectionOffset(offsets[i+1] or offsets[1]) fromPos:sendDistanceEffect(toPos, distanceEffect) end pos:sendMagicEffect(areaEffect) running[cid] = addEvent(sendEffects, delay, cid, delay, areaEffect, distanceEffect) end --[[#######################################################################################]]-- local config = { damage = {min = -10, max = -15}, rounds = 80, -- number of times the spell loops (effects & damage) delay = 160, -- ms radius = {x = 3, y = 3}, -- sqm radius damageType = COMBAT_DEATHDAMAGE, areaEffect = CONST_ME_MORTAREA, distanceEffect = CONST_ANI_SUDDENDEATH, } function onCastSpell(creature, variant) local player = creature:getPlayer() if not player then return false end sendEffects(player:getId(), config.delay, config.areaEffect, config.distanceEffect) runSpell(player:getId(), 0, config.rounds, config.delay, config.radius, config.damage, config.damageType, config.areaEffect, config.distanceEffect) return true end
local a = 100
local b = 200
--[[#######################################################################################]]--
local config = {
damage = {min = -a, max = -b},
rounds = 80, -- number of times the spell loops (effects & damage)
delay = 160, -- ms
radius = {x = 3, y = 3}, -- sqm radius
damageType = COMBAT_DEATHDAMAGE,
areaEffect = CONST_ME_MORTAREA,
distanceEffect = CONST_ANI_SUDDENDEATH,
}
local a = (playerlevel / 5) + (skill * 0.75) --??????????????
local b = (playerlevel / 5) + (skill * 1) --??????????????????
--[[#######################################################################################]]--
local config = {
damage = {min = -a, max = -b},
rounds = 80, -- number of times the spell loops (effects & damage)
delay = 160, -- ms
radius = {x = 3, y = 3}, -- sqm radius
damageType = COMBAT_DEATHDAMAGE,
areaEffect = CONST_ME_MORTAREA,
distanceEffect = CONST_ANI_SUDDENDEATH,
}