hucko
Special Order
- Joined
- May 6, 2011
- Messages
- 79
- Reaction score
- 1
I made some of custom spell by "Spell creator" and i tried to made it based on Skills,Level and Magic,level
but i noticed that
My full equipment doesn't make any change
Explain :
i have full don and hit with
11:03 You deal 60 damage to a training monk. , 11:03 You deal 58 damage to a training monk.
after equip Donation star " Weapon "
11:04 You deal 1166 damage to a training monk.
11:04 You deal 1304 damage to a training monk.
but i noticed that
My full equipment doesn't make any change
Explain :
i have full don and hit with
11:03 You deal 60 damage to a training monk. , 11:03 You deal 58 damage to a training monk.
after equip Donation star " Weapon "
11:04 You deal 1166 damage to a training monk.
11:04 You deal 1304 damage to a training monk.
Code:
-- SpellCreator generated.
-- =============== COMBAT VARS ===============
-- Areas/Combat for 100ms
local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 0.5 + levelTotal), -(skillTotal * 1.5 + levelTotal)
end
setCombatArea(combat1_Brush,createCombatArea({{0, 1, 0, 1, 0},
{1, 0, 0, 0, 1},
{0, 0, 2, 0, 0},
{1, 0, 0, 0, 1},
{0, 1, 0, 1, 0}}))
setCombatCallback(combat1_Brush, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local dfcombat1_Brush = {CONST_ANI_HOLY,2,1,2,-1,1,-2,-1,-2,-2,-1,-2,1,-1,2,1,2}local combat1_Brush_4 = createCombatObject()
setCombatParam(combat1_Brush_4, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat1_Brush_4, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 0.5 + levelTotal), -(skillTotal * 1.5 + levelTotal)
end
setCombatArea(combat1_Brush_4,createCombatArea({{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{1, 0, 2, 0, 1},
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 0}}))
setCombatCallback(combat1_Brush_4, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
-- Areas/Combat for 0ms
local combat0_Brush_4 = createCombatObject()
setCombatParam(combat0_Brush_4, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat0_Brush_4, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 0.5 + levelTotal), -(skillTotal * 1.5 + levelTotal)
end
setCombatArea(combat0_Brush_4,createCombatArea({{1, 1, 1},
{1, 2, 1},
{1, 1, 1}}))
setCombatCallback(combat0_Brush_4, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
-- Areas/Combat for 200ms
local combat2_Brush_5 = createCombatObject()
setCombatParam(combat2_Brush_5, COMBAT_PARAM_EFFECT, CONST_ME_FIREWORK_YELLOW)
setCombatParam(combat2_Brush_5, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 0.5 + levelTotal), -(skillTotal * 1.5 + levelTotal)
end
setCombatArea(combat2_Brush_5,createCombatArea({{0, 1, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 2, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0}}))
setCombatCallback(combat2_Brush_5, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
-- =============== 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)
addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
addEvent(RunPart,100,combat1_Brush_4,cid,var)
RunPart(combat0_Brush_4,cid,var)
addEvent(RunPart,200,combat2_Brush_5,cid,var)
return true
end