• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Code for pets in holograph

Status
Not open for further replies.
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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:
Newbie Spellweaver
Joined
Apr 17, 2007
Messages
89
Reaction score
2
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.

CCT's probabbly fucked up?
 
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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
 
Junior Spellweaver
Joined
May 14, 2009
Messages
130
Reaction score
23
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.
 
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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:
Junior Spellweaver
Joined
May 14, 2009
Messages
130
Reaction score
23
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:
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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 ;)
 
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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.
 
Junior Spellweaver
Joined
May 14, 2009
Messages
130
Reaction score
23
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?
 
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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...
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
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.
 
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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:
Junior Spellweaver
Joined
May 14, 2009
Messages
130
Reaction score
23
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?
 
Experienced Elementalist
Joined
Apr 6, 2009
Messages
296
Reaction score
64
Make a new room the emulator is very buggy :S bUT PETS ARE WORKING BUT THEY ARE NOT EATING :(
 
Status
Not open for further replies.
Back
Top