armark1ng

Untitled

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