Code for pets in holograph

Status
Not open for further replies.
Anyone got the buying of pets working without getting disconnected?

I did, but they are a little unestable, they make my emu crash... i'm looking for a fix.
BTW does anyone know how to add a pet's limit for room?

Regards.
 
Last edited:
DnSk, I got a way to limit the number of pets per room.

I will post it later.

Anyone know how to fix the glitch where you can place a pet on a bed/chair/person and it bugs the pet?
 
I did, but they are a little unestable, they make my emu crash... i'm looking for a fix.
BTW does anyone know how to add a pet's limit for room?

Regards.

Yeh, if you know little about c# better not try fixing it, but I found out that the bots/pets (free roaming) create lagg because when they're in a closed area (like behind a mode bar) and they try to move outside the closed area, they keep sending that packet over and over which will cause lagg, or even crash the server.


This is to get max 5 pets per room (example code is just as an example because if you'll add it in like that you'll get errors since it still needs some other coding :))

case "AZ": // Item handling - place item down

put an exception there..

example code said:
else if (nestPetID > 0)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
// {}
if (Room._Pets.Count >= 5)
{
sendData("BK" + "You're allowed (5) pets per room, maximum.");
break;
}
{
string[] locDetails = currentPacket.Split(' ');
int X = int.Parse(locDetails[1]);
int Y = int.Parse(locDetails[2]);
byte Z = byte.Parse(locDetails[3]);

Room.floorItemManager.placeItem(itemID, templateID, X, Y, 4, Z);

if (Room.floorItemManager.containsItem(itemID))
{
Room.placePet(Room.floorItemManager.getItem(itemID), nestPetID);
}
}
}
}
 
Last edited:
It doesnt let me buy pets with awas source. says i havnt got enough creds. I've tried importing the fixes released by JabboHotel but they dont work. Any help?
 
Hello, i am using Awa500's emulator but using a different database(i imported the stuff) but when it comesg to acctually buying pets it says i have not enough credits. Could anyone please provide me with a fix as i am wanting to open my hotel ASAP! +Il thank & vouche the poster of the fix!

Yeh, if you know little about c# better not try fixing it, but I found out that the bots/pets (free roaming) create lagg because when they're in a closed area (like behind a mode bar) and they try to move outside the closed area, they keep sending that packet over and over which will cause lagg, or even crash the server.


This is to get max 5 pets per room (example code is just as an example because if you'll add it in like that you'll get errors since it still needs some other coding :))



put an exception there..

I Which File do you open and find that as i cannot find it
 
Last edited:
Hello, i am using Awa500's emulator but using a different database(i imported the stuff) but when it comesg to acctually buying pets it says i have not enough credits. Could anyone please provide me with a fix as i am wanting to open my hotel ASAP! +Il thank & vouche the poster of the fix!



I Which File do you open and find that as i cannot find it

It was in the pets/bots manager file, but as said you need to understand some c# to debug the prob
 
Hi again, i've got a problem; hope someone can and want help me :P
This code produces a crash each 15-60 min in my emu (its related with case "AZ": // Item handling - place item down):
PHP:
if (dbClient.findsResult("SELECT id from pets WHERE id = '" + itemID + "'")) // Pet nest
                                    {
                                        string[] locDetails = currentPacket.Split(' ');
                                        int X = int.Parse(locDetails[1]);
                                        int Y = int.Parse(locDetails[2]);
                                        byte Z = byte.Parse(locDetails[3]);
                                        Room.floorItemManager.placeItem(itemID, templateID, X, Y, 4, Z); //"f:" + "1" (0 = Dog, 1 = Cat, 2 = Croco) + " " + "001" (000 = race 1, 001 = race 2 etc.) + " " + "000000" (Hex colour)
                                        Room.addPet(itemID, X, Y);
                                    }
                                    else
                                    {
                                        string[] locDetails = currentPacket.Split(' ');
                                        int X = int.Parse(locDetails[1]);
                                        int Y = int.Parse(locDetails[2]);
                                        byte Z = byte.Parse(locDetails[3]);
                                        byte typeID = catalogueManager.getTemplate(templateID).typeID;
                                        Room.floorItemManager.placeItem(itemID, templateID, X, Y, typeID, Z);
                                    }
                                    break;
Thank you a lot.
Regards!
 
i have them 90% in my edit of holograph (everything works exept snowstorm and camera), i'm still doing that hard 10%, il release the source when i;m finished with it.

---------- Post added at 06:17 PM ---------- Previous post was at 06:16 PM ----------

Also the basket does connect to the actual pet.
 
I test this emulator in my hotel (+60 users online):
-Problem with RAM usage. (50Mo RAM for 60 users online)
-problem when arises an object on the wall (error)
-Crash to 80 users online
-And lots of errors
-Etc

Good job for the pets but this emulator is a **** (sorry for the words).

I've been changed the emulator now.

(Sorry for my bad english, i'm french)
 
Status
Not open for further replies.
Back