• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell Ice Crush

Reyn

On to the next One
Joined
May 15, 2010
Messages
259
Reaction score
1
Location
Germany ;3
Hey :)
This is my first advanced Spell and i hope u like it :)

Code:
local acombat = createCombatObject()

local combat8 = createCombatObject()
setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 28)
setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -77, -500)

local combat9 = createCombatObject()
setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat9, COMBAT_PARAM_EFFECT, 52)
setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat11 = createCombatObject()
setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat11, COMBAT_PARAM_EFFECT, 52)
setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat12 = createCombatObject()
setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat12, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat12,  COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat13 = createCombatObject()
setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat13, COMBAT_PARAM_EFFECT, 52)
setCombatFormula(combat13,  COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat14 = createCombatObject()
setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat14, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat14,  COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat15 = createCombatObject()
setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat15, COMBAT_PARAM_EFFECT, 52)
setCombatFormula(combat15,  COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat16 = createCombatObject()
setCombatParam(combat16, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat16, COMBAT_PARAM_EFFECT, 12)
setCombatFormula(combat16, COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -9.7, -500)

local combat17 = createCombatObject()
setCombatParam(combat17, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat17, COMBAT_PARAM_EFFECT, 52)
setCombatFormula(combat17,  COMBAT_FORMULA_LEVELMAGIC, -9.7, -100, -77, -500)






arr8 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 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0, 0},
{0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

arr17 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}


local area8 = createCombatArea(arr8)
local area9 = createCombatArea(arr9)
local area10 = createCombatArea(arr10)
local area11 = createCombatArea(arr11)
local area12 = createCombatArea(arr12)
local area13 = createCombatArea(arr13)
local area14 = createCombatArea(arr14)
local area15 = createCombatArea(arr15)
local area16 = createCombatArea(arr16)
local area17 = createCombatArea(arr17)
setCombatArea(acombat, area8)
setCombatArea(combat9, area9)
setCombatArea(combat10, area10)
setCombatArea(combat11, area11)
setCombatArea(combat12, area12)
setCombatArea(combat13, area13)
setCombatArea(combat14, area14)
setCombatArea(combat15, area15)
setCombatArea(combat16, area16)
setCombatArea(combat17, area17)



function onTargetTile(cid, pos)
	doCombat(cid,combat8,positionToVariant(pos))
end



setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")


 
local function onCastSpell8(parameters)
    doCombat(parameters.cid, acombat, parameters.var)
end

local function onCastSpell9(parameters)
    doCombat(parameters.cid, combat9, parameters.var)
end

local function onCastSpell10(parameters)
    doCombat(parameters.cid, combat10, parameters.var)
end

local function onCastSpell11(parameters)
    doCombat(parameters.cid, combat11, parameters.var)
end

local function onCastSpell12(parameters)
    doCombat(parameters.cid, combat12, parameters.var)
end

local function onCastSpell13(parameters)
    doCombat(parameters.cid, combat13, parameters.var)
end

local function onCastSpell14(parameters)
    doCombat(parameters.cid, combat14, parameters.var)
end

local function onCastSpell15(parameters)
    doCombat(parameters.cid, combat15, parameters.var)
end

local function onCastSpell16(parameters)
    doCombat(parameters.cid, combat16, parameters.var)
end

local function onCastSpell17(parameters)
    doCombat(parameters.cid, combat17, parameters.var)
end




function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell8, 100, parameters)
addEvent(onCastSpell9, 250, parameters)
addEvent(onCastSpell10, 350, parameters)
addEvent(onCastSpell11, 450, parameters)
addEvent(onCastSpell12, 550, parameters)
addEvent(onCastSpell13, 650, parameters)
addEvent(onCastSpell14, 750, parameters)
addEvent(onCastSpell15, 850, parameters)
addEvent(onCastSpell16, 975, parameters)
addEvent(onCastSpell17, 1050, parameters)
return TRUE
end

Code:
        <instant name="Ice Crush" words="exevo gran freeze" lvl="0" mana="0" prem="0" selftarget="1" exhaustion="1200" needlearn="0" script="testspell.lua">
		<vocation name="Druid"/> 
		<vocation name="Elder Druid"/>
		<vocation name="Priest"/>
	</instant>

It's working non-spammable for players for tfs 0.3.6pl1
if it's to slow/fast for you just edit
Code:
addEvent(onCastSpell8, 100, parameters)
addEvent(onCastSpell9, 250, parameters)
addEvent(onCastSpell10, 350, parameters)
addEvent(onCastSpell11, 450, parameters)
addEvent(onCastSpell12, 550, parameters)
addEvent(onCastSpell13, 650, parameters)
addEvent(onCastSpell14, 750, parameters)
addEvent(onCastSpell15, 850, parameters)
addEvent(onCastSpell16, 975, parameters)
addEvent(onCastSpell17, 1050, parameters)
at the script

Screenies:


 
Last edited:
It looks nice but what im thinking about is wat if the monsters are inside of the spell it wont even get close to them :s good job tho
 
It looks nice but what im thinking about is wat if the monsters are inside of the spell it wont even get close to them :s good job tho


You can easily edit that by placing 1's and 0's within the range you want the spell to be.

Don't be so lazy.

@Ontopic:
It's looking very nice, judging from the picture.
 
The pictures are only of the first 3 moves :p
there are ofc more..
It will hit the monsters inside 3-4 times ^^ just test it out ingame xP
 
Back
Top