Well you can create a new field called 'breedchance' in table prefix_adoptables, which stores the probability of successful breeding(from 0 to 100). Then modify the breeding.php to add another if...else statement. Inside this conditional statement will you need to define a new variable that generates random number from 0 to 100. What you should do next is to insert another if...else statement that checks if this random number is greater or smaller than the value in field 'breedchance'. Breeding will be successful if the random number is smaller than the value 'breedchance', or it will fail.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
|