Author Topic: SMFPets is Finally Here (0.1 out)  (Read 107412 times)

Offline Basil Beard

Re: SMFPets is Finally Here (0.1 out)
« Reply #135 on: March 26, 2007, 05:06:00 am »
This is why this package will probably never be official. I donno enough to actually help people fix their problems. XD Now I feel sad. Hopefully technodragon or daniel will come to my rescue!
Arrrrr!

Offline Lady Ambrosia

Re: SMFPets is Finally Here (0.1 out)
« Reply #136 on: March 26, 2007, 06:46:35 am »
Oh don't feel sad, it's a GREAT mod it really is!  There's a possibility that it's probably not on your end, sometimes servers themselves can make a HUGE difference; I'm saying this because I can tell a HUGE difference in my Test site, as it's free and doesn't do the code properly, but with my main site, things will work like a charm, of course I pay for it too.

I think you should continue to work on this mod, as it's an awesome mod, and is LOADS of fun!!
Ambrosia's Castle - My Personal Site
The Dark Castle - My Forum
Avatar by:  Me

Offline GhostWriter

Re: SMFPets is Finally Here (0.1 out)
« Reply #137 on: March 26, 2007, 07:15:57 am »
I agree with Lady Ambrosia, this is an awesome mod and you should keep at it, that is really the only way to improve it. Some of the problems that are coming should also be expected since it is in it's child stages still. Give it time and things will be fixed up with it to where it works for eveyone. You also have to take into theconsideration that with SMF1.1.2 being out, there is some differences with it then when you made this mod.


With all the knowledge of PHP from this site, someone is bound to solve the issues that you don't aren't sure about, but please don't take anything away from yourself, I could have never coded anything like this at all. 

Offline tamibrown

Re: SMFPets is Finally Here (0.1 out)
« Reply #138 on: March 27, 2007, 02:09:33 am »
I have a member who wants to get rid of one of her pets......is there a way to do this?

Offline Basil Beard

Re: SMFPets is Finally Here (0.1 out)
« Reply #139 on: March 27, 2007, 03:29:09 am »
No, other than editing the database, you cannot get rid of pets yet. Sorry.
Arrrrr!

Offline littleone

Re: SMFPets is Finally Here (0.1 out)
« Reply #140 on: March 27, 2007, 06:18:28 am »
Getting a couple of errors in my logs id like to fix:

8: Undefined index: profile_show_pets_2
File: /home/xxxxxxxxxxxxxx/public_html/forum/Themes/default/Profile.template.php
Line: 598

8: Undefined index: showPets
File: /home/xxxxxxxxxxxxx/public_html/forum/Sources/Profile.php
Line: 350

8: Undefined index: shop_buy_message
File: /home/xxxxxxxx/public_html/forum/Sources/shop/Shop-Pets.php
Line: 146

Offline inkstains

Re: SMFPets is Finally Here (0.1 out)
« Reply #141 on: March 30, 2007, 03:31:10 pm »
hey Basil Beard

just wondering, i'm look at adding the 0.1 upgrade cause i'd like the training fixes i'm just curious what will be affected i've made a few changes to my pet store and just wondering if they will cause issues also will all the pets remain as they are as in peoples levels etc

cheers

EDIT: ignore this have just done a backup and then applied everything appears to be working fine

cheers


EDIT2: actually my pet images in the pet central section have stopped working i had worked around the previous problem by creating a new pet_images folder in the root of my server directory but now it doesn't work it appears to be calling the images from the original pet_images folder but this folder also contains all the images but still fail to display

any ideas?

EDIT3: haha so many edits anyway i've sorted the images i just changed my image paths to

Code: [Select]
src='".$boardurl."/*forumdirectory*/Sources/shop/pet_images/".$this->breed_img."'
in case anyone else has this issue
« Last Edit: March 30, 2007, 11:28:07 pm by inkstains »

Lucid_Dream

  • Guest
Re: SMFPets is Finally Here (0.1 out)
« Reply #142 on: March 31, 2007, 09:48:18 am »
Is that edit in pet_engine.php?

Offline inkstains

Re: SMFPets is Finally Here (0.1 out)
« Reply #143 on: March 31, 2007, 09:56:59 am »
yeh in pet_engine.php
« Last Edit: April 01, 2007, 12:10:05 am by inkstains »

