Advertisement
WallisTeer

L2JaCis Advanced New Char

Sep 14th, 2016
1,114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.50 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P aCis_datapack
  3. Index: data/xml/classes/elven_mystic.xml
  4. ===================================================================
  5. --- data/xml/classes/elven_mystic.xml (revision 190)
  6. +++ data/xml/classes/elven_mystic.xml (working copy)
  7. @@ -103,7 +103,7 @@
  8. <!-- Common Craft -->
  9. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  10. </skillTrees>
  11. - <items val="425;461;6;5588" />
  12. + <items val="437;470;2450;2426;913;850;850;881;881;189;5263;5263;5588" />
  13. </class>
  14. <class id="26"><!-- Elven Wizard -->
  15. <set name="str" val="21" />
  16. Index: data/xml/classes/human_mystic.xml
  17. ===================================================================
  18. --- data/xml/classes/human_mystic.xml (revision 190)
  19. +++ data/xml/classes/human_mystic.xml (working copy)
  20. @@ -106,7 +106,7 @@
  21. <!-- Common Craft -->
  22. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  23. </skillTrees>
  24. - <items val="425;461;6;5588" />
  25. + <items val="437;470;2450;2426;913;850;850;881;881;189;5263;5263;5588" />
  26. </class>
  27. <class id="11"><!-- Human Wizard -->
  28. <set name="str" val="22" />
  29. Index: data/xml/classes/dark_mystic.xml
  30. ===================================================================
  31. --- data/xml/classes/dark_mystic.xml (revision 190)
  32. +++ data/xml/classes/dark_mystic.xml (working copy)
  33. @@ -106,7 +106,7 @@
  34. <!-- Common Craft -->
  35. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  36. </skillTrees>
  37. - <items val="425;461;6;5588" />
  38. + <items val="437;470;2450;2426;913;850;850;881;881;189;5263;5263;5588" />
  39. </class>
  40. <class id="39"><!-- Dark Wizard -->
  41. <set name="str" val="23" />
  42. Index: data/xml/classes/orc_mystic.xml
  43. ===================================================================
  44. --- data/xml/classes/orc_mystic.xml (revision 190)
  45. +++ data/xml/classes/orc_mystic.xml (working copy)
  46. @@ -97,7 +97,7 @@
  47. <!-- Common Craft -->
  48. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  49. </skillTrees>
  50. - <items val="425;461;2368;5588" />
  51. + <items val="437;470;2450;2426;913;850;850;881;881;189;5263;5263;5588" />
  52. </class>
  53. <class id="50"><!-- Orc Shaman -->
  54. <set name="str" val="27" />
  55. Index: data/xml/classes/dark_fighter.xml
  56. ===================================================================
  57. --- data/xml/classes/dark_fighter.xml (revision 190)
  58. +++ data/xml/classes/dark_fighter.xml (working copy)
  59. @@ -96,7 +96,7 @@
  60. <!-- Common Craft -->
  61. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  62. </skillTrees>
  63. - <items val="1147;1146;10;2369;5588" />
  64. + <items val="395;417;2424;2448;913;850;850;881;881;280;225;5251;5251;5588" />
  65. </class>
  66. <class id="32"><!-- Palus Knight -->
  67. <set name="str" val="41" />
  68. Index: data/xml/classes/human_fighter.xml
  69. ===================================================================
  70. --- data/xml/classes/human_fighter.xml (revision 190)
  71. +++ data/xml/classes/human_fighter.xml (working copy)
  72. @@ -89,7 +89,7 @@
  73. <!-- Common Craft -->
  74. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  75. </skillTrees>
  76. - <items val="1147;1146;10;2369;5588" />
  77. + <items val="395;417;2424;2448;913;850;850;881;881;280;225;5251;5251;5588" />
  78. </class>
  79. <class id="1"><!-- Warrior -->
  80. <set name="str" val="40" />
  81. Index: data/xml/classes/orc_fighter.xml
  82. ===================================================================
  83. --- data/xml/classes/orc_fighter.xml (revision 190)
  84. +++ data/xml/classes/orc_fighter.xml (working copy)
  85. @@ -83,7 +83,7 @@
  86. <!-- Common Craft -->
  87. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  88. </skillTrees>
  89. - <items val="1147;1146;2368;2369;5588" />
  90. + <items val="395;417;2424;2448;913;850;850;881;881;70;262;5251;5251;5588" />
  91. </class>
  92. <class id="45"><!-- Orc Raider -->
  93. <set name="str" val="40" />
  94. Index: data/xml/classes/elven_fighter.xml
  95. ===================================================================
  96. --- data/xml/classes/elven_fighter.xml (revision 190)
  97. +++ data/xml/classes/elven_fighter.xml (working copy)
  98. @@ -95,7 +95,7 @@
  99. <!-- Common Craft -->
  100. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  101. </skillTrees>
  102. - <items val="1147;1146;10;2369;5588" />
  103. + <items val="395;417;2424;2448;913;850;850;881;881;280;225;5251;5251;5588" />
  104. </class>
  105. <class id="19"><!-- Elf Knight -->
  106. <set name="str" val="36" />
  107. Index: data/xml/classes/dwarf_fighter.xml
  108. ===================================================================
  109. --- data/xml/classes/dwarf_fighter.xml (revision 190)
  110. +++ data/xml/classes/dwarf_fighter.xml (working copy)
  111. @@ -67,7 +67,7 @@
  112. <!-- Common Craft -->
  113. <skill id="1322" lvl="1" sp="0" minLvl="1" />
  114. </skillTrees>
  115. - <items val="1147;1146;10;2370;5588" />
  116. + <items val="395;417;2424;2448;913;850;850;881;881;297;2499;5251;5251;5588" />
  117. </class>
  118. <class id="56"><!-- Artisan -->
  119. <set name="str" val="39" />
  120. #P aCis_gameserver
  121. Index: java/net/sf/l2j/gameserver/datatables/AccessLevels.java
  122. ===================================================================
  123. --- java/net/sf/l2j/gameserver/datatables/AccessLevels.java (revision 190)
  124. +++ java/net/sf/l2j/gameserver/datatables/AccessLevels.java (working copy)
  125. @@ -39,7 +39,7 @@
  126. public static final int USER_ACCESS_LEVEL_NUMBER = 0;
  127.  
  128. public static L2AccessLevel MASTER_ACCESS_LEVEL = new L2AccessLevel(MASTER_ACCESS_LEVEL_NUMBER, "Master Access", Config.MASTERACCESS_NAME_COLOR, Config.MASTERACCESS_TITLE_COLOR, null, true, true, true, true, true, true, true, true);
  129. - public static L2AccessLevel USER_ACCESS_LEVEL = new L2AccessLevel(USER_ACCESS_LEVEL_NUMBER, "User", 0xFFFFFF, 0xFFFF77, null, false, false, false, true, false, true, true, true);
  130. + public static L2AccessLevel USER_ACCESS_LEVEL = new L2AccessLevel(USER_ACCESS_LEVEL_NUMBER, "User", 0xFFFFFF, Config.NEWCHAR_TITLE_COLOR, null, false, false, false, true, false, true, true, true);
  131.  
  132. private final Map<Integer, L2AccessLevel> _accessLevels = new HashMap<>();
  133.  
  134. @@ -91,15 +91,15 @@
  135. nameColor = Integer.decode("0xFFFFFF");
  136. }
  137.  
  138. - int titleColor;
  139. - try
  140. - {
  141. - titleColor = Integer.decode("0x" + attrs.getNamedItem("titleColor").getNodeValue());
  142. - }
  143. - catch (NumberFormatException nfe)
  144. - {
  145. - titleColor = Integer.decode("0x77FFFF");
  146. - }
  147. + int titleColor;
  148. + try
  149. + {
  150. + titleColor = Integer.decode("0x" + attrs.getNamedItem("titleColor").getNodeValue());
  151. + }
  152. + catch (NumberFormatException nfe)
  153. + {
  154. + titleColor = Integer.decode("0xFFFFFF");
  155. + }
  156.  
  157. String childs = attrs.getNamedItem("childAccess").getNodeValue();
  158. boolean isGm = Boolean.valueOf(attrs.getNamedItem("isGm").getNodeValue());
  159. Index: java/net/sf/l2j/Config.java
  160. ===================================================================
  161. --- java/net/sf/l2j/Config.java (revision 190)
  162. +++ java/net/sf/l2j/Config.java (working copy)
  163. @@ -377,6 +377,12 @@
  164.  
  165. /** Misc */
  166. public static int STARTING_ADENA;
  167. + public static boolean STARTING_LOCATION;
  168. + public static int[] NEW_CHAR_COORDINATES = new int[3];
  169. + public static int STARTING_LEVEL;
  170. + public static String NEW_CHAR_TITLE;
  171. + public static int NEWCHAR_TITLE_COLOR;
  172. + public static int NEW_CHAR_ENCHANT_LEVEL;
  173. public static boolean EFFECT_CANCELING;
  174. public static double HP_REGEN_MULTIPLIER;
  175. public static double MP_REGEN_MULTIPLIER;
  176. @@ -1081,6 +1087,22 @@
  177. {
  178. final ExProperties players = initProperties(PLAYERS_FILE);
  179. STARTING_ADENA = players.getProperty("StartingAdena", 100);
  180. + STARTING_LOCATION = players.getProperty("StartingLocation", false);
  181. + String[] newCharcoords = players.getProperty("NewCharCoordinates", "0,0,0").split(",");
  182. + if (newCharcoords.length < 3)
  183. + STARTING_LOCATION = false;
  184. + else
  185. + {
  186. + NEW_CHAR_COORDINATES[0] = Integer.parseInt(newCharcoords[0]);
  187. + NEW_CHAR_COORDINATES[1] = Integer.parseInt(newCharcoords[1]);
  188. + NEW_CHAR_COORDINATES[2] = Integer.parseInt(newCharcoords[2]);
  189. + }
  190. + STARTING_LEVEL = players.getProperty("StartingLevel", 0);
  191. + NEW_CHAR_TITLE = players.getProperty("NewCharTitle", "");
  192. + NEWCHAR_TITLE_COLOR = Integer.decode("0x" + players.getProperty("NewCharTitleColor", "00FF00"));
  193. + NEW_CHAR_ENCHANT_LEVEL = players.getProperty("NewCharEnchantItems", 0);
  194. + if (NEW_CHAR_ENCHANT_LEVEL < 0)
  195. + NEW_CHAR_ENCHANT_LEVEL = 0;
  196. EFFECT_CANCELING = players.getProperty("CancelLesserEffect", true);
  197. HP_REGEN_MULTIPLIER = players.getProperty("HpRegenMultiplier", 1.);
  198. MP_REGEN_MULTIPLIER = players.getProperty("MpRegenMultiplier", 1.);
  199. Index: config/players.properties
  200. ===================================================================
  201. --- config/players.properties (revision 191)
  202. +++ config/players.properties (working copy)
  203. @@ -5,6 +5,26 @@
  204. #Amount of adenas that a new character is given, default is 100
  205. StartingAdena = 100
  206.  
  207. +#==========================================================
  208. +# Advanced System Of New Char
  209. +#==========================================================
  210. +# Enable new characters spawn location?
  211. +# Default = False
  212. +StartingLocation = True
  213. +# Location for new characters spawn in format x,y,z
  214. +# Default: 18138,145754,-3117
  215. +NewCharCoordinates = 18138,145754,-3117
  216. +# When a new character is created , his level is automatically setted to the number of StartingLevel config (0 = disabled).
  217. +StartingLevel = 20
  218. +# Replace with title you want (null = disabled).
  219. +NewCharTitle = <F4N4T1C>
  220. +# Name color for characters on creation.
  221. +# Default: 77FFFF
  222. +NewCharTitleColor = FFFFFF
  223. +# Enchant level (+) for starter items of characters on creation?
  224. +# Default = 0
  225. +NewCharEnchantItems = 6
  226. +
  227. # If True, when effects of the same stack group are used, lesser
  228. # effects will be canceled if stronger effects are used. New effects
  229. # that are added will be canceled if they are of lesser priority to the old one.
  230. Index: java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java
  231. ===================================================================
  232. --- java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java (revision 190)
  233. +++ java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java (working copy)
  234. @@ -43,8 +43,10 @@
  235. import net.sf.l2j.gameserver.model.item.kind.EtcItem;
  236. import net.sf.l2j.gameserver.model.item.kind.Item;
  237. import net.sf.l2j.gameserver.model.item.kind.Weapon;
  238. +import net.sf.l2j.gameserver.model.item.type.CrystalType;
  239. import net.sf.l2j.gameserver.model.item.type.EtcItemType;
  240. import net.sf.l2j.gameserver.model.item.type.ItemType;
  241. +import net.sf.l2j.gameserver.model.item.type.WeaponType;
  242. import net.sf.l2j.gameserver.network.SystemMessageId;
  243. import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
  244. import net.sf.l2j.gameserver.network.serverpackets.DropItem;
  245. @@ -470,6 +472,16 @@
  246. }
  247.  
  248. /**
  249. + * Returns the reference grade of the item.
  250. + *
  251. + * @return int
  252. + */
  253. + public final CrystalType getItemGrade()
  254. + {
  255. + return _item.getCrystalType();
  256. + }
  257. +
  258. + /**
  259. * @return the reference price of the item.
  260. */
  261. public int getReferencePrice()
  262. @@ -1260,4 +1272,17 @@
  263. {
  264. _shotsMask = 0;
  265. }
  266. +
  267. + /**
  268. + * @return true if item can be enchanted.
  269. + */
  270. + public boolean isEnchantable()
  271. + {
  272. + if (isHeroItem() || isShadowItem() || isEtcItem() || (getItemType() == WeaponType.FISHINGROD) || (getItemGrade() == CrystalType.NONE))
  273. + return false;
  274. +
  275. + // only equipped items or in inventory can be enchanted
  276. + return ((getLocation() == ItemLocation.INVENTORY) || (getLocation() == ItemLocation.PAPERDOLL));
  277. + }
  278. +
  279. }
  280. \ No newline at end of file
  281. Index: java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
  282. ===================================================================
  283. --- java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 190)
  284. +++ java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)
  285. @@ -27,6 +27,7 @@
  286. import net.sf.l2j.gameserver.model.World;
  287. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  288. import net.sf.l2j.gameserver.model.actor.template.PcTemplate;
  289. +import net.sf.l2j.gameserver.model.base.Experience;
  290. import net.sf.l2j.gameserver.model.base.Sex;
  291. import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
  292. import net.sf.l2j.gameserver.model.item.kind.Item;
  293. @@ -135,9 +136,20 @@
  294. World.getInstance().addObject(newChar);
  295.  
  296. newChar.addAdena("Init", Config.STARTING_ADENA, null, false);
  297. - newChar.getPosition().set(template.getSpawn());
  298. - newChar.setTitle("");
  299.  
  300. + if (Config.STARTING_LOCATION)
  301. + newChar.setXYZInvisible(Config.NEW_CHAR_COORDINATES[0], Config.NEW_CHAR_COORDINATES[1], Config.NEW_CHAR_COORDINATES[2]);
  302. + else
  303. + newChar.setXYZInvisible(template.getSpawn());
  304. +
  305. + if (Config.STARTING_LEVEL != 0)
  306. + newChar.getStat().addExp(Experience.LEVEL[Config.STARTING_LEVEL]);
  307. +
  308. + if (!Config.NEW_CHAR_TITLE.isEmpty())
  309. + newChar.setTitle(Config.NEW_CHAR_TITLE);
  310. + else
  311. + newChar.setTitle("");
  312. +
  313. newChar.registerShortCut(new L2ShortCut(0, 0, 3, 2, -1, 1)); // attack shortcut
  314. newChar.registerShortCut(new L2ShortCut(3, 0, 3, 5, -1, 1)); // take shortcut
  315. newChar.registerShortCut(new L2ShortCut(10, 0, 3, 0, -1, 1)); // sit shortcut
  316. @@ -152,6 +164,8 @@
  317. {
  318. if (newChar.getActiveWeaponItem() == null || !(item.getItem().getType2() != Item.TYPE2_WEAPON))
  319. newChar.getInventory().equipItemAndRecord(item);
  320. + if (Config.NEW_CHAR_ENCHANT_LEVEL != 0 && item.isEnchantable())
  321. + item.setEnchantLevel(Config.NEW_CHAR_ENCHANT_LEVEL);
  322. }
  323. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement