Ir para conteúdo

Ajuda com uma spell


tsutiya

Posts Recomendados

Gostaria que essa spell desse 3 hits ao inves de 2 alguem poderia me ajudar? 

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 59)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -6.5, -0, -7.0, 0)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -250)
setConditionFormula(condition, -0.8, 0, -0.8, 0)
setCombatCondition(combat, condition)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 60)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -7.5, -0, -8.0, 0)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -250)
setConditionFormula(condition, -0.8, 0, -0.8, 0)
setCombatCondition(combat2, condition)


arr1 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

arr2 = {
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0}
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat, area1)
setCombatArea(combat2, area2)

local function Cooldown(cid)
if isPlayer(cid) == TRUE then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,'CD: Exevo Gran Rain.')
end
end


local exhausted_seconds = 11 -- Segundos que o Player Poderá castar a spell novamente
local exhausted_storagevalue = 1165 -- Storage Value do Cool Down


function onCastSpell(cid, var)
if getPlayerReset(cid) < 4 then

doPlayerSendCancel(cid,'Voce precisa ter 4 resets para usar esta magia.')

return TRUE
end


if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doPlayerSendCancel(cid,"Exevo Gran Rain em cooldown por " .. getPlayerStorageValue(cid, exhausted_storagevalue) - os.time() .. " segundos.")
return TRUE
end

        local function spell1(cid)
               addEvent(spell2, 1 * 500, cid)
               return doCombat(cid, combat2, var)
         end

         addEvent(spell1, 1 * 500, cid)
     addEvent(Cooldown, 1*10000,cid)
         setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
return doCombat(cid, combat, var)
end

 

 

Link para o comentário
Compartilhar em outros sites

32 minutos atrás, tsutiya disse:

 

 

Vê ai: 
 

Spoiler

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 59)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -6.5, -0, -7.0, 0)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -250)
setConditionFormula(condition, -0.8, 0, -0.8, 0)
setCombatCondition(combat, condition)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 60)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -7.5, -0, -8.0, 0)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -250)
setConditionFormula(condition, -0.8, 0, -0.8, 0)
setCombatCondition(combat2, condition)


arr1 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

arr2 = {
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0}
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat, area1)
setCombatArea(combat2, area2)

local function Cooldown(cid)
if isPlayer(cid) then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,'CD: Exevo Gran Rain.')
end
end


local exhausted_seconds = 11 -- Segundos que o Player Poderá castar a spell novamente
local exhausted_storagevalue = 1165 -- Storage Value do Cool Down


function onCastSpell(cid, var)
if getPlayerReset(cid) < 4 then

doPlayerSendCancel(cid,'Voce precisa ter 4 resets para usar esta magia.')

return true
end


if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doPlayerSendCancel(cid,"Exevo Gran Rain em cooldown por " .. getPlayerStorageValue(cid, exhausted_storagevalue) - os.time() .. " segundos.")
return true
end

        local function spell1(cid)
               addEvent(spell2, 1 * 500, cid)
               return doCombat(cid, combat2, var)
         end

         addEvent(spell1, 1 * 500, cid)
		  addEvent(spell1, 1 * 500, cid)
     addEvent(Cooldown, 1*10000,cid)
         setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
return doCombat(cid, combat, var)
end

 

 

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

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