Ir para conteúdo

Sobre Sistema De Empurrar


spiderspr

Posts Recomendados

Tpw, eu to kerendo saber ond coloka a distance q o monster/player sera empurrado e o speed, n sei se muda na global.lua ou na script da spell, se for na global me falem em kal parte da script do dokmos q muda..

Essa spell so empurra 1 sqm do player e keria mudar isso...

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.4, 0, -1.9, 0)

 

local arr = {

{1, 1, 1},

{1, 1, 1},

{1, 1, 1},

{0, 1, 0},

{0, 3, 0}

}

 

local area = createCombatArea(arr)

setCombatArea(combat, area)

 

function onCastSpell(cid, var)

pos = getPosfromArea(cid,arr)

n = 0

 

while n < #pos do

n = n+1

thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}

if isCreature(getThingfromPos(thing).uid) == TRUE then

doPushCreature(getThingfromPos(thing).uid,getPlayerLookDir(cid))

end

end

 

return doCombat(cid, combat, var)

end

 

me ajudem plz...

Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...

tenta assim:

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.4, 0, -1.9, 0)

 

local arr = {

{1, 1, 1},

{1, 1, 1},

{1, 1, 1},

{0, 1, 0},

{0, 3, 0}

}

 

local area = createCombatArea(arr)

setCombatArea(combat, area)

 

function onCastSpell(cid, var)

pos = getPosfromArea(cid,arr)

n = 0

 

while n < #pos do

n = n+1

thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}

if isCreature(getThingfromPos(thing).uid) == TRUE then

for i= 1,5 do

doPushCreature(getThingfromPos(thing).uid,getPlayerLookDir(cid))

end

end

 

return doCombat(cid, combat, var)

end

 

se nao for tenta assim:

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.4, 0, -1.9, 0)

 

local arr = {

{1, 1, 1},

{1, 1, 1},

{1, 1, 1},

{0, 1, 0},

{0, 3, 0}

}

 

local area = createCombatArea(arr)

setCombatArea(combat, area)

 

function onCastSpell(cid, var)

pos = getPosfromArea(cid,arr)

n = 0

 

while n < #pos do

n = n+5

thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}

if isCreature(getThingfromPos(thing).uid) == TRUE then

doPushCreature(getThingfromPos(thing).uid,getPlayerLookDir(cid))

end

end

 

return doCombat(cid, combat, var)

end

Link para o comentário
Compartilhar em outros sites

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