• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

spell

Nani3601

elhanan
Joined
May 18, 2012
Messages
98
Reaction score
4
Location
Secret
can someone show me how to make spell that give more damage with your level. lv.100 the spell lets say damage 500. lv.200 damage 1000... and you know. someone can help with that?
 
"local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO)
combat:setArea(createCombatArea(AREA_CROSS5X5))

function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 4.0) + 32
local max = (level / 5) + (maglevel * 6.0) + 42
return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant)
if creature:isPlayer() then
local city = CityWars.getPlayerWar(creature)
if city and not city:onCastSpell(creature, 'ultimateExplosion') then
return false
end
end
return combat:execute(creature, variant)
end"

This is exevo gran mas frigo for a example you edit all you stuff in spells/scripts in your data file This hits about 500-700
All you have to do is edit
local min = (level / 5) + (maglevel * 4.0) + 32
local max = (level / 5) + (maglevel * 6.0) + 42
Till you get the perfect hit rate you like pretty simple.

If you want to make a custom spell Make a new .Xml file copy paste this in it
"local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) < search for combat types, for example where gonna do PHYCICAL
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_M) < search for combat effects, for example im gonna use mort
combat:setArea(createCombatArea(AREA_CROSS5X5)) < is how big the burst goes

function onGetFormulaValues(player, level, maglevel) < adjust to make the damage to your liking like above
local min = (level / 5) + (maglevel * 4.0) + 32
local max = (level / 5) + (maglevel * 6.0) + 42
return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant)
if creature:isPlayer() then
local city = CityWars.getPlayerWar(creature)
if city and not city:onCastSpell(creature, 'ultimateExplosion') then
return false
end
end
return combat:execute(creature, variant)
end"
Hope this helps you!!!!
 
Back
Top