Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

@bismarkzika

function repeatEff(cid, eff, tempo, health)

local pos = {x = getCreaturePosition(cid).x + 0, y = getCreaturePosition(cid).y + 0, z = getCreaturePosition(cid).z}

   if not isCreature(cid) or tempo == 0 then return end
   doSendMagicEffect(pos, eff)
   doCreatureAddHealth(cid, health)
   addEvent(repeatEff, 1000, cid, eff, tempo-1, health)
end

function onCastSpell(cid, var)

local eff = 7 -- Efeito
local tempo = 30 -- em segundos
local health = 200 -- Quanto ganhará de vida em aproximadamente alguns segundos quebrados

     if isPlayer(cid) then
     
     doCreatureSetNoMove(cid, true)
     repeatEff(cid, eff, tempo, health)
     doAddCondition(cid, CONDITION_MUTED)
     addEvent(doRemoveCondition, tempo * 1000, cid, CONDITION_MUTED)
     addEvent(doCreatureSetNoMove, tempo * 1000, cid, false)
     
     return true
     end
return true
end

 

  • Respostas 8
  • Visualizações 714
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Armei essa gambiarra aqui : local function LoopEff(time2, time3, uid, effect, position, health) if isCreature(uid) then for i= 1, #effect do local position = {x = getCreaturePosi

  • function repeatEff(cid, eff, tempo, health) local pos = {x = getCreaturePosition(cid).x + 0, y = getCreaturePosition(cid).y + 0, z = getCreaturePosition(cid).z} if not isCreature(cid) or tempo ==

  • @bismarkzika function repeatEff(cid, eff, tempo, health) local pos = {x = getCreaturePosition(cid).x + 0, y = getCreaturePosition(cid).y + 0, z = getCreaturePosition(cid).z} if not isCreature

Postado
  • Autor

@Sttorm healando normalmente como eu queria, mais o player ainda consegue usar spells e tb tá dando esse erro na distro

[16/05/2018 19:33:38] [Error - Spell Interface] 
[16/05/2018 19:33:38] data/spells/scripts/Orochimaru/lvl40.lua:onCastSpell
[16/05/2018 19:33:38] Description: 
[16/05/2018 19:33:38] (luaDoAddCondition) Condition not found
 

Postado
  • Solução

Agora vai @bismarkzika

local tempo = 30 -- em segundos

local condition = createConditionObject(CONDITION_MUTED)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo * 1000)

function repeatEff(cid, eff, tempo, health)

local pos = {x = getCreaturePosition(cid).x + 0, y = getCreaturePosition(cid).y + 0, z = getCreaturePosition(cid).z}

   if not isCreature(cid) or tempo == 0 then return end
   doSendMagicEffect(pos, eff)
   doCreatureAddHealth(cid, health)
   addEvent(repeatEff, 1000, cid, eff, tempo-1, health)
end

function onCastSpell(cid, var)

local eff = 7 -- Efeito
local health = 200 -- Quanto ganhará de vida em aproximadamente alguns segundos quebrados

     if isPlayer(cid) then
     
     doCreatureSetNoMove(cid, true)
     repeatEff(cid, eff, tempo, health)
     doAddCondition(cid, condition)
     addEvent(doCreatureSetNoMove, tempo * 1000, cid, false)
     
     return true
     end
return true
end

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo