hucko
Special Order
- Joined
- May 6, 2011
- Messages
- 79
- Reaction score
- 1
Help Otlanders,
i Got new Spell " Creative " and i made it based on magic level,
but it didn't work well, " There is no damage "
i just need it work i tried to put " setAttackFormula " Istead SetCombatFormula " but it still based on just Magic level
i Need it based on level & Magic level !!!
so can i find any one help
i Got new Spell " Creative " and i made it based on magic level,
but it didn't work well, " There is no damage "
i just need it work i tried to put " setAttackFormula " Istead SetCombatFormula " but it still based on just Magic level
i Need it based on level & Magic level !!!
so can i find any one help
Code:
-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{1, 0, 1, 0, 1},
{0, 1, 0, 1, 0},
{1, 0, 2, 0, 1},
{0, 1, 0, 1, 0},
{1, 0, 1, 0, 1}}))
setCombatFormula(combat0_Brush, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4)local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatArea(combat0_Brush_2,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}}))
setCombatFormula(combat0_Brush_2, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4)
-- =============== 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)
RunPart(combat0_Brush_2,cid,var)
return true
end