Breeding System - Complete!
Firstly, I don't take credit for all this. This code was made by gabeki, Seapyramid, Brandon, and me. :D
You'll need to have some kind of gender mod for this, so viewing the thread that I have would be very useful. ;) Just copy and paste the file at the bottom of this post into a file and call it 'breeding.php'. Then upload it via FTP or FileManager to your website, in the 'adoptables' folder (or whatever else you called it). There are a few things you'll need to change - if you don't have a date system like me, take out the following part on line 204. PHP Code:
PHP Code:
The last thing you need is a link to the breeding page. You can put it in the top nav bar (I do that via PHPmyAdmin) or in the sidebar (functions.php) but make sure your members have some way to access it. Tell me if there is anything left which is wrong with the code, please! PHP Code:
|
RE: Breeding System - Complete!
Thanks gabeki, Seapyramid, Brandon, and Arianna! I'm not sure when I'll be be able to try this out, but I definitely will in the future. Thanks for posting this!
|
RE: Breeding System - Complete!
You're welcome. :D I hope that you like it!
|
RE: Breeding System - Complete!
Ari, do you have a trade system?
|
RE: Breeding System - Complete!
Yes. :D Sea was nice enough to give me the code. :) Is there any chance this is interfering with the breeding code?
|
RE: Breeding System - Complete!
what do you mean by interfering? are you with some error?
how does sea's trading system works? I'll have to remake my code and I need some ideas ^^ |
RE: Breeding System - Complete!
Quote:
Sea |
RE: Breeding System - Complete!
I'm not giving her the code, I just thought that it might be somehow not working as she didn't have it on her install (because it might not take it if there are 'fortrades' in the table. Come to think of it, I don't think it checks, I just wanted to be sure.
By interfering, I meant that you not having it may be causing something. But IDK if that's how it works. [/php novice speak] |
RE: Breeding System - Complete!
I wasn't impling anything on you Arianna.. Just saying that those who asked were asking the wrong person :)
|
RE: Breeding System - Complete!
Okay, that's good. :)
I can't wait to try out the system on my working site. (My pets haven't grown up yet. xD) |
RE: Breeding System - Complete!
but the code that you need top put on the 207 line......in what of file you need to add(doadopt?myadopt?what??I)
|
RE: Breeding System - Complete!
In the actual breeding.php file.
|
RE: Breeding System - Complete!
Uhm... but i can change the file name with coupling.php???
|
RE: Breeding System - Complete!
Seapyramid, I did not ask for the code, can you read my post at least once, before saying something about it?
Thanks ^^ Or even better, even after you read it at least once, you can relax and THINK before you post. That way you can try to be less rude and more useful to people here in the Forum. I read almost all the posts here in the adoptables forum, including yours, and seems to me that because you have a good site, with a good amout of members and scripts programmed by yourself, you think you can despise others members that are starting now. Well, it's not that way. But, if you are rude not because you think you are something more than others members, but because of personal problems, I recommend yoga. And it doesn't mean I care about your stress or something, so no need to thank me. I just care about how I'm treated. |
RE: Breeding System - Complete!
Quote:
|
RE: Breeding System - Complete!
ok....now i show this hen i go in the Coupling:
i show this on the top of the page: Code:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a6518385/public_html/GcA/adoptables/breeding.php on line 81 |
RE: Breeding System - Complete!
I don't know. Can you please be patient? Gosh, I don't even want to help if you're so impolite.
|
RE: Breeding System - Complete!
Sorry...
|
RE: Breeding System - Complete!
Quote:
SieghartZeke you act very impatiently in a lot of the threads you post in. I would like to ask you nicely to please be patient and to please show some respect. |
RE: Breeding System - Complete!
So this is an egg system? Excellent!
|
RE: Breeding System - Complete!
I'm sorry, I've been busy. I can try and troubleshoot, though.
Maybe, try changing it back to breeding.php. There may be some file links, which could be disrupting it. :) Have you installed the gender system/given existing pets genders? I had to do it manually, by making the default value 'female', then changing the rest to male. |
RE: Breeding System - Complete!
err i dont have complted the gender system because in a part,when ichanged the code i can managae the new charatcer!
|
RE: Breeding System - Complete!
Quote:
|
RE: Breeding System - Complete!
I installed this addon, and get the two warnings below:
Quote:
|
RE: Breeding System - Complete!
But when i add a code,4 the gender, i dont show the new adoptable!
And 4 the Sql ,i dont know where to put ...and what put..... |
RE: Breeding System - Complete!
I don't get what you're trying to say now... Are you saying you're having problems with this code, or with the gender code?
Why don't you just add the gender table, give the pets genders, and see if the breeding system works. Then we can work on the inserting into the table/ |
RE: Breeding System - Complete!
No with the breeding no....is the gender that give me problem!
When i add this code: Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender')"); Then......i need to add a new table in owned adoptable...but i dont know what i need to put! |
RE: Breeding System - Complete!
Adding a row to a table is quite easy & in the Breeding system it is listed how to set it. Please, just try to read and learn a bit so that you can understand at least some of what you are told. http://www.w3schools.com/PHP/php_mysql_intro.asp
Sea |
RE: Breeding System - Complete!
Hi, Thank you for posting this. It's excellent. My problem is that once an egg is successfully bread ( is that the past tense of breed? Bread? Not the food bread T.T) it isn't transferred to the user's account. The only edit I've made is changing the required levels from 2 to 0. If you have time, could you please help? Oh and I'm using your gender system as well. Also very awesome.
Thanks, Ashje =D |
RE: Breeding System - Complete!
Cool! I don't know why - why don't you try this. After where it's supposed to insert it, write:
PHP Code:
== Lol, I just noticed that we don't do that in the query. If you put it in an external string, you can echo it. For now, try removing '$date', from the sting. |
RE: Breeding System - Complete!
I'll give it a shot, thanks for the help. XD
|
RE: Breeding System - Complete!
Arianna, how much work do you think it would be to add a cost system to this mod ??
At the moment members can just breed as many as they like but if it costs them credits then it will limit the amount they can breed :) |
RE: Breeding System - Complete!
Not much, just send me a PM and I can try and get it to work, especially as that would be good for my site, too. :)
|
RE: Breeding System - Complete!
Hi Arianna,
I tried removing the date codes but it still isn't transferring the newly born adoptable to the user's account. If you could, please help. Thanks, Ashje. |
RE: Breeding System - Complete!
Hmm... That still is very weird. Could you make a line, after it's supposed to insert it, which echoes the query (or goes $article_content = $article_content . $query;, I guess) and paste that in. We can compare it to your table, then, to see what's wrong. :)
|
RE: Breeding System - Complete!
Thank you,
I'll try it as soon as my FTP gets up and running again. :D I'm excited, I'm learning PHP. XD So I would say... PHP Code:
PHP Code:
Ashje. |
RE: Breeding System - Complete!
Hmm, maybe...
PHP Code:
|
RE: Breeding System - Complete!
well it works fine at me, butthe new adoptable egg doesnt show up in myadopts.php?
|
RE: Breeding System - Complete!
That's weird. Are you sure you have the right colums in your table?
|
RE: Breeding System - Complete!
Hi Arianna,
I tried that and it worked! The adoptables were being inserted into the database. Problem is, it was showing the query on the page. So I removed your edit and it stopped working again. So then I put PHP Code:
PHP Code:
Ashje |
All times are GMT -5. The time now is 01:36 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.