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(?):
But I have no idea where to add it? I believe it's into the rooms.cs file. I've managed to find theCode: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; }
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.Code:if (Bot == null) { Logging.WriteLine("Null bot found" + PetId); return; }


Reply With Quote

