Ir para conteúdo

Featured Replies

Postado

Quando vou usar esse critical system que tem aqui no forum acontece erro no distro:
o critical system é esse: http://www.tibiaking.com/forum/topic/35663-critical-skill-system/?page=1
o erro acontece quando ocorre o critical, aparece erro no distro e o jogador nao toma nenhum dano

[Error - CreatureEvent::executeCombat] Call stack overflow.
  • Respostas 6
  • Visualizações 1.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Substitui o teu creaturescripts\scripts\critical.lua por esse: --[[Critical System ------------------------- By Night Wolf]] local lvlcrit = 48913 local multiplier = 1.5 function onStatsChange(c

Postado

Substitui o teu creaturescripts\scripts\critical.lua por esse:
 

--[[Critical System
-------------------------  By Night Wolf]]


local lvlcrit = 48913
local multiplier = 1.5


function onStatsChange(cid, attacker, type, combat, value)
  if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)  then
    if getPlayerStorageValue(cid, 48914) > 0 then
        return true
    end
    
    if (getPlayerStorageValue(attacker, lvlcrit)*3) >= math.random (0,1000) then
      dano = math.ceil(value*(multiplier))
      setPlayerStorageValue(cid, 48914, 1)
      doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 255)
      setPlayerStorageValue(cid, 48913, -1)
      doSendAnimatedText(getCreaturePos(attacker), "CRITICAL!!", 144)
      return false
    end
  end
  
  return true
end

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Postado
  • Autor
  Em 10/10/2015 em 04:53, MaXwEllDeN disse:

Substitui o teu creaturescripts\scripts\critical.lua por esse:
 

--[[Critical System
-------------------------  By Night Wolf]]


local lvlcrit = 48913
local multiplier = 1.5


function onStatsChange(cid, attacker, type, combat, value)
  if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)  then
    if getPlayerStorageValue(cid, 48914) > 0 then
        return true
    end
    
    if (getPlayerStorageValue(attacker, lvlcrit)*3) >= math.random (0,1000) then
      dano = math.ceil(value*(multiplier))
      setPlayerStorageValue(cid, 48914, 1)
      doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 255)
      setPlayerStorageValue(cid, 48913, -1)
      doSendAnimatedText(getCreaturePos(attacker), "CRITICAL!!", 144)
      return false
    end
  end
  
  return true
end


testei desse jeito ele da o critical 1x apenas e depois nunca mais da critical

Postado

Substitui o teu creaturescripts\scripts\critical.lua por esse:

--[[Critical System
-------------------------  By Night Wolf]]


local lvlcrit = 48913
local multiplier = 1.5


function onStatsChange(cid, attacker, type, combat, value)
  if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)  then
    if getPlayerStorageValue(cid, 48914) > 0 then
        return true
    end
    
    if (getPlayerStorageValue(attacker, lvlcrit)*3) >= math.random (0,1000) then
      dano = math.ceil(value*(multiplier))
      setPlayerStorageValue(cid, 48914, 1)
      doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 255)
      setPlayerStorageValue(cid, 48914, -1)
      doSendAnimatedText(getCreaturePos(attacker), "CRITICAL!!", 144)
      return false
    end
  end
  
  return true
end


Opa, erro meu. Tenta esse

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

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

Informação Importante

Confirmação de Termo