Galera preciso de ajudar para mudar essa spell
* Essa magia esta saindo após segundos - Preciso que ela saia no target - porem ela esta saindo no ultimo local onde o player esteve
-- Areas/Combat for 2000ms
local combat20_Brush = createCombatObject()
setCombatParam(combat20_Brush, COMBAT_PARAM_EFFECT, 185)
setCombatParam(combat20_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatArea(combat20_Brush,createCombatArea({
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}}))
function onGetFormulaValues(cid, level, maglevel)
local levelTotal = level / 7
local min = levelTotal + (maglevel * 6.0)
local max = levelTotal + (maglevel * 6.5)
return -min, -max
end
-- =============== CORE FUNCTIONS ===============
local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part
local target = getCreatureTarget(cid)
if target < 1 then
doPlayerSendCancel(cid, "You need a target to cast this spell.")
return true
end
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
return true
end
end
end
end
setCombatCallback(combat20_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
local startPos = getCreatureTarget(cid)
addEvent(RunPart,2000,combat20_Brush,cid,var)
return true
end
Pergunta
robinpah 1
Galera preciso de ajudar para mudar essa spell
* Essa magia esta saindo após segundos - Preciso que ela saia no target - porem ela esta saindo no ultimo local onde o player esteve
-- Areas/Combat for 2000ms local combat20_Brush = createCombatObject() setCombatParam(combat20_Brush, COMBAT_PARAM_EFFECT, 185) setCombatParam(combat20_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatArea(combat20_Brush,createCombatArea({ {1, 1, 1}, {1, 3, 1}, {1, 1, 1}})) function onGetFormulaValues(cid, level, maglevel) local levelTotal = level / 7 local min = levelTotal + (maglevel * 6.0) local max = levelTotal + (maglevel * 6.5) return -min, -max end -- =============== CORE FUNCTIONS =============== local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part local target = getCreatureTarget(cid) if target < 1 then doPlayerSendCancel(cid, "You need a target to cast this spell.") return true end 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 return true end end end end setCombatCallback(combat20_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) local startPos = getCreatureTarget(cid) addEvent(RunPart,2000,combat20_Brush,cid,var) return true end
Link para o comentário
Compartilhar em outros sites
4 respostass a esta questão
Posts Recomendados