• 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!

Lua What in a spell allows it to improve on it's own?

KikiRook

₆⁶₆NOS Titan₆⁶₆
Joined
May 29, 2016
Messages
382
Reaction score
104
Location
Japan
So If I made a simple Exori like spell like the example below.. What do I add to it to make it improve as the player levels.

Please Highlight what you added so I may have something proper to study


-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDAXE)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{1, 1, 1},
{1, 2, 1},
{1, 1, 1}}))
function getDmg_Brush(cid, level, maglevel)
return (8500)*-1,(9500)*-1
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_WHIRLWINDAXE,1,1,0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0}

-- Areas/Combat for 100ms
local combat1_Brush_2 = createCombatObject()
setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_STONES)
setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Brush_2,createCombatArea({{1, 1, 1},
{1, 2, 1},
{1, 1, 1}}))
function getDmg_Brush_2(cid, level, maglevel)
return (0)*-1,(0)*-1
end
setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")

-- =============== 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,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,100,combat1_Brush_2,cid,var)
return true
end
 
Re-write it completely, I think that spell maker program is really for people satisfied with the basic functionality it has to offer or for those who do know how to code a lazy approach to making spells they can tweak.
 
Re-write it completely, I think that spell maker program is really for people satisfied with the basic functionality it has to offer or for those who do know how to code a lazy approach to making spells they can tweak.
not the first person to tell me that T_T
 
Back
Top