Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 04-24-2012, 08:38 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 95,999
SilverDragonTears is on a distinguished road
Default

I see :) Cool! Ok... so is it possible to have some one type and some the other? Also... can I show all the baby images instead of just one??
__________________

Check out SilvaTales
Reply With Quote
  #12  
Old 04-24-2012, 08:41 PM
Aasixx's Avatar
Aasixx Aasixx is offline
.. your friendly geek. c:
 
Join Date: Nov 2011
Location: somewhere ur not.
Posts: 191
Gender: Female
Credits: 31,684
Aasixx is on a distinguished road
Default

Silver, which one of your sites are you putting this on? I would like to test it out on your site (I have an account on both).
Reply With Quote
  #13  
Old 04-24-2012, 08:41 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 481,775
Hall of Famer is on a distinguished road
Default

Theoretically yes, you can have two possible types of dragons for multiple offsprings production. If you look at the code itself, the baby's type is generated inside the for loop, which is why the first baby may assume its father's type while the second baby can be the same type of its mother's.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #14  
Old 04-24-2012, 08:45 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 95,999
SilverDragonTears is on a distinguished road
Default

X.X... umm... lol. Example?


EDIT: I'm so stupid. I was breeding the same two types. It already does what I wanted. *facepalm*

Ok so how do I get all the baby images to show instead of one?
__________________

Check out SilvaTales

Last edited by SilverDragonTears; 04-24-2012 at 08:58 PM.
Reply With Quote
  #15  
Old 04-24-2012, 10:08 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 481,775
Hall of Famer is on a distinguished road
Default

Well... You can simply change the equal sign = after $article_content to .=

Original code:

