warc222

Race Starting Items ( iSparky ) L2jFrozen

Oct 4th, 2015
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.40 KB | None | 0 0
  1. Index: config/frozen/frozen.properties
  2. ===================================================================
  3. --- config/frozen/frozen.properties (revision 1118)
  4. +++ config/frozen/frozen.properties (working copy)
  5. @@ -22,4 +22,87 @@
  6.  
  7. # New players get fireworks the first time they log in
  8. # Default: False
  9. -NewPlayerEffect = False
  10. \ No newline at end of file
  11. +NewPlayerEffect = False
  12. +
  13. +# New players Starting Items ( Human )
  14. +# Default: False
  15. +EnableHumanReward = False
  16. +# Human Fighter
  17. +HumanFighterHelmID =
  18. +HumanFighterChestID =
  19. +HumanFighterLegsID =
  20. +HumanFighterBootsID =
  21. +HumanFighterGlovesID =
  22. +HumanFighterWeaponID =
  23. +# Human Mage
  24. +HumanMageHelmID =
  25. +HumanMageChestID =
  26. +HumanMageLegsID =
  27. +HumanMageBootsID =
  28. +HumanMageGlovesID =
  29. +HumanMageWeaponID =
  30. +
  31. +# New players Starting Items ( Elf )
  32. +# Default: False
  33. +EnableElfReward = False
  34. +# Elf Fighter
  35. +ElfFighterHelmID =
  36. +ElfFighterChestID =
  37. +ElfFighterLegsID =
  38. +ElfFighterBootsID =
  39. +ElfFighterGlovesID =
  40. +ElfFighterWeaponID =
  41. +# Elf Mage
  42. +ElfMageHelmID =
  43. +ElfMageChestID =
  44. +ElfMageLegsID =
  45. +ElfMageBootsID =
  46. +ElfMageGlovesID =
  47. +ElfMageWeaponID =
  48. +
  49. +# New players Starting Items ( DarkElf )
  50. +# Default: False
  51. +EnableDEReward = False
  52. +# DarkElf Fighter
  53. +DEFighterHelmID =
  54. +DEFighterChestID =
  55. +DEFighterLegsID =
  56. +DEFighterBootsID =
  57. +DEFighterGlovesID =
  58. +DEFighterWeaponID =
  59. +# DarkElf Mage
  60. +DEMageHelmID =
  61. +DEMageChestID =
  62. +DEMageLegsID =
  63. +DEMageBootsID =
  64. +DEMageGlovesID =
  65. +DEMageWeaponID =
  66. +
  67. +# New players Starting Items ( Orc )
  68. +# Default: False
  69. +EnableOrcReward = False
  70. +# Orc Fighter
  71. +OrcFighterHelmID =
  72. +OrcFighterChestID =
  73. +OrcFighterLegsID =
  74. +OrcFighterBootsID =
  75. +OrcFighterGlovesID =
  76. +OrcFighterWeaponID =
  77. +# Orc Mage
  78. +OrcMageHelmID =
  79. +OrcMageChestID =
  80. +OrcMageLegsID =
  81. +OrcMageBootsID =
  82. +OrcMageGlovesID =
  83. +OrcMageWeaponID =
  84. +
  85. +# New players Starting Items ( Dwarf )
  86. +# Default: False
  87. +EnableDwarfReward = False
  88. +# Dwarf Fighter
  89. +DwarfFighterHelmID =
  90. +DwarfFighterChestID =
  91. +DwarfFighterLegsID =
  92. +DwarfFighterBootsID =
  93. +DwarfFighterGlovesID =
  94. +DwarfFighterWeaponID =
  95. \ No newline at end of file
  96. Index: head-src/com/l2jfrozen/Config.java
  97. ===================================================================
  98. --- head-src/com/l2jfrozen/Config.java (revision 1118)
  99. +++ head-src/com/l2jfrozen/Config.java (working copy)
  100. @@ -2169,7 +2169,67 @@
  101. public static String PM_TEXT1;
  102. public static String PM_TEXT2;
  103. public static boolean NEW_PLAYER_EFFECT;
  104. -
  105. + /** Configuration to allow custom armor to new characters By iSparky */
  106. + public static boolean ENABLE_HUMAN_REWARD;
  107. + public static boolean ENABLE_ELF_REWARD;
  108. + public static boolean ENABLE_DE_REWARD;
  109. + public static boolean ENABLE_ORC_REWARD;
  110. + public static boolean ENABLE_DWARF_REWARD;
  111. + public static int HUMAN_M_HELM_ID;
  112. + public static int HUMAN_M_CHEST_ID;
  113. + public static int HUMAN_M_LEGS_ID;
  114. + public static int HUMAN_M_BOOTS_ID;
  115. + public static int HUMAN_M_GLOVES_ID;
  116. + public static int HUMAN_M_WEAPON_ID;
  117. + public static int HUMAN_F_HELM_ID;
  118. + public static int HUMAN_F_CHEST_ID;
  119. + public static int HUMAN_F_LEGS_ID;
  120. + public static int HUMAN_F_BOOTS_ID;
  121. + public static int HUMAN_F_GLOVES_ID;
  122. + public static int HUMAN_F_WEAPON_ID;
  123. + public static int ELF_M_HELM_ID;
  124. + public static int ELF_M_CHEST_ID;
  125. + public static int ELF_M_LEGS_ID;
  126. + public static int ELF_M_BOOTS_ID;
  127. + public static int ELF_M_GLOVES_ID;
  128. + public static int ELF_M_WEAPON_ID;
  129. + public static int ELF_F_HELM_ID;
  130. + public static int ELF_F_CHEST_ID;
  131. + public static int ELF_F_LEGS_ID;
  132. + public static int ELF_F_BOOTS_ID;
  133. + public static int ELF_F_GLOVES_ID;
  134. + public static int ELF_F_WEAPON_ID;
  135. + public static int DE_M_HELM_ID;
  136. + public static int DE_M_CHEST_ID;
  137. + public static int DE_M_LEGS_ID;
  138. + public static int DE_M_BOOTS_ID;
  139. + public static int DE_M_GLOVES_ID;
  140. + public static int DE_M_WEAPON_ID;
  141. + public static int DE_F_HELM_ID;
  142. + public static int DE_F_CHEST_ID;
  143. + public static int DE_F_LEGS_ID;
  144. + public static int DE_F_BOOTS_ID;
  145. + public static int DE_F_GLOVES_ID;
  146. + public static int DE_F_WEAPON_ID;
  147. + public static int ORC_M_HELM_ID;
  148. + public static int ORC_M_CHEST_ID;
  149. + public static int ORC_M_LEGS_ID;
  150. + public static int ORC_M_BOOTS_ID;
  151. + public static int ORC_M_GLOVES_ID;
  152. + public static int ORC_M_WEAPON_ID;
  153. + public static int ORC_F_HELM_ID;
  154. + public static int ORC_F_CHEST_ID;
  155. + public static int ORC_F_LEGS_ID;
  156. + public static int ORC_F_BOOTS_ID;
  157. + public static int ORC_F_GLOVES_ID;
  158. + public static int ORC_F_WEAPON_ID;
  159. + public static int DWARF_F_HELM_ID;
  160. + public static int DWARF_F_CHEST_ID;
  161. + public static int DWARF_F_LEGS_ID;
  162. + public static int DWARF_F_BOOTS_ID;
  163. + public static int DWARF_F_GLOVES_ID;
  164. + public static int DWARF_F_WEAPON_ID;
  165. +
  166. // ============================================================
  167. public static void loadFrozenConfig()
  168. {
  169. @@ -2190,7 +2250,66 @@
  170. PM_TEXT1 = frozenSettings.getProperty("PMText1", "Have Fun and Nice Stay on");
  171. PM_TEXT2 = frozenSettings.getProperty("PMText2", "Vote for us every 24h");
  172. NEW_PLAYER_EFFECT = Boolean.parseBoolean(frozenSettings.getProperty("NewPlayerEffect", "True"));
  173. -
  174. + ENABLE_HUMAN_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableHumanReward", "True"));
  175. + ENABLE_ELF_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableElfReward", "True"));
  176. + ENABLE_DE_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableDEReward", "True"));
  177. + ENABLE_ORC_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableOrcReward", "True"));
  178. + ENABLE_DWARF_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableDwarfReward", "True"));
  179. + HUMAN_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageHelmID", ""));
  180. + HUMAN_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageChestID", ""));
  181. + HUMAN_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageLegsID", ""));
  182. + HUMAN_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageBootsID", ""));
  183. + HUMAN_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageGlovesID", ""));
  184. + HUMAN_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageWeaponID", ""));
  185. + HUMAN_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterHelmID", ""));
  186. + HUMAN_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterChestID", ""));
  187. + HUMAN_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterLegsID", ""));
  188. + HUMAN_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterBootsID", ""));
  189. + HUMAN_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterGlovesID", ""));
  190. + HUMAN_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterWeaponID", ""));
  191. + ELF_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageHelmID", ""));
  192. + ELF_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageChestID", ""));
  193. + ELF_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageLegsID", ""));
  194. + ELF_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageBootsID", ""));
  195. + ELF_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageGlovesID", ""));
  196. + ELF_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageWeaponID", ""));
  197. + ELF_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterHelmID", ""));
  198. + ELF_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterChestID", ""));
  199. + ELF_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterLegsID", ""));
  200. + ELF_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterBootsID", ""));
  201. + ELF_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterGlovesID", ""));
  202. + ELF_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterWeaponID", ""));
  203. + DE_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("DEMageHelmID", ""));
  204. + DE_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("DEMageChestID", ""));
  205. + DE_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("DEMageLegsID", ""));
  206. + DE_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("DEMageBootsID", ""));
  207. + DE_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("DEMageGlovesID", ""));
  208. + DE_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("DEMageWeaponID", ""));
  209. + DE_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterHelmID", ""));
  210. + DE_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterChestID", ""));
  211. + DE_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterLegsID", ""));
  212. + DE_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterBootsID", ""));
  213. + DE_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterGlovesID", ""));
  214. + DE_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterWeaponID", ""));
  215. + ORC_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageHelmID", ""));
  216. + ORC_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageChestID", ""));
  217. + ORC_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageLegsID", ""));
  218. + ORC_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageBootsID", ""));
  219. + ORC_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageGlovesID", ""));
  220. + ORC_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageWeaponID", ""));
  221. + ORC_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterHelmID", ""));
  222. + ORC_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterChestID", ""));
  223. + ORC_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterLegsID", ""));
  224. + ORC_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterBootsID", ""));
  225. + ORC_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterGlovesID", ""));
  226. + ORC_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterWeaponID", ""));
  227. + DWARF_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterHelmID", ""));
  228. + DWARF_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterChestID", ""));
  229. + DWARF_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterLegsID", ""));
  230. + DWARF_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterBootsID", ""));
  231. + DWARF_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterGlovesID", ""));
  232. + DWARF_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterWeaponID", ""));
  233. +
  234. }
  235. catch (final Exception e)
  236. {
  237. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/CharacterCreate.java
  238. ===================================================================
  239. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/CharacterCreate.java (revision 1118)
  240. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/CharacterCreate.java (working copy)
  241. @@ -37,6 +37,7 @@
  242. import com.l2jfrozen.gameserver.model.L2World;
  243. import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
  244. import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  245. +import com.l2jfrozen.gameserver.model.base.Race;
  246. import com.l2jfrozen.gameserver.model.quest.Quest;
  247. import com.l2jfrozen.gameserver.model.quest.QuestState;
  248. import com.l2jfrozen.gameserver.network.L2GameClient;
  249. @@ -189,6 +190,270 @@
  250. if (Config.STARTING_AA > 0)
  251. newChar.addAncientAdena("Init", Config.STARTING_AA, null, false);
  252.  
  253. + // by iSparky
  254. + if (Config.ENABLE_HUMAN_REWARD)
  255. + {
  256. + if (newChar.getRace() == Race.human || newChar.isMageClass())
  257. + {
  258. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.HUMAN_M_HELM_ID, 1, newChar, null);
  259. + if (Helm.isEquipable())
  260. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  261. + newChar.getInventory().equipItemAndRecord(Helm);
  262. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.HUMAN_M_CHEST_ID, 1, newChar, null);
  263. + if (Chest.isEquipable())
  264. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  265. + newChar.getInventory().equipItemAndRecord(Chest);
  266. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.HUMAN_M_LEGS_ID, 1, newChar, null);
  267. + if (Legs.isEquipable())
  268. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  269. + newChar.getInventory().equipItemAndRecord(Legs);
  270. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.HUMAN_M_BOOTS_ID, 1, newChar, null);
  271. + if (Boots.isEquipable())
  272. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  273. + newChar.getInventory().equipItemAndRecord(Boots);
  274. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.HUMAN_M_GLOVES_ID, 1, newChar, null);
  275. + if (Gloves.isEquipable())
  276. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  277. + newChar.getInventory().equipItemAndRecord(Gloves);
  278. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.HUMAN_M_WEAPON_ID, 1, newChar, null);
  279. + if (Weap.isEquipable())
  280. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  281. + newChar.getInventory().equipItemAndRecord(Weap);
  282. + }
  283. + else
  284. + {
  285. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.HUMAN_F_HELM_ID, 1, newChar, null);
  286. + if (Helm.isEquipable())
  287. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  288. + newChar.getInventory().equipItemAndRecord(Helm);
  289. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.HUMAN_F_CHEST_ID, 1, newChar, null);
  290. + if (Chest.isEquipable())
  291. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  292. + newChar.getInventory().equipItemAndRecord(Chest);
  293. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.HUMAN_F_LEGS_ID, 1, newChar, null);
  294. + if (Legs.isEquipable())
  295. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  296. + newChar.getInventory().equipItemAndRecord(Legs);
  297. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.HUMAN_F_BOOTS_ID, 1, newChar, null);
  298. + if (Boots.isEquipable())
  299. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  300. + newChar.getInventory().equipItemAndRecord(Boots);
  301. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.HUMAN_F_GLOVES_ID, 1, newChar, null);
  302. + if (Gloves.isEquipable())
  303. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  304. + newChar.getInventory().equipItemAndRecord(Gloves);
  305. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.HUMAN_F_WEAPON_ID, 1, newChar, null);
  306. + if (Weap.isEquipable())
  307. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  308. + newChar.getInventory().equipItemAndRecord(Weap);
  309. + }
  310. + }
  311. +
  312. + if (Config.ENABLE_ELF_REWARD)
  313. + {
  314. + if (newChar.getRace() == Race.elf || newChar.isMageClass())
  315. + {
  316. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ELF_M_HELM_ID, 1, newChar, null);
  317. + if (Helm.isEquipable())
  318. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  319. + newChar.getInventory().equipItemAndRecord(Helm);
  320. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ELF_M_CHEST_ID, 1, newChar, null);
  321. + if (Chest.isEquipable())
  322. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  323. + newChar.getInventory().equipItemAndRecord(Chest);
  324. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ELF_M_LEGS_ID, 1, newChar, null);
  325. + if (Legs.isEquipable())
  326. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  327. + newChar.getInventory().equipItemAndRecord(Legs);
  328. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ELF_M_BOOTS_ID, 1, newChar, null);
  329. + if (Boots.isEquipable())
  330. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  331. + newChar.getInventory().equipItemAndRecord(Boots);
  332. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ELF_M_GLOVES_ID, 1, newChar, null);
  333. + if (Gloves.isEquipable())
  334. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  335. + newChar.getInventory().equipItemAndRecord(Gloves);
  336. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ELF_M_WEAPON_ID, 1, newChar, null);
  337. + if (Weap.isEquipable())
  338. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  339. + newChar.getInventory().equipItemAndRecord(Weap);
  340. + }
  341. + else
  342. + {
  343. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ELF_F_HELM_ID, 1, newChar, null);
  344. + if (Helm.isEquipable())
  345. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  346. + newChar.getInventory().equipItemAndRecord(Helm);
  347. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ELF_F_CHEST_ID, 1, newChar, null);
  348. + if (Chest.isEquipable())
  349. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  350. + newChar.getInventory().equipItemAndRecord(Chest);
  351. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ELF_F_LEGS_ID, 1, newChar, null);
  352. + if (Legs.isEquipable())
  353. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  354. + newChar.getInventory().equipItemAndRecord(Legs);
  355. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ELF_F_BOOTS_ID, 1, newChar, null);
  356. + if (Boots.isEquipable())
  357. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  358. + newChar.getInventory().equipItemAndRecord(Boots);
  359. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ELF_F_GLOVES_ID, 1, newChar, null);
  360. + if (Gloves.isEquipable())
  361. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  362. + newChar.getInventory().equipItemAndRecord(Gloves);
  363. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ELF_F_WEAPON_ID, 1, newChar, null);
  364. + if (Weap.isEquipable())
  365. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  366. + newChar.getInventory().equipItemAndRecord(Weap);
  367. + }
  368. + }
  369. +
  370. + if (Config.ENABLE_DE_REWARD)
  371. + {
  372. + if (newChar.getRace() == Race.darkelf || newChar.isMageClass())
  373. + {
  374. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.DE_M_HELM_ID, 1, newChar, null);
  375. + if (Helm.isEquipable())
  376. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  377. + newChar.getInventory().equipItemAndRecord(Helm);
  378. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.DE_M_CHEST_ID, 1, newChar, null);
  379. + if (Chest.isEquipable())
  380. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  381. + newChar.getInventory().equipItemAndRecord(Chest);
  382. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.DE_M_LEGS_ID, 1, newChar, null);
  383. + if (Legs.isEquipable())
  384. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  385. + newChar.getInventory().equipItemAndRecord(Legs);
  386. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.DE_M_BOOTS_ID, 1, newChar, null);
  387. + if (Boots.isEquipable())
  388. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  389. + newChar.getInventory().equipItemAndRecord(Boots);
  390. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.DE_M_GLOVES_ID, 1, newChar, null);
  391. + if (Gloves.isEquipable())
  392. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  393. + newChar.getInventory().equipItemAndRecord(Gloves);
  394. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.DE_M_WEAPON_ID, 1, newChar, null);
  395. + if (Weap.isEquipable())
  396. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  397. + newChar.getInventory().equipItemAndRecord(Weap);
  398. + }
  399. + else
  400. + {
  401. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.DE_F_HELM_ID, 1, newChar, null);
  402. + if (Helm.isEquipable())
  403. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  404. + newChar.getInventory().equipItemAndRecord(Helm);
  405. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.DE_F_CHEST_ID, 1, newChar, null);
  406. + if (Chest.isEquipable())
  407. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  408. + newChar.getInventory().equipItemAndRecord(Chest);
  409. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.DE_F_LEGS_ID, 1, newChar, null);
  410. + if (Legs.isEquipable())
  411. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  412. + newChar.getInventory().equipItemAndRecord(Legs);
  413. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.DE_F_BOOTS_ID, 1, newChar, null);
  414. + if (Boots.isEquipable())
  415. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  416. + newChar.getInventory().equipItemAndRecord(Boots);
  417. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.DE_F_GLOVES_ID, 1, newChar, null);
  418. + if (Gloves.isEquipable())
  419. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  420. + newChar.getInventory().equipItemAndRecord(Gloves);
  421. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.DE_F_WEAPON_ID, 1, newChar, null);
  422. + if (Weap.isEquipable())
  423. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  424. + newChar.getInventory().equipItemAndRecord(Weap);
  425. + }
  426. + }
  427. +
  428. + if (Config.ENABLE_ORC_REWARD)
  429. + {
  430. + if (newChar.getRace() == Race.orc || newChar.isMageClass())
  431. + {
  432. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ORC_M_HELM_ID, 1, newChar, null);
  433. + if (Helm.isEquipable())
  434. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  435. + newChar.getInventory().equipItemAndRecord(Helm);
  436. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ORC_M_CHEST_ID, 1, newChar, null);
  437. + if (Chest.isEquipable())
  438. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  439. + newChar.getInventory().equipItemAndRecord(Chest);
  440. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ORC_M_LEGS_ID, 1, newChar, null);
  441. + if (Legs.isEquipable())
  442. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  443. + newChar.getInventory().equipItemAndRecord(Legs);
  444. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ORC_M_BOOTS_ID, 1, newChar, null);
  445. + if (Boots.isEquipable())
  446. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  447. + newChar.getInventory().equipItemAndRecord(Boots);
  448. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ORC_M_GLOVES_ID, 1, newChar, null);
  449. + if (Gloves.isEquipable())
  450. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  451. + newChar.getInventory().equipItemAndRecord(Gloves);
  452. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ORC_M_WEAPON_ID, 1, newChar, null);
  453. + if (Weap.isEquipable())
  454. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  455. + newChar.getInventory().equipItemAndRecord(Weap);
  456. + }
  457. + else
  458. + {
  459. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ORC_F_HELM_ID, 1, newChar, null);
  460. + if (Helm.isEquipable())
  461. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  462. + newChar.getInventory().equipItemAndRecord(Helm);
  463. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ORC_F_CHEST_ID, 1, newChar, null);
  464. + if (Chest.isEquipable())
  465. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  466. + newChar.getInventory().equipItemAndRecord(Chest);
  467. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ORC_F_LEGS_ID, 1, newChar, null);
  468. + if (Legs.isEquipable())
  469. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  470. + newChar.getInventory().equipItemAndRecord(Legs);
  471. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ORC_F_BOOTS_ID, 1, newChar, null);
  472. + if (Boots.isEquipable())
  473. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  474. + newChar.getInventory().equipItemAndRecord(Boots);
  475. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ORC_F_GLOVES_ID, 1, newChar, null);
  476. + if (Gloves.isEquipable())
  477. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  478. + newChar.getInventory().equipItemAndRecord(Gloves);
  479. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ORC_F_WEAPON_ID, 1, newChar, null);
  480. + if (Weap.isEquipable())
  481. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  482. + newChar.getInventory().equipItemAndRecord(Weap);
  483. + }
  484. + }
  485. +
  486. + if (Config.ENABLE_DWARF_REWARD)
  487. + {
  488. + if (newChar.getRace() == Race.dwarf)
  489. + {
  490. + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.DWARF_F_HELM_ID, 1, newChar, null);
  491. + if (Helm.isEquipable())
  492. + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
  493. + newChar.getInventory().equipItemAndRecord(Helm);
  494. + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.DWARF_F_CHEST_ID, 1, newChar, null);
  495. + if (Chest.isEquipable())
  496. + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
  497. + newChar.getInventory().equipItemAndRecord(Chest);
  498. + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.DWARF_F_LEGS_ID, 1, newChar, null);
  499. + if (Legs.isEquipable())
  500. + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
  501. + newChar.getInventory().equipItemAndRecord(Legs);
  502. + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.DWARF_F_BOOTS_ID, 1, newChar, null);
  503. + if (Boots.isEquipable())
  504. + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
  505. + newChar.getInventory().equipItemAndRecord(Boots);
  506. + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.DWARF_F_GLOVES_ID, 1, newChar, null);
  507. + if (Gloves.isEquipable())
  508. + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
  509. + newChar.getInventory().equipItemAndRecord(Gloves);
  510. + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.DWARF_F_WEAPON_ID, 1, newChar, null);
  511. + if (Weap.isEquipable())
  512. + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
  513. + newChar.getInventory().equipItemAndRecord(Weap);
  514. + }
  515. + }
  516. +
  517. if (Config.CUSTOM_STARTER_ITEMS_ENABLED)
  518. {
  519. if (newChar.isMageClass())
  520. @@ -233,8 +498,7 @@
  521.  
  522. // Shortcuts
  523. newChar.registerShortCut(new L2ShortCut(0, 0, 3, 2, -1, 1)); // Attack
  524. - newChar.registerShortCut(new L2ShortCut(3, 0, 3, 5, -1, 1)); // Take
  525. - newChar.registerShortCut(new L2ShortCut(10, 0, 3, 0, -1, 1)); // Sit
  526. + newChar.registerShortCut(new L2ShortCut(1, 0, 3, 5, -1, 1)); // Take
  527.  
  528. final ItemTable itemTable = ItemTable.getInstance();
  529. final L2Item[] items = template.getItems();
Add Comment
Please, Sign In to add comment