internal static int GetPetFood(int PetType) { if (PET_FOODS[PetType] > 0) { return(PET_FOODS[PetType]); } using (IQueryAdapter dbClient = OtanixEnvironment.GetDatabaseManager().getQueryreactor()) { dbClient.setQuery("SELECT item_id FROM items_base WHERE item_name = 'petfood" + PetType + "' LIMIT 1"); int itemId = dbClient.getInteger(); PET_FOODS[PetType] = itemId; return(itemId); } }
internal static void enterProvisionalRoom(GameClient Session) { if (usersProvisionalHomes.ContainsKey(Session.GetHabbo().Id)) { Room room = OtanixEnvironment.GetGame().GetRoomManager().LoadRoom(usersProvisionalHomes[Session.GetHabbo().Id]); if (room == null) { return; } Session.GetMessageHandler().enterOnRoom3(room); usersProvisionalHomes.Remove(Session.GetHabbo().Id); } }
internal static void Initialize(IQueryAdapter dbClient) { Configuration = new ConfigurationData(Path.Combine(Application.StartupPath, @"Settings/values.ini")); HOTEL_LINK = Configuration.data["hotel.link"]; PIN_CLIENTE = Configuration.data["pin.client"]; //HOTEL_ID = int.Parse(Configuration.data["hotel.id"]); TILE_STACKING_VALUE = Configuration.data["tile.stacking.value"]; FURNIDATA_LINK = Configuration.data["hotel.furnidata"]; FIGUREDATA_LINK = Configuration.data["hotel.figuredata"]; EXCHANGE_DIAMONDS = Configuration.data["exchange.diamonds"].ToLower() == "true"; CRYPTO_CLIENT_SIDE = Configuration.data["crypto.client.side"].ToLower() == "true"; SHOW_PACKETS = Configuration.data["show.packets"].ToLower() == "true"; HOTEL_LUCRATIVO = Configuration.data["hotel.lucrativo"].ToLower() == "true"; HOTEL_LUCRATIVO_ALERTAR_GANHOU_MOEDAS = Configuration.data["hotel.lucrativo.alertar.ganhou.moedas"].ToLower() == "true"; HOTEL_LUCRATIVO_DARMOEDAS = Configuration.data["hotel.lucrativo.darmoedas"].ToLower() == "true"; HOTEL_LUCRATIVO_MOEDAS_TEMPO = int.Parse(Configuration.data["hotel.lucrativo.quantidade.tempo.minutos"]); HOTEL_LUCRATIVO_QUANTIDADE_MOEDAS = int.Parse(Configuration.data["hotel.lucrativo.quantidade.moedas"]); // CAMERA CAMERA_SERVER_LOAD = Configuration.data["camera.server.load"]; CAMERA_BASEID = uint.Parse(Configuration.data["camera.baseid"]); // CHATS IDS CHAT_TYPES_USERS = new List <int>(); string chattypesusers = Configuration.data["chat_types_users"]; foreach (string value in chattypesusers.Split(',')) { if (!CHAT_TYPES_USERS.Contains(int.Parse(value))) { CHAT_TYPES_USERS.Add(int.Parse(value)); } } CHAT_USER_ID = uint.Parse(Configuration.data["chat_user_id"]); // ANTI SPAM CONFIGURATION CHECK_EVERY = int.Parse(Configuration.data["checkEveryXMessages"]); SENDINGS_TO_WHITE_LIST = int.Parse(Configuration.data["whitelistAfterXSendings"]); PROCESS_FOR_X_MINUTES = int.Parse(Configuration.data["FullProcessingForXMinutes"]); // FRIENDS LIMITS FRIENDS_REQUEST_LIMIT = Int32.Parse(Configuration.data["client.maxrequests"]); FRIENDS_LIMIT = Int32.Parse(Configuration.data["client.maxpossiblefriends"]); // INVENTARY LIMITS INVENTARY_ITEMS_LIMIT = uint.Parse(Configuration.data["client.maxitemsininventary"]); // MAXIMUMS MAX_NAME_CHANGES = Int32.Parse(Configuration.data["game.maxnamechanges"]); MAX_BOTS_PER_ROOM = Int32.Parse(Configuration.data["max.bots.room"]); MAX_BOTS_MESSAGES = Int32.Parse(Configuration.data["max.bots.messages"]); MAX_PETS_PER_ROOM = Int32.Parse(Configuration.data["max.pets.room"]); // BOOLS AND URLS LOG_EXCEPTIONS = Configuration.data["logExceptions"].ToLower() == "true"; PRISAOID = uint.Parse(Configuration.data["prisaoId"]); // EXTRA INFO FIRST_PRESENT_ID = UInt32.Parse(Configuration.data["first.present.wrap.id"]); LAST_PRESENT_SPRITEID = UInt32.Parse(Configuration.data["last.present.wrap.id"]); FIRST_BALLOON_PRESENT_ID = UInt32.Parse(Configuration.data["first.balloon.present.id"]); LAST_BALLOON_PRESENT_ID = UInt32.Parse(Configuration.data["last.balloon.present.id"]); CLUB_PAGE_ID = Int32.Parse(Configuration.data["club.hc.page"]); dbClient.setQuery("SELECT item_id FROM items_base WHERE item_name = 'ecotron_box' LIMIT 1"); FURNIMATIC_BOX_ITEMID = dbClient.getInteger(); dbClient.setQuery("SELECT item_id FROM items_base WHERE item_name = 'song_disk' LIMIT 1"); JUKEBOX_CD_BASEID = dbClient.getInteger(); // CATALOGUE CATALOG_NOSEARCH_PAGES = new List <int>(); if (Configuration.data["catalog.nosearch.pages"].Length > 0) { foreach (string value in Configuration.data["catalog.nosearch.pages"].Split(',')) { CATALOG_NOSEARCH_PAGES.Add(Int32.Parse(value)); } } // DIAMONDS DIAMONDS_ENABLED = Configuration.data["diamonds.enable"].ToLower() == "true"; DIAMONDS_AMOUNT = UInt32.Parse(Configuration.data["diamonds.amount"]); DIAMONDS_MINUTES = UInt32.Parse(Configuration.data["diamonds.minutes"]); DIAMONDS_ALERT = Configuration.data["diamonds.alert"].ToLower() == "true"; // HORSE dbClient.setQuery("SELECT item_id FROM items_base WHERE item_name = 'horse_saddle1' LIMIT 1"); HORSECHAIR1 = (uint)dbClient.getInteger(); dbClient.setQuery("SELECT item_id FROM items_base WHERE item_name = 'horse_saddle2' LIMIT 1"); HORSECHAIR2 = (uint)dbClient.getInteger(); PET_FOODS = new int[38]; // NAVIGATOR NAVIGATOR_STAFF_SELECTION = Configuration.data["navigator.selection.staff"]; ROOMS_X_PESTAÑA = Int32.Parse(Configuration.data["rooms.x.tab"]); // PREMIUM PREMIUM_BASEID = UInt32.Parse(Configuration.data["premium.baseid"]); EVENTHA_ICON = Configuration.data["eventha.icon"]; if (OtanixEnvironment.GetGame() != null) { OtanixEnvironment.GetGame().GetRoomRankConfig().Initialize(); } }