Ir para conteúdo
  • 0

Como Criar Spell com Poison


rodhz

Pergunta

2 respostass a esta questão

Posts Recomendados

  • 0
local damage = COMBAT_PHYSICALDAMAGE
local effect = CONST_ME_DRAWBLOOD
local animation = CONST_ANI_REDSTAR

local rounds = 15
local delay = 3 * 1000

local condition = createConditionObject(CONDITION_BLEEDING)

local function doCombatCondition(cid, target, type, area, min, max, effect, rounds)
   if isCreature(target) then
       if getCreatureCondition(target, CONDITION_BLEEDING) then
           doAreaCombatHealth((isCreature(cid) and cid or 0), type, getThingPosition(target), area, min, max, effect)
           if rounds > 0 then
               addEvent(doCombatCondition, delay, cid, target, type, area, min, max, effect, (rounds - 1))
           end
       end
   end
   return true
end

function onCastSpell(cid, var)
   local formula_min = getPlayerLevel(cid)
   local formula_max = getPlayerLevel(cid) * 2.5 + 32

   local target = variantToNumber(var)
   if getDistanceBetween(getThingPosition(target), getThingPosition(cid)) < 4 then
       doSendDistanceShoot(getThingPosition(cid), getThingPosition(target), animation)
   end
   doAddCondition(target, condition)
   addEvent(doCombatCondition, delay, cid, target, damage, 0, -formula_min, -formula_max, CONST_ME_DRAWBLOOD, rounds)
   return true
end

Tópico: 

 

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...