Ir para conteúdo
  • 0

{Ajuda} Editar Spell


Clarym

Pergunta

Iae :)

 

Bom, fiz uma spell mas não sei como dar a ultima editada nela, então peço que alguém me ajude :)

 

É uma magia que fica causando dano em área por 6 segundos, mas quando o jogador ativa a magia e começa a andar, a magia não acompanha ele, bom, se alguém souber, queria que ela o acompanhasse :)

 

Aqui a magia:

 

 

 

-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 6000ms
local combat60_Brush = createCombatObject()
setCombatParam(combat60_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat60_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat60_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat60_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat60_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat60_Brush, con_paralyze__combat60_Brush)

-- Areas/Combat for 5500ms
local combat55_Brush = createCombatObject()
setCombatParam(combat55_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat55_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat55_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat55_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat55_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat55_Brush, con_paralyze__combat55_Brush)

-- Areas/Combat for 5000ms
local combat50_Brush = createCombatObject()
setCombatParam(combat50_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat50_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat50_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat50_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat50_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat50_Brush, con_paralyze__combat50_Brush)

-- Areas/Combat for 4500ms
local combat45_Brush = createCombatObject()
setCombatParam(combat45_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat45_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat45_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat45_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat45_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat45_Brush, con_paralyze__combat45_Brush)

-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat0_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat0_Brush, con_paralyze__combat0_Brush)

-- Areas/Combat for 500ms
local combat5_Brush = createCombatObject()
setCombatParam(combat5_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat5_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat5_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat5_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat5_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat5_Brush, con_paralyze__combat5_Brush)

-- Areas/Combat for 1000ms
local combat10_Brush = createCombatObject()
setCombatParam(combat10_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat10_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat10_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat10_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat10_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat10_Brush, con_paralyze__combat10_Brush)

-- Areas/Combat for 1500ms
local combat15_Brush = createCombatObject()
setCombatParam(combat15_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat15_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat15_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat15_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat15_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat15_Brush, con_paralyze__combat15_Brush)

-- Areas/Combat for 2000ms
local combat20_Brush = createCombatObject()
setCombatParam(combat20_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat20_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat20_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat20_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat20_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat20_Brush, con_paralyze__combat20_Brush)

-- Areas/Combat for 2500ms
local combat25_Brush = createCombatObject()
setCombatParam(combat25_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat25_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat25_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat25_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat25_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat25_Brush, con_paralyze__combat25_Brush)

-- Areas/Combat for 3000ms
local combat30_Brush = createCombatObject()
setCombatParam(combat30_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat30_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat30_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat30_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat30_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat30_Brush, con_paralyze__combat30_Brush)

-- Areas/Combat for 3500ms
local combat35_Brush = createCombatObject()
setCombatParam(combat35_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat35_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat35_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat35_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat35_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat35_Brush, con_paralyze__combat35_Brush)

-- Areas/Combat for 4000ms
local combat40_Brush = createCombatObject()
setCombatParam(combat40_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat40_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat40_Brush,createCombatArea({{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (500)*-1,(1000)*-1 
end
setCombatCallback(combat40_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local con_paralyze__combat40_Brush = createConditionObject(0+CONDITION_PARALYZE)
setCombatCondition(combat40_Brush, con_paralyze__combat40_Brush)

-- =============== 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,6000,combat60_Brush,cid,var)
	addEvent(RunPart,5500,combat55_Brush,cid,var)
	addEvent(RunPart,5000,combat50_Brush,cid,var)
	addEvent(RunPart,4500,combat45_Brush,cid,var)
	RunPart(combat0_Brush,cid,var)
	addEvent(RunPart,500,combat5_Brush,cid,var)
	addEvent(RunPart,1000,combat10_Brush,cid,var)
	addEvent(RunPart,1500,combat15_Brush,cid,var)
	addEvent(RunPart,2000,combat20_Brush,cid,var)
	addEvent(RunPart,2500,combat25_Brush,cid,var)
	addEvent(RunPart,3000,combat30_Brush,cid,var)
	addEvent(RunPart,3500,combat35_Brush,cid,var)
	addEvent(RunPart,4000,combat40_Brush,cid,var)
	return true
end

 

 

 

Rep+

Editado por Clarym
Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

×
×
  • Criar Novo...