#1
|
||||
|
||||
Breeding
Yes, I know that this will take a lot of work and I'm certainly not the right person to be doing this, given my knowledge of PHP.
Is anyone here making a script right now, or would anyonee like to give me some help on my current page (which is very drafty and probably not the right way to code it)? Here's my current code, if anyone would like to look and help me. Most of the things which I need help on are in comments, where I have no idea what to do. PHP Code:
Arianna |
#2
|
|||
|
|||
RE: Breeding
What I would recommend is that you use the alternate images system as a basis for gendering your adoptables. Make each adoptable have a 1 in 2 chance of using the alternate images. Then when you make new adoptables always use alternate images and make the primary images female and the alternates male. That way then you have a 50/50 shot of getting a male or female adoptable.
Then for breeding, simply check if the adoptable is using the primary or alternate images. So, for sample breeding what you could do is check if the user has one adoptable of type x that is male and one of type x that is female. If they do, then they are allowed to breed. :) Hope it helps, Brandon |
#3
|
||||
|
||||
RE: Breeding
Hmm, that makes sense. However, I already made the whole gender system and I quite like it. :/ We have alt images which are different things (not female/male) so I don't think that that would work.
Is there any way that this script would ever work, or would it make sense to scrap it? |
#4
|
|||
|
|||
RE: Breeding
I would do like that: create a table to store adoptables that users want do breed
then create a page so users can put the adoptables there, like a 'daycare', and while they are there, they are removed from the owned_adoptables then a page that displays the adoptables in the daycare, and allows users to choose if there's any that they want to breed with, and when they choose, the other adoptable go to the daycare table too, and also the date is inserted, so you can put something that allows the user to return and see if they bred well just after some days and I guess each user has to keep one egg.. idk just some ideas '-' |
#5
|
||||
|
||||
RE: Breeding
I was thinking more of an instant system. I don't really know what to do. Do you think that your way would make it harder or easier for a PHP novice like me to complete?
Does anyone have any advice on the pieces of code I'm missing? |
#6
|
|||
|
|||
RE: Breeding
that way would be harder I guess '-' but I don't understand very well what you're trying to do x_x
is it like, just breeding two of your adoptables into one new? I'm a PHP novice too like you, but I'll see your code e_e $aid=@mysql_result($result,$i,"id"); //The adoptable's ID $type=@mysql_result($result,$i,"type"); $description=@mysql_result($result,$i,"description "); $gender=@mysql_result($result,$i,"gender"); $eggimage=@mysql_result($result,$i,"eggimage"); $query = "SELECT * FROM ".$prefix."owned_adoptables WHERE level='2' AND owner='$loggedinname'"; //is this how we select it, somehow? for this part... you have to estabilish a $result variable first, and the $query is not being used at all.. also, the 'level' is not a colum in owned_adoptables.. do you want to select the rows just from the adoptables that are level 2? well I'll guess you forgot an important thing.. how the user will select the adoptables that he wants to breed? .-. I'll try to create a code to that and I'll post here but I'm not sure I can haha x_x |
#7
|
||||
|
||||
RE: Breeding
Basically what I want is that the user selects adoptable 'a' which is a female, and then it displays all males. They then choose the male. This sets adoptable a's id to parent1 and adoptable b's id to parent2. This then determines how the egg with be.
I'm a PHP beginner would be better to describe it. The only thing I've learnt from is this script. -.- Yes, I'd like to select the ones which are level 2 (grown ups). Good luck with the code! I'm sorry I had no idea, what to do there. xP |
#8
|
|||
|
|||
RE: Breeding
i've been on the verge of finishing my breeding script but i had homework, i started like 2 weeks ago
|
#9
|
||||
|
||||
RE: Breeding
Awesome!
Is there any chance that I could use it or something like that? I'd really love to be able to use it. Do you use something like genders on your script, or do you use alt images? |
#10
|
|||
|
|||
RE: Breeding
ok, I did it... I did not test it, because my gender system is a little different, but I'll test soon.
I'm not sure it'll work, but I tried to explain everything for you, so you can change what is necessary If it works, or if you change it so it works, you can release it in mods forum :D PHP Code:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Breeding Bug? Need help :) | Missy Master | Questions and Supports | 7 | 08-14-2014 02:29 PM |
Breeding help | SilverDragonTears | Questions and Supports | 0 | 04-12-2012 11:41 PM |
Random breeding outcome/ rare breeding | SilverDragonTears | Questions and Supports | 0 | 03-25-2012 02:33 AM |
breeding | Ruffsta | Feedback and Suggestions | 3 | 06-06-2011 04:09 PM |
No breeding | RoconzaArt | Questions and Supports | 15 | 01-24-2011 02:48 PM |
What's New? |
What's Hot? |
What's Popular? |