Breeding System - Complete!

Forum
Last Post
Threads / Messages
anyone have any ideas on how to do a delay of the actual birth? like how to write the timing for it?

thanks!
 
I think theres a part of the code that shows that... im trying to work on making a script with pet stats like on foopets:D
 
redheadturkey:
To do that, you would have to look into timing.
It would depend on how you want it done.
But I would suggest a countdown on the breeding page.
Then after that time, the user can get the pet.

Just thinking on it a little, I think you would have to have the pet created instantly like the script does.
But then have it so the pet isn't given to them, but the system.
So you make a clone of the owned_adoptables. but called it something like bred_adoptables.
You would have to add some extra fields, like who it belongs to and stuff.
Then say, since it has a date on it. You'd need to have a script that checks that date, and compares it to today's date. Then if the right time has passed, it gives the adopable to right owner. Then updates the 'created date' to the date of the day you're getting it.

Sounds really hard XD but I'm just bad at explaining things. I don't understand php with dates too much. But I'm sure you can do it.
You'd need to set up a cron, and have it run like once a day. Which will do all this work for you XD

Or, you could just have a countdown on the page, then once the countdown is over, it displays a button in which the user clicks, and it gives them their pet XD No need for cron then o-o
 
..I've tried several solutions suggested in this thread, and I just can't get the script to enter the new egg into the mysql database.

It works fine otherwise, and it's a really cool script!

..I'll go learn some PHP now, I hate not knowing anything about this XD
 
Look;
PokePets said:
There is missing a part of the code.
Enter this;
PHP:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender')");
After this;
PHP:
// Now we actually process the adoption and add it to the database...
// We need a unique code for the adoptable so we can show it to the user when we're done here...

$code = rand(1, 20000);

;)
So works it fine for me.



;)
 
Thanks, but that's one of the solutions I tried..
the breeding now works correctly, the egg is being transferred into my adopts, but it keeps displaying the query on the new egg page and I can't get rid of it..

..just a minor nuisance me and future users will just have to live with, I guess..
 
Awesome script!

2 questions though.

The first inquiry is just a small bug, but I thought I'd ask. If I try to mate without having a second gender I get error-messages. Is there some way to block this by adding a "No male/female co-breeder available" message or something like that in the textbox?

Secondly, the new-born are born without names. It's really not a problem, I was just wondering if there's a way to put a placeholder name like 'Newborn' or something so it doesn't just say "Get stats for" and "Get BBCodes / HTML Codes for" in the pet management section.

That's all. Thanks for all the walkthroughs and all the help.
 
The born name is - "Daughter of (mpther name) & (father name).
But if you haven't got gender system it doesn't work ;D
 
My mistake, used an old pet to breed, hence the no-name error. I did install the gender-system but I didn't change the old pets genders.
 
Link to one I made.. It has some problems but, a look of how it looks. file:///C:/Users/admin/documents/my%20web%20sites/breeding%20test.php
 
Sorry ma, but we can't actually view code that has been made on your home computer. You can try attaching the file or uploading it to a host so we can see it there.
 
umm is this a spammer?

Anyway, Arianna you are absolutely amazing for making such a script. I'm giving you the karma you should've gotten a long long time ago, thank you. ^^
 
Oh btw, it would be nicer if there is a way to specify gender ratio for different species of adoptables. I will see what I can do with this. I've already made it possible for adoptables to evolve based on gender difference(for instance, Kirlia evolves into Gardevoir if its female, and Gallade if its male), and this is worth trying too. XD
 
Great mod, thank you! ^^


Maybe I will try to change it a bit to get different eggs (like suggested here before)...we'll see XD
 
Excellent work Arianna! Had some issues with it messing up pre-existing code, but with a few minor edits, it works flawlessly.

P.S. You're ridiculously patient dealing with so many requests of troubleshooting. Know that there are some of us who legitimately try to learn and resolve issues on our own rather than abusing your time. Some of us also understand that troubleshooting for varying code, is not an easy task.
 
@ Arianna: Is there a simple way to modify this code so there is a waiting period after a certain creature breeds? That way users can't just breed the same ones over and over again?
 
You'd want it to be pet ID specific, as opposed to just letting all female rest, etc ------------- there would be a way, I might try to code it later ^^
 
@ Kaeliah: Sorry about that. Didn't realize she wasn't here anymore. It's sad to hear she's not active.

@ redheadturkey: Pet ID specific. Hmm. Some ideas come to mind, but I don't exactly trust the accuracy of my coding at this point. I still might dink around. If nothing else it might give others ideas and get wheels turning in a good direction.

Maybe somehow doing a modified version of the sick code, but working in time variables. Sick status seems to work the same way only instead of a happy default, the default would be an ability to breed. Instead of sick until a condition is met, unable to breed until condition is met, the condition being time span rather than click from owner. Time variable replaces owner ID and information to return to default status. I dunno. Most likely I'm on the entirely wrong track. Just throwing it out there.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top