Ir para conteúdo
  • 0

Ajuda em spell!!! adicionar paralyze


Thow

Pergunta

Boa tarde galera !!!

 

Alguem que manja de script poderia adicionar a condition paralyze nessa spell :

 

 

local waves = 2

local water = {490, 491}
local combat = createCombatObject()
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_USECHARGES, TRUE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, 34)
setCombatParam(meteor, COMBAT_PARAM_DISTANCEEFFECT, 27) 
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -570.0, 0, -590.0, 0)

local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_USECHARGES, TRUE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 34)
setCombatParam(meteor_water, COMBAT_PARAM_DISTANCEEFFECT, 44) 
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -570.0, 0, -590.0, 0)

combat_arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local combat_area = createCombatArea(combat_arr)
setCombatArea(combat, combat_area)

local function meteorCast(p)
doCombat(p.cid, p.combat, positionToVariant(p.pos))
end

local function stunEffect(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
end

function onTargetTile(cid, pos)
if (math.random(0, 0) == 0) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_WHIRLWINDCLUB)
addEvent(meteorCast, 300, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_WHIRLWINDCLUB)
addEvent(meteorCast, 300, {cid = cid,pos = pos, combat = meteor})
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
    for i = 0, waves do
        addEvent(function()
            if isCreature(cid) then
                doCombat(cid, combat, var)
            end
        end, 200 * i)
    end
 
return true
end

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

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...