Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   Make Breeding Random? (http://www.mysidiaadoptables.com/forum/showthread.php?t=2333)

SilverDragonTears 08-24-2011 03:43 PM

Make Breeding Random?
 
Is it possible to make it so that the adopts may or may not breed?

ipengu 08-24-2011 04:03 PM

As in an adoptable in class 'Avian' has a 50/50 change of being able to breed with other 'Avian' class adoptables?

SilverDragonTears 08-24-2011 04:10 PM

yep that's what I mean...

ipengu 08-24-2011 04:29 PM

You COULD always make a little bit of script that picks a random number, and adds it to the end of 'Avian' like 'Avian9385' or 'Avian2468' Then theres what.... 1 in 10,000 chance that same person would HAPPEN to get the same numbered 'Avian' class.

SilverDragonTears 08-24-2011 04:55 PM

wait. what?

Hall of Famer 08-24-2011 09:25 PM

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.

SilverDragonTears 08-24-2011 09:47 PM

I can code... but I'm not advanced yet... could you help me write that?

Hall of Famer 08-25-2011 04:58 AM

Alright I will rewrite the breeding.php for you later this week.


All times are GMT -5. The time now is 09:48 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.