Quote:
Originally posted by Kaimetsu
Um... The odds of getting 483 from a random(0,1000) are like 100000000000:1. You better have some patient players.
|
It's fun to tell him why, Kai!
PHP Code:
this.destroy=int(random(1,1000));
if (this.destroyed=483) {
putnpc diamond.gif,diamond.txt,32,32;
}
By using random, it finds a random real number between the two numbers you've set. That means that muber could be 4.876658756 or any other number like that, making the odds of getting 483 somewhere around infinity to one. What you want is a random integer number, which only allows numbers without decimals. By putting int() in there, the odds around 1 in 1000 once again.