Isso ae Zmovir! Vamo trabalhar pro nosso projeto funcionar ;D
info
Group: Campones
Joined: 04/02/11
Posts: 65
Reputation: +11
Tibia Character: Kako Espadachim

@UP
Obrigado
@TOPIC
Ninguem sabe? plx alguem ajuda ai
info
Group: Barão
Joined: 05/08/10
Posts: 218
Reputation: +86
Gender: Masculino

aki esta dizendo que se o numero do meth.random for menor ou igual a 80 vai falhar, se for maior ira funcionar!
S isso mesmo e isso que eu quero mais ai da erro no distro so unsprected symbol near 'then' alguma coisa assim
Se tirar o then fica certo eu acho. Não deveria ser if ... then ???
O correto seria:
local chance = math.random(1,100) if chance >= 80 then doPlayerSendCancel(cid, "You failed to heal the poison")
Só lembrando que assim o player terá 80% de chance para curar o veneno.
Edited Março 15 by lucashgas
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

ou
if (math.random(0,100) >= 80) then doPlayerSendCancel(cid, "You failed to heal the poison")
Quando aparecer algum erro no script que tiver fazendo pro shadow, manda duvida pro meu inbox.
Edited Março 13 by Jhon992
info
Group: Herói
Joined: 20/05/10
Posts: 3.4k
Reputation: +1.5k
Gender: Masculino

chance = 80 if math.random(1,100) >= chance then
edited
isuhuishisuhsus ja responderam ![]()
Edited Março 13 by Vodkart
Obrigado a todos irei dar rep+ para os 3 so aguardem
info
Group: Infante
Joined: 13/10/08
Posts: 1.6k
Reputation: +420
Tibia Character: Demonbholder

o do vodkart está correto, pois o random é de 1 até 100 e não de 0 até 100.





info
Group: Barão
Joined: 28/09/10
Posts: 237
Reputation: +41
Eu queria que a spell tivese 80% chance de funcionar eu adcionei assim mais ele da erro sobre 'then' sla no distro
aonde errei?