Ir para conteúdo
  • 0

Colocar Essa Spell Pra Empurrar


craigmabbit

Pergunta

alguem pode me ajudar a por dopushcreature, ou domove nessa spell

 

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Fire_Wave = createCombatObject()
setCombatParam(combat0_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat0_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat0_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat0_Cannon = createCombatObject()
setCombatParam(combat0_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat0_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Cannon,createCombatArea({{0, 2, 0},
{1, 0, 1}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat0_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat0_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat0_Cannon, con___combat0_Cannon)
-- Areas/Combat for 200ms
local combat2_Fire_Wave = createCombatObject()
setCombatParam(combat2_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat2_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat2_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat2_Cannon = createCombatObject()
setCombatParam(combat2_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat2_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Cannon,createCombatArea({{1, 0, 1},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat2_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat2_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat2_Cannon, con___combat2_Cannon)
-- Areas/Combat for 100ms
local combat1_Fire_Wave = createCombatObject()
setCombatParam(combat1_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat1_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat1_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat1_Cannon = createCombatObject()
setCombatParam(combat1_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat1_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Cannon,createCombatArea({{1, 2, 1}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat1_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat1_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat1_Cannon, con___combat1_Cannon)
-- Areas/Combat for 400ms
local combat4_Fire_Wave = createCombatObject()
setCombatParam(combat4_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat4_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat4_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat4_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat4_Cannon = createCombatObject()
setCombatParam(combat4_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat4_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat4_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat4_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat4_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat4_Cannon, con___combat4_Cannon)
-- Areas/Combat for 300ms
local combat3_Fire_Wave = createCombatObject()
setCombatParam(combat3_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat3_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat3_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat3_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat3_Cannon = createCombatObject()
setCombatParam(combat3_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat3_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat3_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat3_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat3_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat3_Cannon, con___combat3_Cannon)
-- Areas/Combat for 500ms
local combat5_Cannon = createCombatObject()
setCombatParam(combat5_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat5_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat5_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat5_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat5_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat5_Cannon, con___combat5_Cannon)
-- =============== 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[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
elseif (startDir == 2) then -- S
 doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x+dirList[i],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[i],z=dirEmitPos.z},dirList[1])
else -- W / Something weird happened
 doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i+1],y=dirEmitPos.y-dirList[i],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_Fire_Wave,cid,var)
RunPart(combat0_Cannon,cid,var)
addEvent(RunPart,200,combat2_Fire_Wave,cid,var)
addEvent(RunPart,200,combat2_Cannon,cid,var)
addEvent(RunPart,100,combat1_Fire_Wave,cid,var)
addEvent(RunPart,100,combat1_Cannon,cid,var)
addEvent(RunPart,400,combat4_Fire_Wave,cid,var)
addEvent(RunPart,400,combat4_Cannon,cid,var)
addEvent(RunPart,300,combat3_Fire_Wave,cid,var)
addEvent(RunPart,300,combat3_Cannon,cid,var)
addEvent(RunPart,500,combat5_Cannon,cid,var)
doSendAnimatedText(getThingPos(cid), "Cannon", 192)
return FALSE
end

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0
-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Fire_Wave = createCombatObject()
setCombatParam(combat0_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat0_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat0_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat0_Cannon = createCombatObject()
setCombatParam(combat0_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat0_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Cannon,createCombatArea({{0, 2, 0},
{1, 0, 1}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat0_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat0_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat0_Cannon, con___combat0_Cannon)
-- Areas/Combat for 200ms
local combat2_Fire_Wave = createCombatObject()
setCombatParam(combat2_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat2_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat2_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat2_Cannon = createCombatObject()
setCombatParam(combat2_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat2_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Cannon,createCombatArea({{1, 0, 1},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat2_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat2_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat2_Cannon, con___combat2_Cannon)
-- Areas/Combat for 100ms
local combat1_Fire_Wave = createCombatObject()
setCombatParam(combat1_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat1_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat1_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat1_Cannon = createCombatObject()
setCombatParam(combat1_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat1_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Cannon,createCombatArea({{1, 2, 1}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat1_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat1_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat1_Cannon, con___combat1_Cannon)
-- Areas/Combat for 400ms
local combat4_Fire_Wave = createCombatObject()
setCombatParam(combat4_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat4_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat4_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat4_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat4_Cannon = createCombatObject()
setCombatParam(combat4_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat4_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat4_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat4_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat4_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat4_Cannon, con___combat4_Cannon)
-- Areas/Combat for 300ms
local combat3_Fire_Wave = createCombatObject()
setCombatParam(combat3_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat3_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat3_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat3_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat3_Cannon = createCombatObject()
setCombatParam(combat3_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat3_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat3_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat3_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat3_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat3_Cannon, con___combat3_Cannon)
-- Areas/Combat for 500ms
local combat5_Cannon = createCombatObject()
setCombatParam(combat5_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat5_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat5_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat5_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat5_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat5_Cannon, con___combat5_Cannon)
-- =============== 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[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
    elseif (startDir == 2) then -- S
	 doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x+dirList[i],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[i],z=dirEmitPos.z},dirList[1])
    else -- W / Something weird happened
	 doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i+1],y=dirEmitPos.y-dirList[i],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_Fire_Wave,cid,var)
RunPart(combat0_Cannon,cid,var)
addEvent(RunPart,200,combat2_Fire_Wave,cid,var)
addEvent(RunPart,200,combat2_Cannon,cid,var)
addEvent(RunPart,100,combat1_Fire_Wave,cid,var)
addEvent(RunPart,100,combat1_Cannon,cid,var)
addEvent(RunPart,400,combat4_Fire_Wave,cid,var)
addEvent(RunPart,400,combat4_Cannon,cid,var)
addEvent(RunPart,300,combat3_Fire_Wave,cid,var)
addEvent(RunPart,300,combat3_Cannon,cid,var)
addEvent(RunPart,500,combat5_Cannon,cid,var)
doSendAnimatedText(getThingPos(cid), "Cannon", 192)
return FALSE
end
local max_sqm = 3 -- maximo de sqm que vai empurrar o player
local pos = getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), 1)
pos.stackpos = 253
if (isPlayer(getThingFromPos(pos).uid)) then
doTeleportThing(getThingFromPos(pos).uid, getClosestFreeTile(getThingFromPos(pos).uid, (getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), max_sqm))))
doSendMagicEffect(pos,10)
return true
end

Link para o comentário
Compartilhar em outros sites

  • 0
-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Fire_Wave = createCombatObject()
setCombatParam(combat0_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat0_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat0_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat0_Cannon = createCombatObject()
setCombatParam(combat0_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat0_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Cannon,createCombatArea({{0, 2, 0},
{1, 0, 1}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat0_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat0_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat0_Cannon, con___combat0_Cannon)
-- Areas/Combat for 200ms
local combat2_Fire_Wave = createCombatObject()
setCombatParam(combat2_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat2_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat2_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat2_Cannon = createCombatObject()
setCombatParam(combat2_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat2_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Cannon,createCombatArea({{1, 0, 1},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat2_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat2_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat2_Cannon, con___combat2_Cannon)
-- Areas/Combat for 100ms
local combat1_Fire_Wave = createCombatObject()
setCombatParam(combat1_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat1_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat1_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat1_Cannon = createCombatObject()
setCombatParam(combat1_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat1_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Cannon,createCombatArea({{1, 2, 1}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat1_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat1_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat1_Cannon, con___combat1_Cannon)
-- Areas/Combat for 400ms
local combat4_Fire_Wave = createCombatObject()
setCombatParam(combat4_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat4_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat4_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat4_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat4_Cannon = createCombatObject()
setCombatParam(combat4_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat4_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat4_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat4_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat4_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat4_Cannon, con___combat4_Cannon)
-- Areas/Combat for 300ms
local combat3_Fire_Wave = createCombatObject()
setCombatParam(combat3_Fire_Wave, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat3_Fire_Wave, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat3_Fire_Wave,createCombatArea({{2}}))
function getDmg_Fire_Wave(cid, level, maglevel)
return (30)*-1,(120)*-1
end
setCombatCallback(combat3_Fire_Wave, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Fire_Wave")local combat3_Cannon = createCombatObject()
setCombatParam(combat3_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat3_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat3_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat3_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat3_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat3_Cannon, con___combat3_Cannon)
-- Areas/Combat for 500ms
local combat5_Cannon = createCombatObject()
setCombatParam(combat5_Cannon, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat5_Cannon, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat5_Cannon,createCombatArea({{1, 0, 1},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{0, 2, 0}}))
function getDmg_Cannon(cid, level, maglevel)
return (30)*-1,(60)*-1
end
setCombatCallback(combat5_Cannon, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Cannon")
local con___combat5_Cannon = createConditionObject(0+CONDITION_FIRE)
setCombatCondition(combat5_Cannon, con___combat5_Cannon)
-- =============== 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[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
    elseif (startDir == 2) then -- S
	 doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x+dirList[i],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[i],z=dirEmitPos.z},dirList[1])
    else -- W / Something weird happened
	 doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i+1],y=dirEmitPos.y-dirList[i],z=dirEmitPos.z},dirList[1])
    end
    i = i + 2
  end
 end
end
local startPos = getCreaturePosition(cid)
local startDir = getCreatureLookDirection(cid)
RunPart(combat0_Fire_Wave,cid,var)
RunPart(combat0_Cannon,cid,var)
addEvent(RunPart,200,combat2_Fire_Wave,cid,var)
addEvent(RunPart,200,combat2_Cannon,cid,var)
addEvent(RunPart,100,combat1_Fire_Wave,cid,var)
addEvent(RunPart,100,combat1_Cannon,cid,var)
addEvent(RunPart,400,combat4_Fire_Wave,cid,var)
addEvent(RunPart,400,combat4_Cannon,cid,var)
addEvent(RunPart,300,combat3_Fire_Wave,cid,var)
addEvent(RunPart,300,combat3_Cannon,cid,var)
addEvent(RunPart,500,combat5_Cannon,cid,var)
doSendAnimatedText(getThingPos(cid), "Cannon", 192)
return FALSE
end
local max_sqm = 3 -- maximo de sqm que vai empurrar o player
local pos = getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), 1)
pos.stackpos = 253
function onCastSpell(cid, var)
if (isPlayer(getThingFromPos(pos).uid)) then
doTeleportThing(getThingFromPos(pos).uid, getClosestFreeTile(getThingFromPos(pos).uid, (getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), max_sqm))))
doSendMagicEffect(pos,10) 
end
return FALSE
end

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...