how to make the spell get stronger by lvl
here is my script
i use 0.36 tfs
here is my script
i use 0.36 tfs
Code:
-- SpellCreator generated.
-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{1, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 2, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 1}}))
setCombatFormula(combat0_Brush, COMBAT_FORMULA_SKILL, 1, -1000, 2, -20000)
local dfcombat0_Brush = {CONST_ANI_FIRE,1,0,1,-1,0,-1,-1,-1,-1,0,-1,1,0,1,1,1,2,-2,-2,-2,3,-3,-3,-3,-2,2,-3,3,2,2,3,3}
-- Areas/Combat for 400ms
local combat4_Brush = createCombatObject()
setCombatParam(combat4_Brush, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat4_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat4_Brush,createCombatArea({{1, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 2, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 1}}))
setCombatFormula(combat4_Brush, COMBAT_FORMULA_SKILL, 1, -1000, 2, -2000)
local dfcombat4_Brush = {CONST_ANI_FIRE,3,-3,2,-2,2,2,3,3,-2,2,-3,3,-2,-2,-3,-3,-1,-1,0,-1,1,-1,1,0,1,1,0,1,-1,1,-1,0}
-- =============== CORE FUNCTIONS ===============
local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part
if (isCreature(cid)) then
doCombat(cid, c, var)
if (dirList ~= nil) then -- Emit distance effects
local i = 2;
while (i < #dirList) do
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
i = i + 2
end
end
end
end
function onCastSpell(cid, var)
local startPos = getCreaturePosition(cid)
RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
addEvent(RunPart,400,combat4_Brush,cid,var,dfcombat4_Brush,startPos)
return true
end