![]() |
Pet personalities?
Is there a way I could give pets a randomly generated personality on creation? And maybe have it display a bit of text related to that on the profile(assuming I can get one set up)/on the stats page?
|
Oh lords, I just typed out a bunch of information for you and the internet glitched and ate my entire post.
Okay, I'll edit this post in a moment, just adding the codes that you'll need at the moment. Edit: You will need to create two new files, one where the base files for your site are (adopt.php, account.php, etc): personality.php PHP Code:
personalityview.php PHP Code:
name: id type: int(20) null: No default: None extra: AUTO_INCREMENT name: pers type: varchar(100) collation: latin1_swedish_ci null: Yes default: Null Now move on over to owned_adoptables and add a new column with the following info: name: personality type: varchar(100) collation: latin1_swedish_ci null: No default: Easy Going Now for the tedious part. You will need to make the same edits, more or less, to the following five files: adopt.php classes/class_breeding.php classes/class_promocode.php classes/class_stockadopt.php admincp/ownedadopt.php Find the insert line in each file that starts like this: $mysidia->db->insert("owned_adoptables", array("aid" => NULL... At the end of that, before the closing )); add a comma behind whatever is last, and then add this: PHP Code:
|
Quote:
|
Sorry, internet shorted out again before I could finish @_@
Okay, here are the rest of the instructions: In the same 5 files I mentioned, find the insert line again, and right above it add this line; PHP Code:
PHP Code:
PHP Code:
And that should be it! |
I probably screwed something up, but my site returns a 500 error when I try to access mysite/personality
|
Did you edit anything in the files at all?
Make sure everything's in the right folder? |
The only edits I made are the ones you said to make, and I double checked the positions, so I'm pretty sure that's not it
|
Alright, could you show me the sections in the 5 files that have been edited? (adopt.php, class_breeding.php, class_promocode.php, class_stockadopt.php, and admincp/ownedadopt.php)
Edit: Before doing that, try adding this about the index function in personality.php: PHP Code:
|
adopt.php
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
I posted a snippet of code above, could you try that and let me know the results?
|
All times are GMT -5. The time now is 04:11 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.