Breeding System - Complete!

Forum
Last Post
Threads / Messages
Thanks. :) I'm glad you got it working. The problem for me is I have so many columns in the database (dates, parents, lots of other stuff) that it's hard to make the code work for everyone on the first try.
 
Uhm...i have a question..is possible to make different character from the breeding?
Becuase in my site i want make a little difference...

For esample:
Elesis
311a61e9f18e6312cea3c3eb263c7fac.gif

+
Ronan
2c30bf2563a60d9a1c56aac7a07ebf8d.gif

=
75c256c483866c6dab35a1f72551de84.gif

???
 
Actually, it is possible, but requires quite a big code addition
probably it would be best to create a function which looks up the combination of the id's
like pet 2+7 gives back pet 9
but that means you have to save those combinations somewhere(preferable the database)
and when there is no combination it should say that the pets won't mate
I'll take a look at it, but it seems to be annoyingly time-taking
 
The point is - if you have 20 pets, that's an additional 400 pets you need to make. And what about if those 400 kinds can breed?
I won't code something like it, it's simply to hard. I guess you could check for certain situations (if ($kind="Kind1")) and then determine it, but I'm not in the mood for that.
 
Yes, it would be pretty hard
It's just an idea, maybe there's some sort of way...
I'll play with the code a bit, maybe I'll find some way
anyway nice script, seems to work flawless on my server.
 
maybe ill make in the future a nod on this mod to let the eggs breed once, im not sre if its gonna succeed but ill maybe gonna try :D
 
Ok, here is a question that has to do with the above asked question:

Can I in theory make a "group" if you will as a new attribute like "gender" or "species" and tell the script instead of species the parents from this "group" can breed despite species and produce a egg that's a random choice of the one of the parents species?

I want to try this out it should work in theory but my php skill are very limited.
 
mapleblade said:
maybe ill make in the future a nod on this mod to let the eggs breed once, im not sre if its gonna succeed but ill maybe gonna try :D
I have no idea what you mean.

Roconza, I guess you could. I don't have time to make it, maybe you can get someone else to try for you.
 
Roconza said:
Ok, here is a question that has to do with the above asked question:

Can I in theory make a "group" if you will as a new attribute like "gender" or "species" and tell the script instead of species the parents from this "group" can breed despite species and produce a egg that's a random choice of the one of the parents species?

I want to try this out it should work in theory but my php skill are very limited.

basically you would have to make a new table with say 1-10 being possible for 1xb breeding ... 11-20 being possible for yxz breeding.. then set up limits on a random for each breeding pair possible... thne set those randoms to the ids in the table.. then when a randon is right have it insert into the owned_adoptables table...


Have Fun :)
 
Seapyramid said:
Roconza said:
Ok, here is a question that has to do with the above asked question:

Can I in theory make a "group" if you will as a new attribute like "gender" or "species" and tell the script instead of species the parents from this "group" can breed despite species and produce a egg that's a random choice of the one of the parents species?

I want to try this out it should work in theory but my php skill are very limited.

basically you would have to make a new table with say 1-10 being possible for 1xb breeding ... 11-20 being possible for yxz breeding.. then set up limits on a random for each breeding pair possible... thne set those randoms to the ids in the table.. then when a randon is right have it insert into the owned_adoptables table...


Have Fun :)
Wouldn't adding a "group" column to the owned_adoptable table and a random number generator in the breeding script work just as well?

E.g.

  • if ($dadgroup == $momgroup){

    $pickspecies = rand(1,2);
    if $pickspecies = 1 { $babyspecies = $dadspecies }
    else { $babyspecies = $momspecies }

    }
    else{
    return die("What were you thinking?? A walrus and a DUCK??")
    }


Btw, do NOT copy/paste this. This is NOT real php, just an example. :p
Real php syntax would take me a lot longer to write - time I don't like to use at 2:30am. :S
 
can anybody re-upload? please i've got problem with breeding.php and funstions.php :|
 
I'd like to do something where there is like a 2 day "pregnancy" that happens before the new egg goes to the hatchery.

I think its a matter of applying a timing to this, but I am not sure how to do it--- and everything I have read is making it more confusing for me.

So basically, the result would be the egg/baby still, but only after a certain time frame, and not instantly!

Possibly the pregnant pets would have a special designation too, or whatever, so you could mark them.

thanks for the help, I have an idea how to do it, just adding timing, but not sure at all how to do it.
 
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.
 
sorry...i have a question.....How do you make a pet male or female...or do you just fake it..or not add it?
 
It's. set automatic.
Look at the post of tommyk1210;
http://www.rusnakweb.com/forum/showthread.php?tid=1367&highlight=gender

or do you mean that some adoptable only can be male/female/ etc. ?
 
oh..ill insert the code I get it know thanks:D ill give credit if i use it
 

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