Newbie Spellweaver
- Joined
- Feb 18, 2007
- Messages
- 61
- Reaction score
- 0
Anyone got the buying of pets working without getting disconnected?
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!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.
case "AZ": // Item handling - place item down
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);
}
}
}
}
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..
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
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;
awa500 lav ting til uberemulator istedet for ;D