Code for pets in holograph

Status
Not open for further replies.
for the person who couldnt get the buy button working, rename the case that was like case "AGB" or something like that to

case "@B"

In awa's source, it uses methods and replace @ with AG or AT (i cant remember)
o.O
I'll try that out whenever I get the chance. Thanx Andrew.
 
for the person who couldnt get the buy button working, rename the case that was like case "AGB" or something like that to

case "@B"

In awa's source, it uses methods and replace @ with AG or AT (i cant remember)

Thanks, it works and it doesn't D/C me when I buy it. But now there is a little error, when i buy one pet it goes to my hand but it appears as a grey brick. Could someone help me?
Picture:
AWA - Code for pets in holograph - RaGEZONE Forums


Thank you so much.
 
Last edited:
The problem is that pets are not insert in the 'pets' table and that's why they are not showing. Could someone help me fixing it?

Here is my buying code just in case someone else need it:
Code:
#region Pets

                        case "@j": // Pet buying - Check if the name is valid
                            {
                                if (currentPacket.Contains("¬") || currentPacket.Contains(Convert.ToChar(1).ToString()) || currentPacket.Contains(Convert.ToChar(2).ToString()))
                                    sendData("@d" + "I"); // Name is invalid
                                else
                                {
                                    sendData("@d" + "H"); // Name is valid
                                }
                                break;
                            }

                        case "B@": // Pet - Show info about the pet
                            {
                                break;
                            }
                        #endregion
 
The problem is that pets are not insert in the 'pets' table and that's why they are not showing. Could someone help me fixing it?

Here is my buying code just in case someone else need it:
Code:
#region Pets

                        case "@j": // Pet buying - Check if the name is valid
                            {
                                if (currentPacket.Contains("¬") || currentPacket.Contains(Convert.ToChar(1).ToString()) || currentPacket.Contains(Convert.ToChar(2).ToString()))
                                    sendData("@d" + "I"); // Name is invalid
                                else
                                {
                                    sendData("@d" + "H"); // Name is valid
                                }
                                break;
                            }

                        case "B@": // Pet - Show info about the pet
                            {
                                break;
                            }
                        #endregion

Shouldn't there be a bit of code that inserts the pet into the database after buying? Just curious.
 
Shouldn't there be a bit of code that inserts the pet into the database after buying? Just curious.

That's on what i've been thinking, but I haven't seen it in awa's source :S and people in the thread who have ported pets to their emus said that it worked by adding it :S
 
Last edited:
Maybe you forgot to add a line of code? I make mistakes like that all the time and wonder for hours why what I added isn't working. You should double-check.

Also, just curious, what all did you add to get pets working on your server? See, I have a hotel, and couldn't figure out what files I needed to edit other than virtualUser.cs to make it work.
 
Last edited:
Maybe you forgot to add a line of code? I make mistakes like that all the time and wonder for hours why what I added isn't working. You should double-check.

Also, just curious, what all did you add to get pets working on your server? See, I have a hotel, and couldn't figure out what files I needed to edit other than virtualUser.cs to make it work.

I took awa's emu and searched for 'pet' and in every line of code that appeared i added to my emu; i also made some modifications to it to make it work. Now pets work in my emu (i insert some throught phpmyadmin) but i can't buy them. Tomorrow i'll search for the problem.
BTW i'm a beginner in C#

Thank you for the tip ;)
 
pets are "inserted" into the database in

case "Ad"

If you search in awa's source for

ProcessPacketAd()

at the bottom of that method is the inserting code

Thank you so much. Now the emu inserts the pets into the database but i get the same error as before, they appear as grey bricks in my hand and i can't select them.
 
Sounds like you forgot a line of code, or it's your pets page. Did you use the pets page that came with your emulator, or the one provided in this thread?
 
Sounds like you forgot a line of code, or it's your pets page. Did you use the pets page that came with your emulator, or the one provided in this thread?

Yes, it's the same. I have used awa's emu and pets worked in my hotel (with the ones provided in this thread). Probably is something i forgot...
 
It may be a few things.
1. It doesnt inert the right data into database. e.g. The nest isnt connected to pet.
2. catalogue_items is incorrect.

Il add them to my server and test diffrent cases.

Also il packetlogg awa's server when you buy the pets and they go into your hand.
 
It may be a few things.
1. It doesnt inert the right data into database. e.g. The nest isnt connected to pet.
2. catalogue_items is incorrect.

Il add them to my server and test diffrent cases.

Also il packetlogg awa's server when you buy the pets and they go into your hand.

That's the point, 'The nest isnt connected to pet', how can i connect it to pet?

Thanks :P

EDIT: I have pets working, thank you all so much :) :)
 
Last edited:
I'm having trouble with this. Everytime I try to recompile the source I get the error "Unexpected preprocessor directive". It's getting quite annoying. Would anyone be kind enough to help me?
 
Status
Not open for further replies.
Back