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.
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.
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.
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...
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...
}
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.
Real php syntax would take me a lot longer to write - time I don't like to use at 2:30am. :S
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);