Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Code for pets in holograph

Status
Not open for further replies.
Newbie Spellweaver
Joined
Feb 18, 2007
Messages
61
Reaction score
0
Anyone got the buying of pets working without getting disconnected?
 
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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:
retired
Joined
Jun 17, 2008
Messages
561
Reaction score
39
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?
 
Newbie Spellweaver
Joined
Apr 17, 2007
Messages
89
Reaction score
2
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:
Newbie Spellweaver
Joined
Apr 4, 2010
Messages
31
Reaction score
1
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?
 
ส็็็็็็็
Loyal Member
Joined
Sep 21, 2009
Messages
2,005
Reaction score
594
I almost had them 100%, but my computer had to crash and lose all my progress on microsoft c# so fucked off now Lol. i never give up without a fight. :)
 
Initiate Mage
Joined
Mar 22, 2009
Messages
4
Reaction score
0
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:
Newbie Spellweaver
Joined
Apr 17, 2007
Messages
89
Reaction score
2
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
 
Initiate Mage
Joined
Mar 22, 2009
Messages
4
Reaction score
0
Thanks found it now but do you know how to fix the page where it says i dont have enough credits it annoying me now!
 
Newbie Spellweaver
Joined
Dec 30, 2008
Messages
33
Reaction score
1
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!
 
ส็็็็็็็
Loyal Member
Joined
Sep 21, 2009
Messages
2,005
Reaction score
594
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.
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
You Gotta Edit Few Stuff And Add Them In Diffrent Files If You Want Ill Do It For You
 
Newbie Spellweaver
Joined
May 27, 2010
Messages
6
Reaction score
0
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 poop (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
Top