armark1ng

Untitled

Oct 14th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.08 KB | None | 0 0
  1. package com.rs.game.player;
  2.  
  3. import java.io.Serializable;
  4. import java.util.ArrayList;
  5. import java.util.HashMap;
  6. import java.util.List;
  7. import java.util.Map;
  8.  
  9. import com.rs.cache.loaders.BodyDefinitions;
  10. import com.rs.cache.loaders.ClientScriptMap;
  11. import com.rs.cache.loaders.GeneralRequirementMap;
  12. import com.rs.game.TemporaryAtributtes.Key;
  13. import com.rs.game.item.Item;
  14. import com.rs.game.player.dialogues.Dialogue;
  15. import com.rs.net.decoders.WorldPacketsDecoder;
  16. import com.rs.net.decoders.handlers.ButtonHandler;
  17.  
  18. public class CosmeticsManager implements Serializable {
  19.  
  20. /**
  21. *
  22. */
  23. private static final long serialVersionUID = -6960190414485444043L;
  24.  
  25. public static final int COSMETIC_TYPE_MENU_VARBIT = 673;
  26.  
  27. private static final Map<Integer, Integer> cosmeticsVars1 = new HashMap<Integer, Integer>();
  28. private static final Map<Integer, Integer> cosmeticsVars2 = new HashMap<Integer, Integer>();
  29.  
  30. static {
  31. setVars();
  32. }
  33.  
  34. // autounlocked, no var. blame rs XD, book of faces, the stuffed title, hide
  35. // all(invisbile item)
  36. private static final int[] FREE_COSMETICS = { 14289, 14538, 5692, 19139, 19140, 21095, 21096, 21097, 21103, 21102 };
  37.  
  38. public static enum CosmeticType {
  39. APPEARENCE(1), WARDROBE(2), TITLE(3), ANIMATION(4), PET(5);
  40.  
  41. public int type;
  42.  
  43. private CosmeticType(int type) {
  44. this.type = type;
  45. }
  46. }
  47.  
  48. private transient Player player;
  49. private transient Item[] cosmeticPreview;
  50.  
  51. private boolean showingAllItems;
  52. private List<Integer> unlockedCosmetics;
  53. private ArrayList<Item> keepSakeItems;
  54.  
  55. public CosmeticsManager() {
  56. resetUnlockedCosmetics();
  57. showingAllItems = true;
  58. keepSakeItems = new ArrayList<Item>(20);
  59. }
  60.  
  61. public void init() {
  62. if (keepSakeItems == null)
  63. keepSakeItems = new ArrayList<Item>(20);
  64. refreshVars();
  65. refreshShowingAllItems();
  66. player.getPackets().sendItems(675, keepSakeItems.toArray(new Item[keepSakeItems.size()]));
  67. }
  68.  
  69. public void setPlayer(Player player) {
  70. this.player = player;
  71. if (unlockedCosmetics == null) // temporary
  72. resetUnlockedCosmetics();
  73. }
  74.  
  75. private void resetUnlockedCosmetics() {
  76. unlockedCosmetics = new ArrayList<Integer>();
  77. for (int data : FREE_COSMETICS)
  78. unlockedCosmetics.add(data);
  79. }
  80.  
  81. // save unlocked cosmetics and so on here.
  82.  
  83. public void open(CosmeticType type) {
  84. player.getVarsManager().setVarBit(COSMETIC_TYPE_MENU_VARBIT, type.type);
  85. player.getPackets().sendExecuteScript(6460, type.type); // does same
  86. // send var but
  87. // also clears
  88. // up
  89. sendPreviewTitle(player.getAppearence().getTitleId());
  90. for (int i = 0; i < MENUS_COMPONENT_IDS.length; i++) {
  91. if (MENUS_COMPONENT_IDS[i] == 260)
  92. player.getPackets().sendUnlockIComponentOptionSlots(1311, MENUS_COMPONENT_IDS[i], 0, 1000, 0, 1, 2);
  93. else
  94. player.getPackets().sendUnlockIComponentOptionSlots(1311, MENUS_COMPONENT_IDS[i], 0, 1000, 0, 1);
  95. }
  96. if (type == CosmeticType.WARDROBE) {
  97. player.getPackets().sendUnlockIComponentOptionSlots(1351, 234, 0, 3, 0);
  98. cosmeticPreview = player.getEquipment().getCosmeticItems().getItemsCopy();
  99. refreshCosmeticsPreview();
  100. }
  101. sendRenderAnimation();
  102. }
  103.  
  104. private void sendRenderAnimation() {
  105. Item weapon = cosmeticPreview == null ? null : cosmeticPreview[Equipment.SLOT_WEAPON];
  106. if (weapon == null)
  107. weapon = player.getEquipment().getItem(Equipment.SLOT_WEAPON);
  108.  
  109. player.getPackets().sendCSVarInteger(779, weapon == null ? 2697 : weapon.getDefinitions().getRenderAnimId());
  110. }
  111.  
  112. private void revert() {
  113. CosmeticType type = getCurrentCosmeticType();
  114. if (type == CosmeticType.WARDROBE) {
  115. cosmeticPreview = player.getEquipment().getCosmeticItems().getItemsCopy();
  116. player.getPackets().sendAppearenceLook();
  117. } else if (type == CosmeticType.TITLE)
  118. sendPreviewTitle(player.getAppearence().getTitleId());
  119. else if (type == CosmeticType.ANIMATION)
  120. sendPreviewAnimation(-1);
  121. sendPreviewOptions(-1, true);
  122. }
  123.  
  124. private void sendPreviewTitle(int titleId) {
  125. String title = Appearence.getTitle(player.getAppearence().isMale(), titleId);
  126. player.getPackets().sendExecuteScript(6453, Appearence.isTitleAfterName(titleId) ? 0 : 1,
  127. title == null ? "" : title);
  128. }
  129.  
  130. public void close() {
  131. if (getCurrentCosmeticType() == CosmeticType.WARDROBE) {
  132. player.getPackets().sendAppearenceLook();
  133. player.getAppearence().generateAppearenceData();
  134. cosmeticPreview = null;
  135. }
  136. player.getVarsManager().sendVarBit(COSMETIC_TYPE_MENU_VARBIT, 0);
  137. }
  138.  
  139. private void setCosmetic(ClientScriptMap map, int slot, boolean preview) {
  140. int itemId = map.getIntValue(slot);
  141. if (itemId == -1)
  142. return;
  143. for (int i = 0; i < 30; i++) {
  144. int Id = map.getIntValue(slot);
  145. if (Id == -1)
  146. continue;
  147. System.out.println("slotId = " + slot + ", itemid= " + Id);
  148. }
  149.  
  150. Item item = new Item(itemId);
  151. // no model <.<
  152. if (item.getDefinitions().equipSlot != -1
  153. && (player.getAppearence().isMale() ? item.getDefinitions().getMaleWornModelId1() == -1
  154. : item.getDefinitions().getFemaleWornModelId1() == -1)) {
  155. return;
  156. }
  157.  
  158. cosmeticPreview[slot] = item;
  159.  
  160. if (!preview) {
  161. Item oldItem = player.getEquipment().getCosmeticItems().get(slot);
  162. boolean remove = oldItem != null && oldItem.getId() == item.getId();
  163. player.getEquipment().getCosmeticItems().set(slot, remove ? null : item);
  164. }
  165. }
  166.  
  167. private void sendPreviewOptions(int id, boolean hide) {
  168. if (id == -1 || hide)
  169. player.getTemporaryAttributtes().remove(Key.CURRENT_COSMETIC);
  170. else
  171. player.getTemporaryAttributtes().put(Key.CURRENT_COSMETIC, id);
  172.  
  173. player.getTemporaryAttributtes().remove("Keepsake");
  174.  
  175. boolean canBuy = (isAutoUnlocked(id) || hasCosmeticVar(id, true));
  176.  
  177. player.getPackets().sendHideIComponent(1311, 174, hide || canBuy);
  178. player.getPackets().sendHideIComponent(1311, 194, hide || !canBuy);
  179. if (!hide && canBuy)
  180. player.getPackets().sendIComponentText(1311, 681, unlockedCosmetics.contains(id) ? "Apply" : "Buy");
  181. }
  182.  
  183. private void setCosmetic(GeneralRequirementMap data, boolean preview) {
  184. ClientScriptMap map = ClientScriptMap.getMap(data.getIntValue(2542));
  185. if (data.getIntValue(2532) == 20) {
  186. cosmeticPreview = new Item[BodyDefinitions.getEquipmentContainerSize()];
  187. if (!preview)
  188. player.getEquipment().getCosmeticItems().reset();
  189. for (Long slot : map.getValues().keySet())
  190. setCosmetic(map, slot.intValue(), preview);
  191. } else {
  192. int slot = data.getIntValue(2532);
  193. cosmeticPreview[slot] = null;
  194. setCosmetic(map, slot, preview);
  195. }
  196. refreshCosmeticsPreview();
  197. sendRenderAnimation();
  198. if (preview)
  199. sendPreviewOptions(data.getId(), !preview);
  200. }
  201.  
  202. private void setCosmetic(Item item, boolean preview) {
  203. int slot = item.getDefinitions().getEquipSlot();
  204. cosmeticPreview[slot] = null;
  205. if (item.getDefinitions().equipSlot != -1
  206. && (player.getAppearence().isMale() ? item.getDefinitions().getMaleWornModelId1() == -1
  207. : item.getDefinitions().getFemaleWornModelId1() == -1)) {
  208. return;
  209. }
  210.  
  211. cosmeticPreview[slot] = item;
  212.  
  213. if (!preview) {
  214. Item oldItem = player.getEquipment().getCosmeticItems().get(slot);
  215. boolean remove = oldItem != null && oldItem.getId() == item.getId();
  216. player.getEquipment().getCosmeticItems().set(slot, remove ? null : item);
  217. }
  218. refreshCosmeticsPreview();
  219. sendRenderAnimation();
  220. if (preview) {
  221. player.getPackets().sendHideIComponent(1311, 174, true);
  222. player.getPackets().sendHideIComponent(1311, 194, false);
  223. player.getPackets().sendIComponentText(1311, 681, "Apply");
  224. player.getTemporaryAttributtes().put("Keepsake", item);
  225. }
  226. }
  227.  
  228. private void refreshCosmeticsPreview() {
  229. player.getPackets().sendAppearanceLook(cosmeticPreview, player.getAppearence().getLook());
  230. player.getPackets().sendItems(670, player.getEquipment().getCosmeticItems());
  231. player.getPackets().sendItems(671, cosmeticPreview);
  232. }
  233.  
  234. // -1 means TODO that menu type(22 menus, im adding them as i need them)
  235. private static final int[] MENUS_COMPONENT_IDS = { 217, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
  236. 254, 255, 256, 257, 258, 259, 260, 261, 262 };
  237.  
  238. // data.getIntValue(2547) (boolean cant preview/buy such as event)
  239.  
  240. // menu id - related to componentId
  241. private Integer[] getCosmeticIds(CosmeticType type, int menuId) {
  242. ArrayList<Integer> ids = new ArrayList<Integer>();
  243.  
  244. for (int index = 0; index < getCosmeticsIds(type).getSize(); index++) {
  245. GeneralRequirementMap data = getCosmeticData(type, index);
  246. if (data.getIntValue(2532) == menuId && ((showingAllItems && data.getIntValue(2547) == 0)
  247. || isAutoUnlocked(data.getId()) || unlockedCosmetics.contains(data.getId())
  248. && hasCosmeticVar(data.getId(), data.getIntValue(2546) == 1))) {
  249. ids.add(index);
  250. }
  251. }
  252. return ids.toArray(new Integer[ids.size()]);
  253. }
  254.  
  255. // if no cosmetic var, dont let it buy as cant display for now(resuming not
  256. // available)
  257. private boolean hasCosmeticVar(int id, boolean loyality) {
  258. return cosmeticsVars1.get(id) != null || (loyality && cosmeticsVars2.get(id) != null);
  259. }
  260.  
  261. private static boolean isAutoUnlocked(int id) {
  262. for (int i : FREE_COSMETICS)
  263. if (i == id)
  264. return true;
  265. return false;
  266. }
  267.  
  268. // now the hell part :SSSSSS. also need newer vars after rs, or unlocking
  269. // will simply bug the list(to prevent that, ima force to check player vars)
  270. public void refreshVars() {
  271. for (int cosmeticId : unlockedCosmetics) {
  272. Integer varbitId = cosmeticsVars1.get(cosmeticId);
  273. if (varbitId == null)
  274. varbitId = cosmeticsVars2.get(cosmeticId);
  275. if (varbitId != null)
  276. player.getVarsManager().sendVarBit(varbitId, 1);
  277. }
  278. }
  279.  
  280. private void unlockOutfit(int outfitId) {
  281. for (int menuId = 0; menuId < BodyDefinitions.getEquipmentContainerSize(); menuId++) {
  282. int mapId = ClientScriptMap.getMap(8464).getIntValue(menuId);
  283. if (mapId == -1)
  284. continue;
  285. ClientScriptMap map = ClientScriptMap.getMap(mapId);
  286. for (Object id : map.getValues().values()) {
  287. GeneralRequirementMap data = GeneralRequirementMap.getMap((int) id);
  288. if (data.getIntValue(4419) == outfitId) {
  289. unlockedCosmetics.add(data.getId());
  290. }
  291. }
  292. }
  293. unlockedCosmetics.add(outfitId);
  294. }
  295.  
  296. /*
  297. * unlocks whole outfit items if its outfit or part of one, else jut item
  298. * itself
  299. */
  300. private void unlockItem(GeneralRequirementMap data) {
  301. if (data.getIntValue(2532) == 20)
  302. unlockOutfit(data.getId());
  303. else {
  304. int outfitId = data.getIntValue(4419);
  305. if (outfitId > 0)
  306. unlockOutfit(outfitId);
  307. else
  308. unlockedCosmetics.add(data.getId());
  309. }
  310. }
  311.  
  312. /*
  313. * -1 all
  314. */
  315. private void clearCosmetic(boolean preview, int slot) {
  316. if (preview) {
  317. if (slot == -1)
  318. cosmeticPreview = new Item[BodyDefinitions.getEquipmentContainerSize()];
  319. else
  320. cosmeticPreview[slot] = null;
  321. } else {
  322. if (slot == -1)
  323. player.getEquipment().getCosmeticItems().reset();
  324. else
  325. player.getEquipment().getCosmeticItems().set(slot, null);
  326. }
  327. refreshCosmeticsPreview();
  328. }
  329.  
  330. public void handleButtons(int componentId, int slotId, int slotId2, int packetId) {
  331. if (componentId == 669)
  332. switchShowingAllItems();
  333. else if (componentId == 686)
  334. revert();
  335. else if (componentId == 678) { // buy / apply
  336. Integer id = (Integer) player.getTemporaryAttributtes().remove(Key.CURRENT_COSMETIC);
  337. if (id == null) {
  338. Item item = (Item) player.getTemporaryAttributtes().remove("Keepsake");
  339. if (item != null) {
  340. setCosmetic(item, false);
  341. revert();
  342. }
  343. return;
  344. }
  345. apply(id);
  346. } else if (componentId == 332 || componentId == 346) {// back/ok
  347. closeReclaimItem();
  348. if (componentId == 346)
  349. player.getInterfaceManager().closeMenu();
  350. } else if (componentId == 339) {// confirm
  351. player.getPackets().sendHideIComponent(1311, 321, false);// ok
  352. player.getPackets().sendHideIComponent(1311, 322, true);// confirm
  353. player.getPackets().sendHideIComponent(1311, 323, true);// back
  354. int index = (int) player.getTemporaryAttributtes().remove("KeepSakeIndex");
  355. Item item = keepSakeItems.get(index);
  356. if (item == null)
  357. return;
  358. int equipSlot = item.getDefinitions().getEquipSlot();
  359. Item cosmetic = player.getEquipment().getCosmeticItems().get(equipSlot);
  360. if (cosmetic != null && cosmetic.getId() == item.getId())
  361. clearCosmetic(false, equipSlot);
  362. keepSakeItems.set(index, null);
  363. player.getPackets().sendItems(675, keepSakeItems.toArray(new Item[keepSakeItems.size()]));
  364. if (!player.getInventory().addItem(item)) {
  365. player.getBank().addItem(item.getId(), 1, true);
  366. player.getPackets().sendIComponentText(1311, 320, "Success! Your item has been added to your bank.");
  367. return;
  368. }
  369. player.getPackets().sendIComponentText(1311, 320, "Success! Your item has been added to your inventory.");
  370. revert();
  371. } else {
  372. for (int menuId = 0; menuId < MENUS_COMPONENT_IDS.length; menuId++) {
  373. if (MENUS_COMPONENT_IDS[menuId] == componentId) {
  374. CosmeticType type = getCurrentCosmeticType();
  375. if (type == null) // impossible unless you open inter
  376. // manualy
  377. return;
  378. int index = slotId / 3;
  379. if (type == CosmeticType.WARDROBE) {
  380. // player.getPackets().sendGameMessage("" + slotId + " ,
  381. // menuid " + menuId);
  382. if (menuId == 19) {
  383. if (index > keepSakeItems.size() - 1)
  384. return;
  385. Item item = keepSakeItems.get(index);
  386. if (item == null)
  387. return;
  388. if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET)
  389. setCosmetic(item, true);
  390. else if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET) {
  391. setCosmetic(item, false);
  392. revert();
  393. } else if (packetId == WorldPacketsDecoder.ACTION_BUTTON3_PACKET)
  394. sendReclaimItem(index);
  395. return;
  396. }
  397. if (menuId == 21) {// clear all
  398. if (index == 0)
  399. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET, -1);
  400. else if (index == 1)
  401. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  402. Equipment.SLOT_HAT);
  403. else if (index == 2)
  404. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  405. Equipment.SLOT_CAPE);
  406. else if (index == 3)
  407. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  408. Equipment.SLOT_AMULET);
  409. else if (index == 4)
  410. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  411. Equipment.SLOT_WEAPON);
  412. else if (index == 5)
  413. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  414. Equipment.SLOT_CHEST);
  415. else if (index == 6)
  416. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  417. Equipment.SLOT_SHIELD);
  418. else if (index == 7)
  419. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  420. Equipment.SLOT_LEGS);
  421. else if (index == 8)
  422. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  423. Equipment.SLOT_HANDS);
  424. else if (index == 9)
  425. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  426. Equipment.SLOT_FEET);
  427. else if (index == 10)
  428. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  429. Equipment.SLOT_AURA);
  430. else if (index == 11)
  431. clearCosmetic(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET,
  432. Equipment.SLOT_WINGS);
  433. sendPreviewOptions(-1, true);
  434. return;
  435. }
  436.  
  437. int dataId = ClientScriptMap.getMap(ClientScriptMap.getMap(8464).getIntValue(menuId))
  438. .getIntValue(slotId / 3);
  439. if (dataId == -1)
  440. return;
  441. GeneralRequirementMap data = GeneralRequirementMap.getMap(dataId);
  442.  
  443. if (!(isAutoUnlocked(data.getId())
  444. || hasCosmeticVar(data.getId(), data.getIntValue(2546) == 1)))
  445. player.getPackets().sendGameMessage(
  446. "This cosmetic var is not currently added. Name: " + data.getValue(2533));
  447.  
  448. if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET) {
  449. setCosmetic(data, true); // preview cosmetic
  450. } else if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET)
  451. apply(data.getId());
  452.  
  453. } else if (type == CosmeticType.APPEARENCE) {
  454.  
  455. Integer[] listIds = getCosmeticIds(type, menuId);
  456. if (index >= listIds.length) // cant happen
  457. return;
  458.  
  459. GeneralRequirementMap data = getCosmeticData(type, listIds[index]);
  460. if (menuId == 2 || menuId == 5) {
  461. int beardId = ClientScriptMap.getMap(703).getIntValue(data.getIntValue(2772));
  462.  
  463. if (menuId != 2 && !(isAutoUnlocked(data.getId())
  464. || hasCosmeticVar(data.getId(), data.getIntValue(2546) == 1)))
  465. player.getPackets().sendGameMessage("This cosmetic var is not currently added.");
  466. player.getAppearence().setBeardStyle(beardId);
  467. } else {
  468.  
  469. int dataId = ClientScriptMap.getMap(player.getAppearence().isMale() ? 2338 : 2341)
  470. .getIntValue(data.getIntValue(2772));
  471. if (dataId == -1)
  472. return;
  473. GeneralRequirementMap data2 = GeneralRequirementMap.getMap(dataId);
  474. if (menuId != 1 && !(isAutoUnlocked(data.getId())
  475. || hasCosmeticVar(data.getId(), data.getIntValue(2546) == 1)))
  476. player.getPackets().sendGameMessage("This cosmetic var is not currently added. Name: "
  477. + data2.getValue(792) + ", " + data.getId());
  478. player.getAppearence().setHairStyle(data2.getIntValue(788));
  479. }
  480. if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET)
  481. sendPreviewOptions(data.getId(), false);
  482. } else {
  483. if (type == CosmeticType.TITLE && menuId == 20) { // clear
  484. sendPreviewTitle(0);
  485. if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET) {
  486. player.getAppearence().setTitle(0);
  487. player.getPackets().sendGameMessage("Your title has been cleared.");
  488. sendPreviewOptions(-1, true);
  489. }
  490. return;
  491. }
  492.  
  493. Integer[] listIds = getCosmeticIds(type, menuId);
  494. if (index >= listIds.length) // cant happen
  495. return;
  496. GeneralRequirementMap data = getCosmeticData(type, listIds[index]);
  497. player.getPackets().sendGameMessage("menu= " + menuId + " ,type= " + type + " , index= " + index
  498. + " , emoteId= " + data.getIntValue(2535));
  499.  
  500. if (type == CosmeticType.ANIMATION) {
  501. if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET) {
  502. sendPreviewAnimation(data.getId());
  503. sendPreviewOptions(data.getId(), false);
  504. }
  505. } else if (type == CosmeticType.TITLE) {
  506. if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET) {
  507. sendPreviewTitle(data.getIntValue(2543));
  508. sendPreviewOptions(data.getId(), false);
  509. } else if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET)
  510. apply(data.getId());
  511. }
  512.  
  513. if (menuId != 20 && !(isAutoUnlocked(data.getId())
  514. || hasCosmeticVar(data.getId(), data.getIntValue(2546) == 1)))
  515. player.getPackets().sendGameMessage(
  516. "This cosmetic var is not currently added. Name: " + data.getValue(2533));
  517.  
  518. }
  519. break;
  520. }
  521. }
  522. }
  523. }
  524.  
  525. public void buy(int id, CosmeticType type) {
  526. if (player.getRights() >= 2) {
  527. if (type == CosmeticType.WARDROBE)
  528. unlockItem(GeneralRequirementMap.getMap(id));
  529. else
  530. unlockedCosmetics.add(id);
  531. refreshVars();
  532. player.getInterfaceManager().closeMenu();
  533. player.getPackets().sendGameMessage("Bought cosmetic, please reopen interface again.");
  534. }
  535. }
  536.  
  537. public void apply(int id) {
  538. CosmeticType type = getCurrentCosmeticType();
  539.  
  540. GeneralRequirementMap data = GeneralRequirementMap.getMap(id);
  541.  
  542. if (type == CosmeticType.TITLE) {
  543. if (unlockedCosmetics.contains(id)) {
  544. int titleId = data.getIntValue(2543);
  545. player.getAppearence().setTitle(player.getAppearence().getTitleId() == titleId ? 0 : titleId);
  546. player.getPackets()
  547. .sendGameMessage(player.getAppearence().getTitleId() == 0 ? "Your title has been cleared."
  548. : "Your title has been changed to: " + player.getAppearence().getTitle() + ".");
  549. //
  550. } else {
  551. buy(id, type);
  552. }
  553. } else if (type == CosmeticType.WARDROBE) {
  554. if (unlockedCosmetics.contains(id)) {
  555. setCosmetic(data, false);
  556. } else
  557. buy(id, type);
  558. }
  559. revert();
  560.  
  561. }
  562.  
  563. public static GeneralRequirementMap getCosmeticData(CosmeticType type, int cosmeticId) {
  564. int dataId = getCosmeticsIds(type).getIntValue(cosmeticId);
  565. if (dataId == -1) // shouldnt happen but lets be safe
  566. return null;
  567. return GeneralRequirementMap.getMap(dataId);
  568. }
  569.  
  570. public void refreshShowingAllItems() {
  571. player.getVarsManager().sendVarBit(678, showingAllItems ? 1 : 0);
  572. }
  573.  
  574. public void switchShowingAllItems() {
  575. showingAllItems = !showingAllItems;
  576. refreshShowingAllItems();
  577. }
  578.  
  579. public CosmeticType getCurrentCosmeticType() {
  580. int id = player.getVarsManager().getBitValue(COSMETIC_TYPE_MENU_VARBIT);
  581. for (CosmeticType type : CosmeticType.values())
  582. if (type.type == id)
  583. return type;
  584. return null;
  585. }
  586.  
  587. public static ClientScriptMap getCosmeticsIds(CosmeticType type) {
  588. return ClientScriptMap.getMap(ClientScriptMap.getMap(5958).getIntValue(type.type));
  589. }
  590.  
  591. /*
  592. * animation and so on
  593. */
  594. public void sendPreviewAnimation(int id) {
  595. player.getPackets().sendExecuteScript(2716, id);
  596. }
  597.  
  598. // dataId - varId
  599.  
  600. // script 6488 - vars for cosmeticVars1
  601. // script 6214 - vars for cosmeticVars2
  602. private static void setVars() {
  603. cosmeticsVars1.put(11113, 860);
  604. cosmeticsVars1.put(11114, 861);
  605. cosmeticsVars1.put(11115, 862);
  606. cosmeticsVars1.put(11116, 863);
  607. cosmeticsVars1.put(11117, 864);
  608. cosmeticsVars1.put(11118, 865);
  609. cosmeticsVars1.put(11119, 866);
  610. cosmeticsVars1.put(11120, 867);
  611. cosmeticsVars1.put(11121, 868);
  612. cosmeticsVars1.put(11122, 869);
  613. cosmeticsVars1.put(11123, 870);
  614. cosmeticsVars1.put(11124, 871);
  615. cosmeticsVars1.put(11125, 872);
  616. cosmeticsVars1.put(11126, 873);
  617. cosmeticsVars1.put(11127, 874);
  618. cosmeticsVars1.put(11128, 875);
  619. cosmeticsVars1.put(11129, 876);
  620. cosmeticsVars1.put(11130, 877);
  621. cosmeticsVars1.put(11131, 878);
  622. cosmeticsVars1.put(11132, 879);
  623. cosmeticsVars1.put(11133, 880);
  624. cosmeticsVars1.put(11134, 881);
  625. cosmeticsVars1.put(11135, 882);
  626. cosmeticsVars1.put(11136, 883);
  627. cosmeticsVars1.put(11137, 884);
  628. cosmeticsVars1.put(11138, 885);
  629. cosmeticsVars1.put(11139, 886);
  630. cosmeticsVars1.put(11140, 887);
  631. cosmeticsVars1.put(11141, 888);
  632. cosmeticsVars1.put(11142, 889);
  633. cosmeticsVars1.put(11143, 890);
  634. cosmeticsVars1.put(11144, 891);
  635. cosmeticsVars1.put(11145, 892);
  636. cosmeticsVars1.put(11146, 893);
  637. cosmeticsVars1.put(11147, 894);
  638. cosmeticsVars1.put(11148, 895);
  639. cosmeticsVars1.put(9918, 895);
  640. cosmeticsVars1.put(11149, 896);
  641. cosmeticsVars1.put(11150, 897);
  642. cosmeticsVars1.put(11151, 898);
  643. cosmeticsVars1.put(11152, 899);
  644. cosmeticsVars1.put(11153, 900);
  645. cosmeticsVars1.put(9919, 899);
  646. cosmeticsVars1.put(9920, 900);
  647. cosmeticsVars1.put(11154, 901);
  648. cosmeticsVars1.put(11080, null); // TODO manual
  649. cosmeticsVars1.put(11081, null); // TODO manual
  650. cosmeticsVars1.put(11082, null); // TODO manual
  651. cosmeticsVars1.put(11083, null); // TODO manual
  652. cosmeticsVars1.put(11084, null); // TODO manual
  653. cosmeticsVars1.put(11085, null); // TODO manual
  654. cosmeticsVars1.put(11086, null); // TODO manual
  655. cosmeticsVars1.put(11087, null); // TODO manual
  656. cosmeticsVars1.put(11088, null); // TODO manual
  657. cosmeticsVars1.put(11089, null); // TODO manual
  658. cosmeticsVars1.put(11090, null); // TODO manual
  659. cosmeticsVars1.put(11091, null); // TODO manual
  660. cosmeticsVars1.put(11092, null); // TODO manual
  661. cosmeticsVars1.put(11093, null); // TODO manual
  662. cosmeticsVars1.put(11094, null); // TODO manual
  663. cosmeticsVars1.put(11095, null); // TODO manual
  664. cosmeticsVars1.put(11096, null); // TODO manual
  665. cosmeticsVars1.put(11097, null); // TODO manual
  666. cosmeticsVars1.put(11098, null); // TODO manual
  667. cosmeticsVars1.put(11099, null); // TODO manual
  668. cosmeticsVars1.put(11100, null); // TODO manual
  669. cosmeticsVars1.put(11101, null); // TODO manual
  670. cosmeticsVars1.put(11102, null); // TODO manual
  671. cosmeticsVars1.put(11103, null); // TODO manual
  672. cosmeticsVars1.put(11104, null); // TODO manual
  673. cosmeticsVars1.put(11105, null); // TODO manual
  674. cosmeticsVars1.put(11106, null); // TODO manual
  675. cosmeticsVars1.put(11107, null); // TODO manual
  676. cosmeticsVars1.put(11108, null); // TODO manual
  677. cosmeticsVars1.put(11109, null); // TODO manual
  678. cosmeticsVars1.put(11110, null); // TODO manual
  679. cosmeticsVars1.put(11111, null); // TODO manual
  680. cosmeticsVars1.put(11112, null); // TODO manual
  681. cosmeticsVars1.put(11155, null); // TODO manual
  682. cosmeticsVars1.put(11156, null); // TODO manual
  683. cosmeticsVars1.put(11157, null); // TODO manual
  684. cosmeticsVars1.put(11158, null); // TODO manual
  685. cosmeticsVars1.put(11159, null); // TODO manual
  686. cosmeticsVars1.put(11160, null); // TODO manual
  687. cosmeticsVars1.put(11161, null); // TODO manual
  688. cosmeticsVars1.put(11162, null); // TODO manual
  689. cosmeticsVars1.put(11163, null); // TODO manual
  690. cosmeticsVars1.put(11164, null); // TODO manual
  691. cosmeticsVars1.put(11165, null); // TODO manual
  692. cosmeticsVars1.put(11166, null); // TODO manual
  693. cosmeticsVars1.put(11167, 915);
  694. cosmeticsVars1.put(11168, 917);
  695. cosmeticsVars1.put(11169, 919);
  696. cosmeticsVars1.put(11170, 921);
  697. cosmeticsVars1.put(11171, 923);
  698. cosmeticsVars1.put(11172, 925);
  699. cosmeticsVars1.put(11173, 927);
  700. cosmeticsVars1.put(11174, 929);
  701. cosmeticsVars1.put(11175, 931);
  702. cosmeticsVars1.put(11398, 780);
  703. cosmeticsVars1.put(11399, 781);
  704. cosmeticsVars1.put(11400, 782);
  705. cosmeticsVars1.put(11401, 783);
  706. cosmeticsVars1.put(11402, 784);
  707. cosmeticsVars1.put(11403, 786);
  708. cosmeticsVars1.put(11404, 785);
  709. cosmeticsVars1.put(11405, null); // TODO manual
  710. cosmeticsVars1.put(11406, null); // TODO manual
  711. cosmeticsVars1.put(11407, 789);
  712. cosmeticsVars1.put(11390, 765);
  713. cosmeticsVars1.put(11391, 766);
  714. cosmeticsVars1.put(11392, 767);
  715. cosmeticsVars1.put(11393, 768);
  716. cosmeticsVars1.put(11394, 769);
  717. cosmeticsVars1.put(11395, 770);
  718. cosmeticsVars1.put(11396, 771);
  719. cosmeticsVars1.put(11397, 772);
  720. cosmeticsVars1.put(11389, null); // TODO manual
  721. cosmeticsVars1.put(11419, 722);
  722. cosmeticsVars1.put(11420, 723);
  723. cosmeticsVars1.put(11421, 724);
  724. cosmeticsVars1.put(11422, 725);
  725. cosmeticsVars1.put(11423, 726);
  726. cosmeticsVars1.put(11424, 727);
  727. cosmeticsVars1.put(11425, 728);
  728. cosmeticsVars1.put(9922, 728);
  729. cosmeticsVars1.put(11426, 729);
  730. cosmeticsVars1.put(9923, 729);
  731. cosmeticsVars1.put(11427, 730);
  732. cosmeticsVars1.put(11428, 731);
  733. cosmeticsVars1.put(9924, 731);
  734. cosmeticsVars1.put(11444, null); // TODO manual
  735. cosmeticsVars1.put(11445, null); // TODO manual
  736. cosmeticsVars1.put(11446, null); // TODO manual
  737. cosmeticsVars1.put(11447, null); // TODO manual
  738. cosmeticsVars1.put(11448, null); // TODO manual
  739. cosmeticsVars1.put(11449, null); // TODO manual
  740. cosmeticsVars1.put(11456, 948);
  741. cosmeticsVars1.put(11457, 950);
  742. cosmeticsVars1.put(11458, 952);
  743. cosmeticsVars1.put(11459, 954);
  744. cosmeticsVars1.put(11460, 956);
  745. cosmeticsVars1.put(11461, 958);
  746. cosmeticsVars1.put(11462, 960);
  747. cosmeticsVars1.put(7231, 962);
  748. cosmeticsVars1.put(7233, 963);
  749. cosmeticsVars1.put(7234, 964);
  750. cosmeticsVars1.put(7237, 966);
  751. cosmeticsVars1.put(7238, 967);
  752. cosmeticsVars1.put(7235, 965);
  753. cosmeticsVars1.put(7239, 968);
  754. cosmeticsVars1.put(7240, 969);
  755. cosmeticsVars1.put(7241, 970);
  756. cosmeticsVars1.put(7245, 972);
  757. cosmeticsVars1.put(7246, 973);
  758. cosmeticsVars1.put(7244, 971);
  759. cosmeticsVars1.put(7247, 974);
  760. cosmeticsVars1.put(7249, 975);
  761. cosmeticsVars1.put(7250, 976);
  762. cosmeticsVars1.put(12326, 977);
  763. cosmeticsVars1.put(12328, 979);
  764. cosmeticsVars1.put(12329, 980);
  765. cosmeticsVars1.put(12327, 978);
  766. cosmeticsVars1.put(12330, 981);
  767. cosmeticsVars1.put(12331, 982);
  768. cosmeticsVars1.put(9921, 982);
  769. cosmeticsVars1.put(13674, 792);
  770. cosmeticsVars1.put(13675, 793);
  771. cosmeticsVars1.put(13676, 794);
  772. cosmeticsVars1.put(13677, 795);
  773. cosmeticsVars1.put(13678, 796);
  774. cosmeticsVars1.put(13679, 797);
  775. cosmeticsVars1.put(13680, 798);
  776. cosmeticsVars1.put(13681, 799);
  777. cosmeticsVars1.put(13682, 800);
  778. cosmeticsVars1.put(13683, 801);
  779. cosmeticsVars1.put(13684, 802);
  780. cosmeticsVars1.put(13685, 803);
  781. cosmeticsVars1.put(13686, 804);
  782. cosmeticsVars1.put(13687, 805);
  783. cosmeticsVars1.put(13688, 806);
  784. cosmeticsVars1.put(13689, 807);
  785. cosmeticsVars1.put(13690, 808);
  786. cosmeticsVars1.put(13691, 809);
  787. cosmeticsVars1.put(13692, 810);
  788. cosmeticsVars1.put(13693, 811);
  789. cosmeticsVars1.put(13694, 812);
  790. cosmeticsVars1.put(13695, null); // TODO manual
  791. cosmeticsVars1.put(13696, null); // TODO manual
  792. cosmeticsVars1.put(13836, 738);
  793. cosmeticsVars1.put(13837, 739);
  794. cosmeticsVars1.put(13838, 740);
  795. cosmeticsVars1.put(13839, 741);
  796. cosmeticsVars1.put(13840, 742);
  797. cosmeticsVars1.put(13841, 743);
  798. cosmeticsVars1.put(13842, 744);
  799. cosmeticsVars1.put(13843, 745);
  800. cosmeticsVars1.put(13844, 746);
  801. cosmeticsVars1.put(13845, 747);
  802. cosmeticsVars1.put(13846, 748);
  803. cosmeticsVars1.put(13847, 749);
  804. cosmeticsVars1.put(13848, 750);
  805. cosmeticsVars1.put(13849, 751);
  806. cosmeticsVars1.put(13850, 752);
  807. cosmeticsVars1.put(13851, 753);
  808. cosmeticsVars1.put(13852, 754);
  809. cosmeticsVars1.put(13853, 755);
  810. cosmeticsVars1.put(13854, 756);
  811. cosmeticsVars1.put(13855, 757);
  812. cosmeticsVars1.put(13856, 758);
  813. cosmeticsVars1.put(13857, 759);
  814. cosmeticsVars1.put(13858, 760);
  815. cosmeticsVars1.put(13859, 761);
  816. cosmeticsVars1.put(13860, 762);
  817. cosmeticsVars1.put(13861, 763);
  818. cosmeticsVars1.put(13863, 815);
  819. cosmeticsVars1.put(13864, 816);
  820. cosmeticsVars1.put(13865, 817);
  821. cosmeticsVars1.put(13866, 818);
  822. cosmeticsVars1.put(13867, 819);
  823. cosmeticsVars1.put(13868, 820);
  824. cosmeticsVars1.put(13869, 821);
  825. cosmeticsVars1.put(9904, 821);
  826. cosmeticsVars1.put(13870, 822);
  827. cosmeticsVars1.put(9905, 822);
  828. cosmeticsVars1.put(13871, 823);
  829. cosmeticsVars1.put(13872, 824);
  830. cosmeticsVars1.put(13873, 828);
  831. cosmeticsVars1.put(13874, 829);
  832. cosmeticsVars1.put(14490, 692);
  833. cosmeticsVars1.put(14491, 693);
  834. cosmeticsVars1.put(14492, 694);
  835. cosmeticsVars1.put(14493, 695);
  836. cosmeticsVars1.put(14494, 696);
  837. cosmeticsVars1.put(14495, 697);
  838. cosmeticsVars1.put(14496, 698);
  839. cosmeticsVars1.put(14497, 699);
  840. cosmeticsVars1.put(14498, 700);
  841. cosmeticsVars1.put(14499, 701);
  842. cosmeticsVars1.put(14500, 702);
  843. cosmeticsVars1.put(14501, 703);
  844. cosmeticsVars1.put(14502, 704);
  845. cosmeticsVars1.put(14503, 705);
  846. cosmeticsVars1.put(9917, 705);
  847. cosmeticsVars1.put(14505, 706);
  848. cosmeticsVars1.put(14504, 707);
  849. cosmeticsVars1.put(14507, 708);
  850. cosmeticsVars1.put(14506, 709);
  851. cosmeticsVars1.put(14518, null); // TODO manual
  852. cosmeticsVars1.put(14519, null); // TODO manual
  853. cosmeticsVars1.put(14520, null); // TODO manual
  854. cosmeticsVars1.put(19634, null); // TODO manual
  855. cosmeticsVars1.put(14521, null); // TODO manual
  856. cosmeticsVars1.put(19635, null); // TODO manual
  857. cosmeticsVars1.put(14522, null); // TODO manual
  858. cosmeticsVars1.put(14523, null); // TODO manual
  859. cosmeticsVars1.put(14524, null); // TODO manual
  860. cosmeticsVars1.put(14536, 222);
  861. cosmeticsVars1.put(14537, 222);
  862. cosmeticsVars1.put(14530, 710);
  863. cosmeticsVars1.put(14531, 712);
  864. cosmeticsVars1.put(14532, 714);
  865. cosmeticsVars1.put(14533, 716);
  866. cosmeticsVars1.put(14534, 718);
  867. cosmeticsVars1.put(14535, 720);
  868. cosmeticsVars1.put(9906, 774);
  869. cosmeticsVars1.put(9907, 774);
  870. cosmeticsVars1.put(9908, 775);
  871. cosmeticsVars1.put(9909, 776);
  872. cosmeticsVars1.put(9910, 776);
  873. cosmeticsVars1.put(9911, 777);
  874. cosmeticsVars1.put(9912, 777);
  875. cosmeticsVars1.put(9913, 778);
  876. cosmeticsVars1.put(9914, 778);
  877. cosmeticsVars1.put(9915, 779);
  878. cosmeticsVars1.put(9916, 779);
  879. cosmeticsVars1.put(975, 16812);
  880. cosmeticsVars1.put(3109, 16813);
  881. cosmeticsVars1.put(1534, 16813);
  882. cosmeticsVars1.put(3110, 16814);
  883. cosmeticsVars1.put(3119, 16815);
  884. cosmeticsVars1.put(3120, 16816);
  885. cosmeticsVars1.put(3121, 16817);
  886. cosmeticsVars1.put(3122, 16818);
  887. cosmeticsVars1.put(3123, 16819);
  888. cosmeticsVars1.put(3124, 16820);
  889. cosmeticsVars1.put(3128, 16822);
  890. cosmeticsVars1.put(3126, 16823);
  891. cosmeticsVars1.put(3125, 16823);
  892. cosmeticsVars1.put(3131, 16824);
  893. cosmeticsVars1.put(3132, 16825);
  894. cosmeticsVars1.put(3134, 16826);
  895. cosmeticsVars1.put(3138, 16827);
  896. cosmeticsVars1.put(5524, 16828);
  897. cosmeticsVars1.put(5544, 16829);
  898. cosmeticsVars1.put(5552, 16830);
  899. cosmeticsVars1.put(16548, 16938);
  900. cosmeticsVars1.put(16549, 16939);
  901. cosmeticsVars1.put(16550, 16940);
  902. cosmeticsVars1.put(16551, 16941);
  903. cosmeticsVars1.put(16552, 16942);
  904. cosmeticsVars1.put(16553, 16943);
  905. cosmeticsVars1.put(16554, 16944);
  906. cosmeticsVars1.put(16555, 16945);
  907. cosmeticsVars1.put(16556, 16946);
  908. cosmeticsVars1.put(16557, 16947);
  909. cosmeticsVars1.put(16558, 16948);
  910. cosmeticsVars1.put(16559, 16949);
  911. cosmeticsVars1.put(16560, 16950);
  912. cosmeticsVars1.put(16561, 16951);
  913. cosmeticsVars1.put(16562, 16952);
  914. cosmeticsVars1.put(16563, 16953);
  915. cosmeticsVars1.put(16564, 16954);
  916. cosmeticsVars1.put(16565, 16955);
  917. cosmeticsVars1.put(17330, 16890);
  918. cosmeticsVars1.put(17331, 16891);
  919. cosmeticsVars1.put(17332, 16892);
  920. cosmeticsVars1.put(17333, 16893);
  921. cosmeticsVars1.put(17334, 16894);
  922. cosmeticsVars1.put(18792, 16895);
  923. cosmeticsVars1.put(18793, 16896);
  924. cosmeticsVars1.put(18794, 16897);
  925. cosmeticsVars1.put(18795, 16898);
  926. cosmeticsVars1.put(18796, 16899);
  927. cosmeticsVars1.put(16584, null); // TODO manual
  928. cosmeticsVars1.put(16585, null); // TODO manual
  929. cosmeticsVars1.put(16586, null); // TODO manual
  930. cosmeticsVars1.put(16587, null); // TODO manual
  931. cosmeticsVars1.put(16588, null); // TODO manual
  932. cosmeticsVars1.put(16589, null); // TODO manual
  933. cosmeticsVars1.put(17294, 17507);
  934. cosmeticsVars1.put(17295, 17508);
  935. cosmeticsVars1.put(17296, 17509);
  936. cosmeticsVars1.put(17297, 17510);
  937. cosmeticsVars1.put(17298, 17511);
  938. cosmeticsVars1.put(17299, 17512);
  939. cosmeticsVars1.put(17306, 17519);
  940. cosmeticsVars1.put(17307, 17520);
  941. cosmeticsVars1.put(17308, 17521);
  942. cosmeticsVars1.put(17309, 17522);
  943. cosmeticsVars1.put(17310, 17523);
  944. cosmeticsVars1.put(17311, 17524);
  945. cosmeticsVars1.put(17300, 17513);
  946. cosmeticsVars1.put(17301, 17514);
  947. cosmeticsVars1.put(17302, 17515);
  948. cosmeticsVars1.put(17303, 17516);
  949. cosmeticsVars1.put(17304, 17517);
  950. cosmeticsVars1.put(17305, 17518);
  951. cosmeticsVars1.put(17312, 17525);
  952. cosmeticsVars1.put(17313, 17526);
  953. cosmeticsVars1.put(17314, 17527);
  954. cosmeticsVars1.put(17315, 17528);
  955. cosmeticsVars1.put(17316, 17529);
  956. cosmeticsVars1.put(17317, 17530);
  957. cosmeticsVars1.put(17318, 17531);
  958. cosmeticsVars1.put(17319, 17532);
  959. cosmeticsVars1.put(17320, 17533);
  960. cosmeticsVars1.put(17321, 17534);
  961. cosmeticsVars1.put(17322, 17535);
  962. cosmeticsVars1.put(17323, 17536);
  963. cosmeticsVars1.put(19019, 17628);
  964. cosmeticsVars1.put(19022, 17629);
  965. cosmeticsVars1.put(19025, 17630);
  966. cosmeticsVars1.put(17324, 17537);
  967. cosmeticsVars1.put(17325, 17537);
  968. cosmeticsVars1.put(17326, 17537);
  969. cosmeticsVars1.put(17327, 17537);
  970. cosmeticsVars1.put(17328, 17537);
  971. cosmeticsVars1.put(17329, 17537);
  972. cosmeticsVars1.put(19028, null); // TODO manual
  973. cosmeticsVars1.put(19029, null); // TODO manual
  974. cosmeticsVars1.put(19030, null); // TODO manual
  975. cosmeticsVars1.put(19031, null); // TODO manual
  976. cosmeticsVars1.put(19032, null); // TODO manual
  977. cosmeticsVars1.put(23223, null); // TODO manual
  978. cosmeticsVars1.put(383, 17617);
  979. cosmeticsVars1.put(19042, 17617);
  980. cosmeticsVars1.put(19043, 17617);
  981. cosmeticsVars1.put(19044, 17617);
  982. cosmeticsVars1.put(19046, 17617);
  983. cosmeticsVars1.put(19047, 17617);
  984. cosmeticsVars1.put(19045, 17617);
  985. cosmeticsVars1.put(19048, 17742);
  986. cosmeticsVars1.put(19049, 17742);
  987. cosmeticsVars1.put(19050, 17742);
  988. cosmeticsVars1.put(19051, 17742);
  989. cosmeticsVars1.put(19053, 17742);
  990. cosmeticsVars1.put(19054, 17742);
  991. cosmeticsVars1.put(19052, 17742);
  992. cosmeticsVars1.put(19121, 17805);
  993. cosmeticsVars1.put(19122, 17806);
  994. cosmeticsVars1.put(19123, 17807);
  995. cosmeticsVars1.put(19124, 17808);
  996. cosmeticsVars1.put(13697, 17873);
  997. cosmeticsVars1.put(14961, 17873);
  998. cosmeticsVars1.put(14962, 17873);
  999. cosmeticsVars1.put(14963, 17873);
  1000. cosmeticsVars1.put(14964, 17873);
  1001. cosmeticsVars1.put(19147, 17873);
  1002. cosmeticsVars1.put(19148, 17871);
  1003. cosmeticsVars1.put(19149, 17871);
  1004. cosmeticsVars1.put(19150, 17871);
  1005. cosmeticsVars1.put(19151, 17871);
  1006. cosmeticsVars1.put(19152, 17871);
  1007. cosmeticsVars1.put(19153, 17871);
  1008. cosmeticsVars1.put(19154, 17871);
  1009. cosmeticsVars1.put(19155, 17870);
  1010. cosmeticsVars1.put(19156, 17870);
  1011. cosmeticsVars1.put(19157, 17870);
  1012. cosmeticsVars1.put(19158, 17870);
  1013. cosmeticsVars1.put(19159, 17870);
  1014. cosmeticsVars1.put(19160, 17870);
  1015. cosmeticsVars1.put(19167, 17872);
  1016. cosmeticsVars1.put(19168, 17872);
  1017. cosmeticsVars1.put(19169, 17872);
  1018. cosmeticsVars1.put(19170, 17872);
  1019. cosmeticsVars1.put(19171, 17872);
  1020. cosmeticsVars1.put(19172, 17872);
  1021. cosmeticsVars1.put(19173, 17872);
  1022. cosmeticsVars1.put(19161, 17874);
  1023. cosmeticsVars1.put(19162, 17874);
  1024. cosmeticsVars1.put(19163, 17874);
  1025. cosmeticsVars1.put(19164, 17874);
  1026. cosmeticsVars1.put(19165, 17874);
  1027. cosmeticsVars1.put(19166, 17874);
  1028. cosmeticsVars1.put(19125, 17816);
  1029. cosmeticsVars1.put(19126, 17817);
  1030. cosmeticsVars1.put(19127, 17818);
  1031. cosmeticsVars1.put(19128, 17819);
  1032. cosmeticsVars1.put(19129, 17820);
  1033. cosmeticsVars1.put(19130, 17821);
  1034. cosmeticsVars1.put(19131, 17822);
  1035. cosmeticsVars1.put(19132, 17823);
  1036. cosmeticsVars1.put(19133, 17824);
  1037. cosmeticsVars1.put(19134, 17825);
  1038. cosmeticsVars1.put(19135, 17826);
  1039. cosmeticsVars1.put(19136, 17827);
  1040. cosmeticsVars1.put(19137, 17828);
  1041. cosmeticsVars1.put(19138, 17829);
  1042. cosmeticsVars1.put(9891, 17876);
  1043. cosmeticsVars1.put(14509, 17876);
  1044. cosmeticsVars1.put(14510, 17876);
  1045. cosmeticsVars1.put(14511, 17876);
  1046. cosmeticsVars1.put(19059, 17876);
  1047. cosmeticsVars1.put(19060, 17876);
  1048. cosmeticsVars1.put(19061, 17880);
  1049. cosmeticsVars1.put(19196, 18036);
  1050. cosmeticsVars1.put(19213, 18036);
  1051. cosmeticsVars1.put(19214, 18036);
  1052. cosmeticsVars1.put(19215, 18036);
  1053. cosmeticsVars1.put(19216, 18036);
  1054. cosmeticsVars1.put(19217, 18036);
  1055. cosmeticsVars1.put(19218, 18037);
  1056. cosmeticsVars1.put(19219, 18037);
  1057. cosmeticsVars1.put(19220, 18037);
  1058. cosmeticsVars1.put(19221, 18037);
  1059. cosmeticsVars1.put(19222, 18037);
  1060. cosmeticsVars1.put(19223, 18037);
  1061. cosmeticsVars1.put(19224, 18038);
  1062. cosmeticsVars1.put(19225, 18038);
  1063. cosmeticsVars1.put(19226, 18038);
  1064. cosmeticsVars1.put(19227, 18038);
  1065. cosmeticsVars1.put(19228, 18038);
  1066. cosmeticsVars1.put(19229, 18038);
  1067. cosmeticsVars1.put(19230, 18039);
  1068. cosmeticsVars1.put(19231, 18039);
  1069. cosmeticsVars1.put(19232, 18039);
  1070. cosmeticsVars1.put(19233, 18039);
  1071. cosmeticsVars1.put(19234, 18039);
  1072. cosmeticsVars1.put(19235, 18039);
  1073. cosmeticsVars1.put(19236, 18040);
  1074. cosmeticsVars1.put(19237, 18041);
  1075. cosmeticsVars1.put(19238, 18042);
  1076. cosmeticsVars1.put(19239, 18043);
  1077. cosmeticsVars1.put(6334, 18198);
  1078. cosmeticsVars1.put(19195, 18168);
  1079. cosmeticsVars1.put(19197, 18168);
  1080. cosmeticsVars1.put(19209, 18168);
  1081. cosmeticsVars1.put(19210, 18168);
  1082. cosmeticsVars1.put(19306, 18168);
  1083. cosmeticsVars1.put(19307, 18168);
  1084. cosmeticsVars1.put(19208, 18168);
  1085. cosmeticsVars1.put(19308, 18169);
  1086. cosmeticsVars1.put(19309, 18169);
  1087. cosmeticsVars1.put(19310, 18169);
  1088. cosmeticsVars1.put(19312, 18169);
  1089. cosmeticsVars1.put(19311, 18169);
  1090. cosmeticsVars1.put(19313, 18169);
  1091. cosmeticsVars1.put(19314, 18169);
  1092. cosmeticsVars1.put(19315, 18170);
  1093. cosmeticsVars1.put(19316, 18170);
  1094. cosmeticsVars1.put(19317, 18170);
  1095. cosmeticsVars1.put(19319, 18170);
  1096. cosmeticsVars1.put(19318, 18170);
  1097. cosmeticsVars1.put(19320, 18170);
  1098. cosmeticsVars1.put(19321, 18171);
  1099. cosmeticsVars1.put(19322, 18171);
  1100. cosmeticsVars1.put(19323, 18171);
  1101. cosmeticsVars1.put(19325, 18171);
  1102. cosmeticsVars1.put(19324, 18171);
  1103. cosmeticsVars1.put(19326, 18171);
  1104. cosmeticsVars1.put(19327, 18171);
  1105. cosmeticsVars1.put(19328, 18172);
  1106. cosmeticsVars1.put(19329, 18172);
  1107. cosmeticsVars1.put(19330, 18172);
  1108. cosmeticsVars1.put(19332, 18172);
  1109. cosmeticsVars1.put(19331, 18172);
  1110. cosmeticsVars1.put(19333, 18172);
  1111. cosmeticsVars1.put(19417, 18227);
  1112. cosmeticsVars1.put(19418, 18228);
  1113. cosmeticsVars1.put(19419, 18229);
  1114. cosmeticsVars1.put(19421, 18229);
  1115. cosmeticsVars1.put(19420, 18229);
  1116. cosmeticsVars1.put(19422, 18229);
  1117. cosmeticsVars1.put(19423, 18230);
  1118. cosmeticsVars1.put(19534, 18285);
  1119. cosmeticsVars1.put(19535, 18285);
  1120. cosmeticsVars1.put(19536, 18285);
  1121. cosmeticsVars1.put(19538, 18285);
  1122. cosmeticsVars1.put(19537, 18285);
  1123. cosmeticsVars1.put(19539, 18285);
  1124. cosmeticsVars1.put(19540, 18286);
  1125. cosmeticsVars1.put(19561, 18322);
  1126. cosmeticsVars1.put(19562, 18322);
  1127. cosmeticsVars1.put(19563, 18322);
  1128. cosmeticsVars1.put(19565, 18322);
  1129. cosmeticsVars1.put(19564, 18322);
  1130. cosmeticsVars1.put(19566, 18322);
  1131. cosmeticsVars1.put(19567, 18323);
  1132. cosmeticsVars1.put(19568, 18323);
  1133. cosmeticsVars1.put(19569, 18323);
  1134. cosmeticsVars1.put(19571, 18323);
  1135. cosmeticsVars1.put(19570, 18323);
  1136. cosmeticsVars1.put(19572, 18323);
  1137. cosmeticsVars1.put(19573, 18324);
  1138. cosmeticsVars1.put(19574, 18324);
  1139. cosmeticsVars1.put(19575, 18324);
  1140. cosmeticsVars1.put(19577, 18324);
  1141. cosmeticsVars1.put(19576, 18324);
  1142. cosmeticsVars1.put(19578, 18324);
  1143. cosmeticsVars1.put(19579, 18325);
  1144. cosmeticsVars1.put(19580, 18325);
  1145. cosmeticsVars1.put(19581, 18325);
  1146. cosmeticsVars1.put(19583, 18325);
  1147. cosmeticsVars1.put(19582, 18325);
  1148. cosmeticsVars1.put(19584, 18325);
  1149. cosmeticsVars1.put(19605, 18389);
  1150. cosmeticsVars1.put(19606, 18390);
  1151. cosmeticsVars1.put(19607, 18391);
  1152. cosmeticsVars1.put(19608, 18392);
  1153. cosmeticsVars1.put(19614, 18478);
  1154. cosmeticsVars1.put(19644, 18478);
  1155. cosmeticsVars1.put(19645, 18478);
  1156. cosmeticsVars1.put(19646, 18478);
  1157. cosmeticsVars1.put(19647, 18478);
  1158. cosmeticsVars1.put(19648, 18478);
  1159. cosmeticsVars1.put(19649, 18478);
  1160. cosmeticsVars1.put(19650, 18478);
  1161. cosmeticsVars1.put(19636, null); // TODO manual
  1162. cosmeticsVars1.put(19637, null); // TODO manual
  1163. cosmeticsVars1.put(19638, null); // TODO manual
  1164. cosmeticsVars1.put(19639, null); // TODO manual
  1165. cosmeticsVars1.put(19640, null); // TODO manual
  1166. cosmeticsVars1.put(19641, null); // TODO manual
  1167. cosmeticsVars1.put(19642, null); // TODO manual
  1168. cosmeticsVars1.put(19643, null); // TODO manual
  1169. cosmeticsVars1.put(18808, 18483);
  1170. cosmeticsVars1.put(19411, 18484);
  1171. cosmeticsVars1.put(19412, 18499);
  1172. cosmeticsVars1.put(19413, 18500);
  1173. cosmeticsVars1.put(19674, 18501);
  1174. cosmeticsVars1.put(19675, 18502);
  1175. cosmeticsVars1.put(19676, 18503);
  1176. cosmeticsVars1.put(19677, 18504);
  1177. cosmeticsVars1.put(19414, 18531);
  1178. cosmeticsVars1.put(19424, 18532);
  1179. cosmeticsVars1.put(21064, 18756);
  1180. cosmeticsVars1.put(21065, 18757);
  1181. cosmeticsVars1.put(28300, 22523);
  1182. cosmeticsVars1.put(21066, 18762);
  1183. cosmeticsVars1.put(28301, 22524);
  1184. cosmeticsVars1.put(21067, 18759);
  1185. cosmeticsVars1.put(21068, 18758);
  1186. cosmeticsVars1.put(21069, 18761);
  1187. cosmeticsVars1.put(21070, 18760);
  1188. cosmeticsVars1.put(20281, 18605);
  1189. cosmeticsVars1.put(22576, 20052);
  1190. cosmeticsVars1.put(22577, 20074);
  1191. cosmeticsVars1.put(22578, 20074);
  1192. cosmeticsVars1.put(22579, 20053);
  1193. cosmeticsVars1.put(22580, 20054);
  1194. cosmeticsVars1.put(22581, 20055);
  1195. cosmeticsVars1.put(22582, 20056);
  1196. cosmeticsVars1.put(22583, 20057);
  1197. cosmeticsVars1.put(22584, 20057);
  1198. cosmeticsVars1.put(22585, 20058);
  1199. cosmeticsVars1.put(22586, 20061);
  1200. cosmeticsVars1.put(22587, 20073);
  1201. cosmeticsVars1.put(22588, 20073);
  1202. cosmeticsVars1.put(22589, 20062);
  1203. cosmeticsVars1.put(22590, 20063);
  1204. cosmeticsVars1.put(22591, 20064);
  1205. cosmeticsVars1.put(22592, 20065);
  1206. cosmeticsVars1.put(22593, 20066);
  1207. cosmeticsVars1.put(22594, 20066);
  1208. cosmeticsVars1.put(22595, 20067);
  1209. cosmeticsVars1.put(22596, 20067);
  1210. cosmeticsVars1.put(22597, 20068);
  1211. cosmeticsVars1.put(22598, 20069);
  1212. cosmeticsVars1.put(22599, 20070);
  1213. cosmeticsVars1.put(20301, 1891);
  1214. cosmeticsVars1.put(21375, 1891);
  1215. cosmeticsVars1.put(21376, 1891);
  1216. cosmeticsVars1.put(21377, 1891);
  1217. cosmeticsVars1.put(21378, 1891);
  1218. cosmeticsVars1.put(21379, 1891);
  1219. cosmeticsVars1.put(21380, 1891);
  1220. cosmeticsVars1.put(21381, 5993);
  1221. cosmeticsVars1.put(21382, 5993);
  1222. cosmeticsVars1.put(21383, 5993);
  1223. cosmeticsVars1.put(21384, 5993);
  1224. cosmeticsVars1.put(21385, 5993);
  1225. cosmeticsVars1.put(21386, 5993);
  1226. cosmeticsVars1.put(21387, 5993);
  1227. cosmeticsVars1.put(21388, 19941);
  1228. cosmeticsVars1.put(21389, 19941);
  1229. cosmeticsVars1.put(21390, 19941);
  1230. cosmeticsVars1.put(21391, 19941);
  1231. cosmeticsVars1.put(21392, 19941);
  1232. cosmeticsVars1.put(21393, 19941);
  1233. cosmeticsVars1.put(21394, 19942);
  1234. cosmeticsVars1.put(21395, 19942);
  1235. cosmeticsVars1.put(21396, 19942);
  1236. cosmeticsVars1.put(21397, 19942);
  1237. cosmeticsVars1.put(21398, 19942);
  1238. cosmeticsVars1.put(21399, 19942);
  1239. cosmeticsVars1.put(21400, 19943);
  1240. cosmeticsVars1.put(21401, 19943);
  1241. cosmeticsVars1.put(21402, 19943);
  1242. cosmeticsVars1.put(21403, 19943);
  1243. cosmeticsVars1.put(21404, 19943);
  1244. cosmeticsVars1.put(21405, 19943);
  1245. cosmeticsVars1.put(21406, 19943);
  1246. cosmeticsVars1.put(21407, 19944);
  1247. cosmeticsVars1.put(21408, 19944);
  1248. cosmeticsVars1.put(21409, 19944);
  1249. cosmeticsVars1.put(21410, 19944);
  1250. cosmeticsVars1.put(21411, 19944);
  1251. cosmeticsVars1.put(21412, 19944);
  1252. cosmeticsVars1.put(21413, 19944);
  1253. cosmeticsVars1.put(21414, 19945);
  1254. cosmeticsVars1.put(21415, 19945);
  1255. cosmeticsVars1.put(21416, 19945);
  1256. cosmeticsVars1.put(21417, 19945);
  1257. cosmeticsVars1.put(21418, 19945);
  1258. cosmeticsVars1.put(21419, 19945);
  1259. cosmeticsVars1.put(21420, 19946);
  1260. cosmeticsVars1.put(21421, 19946);
  1261. cosmeticsVars1.put(21422, 19946);
  1262. cosmeticsVars1.put(21423, 19946);
  1263. cosmeticsVars1.put(21424, 19946);
  1264. cosmeticsVars1.put(21425, 19946);
  1265. cosmeticsVars1.put(20338, 18671);
  1266. cosmeticsVars1.put(20340, 18672);
  1267. cosmeticsVars1.put(20342, 18673);
  1268. cosmeticsVars1.put(20339, 18668);
  1269. cosmeticsVars1.put(20341, 18669);
  1270. cosmeticsVars1.put(20343, 18670);
  1271. cosmeticsVars1.put(21078, null); // TODO manual
  1272. cosmeticsVars1.put(21079, null); // TODO manual
  1273. cosmeticsVars1.put(21080, null); // TODO manual
  1274. cosmeticsVars1.put(21081, null); // TODO manual
  1275. cosmeticsVars1.put(21082, null); // TODO manual
  1276. cosmeticsVars1.put(21083, null); // TODO manual
  1277. cosmeticsVars1.put(21084, null); // TODO manual
  1278. cosmeticsVars1.put(21085, null); // TODO manual
  1279. cosmeticsVars1.put(21086, null); // TODO manual
  1280. cosmeticsVars1.put(21087, null); // TODO manual
  1281. cosmeticsVars1.put(21088, 18778);
  1282. cosmeticsVars1.put(21091, 18779);
  1283. cosmeticsVars1.put(22565, null); // TODO manual
  1284. cosmeticsVars1.put(22566, 20011);
  1285. cosmeticsVars1.put(22567, 20012);
  1286. cosmeticsVars1.put(22568, 20013);
  1287. cosmeticsVars1.put(22569, 20014);
  1288. cosmeticsVars1.put(22570, 20015);
  1289. cosmeticsVars1.put(22561, null); // TODO manual
  1290. cosmeticsVars1.put(22562, null); // TODO manual
  1291. cosmeticsVars1.put(22563, null); // TODO manual
  1292. cosmeticsVars1.put(22564, null); // TODO manual
  1293. cosmeticsVars1.put(23127, null); // TODO manual
  1294. cosmeticsVars1.put(23128, null); // TODO manual
  1295. cosmeticsVars1.put(23132, null); // TODO manual
  1296. cosmeticsVars1.put(23133, null); // TODO manual
  1297. cosmeticsVars1.put(23111, 20370);
  1298. cosmeticsVars1.put(23112, 20370);
  1299. cosmeticsVars1.put(23113, 20370);
  1300. cosmeticsVars1.put(23114, 20370);
  1301. cosmeticsVars1.put(23115, 20370);
  1302. cosmeticsVars1.put(23119, 20373);
  1303. cosmeticsVars1.put(23120, 20373);
  1304. cosmeticsVars1.put(23116, 20374);
  1305. cosmeticsVars1.put(23117, 20374);
  1306. cosmeticsVars1.put(23118, 20375);
  1307. cosmeticsVars1.put(23121, 20411);
  1308. cosmeticsVars1.put(23122, 20411);
  1309. cosmeticsVars1.put(23123, 20411);
  1310. cosmeticsVars1.put(23124, 20411);
  1311. cosmeticsVars1.put(23125, 20411);
  1312. cosmeticsVars1.put(22571, null); // TODO manual
  1313. cosmeticsVars1.put(23004, null); // TODO manual
  1314. cosmeticsVars1.put(23005, null); // TODO manual
  1315. cosmeticsVars1.put(23006, null); // TODO manual
  1316. cosmeticsVars1.put(23007, null); // TODO manual
  1317. cosmeticsVars1.put(23008, null); // TODO manual
  1318. cosmeticsVars1.put(23009, null); // TODO manual
  1319. cosmeticsVars1.put(23010, null); // TODO manual
  1320. cosmeticsVars1.put(23011, null); // TODO manual
  1321. cosmeticsVars1.put(23012, null); // TODO manual
  1322. cosmeticsVars1.put(23013, null); // TODO manual
  1323. cosmeticsVars1.put(23014, null); // TODO manual
  1324. cosmeticsVars1.put(23015, null); // TODO manual
  1325. cosmeticsVars1.put(23016, null); // TODO manual
  1326. cosmeticsVars1.put(23017, null); // TODO manual
  1327. cosmeticsVars1.put(23018, null); // TODO manual
  1328. cosmeticsVars1.put(23019, null); // TODO manual
  1329. cosmeticsVars1.put(23020, null); // TODO manual
  1330. cosmeticsVars1.put(23021, null); // TODO manual
  1331. cosmeticsVars1.put(23022, null); // TODO manual
  1332. cosmeticsVars1.put(23023, null); // TODO manual
  1333. cosmeticsVars1.put(23024, null); // TODO manual
  1334. cosmeticsVars1.put(23025, null); // TODO manual
  1335. cosmeticsVars1.put(23026, null); // TODO manual
  1336. cosmeticsVars1.put(23027, null); // TODO manual
  1337. cosmeticsVars1.put(23028, null); // TODO manual
  1338. cosmeticsVars1.put(23029, null); // TODO manual
  1339. cosmeticsVars1.put(23030, null); // TODO manual
  1340. cosmeticsVars1.put(23031, null); // TODO manual
  1341. cosmeticsVars1.put(23032, null); // TODO manual
  1342. cosmeticsVars1.put(23033, null); // TODO manual
  1343. cosmeticsVars1.put(23034, null); // TODO manual
  1344. cosmeticsVars1.put(23035, null); // TODO manual
  1345. cosmeticsVars1.put(23036, null); // TODO manual
  1346. cosmeticsVars1.put(23037, null); // TODO manual
  1347. cosmeticsVars1.put(23038, null); // TODO manual
  1348. cosmeticsVars1.put(23039, null); // TODO manual
  1349. cosmeticsVars1.put(23040, null); // TODO manual
  1350. cosmeticsVars1.put(23041, null); // TODO manual
  1351. cosmeticsVars1.put(23042, null); // TODO manual
  1352. cosmeticsVars1.put(23043, null); // TODO manual
  1353. cosmeticsVars1.put(23044, null); // TODO manual
  1354. cosmeticsVars1.put(23045, null); // TODO manual
  1355. cosmeticsVars1.put(23046, null); // TODO manual
  1356. cosmeticsVars1.put(23047, null); // TODO manual
  1357. cosmeticsVars1.put(23048, null); // TODO manual
  1358. cosmeticsVars1.put(23049, null); // TODO manual
  1359. cosmeticsVars1.put(23050, null); // TODO manual
  1360. cosmeticsVars1.put(23051, null); // TODO manual
  1361. cosmeticsVars1.put(23052, null); // TODO manual
  1362. cosmeticsVars1.put(23053, null); // TODO manual
  1363. cosmeticsVars1.put(23054, null); // TODO manual
  1364. cosmeticsVars1.put(23055, null); // TODO manual
  1365. cosmeticsVars1.put(23056, null); // TODO manual
  1366. cosmeticsVars1.put(23057, null); // TODO manual
  1367. cosmeticsVars1.put(23058, null); // TODO manual
  1368. cosmeticsVars1.put(23059, null); // TODO manual
  1369. cosmeticsVars1.put(23060, null); // TODO manual
  1370. cosmeticsVars1.put(23061, null); // TODO manual
  1371. cosmeticsVars1.put(23062, null); // TODO manual
  1372. cosmeticsVars1.put(23063, null); // TODO manual
  1373. cosmeticsVars1.put(23064, null); // TODO manual
  1374. cosmeticsVars1.put(23065, null); // TODO manual
  1375. cosmeticsVars1.put(23066, null); // TODO manual
  1376. cosmeticsVars1.put(23067, null); // TODO manual
  1377. cosmeticsVars1.put(23068, null); // TODO manual
  1378. cosmeticsVars1.put(23069, null); // TODO manual
  1379. cosmeticsVars1.put(23070, null); // TODO manual
  1380. cosmeticsVars1.put(23072, null); // TODO manual
  1381. cosmeticsVars1.put(23071, null); // TODO manual
  1382. cosmeticsVars1.put(23073, null); // TODO manual
  1383. cosmeticsVars1.put(23074, null); // TODO manual
  1384. cosmeticsVars1.put(23075, null); // TODO manual
  1385. cosmeticsVars1.put(23076, null); // TODO manual
  1386. cosmeticsVars1.put(23077, null); // TODO manual
  1387. cosmeticsVars1.put(23081, null); // TODO manual
  1388. cosmeticsVars1.put(23080, null); // TODO manual
  1389. cosmeticsVars1.put(23079, null); // TODO manual
  1390. cosmeticsVars1.put(23078, null); // TODO manual
  1391. cosmeticsVars1.put(11051, null); // TODO manual
  1392. cosmeticsVars1.put(11052, 20412);
  1393. cosmeticsVars1.put(11053, 20413);
  1394. cosmeticsVars1.put(11054, 20414);
  1395. cosmeticsVars1.put(11055, 20415);
  1396. cosmeticsVars1.put(11056, 20416);
  1397. cosmeticsVars1.put(23130, 20407);
  1398. cosmeticsVars1.put(21210, 20547);
  1399. cosmeticsVars1.put(21211, 20548);
  1400. cosmeticsVars1.put(21212, 20551);
  1401. cosmeticsVars1.put(23185, 20553);
  1402. cosmeticsVars1.put(11061, null); // TODO manual
  1403. cosmeticsVars1.put(11062, null); // TODO manual
  1404. cosmeticsVars1.put(20278, null); // TODO manual
  1405. cosmeticsVars1.put(23186, 20586);
  1406. cosmeticsVars1.put(23197, 20616);
  1407. cosmeticsVars1.put(23198, 20616);
  1408. cosmeticsVars1.put(23199, 20616);
  1409. cosmeticsVars1.put(23200, 20616);
  1410. cosmeticsVars1.put(23201, 20616);
  1411. cosmeticsVars1.put(23202, 20616);
  1412. cosmeticsVars1.put(23203, 20616);
  1413. cosmeticsVars1.put(23204, 20617);
  1414. cosmeticsVars1.put(23205, 20617);
  1415. cosmeticsVars1.put(23206, 20617);
  1416. cosmeticsVars1.put(23207, 20617);
  1417. cosmeticsVars1.put(23208, 20617);
  1418. cosmeticsVars1.put(23209, 20617);
  1419. cosmeticsVars1.put(23210, 20618);
  1420. cosmeticsVars1.put(23211, 20618);
  1421. cosmeticsVars1.put(23212, 20618);
  1422. cosmeticsVars1.put(23213, 20618);
  1423. cosmeticsVars1.put(23214, 20618);
  1424. cosmeticsVars1.put(23215, 20618);
  1425. cosmeticsVars1.put(23216, 20618);
  1426. cosmeticsVars1.put(23217, 20619);
  1427. cosmeticsVars1.put(23218, 20619);
  1428. cosmeticsVars1.put(23219, 20619);
  1429. cosmeticsVars1.put(23220, 20619);
  1430. cosmeticsVars1.put(23221, 20619);
  1431. cosmeticsVars1.put(23222, 20619);
  1432. cosmeticsVars1.put(6975, 21297);
  1433. cosmeticsVars1.put(25026, 21297);
  1434. cosmeticsVars1.put(25027, 21297);
  1435. cosmeticsVars1.put(25677, 21297);
  1436. cosmeticsVars1.put(25678, 21297);
  1437. cosmeticsVars1.put(25679, 21297);
  1438. cosmeticsVars1.put(25680, 21297);
  1439. cosmeticsVars1.put(25681, 21298);
  1440. cosmeticsVars1.put(25682, 21298);
  1441. cosmeticsVars1.put(25683, 21298);
  1442. cosmeticsVars1.put(25684, 21298);
  1443. cosmeticsVars1.put(25765, 21298);
  1444. cosmeticsVars1.put(25766, 21298);
  1445. cosmeticsVars1.put(25767, 21299);
  1446. cosmeticsVars1.put(25772, 21299);
  1447. cosmeticsVars1.put(25773, 21299);
  1448. cosmeticsVars1.put(25774, 21299);
  1449. cosmeticsVars1.put(25775, 21299);
  1450. cosmeticsVars1.put(25780, 21299);
  1451. cosmeticsVars1.put(25781, 21299);
  1452. cosmeticsVars1.put(25782, 21300);
  1453. cosmeticsVars1.put(25783, 21300);
  1454. cosmeticsVars1.put(25784, 21300);
  1455. cosmeticsVars1.put(25785, 21300);
  1456. cosmeticsVars1.put(25786, 21300);
  1457. cosmeticsVars1.put(25787, 21300);
  1458. cosmeticsVars1.put(25788, 21301);
  1459. cosmeticsVars1.put(25789, 21302);
  1460. cosmeticsVars1.put(11060, 20614);
  1461. cosmeticsVars1.put(23191, 20615);
  1462. cosmeticsVars1.put(24043, 20678);
  1463. cosmeticsVars1.put(24044, 20678);
  1464. cosmeticsVars1.put(24045, 20678);
  1465. cosmeticsVars1.put(24046, 20678);
  1466. cosmeticsVars1.put(24047, 20678);
  1467. cosmeticsVars1.put(24048, 20678);
  1468. cosmeticsVars1.put(24049, 20678);
  1469. cosmeticsVars1.put(24050, 20678);
  1470. cosmeticsVars1.put(24051, 20679);
  1471. cosmeticsVars1.put(24052, 20679);
  1472. cosmeticsVars1.put(24053, 20679);
  1473. cosmeticsVars1.put(24054, 20679);
  1474. cosmeticsVars1.put(24055, 20679);
  1475. cosmeticsVars1.put(24056, 20679);
  1476. cosmeticsVars1.put(24057, 20679);
  1477. cosmeticsVars1.put(24058, 20679);
  1478. cosmeticsVars1.put(24059, 20679);
  1479. cosmeticsVars1.put(24042, 20680);
  1480. cosmeticsVars1.put(24031, 20705);
  1481. cosmeticsVars1.put(24032, 20706);
  1482. cosmeticsVars1.put(24038, 20725);
  1483. cosmeticsVars1.put(24039, 20727);
  1484. cosmeticsVars1.put(24040, 20726);
  1485. cosmeticsVars1.put(24041, 14429);
  1486. cosmeticsVars1.put(24126, 20732);
  1487. cosmeticsVars1.put(24127, 20730);
  1488. cosmeticsVars1.put(24128, 20731);
  1489. cosmeticsVars1.put(24166, 20798);
  1490. cosmeticsVars1.put(24167, 20798);
  1491. cosmeticsVars1.put(24168, 20798);
  1492. cosmeticsVars1.put(24169, 20798);
  1493. cosmeticsVars1.put(24170, 20798);
  1494. cosmeticsVars1.put(24171, 20798);
  1495. cosmeticsVars1.put(24172, 20798);
  1496. cosmeticsVars1.put(24173, 20799);
  1497. cosmeticsVars1.put(24174, 20799);
  1498. cosmeticsVars1.put(24175, 20799);
  1499. cosmeticsVars1.put(24176, 20799);
  1500. cosmeticsVars1.put(24177, 20799);
  1501. cosmeticsVars1.put(24178, 20799);
  1502. cosmeticsVars1.put(24179, 20799);
  1503. cosmeticsVars1.put(24180, 20799);
  1504. cosmeticsVars1.put(24125, 20789);
  1505. cosmeticsVars1.put(24136, 20789);
  1506. cosmeticsVars1.put(24137, 20789);
  1507. cosmeticsVars1.put(24138, 20789);
  1508. cosmeticsVars1.put(24139, 20789);
  1509. cosmeticsVars1.put(24140, 20789);
  1510. cosmeticsVars1.put(24196, 20886);
  1511. cosmeticsVars1.put(24199, 20889);
  1512. cosmeticsVars1.put(21104, 20858);
  1513. cosmeticsVars1.put(21105, 20859);
  1514. cosmeticsVars1.put(21106, 20860);
  1515. cosmeticsVars1.put(21107, 20861);
  1516. cosmeticsVars1.put(14993, 21015);
  1517. cosmeticsVars1.put(21109, 21017);
  1518. cosmeticsVars1.put(24191, 21001);
  1519. cosmeticsVars1.put(24192, 21001);
  1520. cosmeticsVars1.put(24193, 21001);
  1521. cosmeticsVars1.put(24194, 21001);
  1522. cosmeticsVars1.put(24980, 21001);
  1523. cosmeticsVars1.put(24981, 21001);
  1524. cosmeticsVars1.put(24982, 21001);
  1525. cosmeticsVars1.put(24983, 21001);
  1526. cosmeticsVars1.put(24984, 21001);
  1527. cosmeticsVars1.put(24985, 21001);
  1528. cosmeticsVars1.put(24986, 21001);
  1529. cosmeticsVars1.put(24987, 21001);
  1530. cosmeticsVars1.put(24988, 21001);
  1531. cosmeticsVars1.put(24989, 21001);
  1532. cosmeticsVars1.put(24990, 21001);
  1533. cosmeticsVars1.put(24991, 21001);
  1534. cosmeticsVars1.put(24992, 21001);
  1535. cosmeticsVars1.put(24993, 21001);
  1536. cosmeticsVars1.put(24994, 21001);
  1537. cosmeticsVars1.put(24995, 21001);
  1538. cosmeticsVars1.put(24996, 21001);
  1539. cosmeticsVars1.put(24997, 21001);
  1540. cosmeticsVars1.put(24998, 21002);
  1541. cosmeticsVars1.put(24999, 21002);
  1542. cosmeticsVars1.put(25000, 21002);
  1543. cosmeticsVars1.put(26469, 21002);
  1544. cosmeticsVars1.put(25001, 21002);
  1545. cosmeticsVars1.put(26470, 21002);
  1546. cosmeticsVars1.put(25002, 21002);
  1547. cosmeticsVars1.put(25003, 21002);
  1548. cosmeticsVars1.put(25004, 21002);
  1549. cosmeticsVars1.put(25005, 21002);
  1550. cosmeticsVars1.put(25006, 21002);
  1551. cosmeticsVars1.put(25007, 21002);
  1552. cosmeticsVars1.put(26471, 21002);
  1553. cosmeticsVars1.put(25008, 21002);
  1554. cosmeticsVars1.put(25009, 21002);
  1555. cosmeticsVars1.put(25010, 21002);
  1556. cosmeticsVars1.put(25011, 21002);
  1557. cosmeticsVars1.put(26472, 21002);
  1558. cosmeticsVars1.put(7013, 21249);
  1559. cosmeticsVars1.put(14992, 21243);
  1560. cosmeticsVars1.put(25697, 21226);
  1561. cosmeticsVars1.put(25698, 21227);
  1562. cosmeticsVars1.put(25689, null); // TODO manual
  1563. cosmeticsVars1.put(25690, null); // TODO manual
  1564. cosmeticsVars1.put(25691, null); // TODO manual
  1565. cosmeticsVars1.put(25692, null); // TODO manual
  1566. cosmeticsVars1.put(25693, null); // TODO manual
  1567. cosmeticsVars1.put(25694, null); // TODO manual
  1568. cosmeticsVars1.put(25695, null); // TODO manual
  1569. cosmeticsVars1.put(25696, null); // TODO manual
  1570. cosmeticsVars1.put(25055, 21044);
  1571. cosmeticsVars1.put(25056, 21045);
  1572. cosmeticsVars1.put(25057, 21038);
  1573. cosmeticsVars1.put(25058, 21038);
  1574. cosmeticsVars1.put(25059, 21039);
  1575. cosmeticsVars1.put(25060, 21039);
  1576. cosmeticsVars1.put(25061, 21041);
  1577. cosmeticsVars1.put(25062, 21041);
  1578. cosmeticsVars1.put(25063, 21042);
  1579. cosmeticsVars1.put(25064, 21042);
  1580. cosmeticsVars1.put(25065, 21047);
  1581. cosmeticsVars1.put(25066, 21048);
  1582. cosmeticsVars1.put(25745, 21291);
  1583. cosmeticsVars1.put(25746, 21291);
  1584. cosmeticsVars1.put(25747, 21291);
  1585. cosmeticsVars1.put(25748, 21291);
  1586. cosmeticsVars1.put(25749, 21291);
  1587. cosmeticsVars1.put(25750, 21291);
  1588. cosmeticsVars1.put(25751, 21291);
  1589. cosmeticsVars1.put(25752, 21292);
  1590. cosmeticsVars1.put(25755, 21292);
  1591. cosmeticsVars1.put(25756, 21292);
  1592. cosmeticsVars1.put(25757, 21292);
  1593. cosmeticsVars1.put(25758, 21292);
  1594. cosmeticsVars1.put(25759, 21292);
  1595. cosmeticsVars1.put(25760, 21292);
  1596. cosmeticsVars1.put(25761, 21292);
  1597. cosmeticsVars1.put(26394, 21365);
  1598. cosmeticsVars1.put(26457, 21365);
  1599. cosmeticsVars1.put(26458, 21365);
  1600. cosmeticsVars1.put(26459, 21365);
  1601. cosmeticsVars1.put(26460, 21366);
  1602. cosmeticsVars1.put(26461, 21366);
  1603. cosmeticsVars1.put(26462, 21366);
  1604. cosmeticsVars1.put(26463, 21366);
  1605. cosmeticsVars1.put(26464, 21362);
  1606. cosmeticsVars1.put(26465, 21362);
  1607. cosmeticsVars1.put(26466, 21362);
  1608. cosmeticsVars1.put(26467, 21362);
  1609. cosmeticsVars1.put(26468, 21363);
  1610. cosmeticsVars1.put(26399, 21354);
  1611. cosmeticsVars1.put(26400, 21354);
  1612. cosmeticsVars1.put(26401, 21354);
  1613. cosmeticsVars1.put(26402, 21354);
  1614. cosmeticsVars1.put(26404, 21354);
  1615. cosmeticsVars1.put(26403, 21354);
  1616. cosmeticsVars1.put(26405, 21354);
  1617. cosmeticsVars1.put(26406, 21354);
  1618. cosmeticsVars1.put(26407, 21355);
  1619. cosmeticsVars1.put(26408, 21355);
  1620. cosmeticsVars1.put(26409, 21355);
  1621. cosmeticsVars1.put(26410, 21355);
  1622. cosmeticsVars1.put(26412, 21355);
  1623. cosmeticsVars1.put(26411, 21355);
  1624. cosmeticsVars1.put(26413, 21355);
  1625. cosmeticsVars1.put(26414, 21355);
  1626. cosmeticsVars1.put(25794, null); // TODO manual
  1627. cosmeticsVars1.put(26415, null); // TODO manual
  1628. cosmeticsVars1.put(26416, null); // TODO manual
  1629. cosmeticsVars1.put(26570, 21466);
  1630. cosmeticsVars1.put(26784, 21891);
  1631. cosmeticsVars1.put(26564, null); // TODO manual
  1632. cosmeticsVars1.put(26565, null); // TODO manual
  1633. cosmeticsVars1.put(26566, 21444);
  1634. cosmeticsVars1.put(26567, 21446);
  1635. cosmeticsVars1.put(26568, 21448);
  1636. cosmeticsVars1.put(26569, 21450);
  1637. cosmeticsVars1.put(26528, null); // TODO manual
  1638. cosmeticsVars1.put(26529, null); // TODO manual
  1639. cosmeticsVars1.put(26832, 21900);
  1640. cosmeticsVars1.put(26833, 21901);
  1641. cosmeticsVars1.put(26834, 21902);
  1642. cosmeticsVars1.put(26835, 21903);
  1643. cosmeticsVars1.put(26741, null); // TODO manual
  1644. cosmeticsVars1.put(26742, null); // TODO manual
  1645. cosmeticsVars1.put(26743, null); // TODO manual
  1646. cosmeticsVars1.put(26744, null); // TODO manual
  1647. cosmeticsVars1.put(26745, null); // TODO manual
  1648. cosmeticsVars1.put(26746, null); // TODO manual
  1649. cosmeticsVars1.put(26747, null); // TODO manual
  1650. cosmeticsVars1.put(26748, null); // TODO manual
  1651. cosmeticsVars1.put(26749, null); // TODO manual
  1652. cosmeticsVars1.put(26750, null); // TODO manual
  1653. cosmeticsVars1.put(26751, null); // TODO manual
  1654. cosmeticsVars1.put(26752, null); // TODO manual
  1655. cosmeticsVars1.put(26753, null); // TODO manual
  1656. cosmeticsVars1.put(26754, null); // TODO manual
  1657. cosmeticsVars1.put(26755, null); // TODO manual
  1658. cosmeticsVars1.put(26756, null); // TODO manual
  1659. cosmeticsVars1.put(26757, null); // TODO manual
  1660. cosmeticsVars1.put(26758, null); // TODO manual
  1661. cosmeticsVars1.put(26759, null); // TODO manual
  1662. cosmeticsVars1.put(26760, null); // TODO manual
  1663. cosmeticsVars1.put(26761, null); // TODO manual
  1664. cosmeticsVars1.put(26762, null); // TODO manual
  1665. cosmeticsVars1.put(26763, null); // TODO manual
  1666. cosmeticsVars1.put(26764, null); // TODO manual
  1667. cosmeticsVars1.put(26765, null); // TODO manual
  1668. cosmeticsVars1.put(26766, null); // TODO manual
  1669. cosmeticsVars1.put(26767, null); // TODO manual
  1670. cosmeticsVars1.put(26768, null); // TODO manual
  1671. cosmeticsVars1.put(26769, null); // TODO manual
  1672. cosmeticsVars1.put(26770, null); // TODO manual
  1673. cosmeticsVars1.put(26771, null); // TODO manual
  1674. cosmeticsVars1.put(26772, null); // TODO manual
  1675. cosmeticsVars1.put(26773, null); // TODO manual
  1676. cosmeticsVars1.put(26774, null); // TODO manual
  1677. cosmeticsVars1.put(26775, null); // TODO manual
  1678. cosmeticsVars1.put(26776, null); // TODO manual
  1679. cosmeticsVars1.put(26777, null); // TODO manual
  1680. cosmeticsVars1.put(26778, null); // TODO manual
  1681. cosmeticsVars1.put(26779, null); // TODO manual
  1682. cosmeticsVars1.put(26780, null); // TODO manual
  1683. cosmeticsVars1.put(26781, null); // TODO manual
  1684. cosmeticsVars1.put(26782, null); // TODO manual
  1685. cosmeticsVars1.put(26783, null); // TODO manual
  1686. cosmeticsVars1.put(26788, 21904);
  1687. cosmeticsVars1.put(26789, 21906);
  1688. cosmeticsVars1.put(26790, 21908);
  1689. cosmeticsVars1.put(26791, 21910);
  1690. cosmeticsVars1.put(26787, 22032);
  1691. cosmeticsVars1.put(26739, 21987);
  1692. cosmeticsVars1.put(26740, 21988);
  1693. cosmeticsVars1.put(26887, null); // TODO manual
  1694. cosmeticsVars1.put(26888, null); // TODO manual
  1695. cosmeticsVars1.put(26889, 21958);
  1696. cosmeticsVars1.put(26891, 21958);
  1697. cosmeticsVars1.put(26792, 21913);
  1698. cosmeticsVars1.put(26793, 21913);
  1699. cosmeticsVars1.put(26794, 21913);
  1700. cosmeticsVars1.put(26795, 21913);
  1701. cosmeticsVars1.put(26796, 21913);
  1702. cosmeticsVars1.put(26797, 21913);
  1703. cosmeticsVars1.put(26798, 21913);
  1704. cosmeticsVars1.put(26799, 21913);
  1705. cosmeticsVars1.put(26800, 21913);
  1706. cosmeticsVars1.put(26801, 21914);
  1707. cosmeticsVars1.put(26802, 21914);
  1708. cosmeticsVars1.put(26803, 21914);
  1709. cosmeticsVars1.put(26804, 21914);
  1710. cosmeticsVars1.put(26805, 21914);
  1711. cosmeticsVars1.put(26806, 21914);
  1712. cosmeticsVars1.put(26807, 21914);
  1713. cosmeticsVars1.put(26808, 21914);
  1714. cosmeticsVars1.put(26809, 21914);
  1715. cosmeticsVars1.put(26810, 21914);
  1716. cosmeticsVars1.put(26811, 21914);
  1717. cosmeticsVars1.put(26812, 21914);
  1718. cosmeticsVars1.put(26813, 21914);
  1719. cosmeticsVars1.put(26814, 21916);
  1720. cosmeticsVars1.put(26816, 21916);
  1721. cosmeticsVars1.put(26815, 21916);
  1722. cosmeticsVars1.put(26817, 21916);
  1723. cosmeticsVars1.put(26818, 21916);
  1724. cosmeticsVars1.put(26819, 21916);
  1725. cosmeticsVars1.put(26820, 21916);
  1726. cosmeticsVars1.put(26821, 21916);
  1727. cosmeticsVars1.put(26822, 21916);
  1728. cosmeticsVars1.put(26825, 21915);
  1729. cosmeticsVars1.put(26824, 21915);
  1730. cosmeticsVars1.put(26823, 21915);
  1731. cosmeticsVars1.put(26826, 21915);
  1732. cosmeticsVars1.put(26827, 21915);
  1733. cosmeticsVars1.put(26828, 21915);
  1734. cosmeticsVars1.put(26829, 21915);
  1735. cosmeticsVars1.put(26830, 21915);
  1736. cosmeticsVars1.put(26831, 21915);
  1737. cosmeticsVars1.put(28218, 22375);
  1738. cosmeticsVars1.put(28219, 22375);
  1739. cosmeticsVars1.put(28220, 22375);
  1740. cosmeticsVars1.put(28221, 22375);
  1741. cosmeticsVars1.put(28222, 22375);
  1742. cosmeticsVars1.put(28223, 22375);
  1743. cosmeticsVars1.put(28224, 22375);
  1744. cosmeticsVars1.put(28225, 22375);
  1745. cosmeticsVars1.put(28226, 22375);
  1746. cosmeticsVars1.put(28227, 22375);
  1747. cosmeticsVars1.put(28228, 22375);
  1748. cosmeticsVars1.put(28229, 22375);
  1749. cosmeticsVars1.put(28230, 22375);
  1750. cosmeticsVars1.put(28231, 22375);
  1751. cosmeticsVars1.put(28232, 22375);
  1752. cosmeticsVars1.put(28233, 22375);
  1753. cosmeticsVars1.put(28234, 22375);
  1754. cosmeticsVars1.put(28235, 22375);
  1755. cosmeticsVars1.put(28236, 22375);
  1756. cosmeticsVars1.put(28237, 22375);
  1757. cosmeticsVars1.put(28238, 22378);
  1758. cosmeticsVars1.put(28239, 22378);
  1759. cosmeticsVars1.put(28240, 22378);
  1760. cosmeticsVars1.put(28241, 22378);
  1761. cosmeticsVars1.put(28242, 22376);
  1762. cosmeticsVars1.put(28243, 22376);
  1763. cosmeticsVars1.put(28244, 22376);
  1764. cosmeticsVars1.put(28245, 22376);
  1765. cosmeticsVars1.put(28246, 22377);
  1766. cosmeticsVars1.put(28247, 22377);
  1767. cosmeticsVars1.put(28248, 22377);
  1768. cosmeticsVars1.put(28249, 22377);
  1769. cosmeticsVars1.put(27904, 22280);
  1770. cosmeticsVars1.put(27905, 22281);
  1771. cosmeticsVars1.put(27906, 22282);
  1772. cosmeticsVars1.put(28250, 22367);
  1773. cosmeticsVars1.put(28253, 22370);
  1774. cosmeticsVars1.put(28217, 22379);
  1775. cosmeticsVars1.put(28261, 22441);
  1776. cosmeticsVars1.put(28262, 22442);
  1777. cosmeticsVars1.put(28263, 22443);
  1778. cosmeticsVars1.put(28264, 22444);
  1779. cosmeticsVars1.put(28265, 22445);
  1780. cosmeticsVars1.put(28267, 22449);
  1781. cosmeticsVars1.put(28266, 22448);
  1782. cosmeticsVars1.put(28268, 22446);
  1783. cosmeticsVars1.put(28374, 22633);
  1784. cosmeticsVars1.put(28375, 22634);
  1785. cosmeticsVars1.put(28376, 22635);
  1786. cosmeticsVars1.put(28377, 22636);
  1787. cosmeticsVars1.put(28378, 22636);
  1788. cosmeticsVars1.put(28379, 22637);
  1789. cosmeticsVars1.put(28380, 22637);
  1790. cosmeticsVars1.put(28381, 22638);
  1791. cosmeticsVars1.put(28384, 18920);
  1792. cosmeticsVars1.put(28385, 18921);
  1793. cosmeticsVars1.put(28408, 22640);
  1794. cosmeticsVars1.put(28409, 22641);
  1795. cosmeticsVars1.put(28410, 22642);
  1796. cosmeticsVars1.put(1763, null); // TODO manual
  1797. cosmeticsVars1.put(28318, 22544);
  1798. cosmeticsVars1.put(28320, 22546);
  1799. cosmeticsVars1.put(28322, 22548);
  1800. cosmeticsVars1.put(28386, null); // TODO manual
  1801. cosmeticsVars1.put(28387, null); // TODO manual
  1802. cosmeticsVars1.put(28388, null); // TODO manual
  1803. cosmeticsVars1.put(28389, null); // TODO manual
  1804. cosmeticsVars1.put(28390, null); // TODO manual
  1805. cosmeticsVars1.put(28382, null); // TODO manual
  1806. cosmeticsVars1.put(28383, null); // TODO manual
  1807. cosmeticsVars1.put(28391, null); // TODO manual
  1808. cosmeticsVars1.put(28392, 22646);
  1809. cosmeticsVars1.put(28393, 22646);
  1810. cosmeticsVars1.put(28394, 22646);
  1811. cosmeticsVars1.put(28395, 22646);
  1812. cosmeticsVars1.put(28396, 22646);
  1813. cosmeticsVars1.put(28397, 22646);
  1814. cosmeticsVars1.put(28398, 22646);
  1815. cosmeticsVars1.put(28399, 22646);
  1816. cosmeticsVars1.put(28400, 22647);
  1817. cosmeticsVars1.put(28401, 22647);
  1818. cosmeticsVars1.put(28402, 22647);
  1819. cosmeticsVars1.put(28403, 22647);
  1820. cosmeticsVars1.put(28404, 22647);
  1821. cosmeticsVars1.put(28405, 22647);
  1822. cosmeticsVars1.put(28406, 22647);
  1823. cosmeticsVars1.put(28407, 22647);
  1824. cosmeticsVars1.put(28211, 21633);
  1825. cosmeticsVars1.put(28212, 21635);
  1826. cosmeticsVars1.put(28213, 21637);
  1827. cosmeticsVars1.put(28210, 22776);
  1828. }
  1829.  
  1830. public static int KEEP_SAKE_KEY = 25430;
  1831.  
  1832. public boolean keepSakeItem(Item itemUsed, Item itemUsedWith) {
  1833. if (itemUsed.getId() != KEEP_SAKE_KEY && itemUsedWith.getId() != KEEP_SAKE_KEY)
  1834. return false;
  1835. if (itemUsed.getId() == KEEP_SAKE_KEY && itemUsedWith.getId() == KEEP_SAKE_KEY)
  1836. return false;
  1837. Item keepSakeKey = itemUsed.getId() == KEEP_SAKE_KEY ? itemUsed : itemUsedWith;
  1838. Item keepSakeItem = itemUsed.getId() == KEEP_SAKE_KEY ? itemUsedWith : itemUsed;
  1839. if (keepSakeItem == null || keepSakeKey == null)
  1840. return false;
  1841. if (keepSakeItems.size() >= 20) {
  1842. player.getPackets().sendGameMessage("You can only keep sake 20 items.");
  1843. return true;
  1844. }
  1845. int equipSlot = keepSakeItem.getDefinitions().getEquipSlot();
  1846. if (equipSlot == Equipment.SLOT_ARROWS || equipSlot == Equipment.SLOT_AURA
  1847. || equipSlot == Equipment.SLOT_RING) {
  1848. player.getPackets().sendGameMessage(
  1849. "You can only keep sake items that goes into head, cape, neck, body, legs, gloves, main hand, off-hand, or boots slots.");
  1850. return false;
  1851. }
  1852. if (equipSlot == -1) {
  1853. player.getPackets().sendGameMessage("You can't keep sake this item as its not wearable.");
  1854. return true;
  1855. }
  1856. if (!ButtonHandler.canKeepSakeItem(player, keepSakeItem)) {
  1857. player.getPackets().sendGameMessage("You don't have enough requirments to keep sake this item.");
  1858. return true;
  1859. }
  1860. if (keepSakeItem.getDefinitions().isBindItem() || keepSakeItem.getDefinitions().isLended()
  1861. || keepSakeItem.getDefinitions().isStackable())
  1862. return true;
  1863. String name = keepSakeItem.getName().toLowerCase();
  1864. if (name.contains("broken")) {
  1865. player.getPackets().sendGameMessage("You can't keep sake broken items.");
  1866. return true;
  1867. }
  1868. for (Item item : keepSakeItems) {
  1869. if (item == null)
  1870. continue;
  1871. if (item.getId() == keepSakeItem.getId()) {
  1872. player.getPackets().sendGameMessage("You already have that item in your keepsake box.");
  1873. return true;
  1874. }
  1875. }
  1876. player.stopAll();
  1877. player.getDialogueManager().startDialogue(new Dialogue() {
  1878.  
  1879. @Override
  1880. public void start() {
  1881. sendOptionsDialogue("DO YOU WANT TO KEEP SAKE THIS ITEM?",
  1882. "Yes, keepsake this item.(You won't be able to retrieve key)", "Quit.");
  1883. }
  1884.  
  1885. @Override
  1886. public void run(int interfaceId, int componentId) {
  1887. if (componentId == OPTION_1) {
  1888. int index = getNextIndex();
  1889. if (index == -1)
  1890. keepSakeItems.add(keepSakeItem);
  1891. else
  1892. keepSakeItems.set(index, keepSakeItem);
  1893. player.getPackets().sendItems(675, keepSakeItems.toArray(new Item[keepSakeItems.size()]));
  1894. player.getPackets()
  1895. .sendGameMessage("You have added " + keepSakeItem.getName() + " to your keepsake box.");
  1896. player.getInventory().deleteItem(KEEP_SAKE_KEY, 1);
  1897. player.getInventory().deleteItem(keepSakeItem);
  1898. }
  1899. end();
  1900. }
  1901.  
  1902. @Override
  1903. public void finish() {
  1904.  
  1905. }
  1906.  
  1907. });
  1908. return true;
  1909. }
  1910.  
  1911. public int getNextIndex() {
  1912. for (int i = 0; i < keepSakeItems.size(); i++) {
  1913. Item keepSaked = keepSakeItems.get(i);
  1914. if (keepSaked == null)
  1915. return i;
  1916. }
  1917. return -1;
  1918. }
  1919.  
  1920. public void sendReclaimItem(int index) {
  1921. player.getTemporaryAttributtes().put("KeepSakeIndex", index);
  1922. player.getPackets().sendHideIComponent(1311, 316, false);
  1923. player.getPackets().sendHideIComponent(1311, 317, false);
  1924. player.getPackets().sendHideIComponent(1311, 321, true);// ok
  1925. player.getPackets().sendHideIComponent(1311, 322, false);// confirm
  1926. player.getPackets().sendHideIComponent(1311, 323, false);// back
  1927. player.getPackets().sendIComponentText(1311, 320,
  1928. "Are you sure you want to reclaim this item? It will be placed in your inventory or bank.<br><br><br>You will not be able to reclaim your Dragon keepsake Key.");
  1929. }
  1930.  
  1931. public void closeReclaimItem() {
  1932. player.getTemporaryAttributtes().remove("KeepSakeIndex");
  1933. player.getPackets().sendHideIComponent(1311, 316, true);
  1934. player.getPackets().sendHideIComponent(1311, 317, true);
  1935. player.getPackets().sendHideIComponent(1311, 321, true);// ok
  1936. player.getPackets().sendHideIComponent(1311, 322, true);// confirm
  1937. player.getPackets().sendHideIComponent(1311, 323, true);// back
  1938. }
  1939.  
  1940. public ArrayList<Item> getKeepSakeItems() {
  1941. return keepSakeItems;
  1942. }
  1943.  
  1944. public int getKeepSakeItemsCount() {
  1945. int count = 0;
  1946. for (int i = 0; i < keepSakeItems.size(); i++) {
  1947. Item keepSaked = keepSakeItems.get(i);
  1948. if (keepSaked == null)
  1949. continue;
  1950. count++;
  1951. }
  1952. return count;
  1953. }
  1954. }
Advertisement
Add Comment
Please, Sign In to add comment