Lucid_Dream

  • Guest
Re: SMFPets is Finally Here (0.1 out)
« Reply #144 on: March 31, 2007, 09:58:49 am »
hmm, still not working for me, the img comes up in the hatchery but not the pet centre

[Edit] got i working thanks :P

Just a few things my members asked me about.

Will we ever be able to fight other peoples pets?
Will there be an in forum menu where other people can see ur pets? (like the smf arcad thing of showing the games u have top score in)
« Last Edit: March 31, 2007, 10:21:08 am by Lucid_Dream »

Offline inkstains

Re: SMFPets is Finally Here (0.1 out)
« Reply #145 on: March 31, 2007, 10:20:31 am »
did you change that code in both places in the pet_engine.php file

also have you done the upgrade?
« Last Edit: March 31, 2007, 01:17:16 pm by inkstains »

Offline inkstains

Re: SMFPets is Finally Here (0.1 out)
« Reply #146 on: March 31, 2007, 04:34:03 pm »
hope this is cool with Basil

wanted users to be able to terminate their pets if/when they wanted seeing as Basil doesn't appear to have much time thought i'd throw the code changes up here for anyone who would like to do the same

This is all done on a 0.1 updated version of pets i'm not sure if the code is any different between 0.0 and 0.1 so if you try it on a 0.0 version it might be a bit different

in Shop-Pets.php find

Code: [Select]
$temp->store_values();
and above that copy and past the below code

Code: [Select]
///BEGIN KILL
                        elseif ($_GET['type'] == 'kill') {
                                $context['shop_buy_message'] = sprintf('Your pet has been put down');
                                $result = db_query("UPDATE {$db_prefix}members SET numpets = numpets - 1 WHERE ID_MEMBER = {$ID_MEMBER}", __FILE__, __LINE__);
        $result = db_query("DELETE FROM {$db_prefix}shop_pets WHERE pet_id = {$_GET['pet']}", __FILE__, __LINE__);
                        }
///END KILL

then in pet_engine.php find

Code: [Select]
</tr></table><br />";
and before that copy and paste the below code

Code: [Select]
<tr><th colspan='4'>NOTE: This action is permanent and cannot be undone</th>
<td colspan='1'>".$this->killMenu()."</td></tr>

again in pet_engine.php find

Code: [Select]
//Training cost. Set to n *
above that copy and paste the below code

Code: [Select]
//BEGIN KILL
function killMenu() {
global $txt;
                $returnstring = "<form method='post' action='".$scripturl."?action=shop;do=pets;type=kill;pet=".$this->id."'>";
$returnstring .= "<input type='submit' value='Put your pet down'></form>";
                return $returnstring;
}
///END KILL

and that's it if everything went cool you should have a new button and message in your pet central


Basil Beard

i tried to keep this as close to the way you were putting things together as i could but there were a few things i couldn't work out cause i was to tired or whatever but could you point me in the right direction? so i can tidy it up a bit.

first was were you set the value for the text of the buttons on the input=submit stuff in pet_engine.php i had a look but couldn't find them maybe i was just a lil blind though and also the things like pets_describe that has what to do on that area that's all i can think of at the moment but yeh any help would be cool


cheers/enjoy



EDIT: it would be good to do a confirmation screen as well but i haven't bother to look at that yet just wanted to get it working
« Last Edit: March 31, 2007, 11:04:53 pm by inkstains »

Lucid_Dream

  • Guest
Re: SMFPets is Finally Here (0.1 out)
« Reply #147 on: March 31, 2007, 10:41:26 pm »
Basil thanks alot for this mod.

http://www.opiate2.com/images/Bear.zip  // just a quick pet it only has one skill but it will get you started.

Offline Basil Beard

Re: SMFPets is Finally Here (0.1 out)
« Reply #148 on: April 01, 2007, 12:17:17 am »
You probably will want to add some sort of confirm screen for killing your pet. I know how easy it is ti miss click and wouldn't want to accidentally kill a pet I wanted =P
Arrrrr!

Offline inkstains

Re: SMFPets is Finally Here (0.1 out)
« Reply #149 on: April 01, 2007, 12:52:01 am »
yeh i was saying that in my edit as i did exactly that no long after to a pet that was 19 days old and level 14 :-(

haven't really had a look at it yet you got any ideas on how i would do it?