PlusEmuR2 - Pet spawns a bot?

Results 1 to 1 of 1
  1. #1
    Apprentice ErTom is offline
    MemberRank
    Mar 2010 Join Date
    8Posts

    angry PlusEmuR2 - Pet spawns a bot?

    Hi, I have an issue where after a room with a pet in it is unloaded, and then reloaded, a white bot spawns.

    I found this fix(?):

    Code:
    if (Bot == null)
               {
                   Logging.WriteLine("Null bot found" + PetId);
                   return;
               }  
    This:
    PHP Code:
     uint BotsCount = 0;
               uint BotsMax = 0;
               BotsMax = (uint)int.Parse(SilverwaveEnvironment.GetDBConfig().DBData["bots.max"]);
               using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
               {
                   dbClient.setQuery("SELECT COUNT(*) FROM bots WHERE room_id =    @ROOmid and ai_type = 'generic' ");
                       dbClient.addParameter("Roomid", Room.RoomId);
                   BotsCount = uint.Parse(dbClient.getString());
               }
               if (BotsCount > BotsMax -1)
               {
                   Session.SendNotif("You only can have  " + BotsMax + " in a room.");
                       return;
               }
    But I have no idea where to add it? I believe it's into the rooms.cs file. I've managed to find the
    Code:
    if (Bot == null)
               {
                   Logging.WriteLine("Null bot found" + PetId);
                   return;
               }
    and tried to put it here / mess about with it, but it hasn't worked. Can someone help? I'm really out of ideas.Thanks.




Advertisement