PHP Code:
$article_content  = <center> <img src='http://taleofdragons.net/get/".$maleid.".gif'><br> <img src='http://taleofdragons.net/get/".$femaleid.".gif'></center><br>".$imageurl."CongratulationsBreeding is successful,  you have acquired {$numbabies from breeding!<br> <a href='myadopts.php?act=stats&id=".$aid."'><img src='http://taleofdragons.net/get/".$aid.".gif'></a></p>"; 
New Code:

PHP Code:
$article_content .= " <center> <img src='http://taleofdragons.net/get/".$maleid.".gif'><br> <img src='http://taleofdragons.net/get/".$femaleid.".gif'></center><br>".$imageurl."Congratulations! Breeding is successful,  you have acquired {$num} babies from breeding!<br> <a href='myadopts.php?act=stats&id=".$aid."'><img src='http://taleofdragons.net/get/".$aid.".gif'></a></p>"
See the difference? You bet.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #16  
Old 04-24-2012, 10:46 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 95,999
SilverDragonTears is on a distinguished road
Default

Umm... lol

__________________

Check out SilvaTales
Reply With Quote
  #17  
Old 04-25-2012, 12:37 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 95,999
SilverDragonTears is on a distinguished road
Default

Posting what I have per Hof's request...

Code:
 
        else {
        $num = mt_rand(0, 5);
        for($i = 0;$i<$num;$i++){
			// we choose the type!
			$types = array($female->type, $male->type);
			$typerand = rand(0,1);		
			
			// we choose the gender
                        $tempgender = rand(0, 99);
                        if($tempgender < $row->genderratio) {
                        $gender = "f";
                        $alts = "yes";    
                        unset($tempgender);
                        }
                        else {
                        $gender = "m";
                        $alts = "no";          
                        unset($tempgender);
                        }

$salt = passgenerator(10, 0);
$aid = passgenerator(5, 0);				
            $code = codegen(10, 0);

			

			$time = time();
	        $adopts->insert("owned_adoptables", array("aid" => $aid, "type" => $types[$typerand], "name" => $aid, "owner" => $loggedinname, "currentlevel" => 0, "totalclicks" => 0, "code" => $code, 
			                "imageurl" => NULL, "usealternates" => $alts, "tradestatus" => 'notfortrade', "isfrozen" => 'no', "gender" => $gender, "lastbred" => 0, "date" => $date, "father" => $maleid, "mother" => $femaleid));
						
        } // the end of for loop

if($num == "0"){
			$article_content .= " <center> <img src='http://taleofdragons.net/get/".$maleid.".gif'><br> <img src='http://taleofdragons.net/get/".$femaleid.".gif'></center><br>These two do not seem interested in one another. Try again in a week.";  
}else{
			$article_content .= " <center> <img src='http://taleofdragons.net/get/".$maleid.".gif'><br> <img src='http://taleofdragons.net/get/".$femaleid.".gif'></center><br>Congratulations! Breeding is successful,  you have acquired {$num} babies from breeding!<br> <a href='myadopts.php?act=stats&id=".$aid."'><img src='http://taleofdragons.net/get/".$aid.".gif'></a></p>";  
}
__________________

Check out SilvaTales
Reply With Quote
  #18  
Old 04-25-2012, 07:09 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 481,775
Hall of Famer is on a distinguished road
Default

I heard that you fixed your problem already, what a relief. XD
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #19  
Old 04-25-2012, 03:01 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 77,650
AlexC is an unknown quantity at this point
Default

Okay, so this is working perfectly on my site, but I was kinda wondering how to display the parents and all the babies like Silver is. I tried with her code, but it didn't work. I do however, have like, 20+ new babies.
__________________

Last edited by AlexC; 04-25-2012 at 03:04 PM.
Reply With Quote
  #20  
Old 04-26-2012, 06:37 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 95,999
SilverDragonTears is on a distinguished road
Default

Quote:
Originally Posted by Hall of Famer View Post
You can also do database integration by creating a new field in table prefix.adoptables that stores the number of babies a specific species can produce. It can get quite tricky for interspecies breeding though, so I do not recommend it at this moment.
I know you aren't feeling well but I need this. I need to keep the rares and ultra rares from breeding more than 1 at a time.
I figured out a difficult and probably source consuming way....
Code:
 
        else{


        if ($female->type == 'Cake Dragon') $num = mt_rand(0, 1);
        else if ($female->type == 'Sun-up Dragon') $num = mt_rand(0, 1);
        else if ($female->type == 'Sundown Dragon') $num = mt_rand(0, 1);
        else if ($female->type == 'Bastet Dragon') $num = mt_rand(0, 1);
        else if ($male->type == 'Cake Dragon') $num = mt_rand(0, 1);
        else if ($male->type == 'Sun-up Dragon') $num = mt_rand(0, 1);
        else if ($male->type == 'Sundown Dragon') $num = mt_rand(0, 1);
        else if ($male->type == 'Bastet Dragon') $num = mt_rand(0, 1);
        else if ($female->type == 'Aqua Dragon') $num = mt_rand(0, 4);
        else if ($female->type == 'Cow Amphiptere Dragon') $num = mt_rand(0, 4);
        else if ($male->type == 'Aqua Dragon') $num = mt_rand(0, 4);
        else if ($male->type == 'Cow Amphiptere Dragon') $num = mt_rand(0, 4);
        else $num = mt_rand(0, 5);
        for($i = 0;$i<$num;$i++){
I wanted to just use the rarity variable that is in the adoptables table but I wasn't sure how to call it?
__________________

Check out SilvaTales

Last edited by SilverDragonTears; 04-26-2012 at 07:35 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Breed adopt Question Phoeniix Questions and Supports 4 02-04-2015 01:28 AM
Question: How to breed with Males of other Players Missy Master Questions and Supports 2 04-05-2013 03:40 PM
Multiple Outcomes Abronsyth Questions and Supports 11 05-17-2012 04:15 PM
Breed Only Adopt SilverDragonTears Questions and Supports 3 10-05-2011 02:35 PM
Multiple multiple outcomes..? Quillink Suggestions and Feature Requests 5 05-31-2009 07:14 AM


All times are GMT -5. The time now is 06:18 PM.

Currently Active Users: 774 (0 members and 774 guests)
Threads: 4,081, Posts: 32,029, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636