Postado Outubro 9, 2015 9 anos 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=1o erro acontece quando ocorre o critical, aparece erro no distro e o jogador nao toma nenhum dano [Error - CreatureEvent::executeCombat] Call stack overflow.
Postado Outubro 10, 2015 9 anos 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 -
Postado Outubro 10, 2015 9 anos 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 Outubro 10, 2015 9 anos Autor edit: queria que o critical pegasse em todo hit do jogador, como eu teria que fazer?
Postado Outubro 10, 2015 9 anos 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 -
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.