Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.zarketh.model;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.IOException;
- import com.zarketh.Constants;
- import com.zarketh.InstanceDistributor;
- import com.zarketh.model.entity.player.PlayerConstants;
- /**
- * A collection of item methods.
- *
- * @author Daiki
- * @author Graham
- * @author Lukas
- */
- public class Item {
- private int id;
- private int amount;
- // Few item types for equipping
- public static int capes[] = { 15352, 20771, 5607, 9948, 9949, 10499, 10498,
- 9747, 9748, 9750, 9751, 9753, 9754, 9756, 9757, 9759, 9760, 9762,
- 9763, 9765, 9766, 9768, 9769, 9771, 9772, 9774, 9775, 9777, 9778,
- 9780, 9781, 9783, 9784, 9786, 9787, 9789, 9790, 9792, 9793, 9795,
- 9796, 9798, 9799, 9801, 9802, 9804, 9805, 9807, 9808, 9810, 9811,
- 9813, 9747, 9750, 9753, 9756, 9759, 9762, 9765, 9768, 9771, 9774,
- 9777, 9780, 9783, 9786, 9789, 9792, 9795, 9798, 9801, 9804, 9807,
- 9810, 9948, 12169, 18509, 9747, 3781, 3783, 3785, 3787, 3789, 3777,
- 3779, 10448, 3759, 3761, 3763, 3765, 6111, 6570, 6568, 1007, 1019,
- 1021, 1023, 19311, 1027, 1029, 1031, 1052, 2412, 2413, 2414, 4304,
- 4315, 4317, 4319, 9948, 9949, 10450, 4321, 4323, 4325, 4327, 4329,
- 4331, 4333, 4335, 4337, 4339, 4341, 10446, 4343, 4345, 4347, 4349,
- 7918, 4351, 4353, 4355, 4357, 4359, 4361, 4363, 19709, 4365, 4367,
- 4369, 4371, 4373, 4375, 4377, 4379, 4381, 4383, 4385, 9748, 9751,
- 9754, 9757, 9760, 9763, 9766, 9769, 9772, 9775, 9778, 9781, 9784,
- 9787, 9790, 9793, 9796, 9799, 9802, 9805, 9808, 9811, 9949, 12170,
- 4387, 4389, 4391, 4393, 4395, 4397, 4399, 4401, 4403, 4405, 4407,
- 12169, 12170, 4409, 4411, 4413, 4514, 4516, 6070, 6568, 6570,
- 15432, 15433, 18508, 19111, 4041, 4042, 15345, 15347, 15349, 19748,
- 15449, 15454, 15459, 15464, 14641, 15434, 15432, 14642, 14645,
- 15433, 15435, 15474 };
- public static int boots[] = { 11728, 11732, 7596, 6619, 7159, 7991, 6666,
- 6061, 6106, 88, 89, 626, 628, 630, 632, 634, 1061, 1837, 1846,
- 10958, 2577, 2579, 2894, 9921, 21787, 21790, 21793, 2904, 2914,
- 2924, 2934, 3061, 3105, 3107, 3791, 4097, 4107, 4117, 11016, 13675,
- 4119, 15043, 4121, 4123, 4125, 4127, 4129, 4131, 4310, 5064, 5345,
- 5557, 21787, 21793, 21791, 10724, 7114, 14605, 6069, 6106, 6143,
- 6145, 6147, 10839, 6328, 6920, 6349, 6357, 3393, 16272, 16359, 5796, 16931, 16269,
- 16353, 16012, 16115, 17215, 17317 };
- public static int gloves[] = { 10336, 8842, 7595, 6629, 2491, 1065, 2487,
- 15044, 2489, 3060, 1495, 775, 777, 778, 6708, 1059, 1063, 1065,
- 1580, 2487, 2489, 9922, 10368, 10376, 2491, 2902, 2912, 2922, 2932,
- 2942, 3060, 3799, 4095, 4105, 4115, 18347, 4308, 5556, 6068, 6110,
- 6149, 6151, 6153, 6922, 7454, 7455, 7456, 10725, 14602, 11133,
- 7457, 7458, 7459, 7460, 7461, 7462, 6330, 3391, 11118, 11126, 11133,
- 15946, 16239, 16195, 17171, 15943, 16287 };
- public static int shields[] = { 12929, 5609, 10352, 8850, 8849, 8848, 8847,
- 8846, 8845, 8844, 11284, 7342, 7348, 7354, 7360, 7334, 7340, 7347,
- 7352, 7358, 7356, 7350, 7344, 7332, 7338, 7336, 7360, 1171, 1173,
- 2890, 9731, 18691, 1175, 1177, 1179, 1181, 1183, 1185, 1187, 1189,
- 1191, 1193, 1195, 7053, 19712, 1197, 1199, 1201, 1540, 2589, 2597,
- 2603, 2611, 2621, 2629, 2659, 19340, 2667, 2675, 2890, 3122, 3488,
- 3758, 3839, 3840, 3841, 3842, 3843, 3844, 4072, 4156, 4224, 4225,
- 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4302, 4507,
- 4512, 6215, 6217, 6219, 6221, 6223, 18747, 6225, 6227, 6229, 6231,
- 6233, 6235, 6237, 6239, 6241, 6243, 6245, 6247, 6249, 6251, 6253,
- 6255, 6257, 6259, 6261, 6263, 6265, 6267, 6269, 6271, 6273, 6275,
- 6277, 6279, 6524, 6889, 20072, 19617, 13740, 14579, 13738, 13742,
- 13744, 11283, 13734, 13736, 18359, 18361, 18363, 17273, 15815, 17361, 15818,
- 17355 };
- public static int hats[] = { 11789, 10507, 9672, 12866, 20772, 770, 4041,
- 4042, 10836, 10547, 10548, 10549, 10550, 10334, 10342, 10350, 1038,
- 11665, 11664, 11663, 9814, 9749, 9752, 9755, 9758, 9761, 9764,
- 9767, 9770, 9773, 9776, 9779, 9782, 9785, 9788, 9791, 9794, 9797,
- 9800, 9803, 9806, 9809, 9812, 11718, 10828, 4502, 7319, 7321, 7323,
- 7325, 18746, 19314, 7327, 1167, 8074, 4168, 1169, 6665, 6665, 7321,
- 6886, 6547, 6548, 12171, 2645, 2647, 2649, 4856, 4857, 4858, 4859,
- 4880, 4881, 20949, 20950, 20951, 20952, 4882, 4883, 10456, 4904,
- 4905, 4906, 4907, 4928, 4929, 4930, 4931, 15039, 4952, 4953, 4954,
- 9920, 9950, 4955, 4976, 4977, 4978, 4979, 4732, 4753, 4611, 6188,
- 6182, 4511, 10452, 4056, 4071, 4724, 2639, 2641, 2643, 2665, 6109,
- 5525, 5527, 5529, 13950, 5531, 5533, 5535, 5537, 8963, 5539, 5541,
- 5543, 5545, 5547, 5549, 5551, 10382, 10454, 74, 579, 656, 658, 660,
- 662, 664, 740, 1017, 1040, 1042, 13864, 13876, 1044, 1046, 1048,
- 1050, 1053, 1055, 1057, 1137, 1139, 1141, 1143, 9925, 1145, 1147,
- 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1163, 1165, 13672, 10374,
- 1506, 1949, 2422, 2581, 2587, 2595, 2605, 2613, 2619, 2627, 2631,
- 15602, 15608, 15614, 15620, 2633, 2635, 2637, 2651, 2657, 2673,
- 2900, 2910, 2920, 2930, 2940, 10390, 2978, 2979, 2980, 15509,
- 21262, 21258, 21260, 21264, 2981, 2982, 2983, 2984, 2985, 2986,
- 2987, 2988, 6656, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 3057,
- 3385, 3486, 3748, 3749, 3751, 3753, 3797, 4071, 4089, 3755, 4099,
- 4109, 4164, 4302, 4506, 4511, 4513, 4515, 4551, 4567, 4708, 4716,
- 4724, 4745, 4753, 1037, 4856, 4857, 4858, 4859, 4880, 4881, 4882,
- 4883, 4904, 4905, 4906, 4907, 4952, 4953, 4954, 4955, 4976, 4977,
- 4978, 4979, 5013, 5014, 7124, 7130, 7136, 5554, 5574, 6109, 6128,
- 6131, 6137, 6182, 6188, 6335, 12595, 12207, 6337, 6339, 2151, 6345,
- 6355, 6365, 6375, 6382, 6392, 6400, 6918, 6656, 2581, 7539, 15492,
- 8921, 15488, 15490, 7394, 7396, 7534, 5574, 6885, 6858, 6860, 6862,
- 6856, 6326, 6128, 14494, 6137, 7400, 7323, 7325, 7327, 7003, 13101,
- 13263, 20135, 20147, 16701, 20159, 13896, 18510, 16691, 14499,
- 10045, 16697, 13920, 13922, 13950, 12936, 12943, 12950, 12957,
- 13938, 16693, 13952, 13940, 16695 };
- public static int amulets[] = { 10344, 11128, 1654, 1656, 1658, 1660, 1662,
- 1664, 8081, 10474, 8033, 7968, 6585, 86, 87, 295, 421, 552, 589,
- 15511, 1478, 1692, 1694, 10472, 10470, 1696, 1698, 1700, 1702,
- 1704, 1706, 1708, 1710, 1712, 1725, 1727, 9470, 1729, 1731, 4021,
- 4081, 4250, 4677, 6040, 6041, 6208, 1718, 1722, 6857, 6859, 6861,
- 6863, 6859, 6863, 6857, 18335, 18333, 18334, 15126, 19335 };
- public static int arrows[] = { 8052, 8065, 7919, 7906, 78, 598, 877, 878,
- 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891,
- 892, 893, 942, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539,
- 10384, 2540, 2541, 2866, 4160, 4172, 4173, 4174, 4175, 4740, 5616,
- 5617, 9142, 5618, 5619, 5620, 5621, 5622, 5623, 5624, 5625, 5626,
- 5627, 6061, 606, 9241, 9242, 9243, 9244, 9245, 11212, 15243, 9140,
- 9141, 9142, 9143, 9144, 9240, 15954, 15965, 15976, 15987, 16462, 16517,
- 16572, 16627, 15957, 15979, 15990, 16477, 16532, 16587, 16642 };
- public static int rings[] = { 773, 1635, 1637, 1639, 1641, 1643, 1645,
- 2550, 2552, 2554, 2556, 2558, 2560, 2562, 2564, 2566, 2568, 2570,
- 2572, 4202, 4657, 6465, 6737, 6731, 6735, 6735, 6583, 6733, 19669,
- 15220, 15017, 15019, 15020, 15018 };
- public static int body[] = { 9674, 14600, 12873, 13870, 19787, 767, 581,
- 10330, 10338, 10348, 8839, 10551, 11724, 11720, 7362, 7364, 636,
- 638, 640, 642, 644, 426, 1005, 1757, 7592, 6617, 7376, 544, 7372,
- 7370, 577, 3793, 3775, 10378, 3773, 3771, 3769, 3767, 6139, 1135,
- 2499, 2501, 10564, 1035, 540, 5553, 9924, 14936, 10386, 4757, 1833,
- 6388, 6384, 4111, 4101, 4091, 6186, 6184, 6180, 3058, 10458, 10460,
- 10462, 4509, 15040, 4504, 4069, 4728, 4736, 4712, 6107, 2661, 3140,
- 1101, 1103, 6654, 10837, 13858, 15606, 15612, 15618, 15600, 1105,
- 1107, 1109, 1111, 1113, 1115, 1117, 1119, 1121, 1123, 1125, 11017,
- 13673, 13870, 19785, 1127, 1129, 1131, 1133, 2583, 2591, 2599,
- 2607, 2615, 2623, 2653, 7110, 7122, 7128, 7134, 2669, 3481, 4712,
- 4720, 4728, 4749, 4892, 4893, 4894, 4895, 4916, 10727, 13944, 4917,
- 4918, 4919, 4964, 2896, 2906, 2916, 2926, 2936, 4965, 4966, 4967,
- 6107, 6133, 6322, 6322, 10400, 10404, 10408, 15503, 10412, 10416,
- 10420, 10424, 10428, 10432, 10436, 6129, 75, 6916, 6916, 4111,
- 6654, 6654, 75, 7399, 7390, 7374, 5575, 14479, 14492, 19317, 10370,
- 2503, 6341, 6351, 3387, 5030, 5032, 5034, 5030, 5032, 5034, 7392,
- 546, 13887, 20139, 20163, 20151, 13944, 13908, 13944, 17241, 13932,
- 13911, 13910, 14497, 8956, 13946, 17249, 10043, 13934, 10954,
- 13913, 17243, 17239, 13884, 16023, 16090, 16733, 17259, 15847, 17237,
- 16020, 16087, 16727, 17253, 16078, 17193 };
- public static int legs[] = { 9676, 12880, 19786, 769, 10332, 10340, 10346,
- 15041, 15042, 8840, 11722, 11726, 7378, 7380, 7382, 7368, 7366,
- 14501, 7388, 646, 648, 650, 652, 654, 428, 1097, 1095, 7593, 6625,
- 8020, 8015, 7384, 6141, 10464, 10466, 10468, 1835, 538, 1033, 5555,
- 4759, 6386, 6390, 2497, 2495, 2493, 1099, 4113, 4103, 4093, 6924,
- 6187, 6185, 6181, 9678, 2898, 2908, 2918, 2928, 2938, 3059, 4510,
- 4505, 4070, 14938, 13873, 13947, 6108, 538, 542, 548, 1011, 1013,
- 1015, 1067, 1069, 1071, 1073, 6655, 13674, 9923, 19320, 10380,
- 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, 2585,
- 7116, 7126, 7132, 7138, 10388, 2593, 2601, 2609, 2617, 2625, 2655,
- 2663, 2671, 3059, 3389, 3472, 15604, 15610, 15616, 15622, 15505,
- 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3483, 3485, 3795,
- 10402, 10406, 10410, 10414, 10418, 10422, 10426, 10430, 10434,
- 10956, 10438, 4087, 4585, 4712, 4714, 4722, 4730, 4738, 4751, 4759,
- 4874, 4875, 11018, 13861, 4876, 4877, 4898, 4899, 4900, 4901, 4922,
- 4923, 4924, 4925, 4946, 10726, 10372, 4947, 4948, 4949, 4970, 4971,
- 4972, 4973, 4994, 4995, 4996, 4997, 14603, 5048, 5050, 5052, 5576,
- 6107, 6130, 6187, 6390, 6386, 6390, 6396, 6404, 6135, 6809, 6916,
- 4091, 10838, 4111, 6655, 6654, 7398, 7398, 7386, 19339, 6324, 6343,
- 6353, 3387, 5036, 5038, 5040, 13893, 20143, 20167, 16671, 16679,
- 16669, 20155, 16673, 13917, 13919, 13914, 13916, 13914, 13947,
- 13935, 13917, 13916, 13949, 13937, 13919, 14490, 13890, 15935,
- 16206,1667, 16689, 15807, 16865, 15932, 16203, 16661, 16683, 17339 };
- public static int platebody[] = { 9924, 9674, 12873, 8956, 19787, 767, 581,
- 10330, 17239, 17241, 10338, 10348, 8839, 10551, 11724, 11720, 636,
- 638, 640, 642, 644, 426, 8031, 8027, 6617, 544, 577, 3793, 3773,
- 3775, 3771, 3769, 3767, 6139, 1035, 540, 5553, 4757, 1833, 1835,
- 6388, 6384, 4111, 4101, 4868, 4869, 10370, 4870, 4871, 4892, 4893,
- 4894, 4895, 4916, 4917, 4918, 4919, 4940, 19317, 4941, 4942, 4943,
- 4964, 4965, 4966, 4967, 4988, 4989, 4990, 14936, 10378, 10386,
- 15040, 0x2f9a0eb, 6186, 6184, 14600, 6180, 3058, 4509, 4504, 4069,
- 4728, 4736, 10400, 19785, 4712, 6107, 2661, 3140, 1115, 1117, 1119,
- 1121, 1123, 1125, 1127, 2583, 2591, 2599, 2607, 2615, 6322, 2623,
- 2653, 2669, 3481, 4720, 14479, 19337, 4728, 4749, 2661, 6129, 6916,
- 4091, 6654, 6133, 75, 7399, 7390, 5575, 6341, 6351, 3387, 5030,
- 5032, 5034, 10837, 7392, 13887, 20139, 20163, 20151, 14497, 13858,
- 13944, 13870, 13908, 13944, 13932, 13911, 13910, 13946, 13934,
- 13913, 14479, 10564, 14492, 17243, 17249, 13884, 20147 };
- public static int fullHelm[] = { 9672, 10507, 12866, 10547, 10548, 10549,
- 10550, 10334, 10342, 10350, 9814, 9749, 9752, 9755, 9758, 9761,
- 9764, 3748, 9767, 9770, 9773, 9776, 9779, 9782, 9785, 9788, 9791,
- 9794, 9797, 9800, 9803, 9806, 9809, 9812, 11718, 10828, 1147, 3748,
- 6137, 6128, 3753, 3755, 3749, 3751, 1149, 3751, 7594, 4708, 4716,
- 4745, 4732, 5554, 1673, 4753, 4732, 4753, 6188, 4511, 4056, 4071,
- 4724, 6109, 2665, 1153, 11335, 19336, 13263, 1155, 1157, 1159,
- 1161, 1163, 1165, 2587, 2595, 2605, 2613, 2619, 2627, 2657, 2673,
- 3486, 6402, 6394, 6131, 74, 7539, 7539, 7534, 14494, 5574, 6326,
- 13263, 20135, 13896, 13920, 13922, 13938, 16695, 16693, 16691,
- 16701, 16697, 16705, 16707, 16703, 13864, 18510, 15924, 16711,
- 15902, 16755, 15921, 16705, 16056, 17061, 16067 };
- public static int fullMask[] = { 11789, 770, 4502, 6623, 7990, 7594, 1153,
- 1155, 1157, 10728, 7112, 9925, 1159, 1161, 1163, 1165, 4732, 5554,
- 4753, 4611, 6188, 3507, 4511, 11015, 15492, 1506, 3057, 4056, 4071,
- 4724, 2665, 1053, 1055, 1057, 20159, 13950, 13876, 13952, 13940,
- 4041, 4042, 20147 };
- public static boolean[] itemStackable = new boolean[PlayerConstants.MAX_ITEMS];
- public static boolean[] itemIsNote = new boolean[PlayerConstants.MAX_ITEMS];
- static {
- int counter = 0;
- int c;
- try {
- final FileInputStream dataIn = new FileInputStream(new File(
- Constants.DATA_DIRECTORY + "item/stackable.dat"));
- while ((c = dataIn.read()) != -1) {
- if (c == 0)
- itemStackable[counter] = false;
- else
- itemStackable[counter] = true;
- counter++;
- }
- dataIn.close();
- for (int i = 6568; i < 6800; i++)
- itemStackable[i] = false;
- final int[] stackID = { 15389, 6569, 6572, 6574, 6576, 6578, 6580,
- 6582, 6584, 6586, 6588, 6590, 6592, 6594, 6596, 6598, 6600,
- 6602, 6604, 6606, 6608, 6610, 6612, 6614, 6616, 6618, 6620,
- 6622, 6624, 6626, 6628, 6630, 6632, 6634, 6676, 6684, 6686,
- 6688, 6690, 6692, 6694, 6698, 6700, 6702, 6704, 6706, 6725,
- 6732, 6734, 6736, 6738, 6740, 6742, 6744, 6761, 6763, 6765,
- 6795, 6815, 6890, 6892, 6909, 6911, 6913, 6915, 6917, 6919,
- 6921, 6923, 6925, 6960, 6972, 6974, 6976, 6978, 6980, 6982,
- 6984, 7052, 7055, 7057, 7059, 7061, 7063, 7065, 7067, 7069,
- 7071, 7073, 7075, 7077, 7079, 7081, 7083, 7085, 7087, 7089,
- 7091, 7093, 7095, 7113, 7115, 7117, 7123, 7125, 7127, 7129,
- 7131, 7133, 7135, 7137, 7139, 7161, 7163, 7165, 7167, 7169,
- 7171, 7173, 7175, 7177, 7179, 7181, 7183, 7185, 7187, 7189,
- 7191, 7193, 7195, 7197, 7199, 7201, 7203, 7205, 7207, 7209,
- 7211, 7213, 7215, 7217, 7219, 7221, 7223, 7227, 7229, 7320,
- 7322, 15262, 7324, 7326, 7328, 7333, 7335, 7337, 7339,
- 7341, 7343, 7345, 7347, 617, 7349, 7351, 7353, 7355, 7357,
- 7359, 7361, 7363, 7365, 7367, 12530, 7369, 7371, 7373,
- 7375, 7377, 7379, 7381, 7383, 7385, 7387, 12158, 12159,
- 12160, 12161, 12539, 7389, 7391, 7393, 7395, 7397, 7414,
- 7417, 7419, 7434, 7436, 6319, 9976, 9977, 7438, 7440, 7442,
- 7444, 7446, 7448, 7450, 7452, 7467, 7469, 12155, 12183,
- 14485, 12048, 12044, 12060, 12020, 12010, 12779, 12095,
- 12056, 12809, 12068, 12064, 12092, 12801, 12054, 12066,
- 12022, 12819, 12815, 12783, 12799, 12074, 12088, 12072,
- 12052, 12096, 12098, 12100, 12102, 12104, 12106, 12108,
- 12076, 12817, 12042, 12062, 12008, 12036, 12028, 12532,
- 12078, 12811, 12813, 12785, 12024, 12086, 12038, 12016,
- 12046, 12124, 12080, 12032, 12030, 12034, 12821, 12058,
- 14624, 12793, 14624, 12012, 12070, 12082, 12163, 12014,
- 12803, 12805, 12807, 12026, 12018, 12789, 12777, 12084,
- 12040, 12787, 12090, 12797, 12823, 12094, 12791, 7522,
- 7548, 7549, 7550, 7551, 7552, 7553, 7554, 7555, 7556,
- 12425, 12445, 12428, 12459, 12533, 12838, 12460, 12432,
- 12839, 12430, 12446, 12440, 12834, 12447, 12433, 12429,
- 12443, 12443, 12443, 12443, 12461, 12431, 12422, 12448,
- 12458, 12458, 12458, 12458, 12458, 12458, 12458, 12462,
- 12829, 12426, 12444, 12441, 12454, 12453, 12424, 12463,
- 12835, 12836, 12840, 12455, 12468, 12427, 12436, 12467,
- 12452, 12464, 12439, 12438, 12423, 12830, 12451, 14622,
- 12826, 12449, 12450, 12841, 12465, 12831, 12457, 12854,
- 12854, 12442, 12456, 12837, 12832, 12466, 12434, 12833,
- 12827, 12828, 12435, 12825, 12437, 7557, 7558, 7559, 7560,
- 7561, 7562, 7563, 7937, 13879, 13880, 13881, 13882, 13883,
- 15243, 12434, 12438, 12825, 12158, 12159, 12160, 15242,
- 15273, 18831 };
- for (int i = 0; i < stackID.length; i++) {
- itemStackable[stackID[i]] = true;
- counter++;
- }
- // System.out.println("Loaded " + counter + " stackable data.");
- } catch (final IOException e) {
- System.out
- .println("Critical error while loading stackabledata! Trace:");
- e.printStackTrace();
- }
- counter = 0;
- try {
- final FileInputStream dataIn = new FileInputStream(
- Constants.DATA_DIRECTORY + "item/notes.dat");
- while ((c = dataIn.read()) != -1) {
- if (c == 0)
- itemIsNote[counter] = true;
- else
- itemIsNote[counter] = false;
- counter++;
- }
- dataIn.close();
- final int[] noteID = { 6569, 6572, 6574, 6576, 6578, 6580, 6582,
- 6584, 6586, 6588, 6590, 6592, 6594, 6596, 6598, 6600, 6602,
- 6604, 6606, 6608, 6610, 6612, 6614, 6616, 6618, 6620, 6622,
- 6624, 6626, 6628, 6630, 6632, 6634, 6676, 6684, 6686, 6688,
- 6690, 6692, 6694, 6698, 6700, 6702, 6704, 6706, 6725, 6732,
- 6734, 6736, 6738, 6740, 6742, 6744, 6761, 6763, 6765, 6795,
- 6815, 6890, 6892, 6909, 6911, 6913, 6915, 6917, 6919, 6921,
- 6923, 6925, 6960, 6972, 6974, 6976, 6978, 6980, 6982, 6984,
- 7052, 7055, 7057, 7059, 7061, 7063, 7065, 7067, 7069, 7071,
- 7073, 7075, 7077, 7079, 7081, 7083, 7085, 7087, 7089, 7091,
- 7093, 7095, 7113, 7115, 7117, 7123, 7125, 7127, 7129, 7131,
- 7133, 7135, 7137, 7139, 7161, 7163, 7165, 7167, 7169, 7171,
- 7173, 7175, 7177, 7179, 7181, 7183, 7185, 7187, 7189, 7191,
- 7193, 7195, 7197, 7199, 7201, 7203, 7205, 7207, 7209, 7211,
- 7213, 7215, 7217, 7219, 7221, 7223, 7227, 7229, 7320, 7322,
- 7324, 7326, 7328, 7333, 7335, 7337, 7339, 7341, 7343, 7345,
- 7347, 7349, 7351, 7353, 7355, 7357, 7359, 7361, 7363, 7365,
- 7367, 21627, 21625, 21629, 21631, 21633, 21635, 21637,
- 7369, 7371, 7373, 7375, 7377, 7379, 7381, 7383, 7385, 7387,
- 7407, 7389, 7391, 7393, 7395, 7397, 7414, 7417, 7419, 7434,
- 7436, 15273, 7438, 7440, 7442, 7444, 7446, 7448, 7450,
- 7452, 7467, 7469, 12048, 14485, 12044, 12060, 12020, 12010,
- 12779, 12095, 12056, 12809, 12068, 12092, 12801, 12054,
- 12066, 12022, 12819, 12815, 12783, 12799, 12074, 12088,
- 12072, 12052, 12096, 12098, 12100, 12102, 12104, 12106,
- 12108, 12076, 12817, 12042, 12062, 12008, 12036, 12028,
- 12532, 12078, 12811, 12813, 12785, 12024, 12086, 12038,
- 12016, 12046, 12124, 12080, 12032, 12030, 12034, 12821,
- 12058, 14624, 12793, 14624, 12012, 12070, 12082, 12014,
- 12803, 12805, 12807, 12026, 12018, 12789, 12777, 12084,
- 12040, 12787, 12090, 12797, 12823, 12094, 12791, 7522,
- 7549, 7551, 7553, 7555, 7557, 7559, 7561, 7563, 7567,
- 20265, 20267, 20269, 18831, 7569, 7571, 7937, 12048, 12044,
- 12020, 12010, 12779, 12095, 12056, 12809, 12068, 12092,
- 12801, 12054, 12066, 12022, 12819, 12815, 12783, 12799,
- 12074, 12088, 12072, 12052, 12096, 12098, 12100, 12102,
- 12104, 12106, 12108, 12076, 12817, 12042, 12062, 12008,
- 12036, 12028, 12532, 12078, 12811, 12813, 12785, 12024,
- 12086, 12038, 12016, 12046, 12124, 12080, 12032, 12030,
- 12034, 12821, 12058, 14624, 12793, 14624, 12012, 12070,
- 12082, 12014, 12803, 12805, 12807, 12026, 12018, 12789,
- 12777, 12084, 12040, 12787, 12090, 12797, 12823, 12094,
- 15273, 15242, 18831, 13361 };
- for (int i = 0; i < noteID.length; i++) {
- itemIsNote[noteID[i]] = true;
- counter++;
- }
- // System.out.println("Loaded " + counter + " note data.");
- } catch (final IOException e) {
- System.out.println("Critical error while loading notedata! Trace:");
- e.printStackTrace();
- }
- }
- public static Item create(int id) {
- return new Item(id);
- }
- public static Item create(int id, int amount) {
- return new Item(id, amount);
- }
- public static boolean isFullHelm(int itemID) {
- for (final int element : fullHelm)
- if (element == itemID)
- return true;
- return false;
- }
- public static boolean isFullMask(int itemID) {
- for (final int element : fullMask)
- if (element == itemID)
- return true;
- return false;
- }
- public static boolean isPlate(int itemID) {
- for (final int element : platebody)
- if (element == itemID)
- return true;
- return false;
- }
- public static int randomAmulet() {
- return amulets[(int) (Math.random() * amulets.length)];
- }
- public static int randomArrows() {
- return arrows[(int) (Math.random() * arrows.length)];
- }
- public static int randomBody() {
- return body[(int) (Math.random() * body.length)];
- }
- public static int randomBoots() {
- return boots[(int) (Math.random() * boots.length)];
- }
- public static int randomCape() {
- return capes[(int) (Math.random() * capes.length)];
- }
- public static int randomGloves() {
- return gloves[(int) (Math.random() * gloves.length)];
- }
- public static int randomHat() {
- return hats[(int) (Math.random() * hats.length)];
- }
- public static int randomLegs() {
- return legs[(int) (Math.random() * legs.length)];
- }
- public static int randomRing() {
- return rings[(int) (Math.random() * rings.length)];
- }
- public static int randomShield() {
- return shields[(int) (Math.random() * shields.length)];
- }
- public Item(int id) {
- this(id, 1);
- }
- public Item(int id, int amount) {
- this.id = id;
- this.amount = amount;
- }
- public int getCount() {
- return amount;
- }
- public ItemDefinition getDefinition() {
- return InstanceDistributor.getItemManager().getItemDefinition(id);
- }
- public int getId() { // no :D
- return id;
- }
- public void setAmount(int amount) {
- this.amount = amount;
- }
- public void setId(int id) {
- this.id = id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement