Ir para conteúdo
  • 0

[TIBIA 9.86] Ajuda em Spell


jeanflamengo

Pergunta

bom eu criei essa spell no spellmaker, porém eu preciso que saia um effect diferente por direção que o player olha nesse caso mudar o CONST_ME_DRAWBLOOD para x effect

 

script spell

 

 

-- SpellCreator generated.
-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{1, 3, 1}}))
function getDmg_Brush(cid, level, maglevel)
return (20+level+maglevel)*-1,(40+level+maglevel)*-1
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
-- Areas/Combat for 100ms
local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatArea(combat1_Brush,createCombatArea({{1, 1, 1},
{0, 2, 0}}))
function getDmg_Brush(cid, level, maglevel)
return (20+level+maglevel)*-1,(40+level+maglevel)*-1
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
-- Areas/Combat for 200ms
local combat2_Brush = createCombatObject()
setCombatParam(combat2_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat2_Brush, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatArea(combat2_Brush,createCombatArea({{1, 1, 1},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Brush(cid, level, maglevel)
return (20+level+maglevel)*-1,(40+level+maglevel)*-1
end
setCombatCallback(combat2_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
-- Areas/Combat for 300ms
local combat3_Brush = createCombatObject()
setCombatParam(combat3_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat3_Brush, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatArea(combat3_Brush,createCombatArea({{1, 1, 1},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Brush(cid, level, maglevel)
return (20+level+maglevel)*-1,(40+level+maglevel)*-1
end
setCombatCallback(combat3_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
-- Areas/Combat for 400ms
local combat4_Brush = createCombatObject()
setCombatParam(combat4_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat4_Brush, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatArea(combat4_Brush,createCombatArea({{1, 1, 1},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Brush(cid, level, maglevel)
return (20+level+maglevel)*-1,(40+level+maglevel)*-1
end
setCombatCallback(combat4_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
-- =============== CORE FUNCTIONS ===============
local function RunPart(c,cid,var,dirList,dirEmitPos,startDir) -- Part
if (isCreature(cid)) then
doCombat(cid, c, var)
if (dirList ~= nil) then -- Emit distance effects
local i = 2;
while (i < #dirList) do
if (startDir == 0) then -- N
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList,y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
elseif (startDir == 2) then -- S
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x+dirList,y=dirEmitPos.y+dirList[i+1],z=dirEmitPos.z},dirList[1])
elseif (startDir == 1) then -- E
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x+dirList[i+1],y=dirEmitPos.y+dirList,z=dirEmitPos.z},dirList[1])
else -- W / Something weird happened
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i+1],y=dirEmitPos.y-dirList,z=dirEmitPos.z},dirList[1])
end
i = i + 2
end
end
end
end
function onCastSpell(cid, var)
local startPos = getCreaturePosition(cid)
local startDir = getCreatureLookDirection(cid)
RunPart(combat0_Brush,cid,var)
addEvent(RunPart,100,combat1_Brush,cid,var)
addEvent(RunPart,200,combat2_Brush,cid,var)
addEvent(RunPart,300,combat3_Brush,cid,var)
addEvent(RunPart,400,combat4_Brush,cid,var)
return true
end

se alguem poder ajudar agradeço ^^
Editado por jeanflamengo
Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

×
×
  • Criar Novo...