Advertisement
Guest User

NewbiesHelper

a guest
Jan 10th, 2017
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 26.60 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P aCis_datapack
  3. Index: data/html/mods/NewbieNpc/50023.htm
  4. ===================================================================
  5. --- data/html/mods/NewbieNpc/50023.htm  (nonexistent)
  6. +++ data/html/mods/NewbieNpc/50023.htm  (working copy)
  7. @@ -0,0 +1,56 @@
  8. +
  9. +<html>
  10. +   <head>
  11. +       <title>Newbies Service NPC</title>
  12. +   </head>
  13. +   <body>
  14. +<center>
  15. +<img src="L2UI.SquareGray" width=300 height=1>
  16. +<table bgcolor=000000 width=300 height=37>
  17. +<tr>
  18. +<td align=center width=300>Welcome Buddy! <font color=3399CC>Get ready for our World!"</font></td>
  19. +</tr>
  20. +</table>
  21. +<img src="L2UI.SquareGray" width=300 height=1>
  22. +<img src="l2ui_ch3.herotower_deco" width=256 height=32>
  23. +
  24. +
  25. +
  26. +<img src="L2UI.SquareGray" width=300 height=1>
  27. +
  28. +<table border=0 bgcolor=000000 width=300 height=25>
  29. +<tr>
  30. +<td width=99 align=center><a action="bypass -h npc_%objectId%_LevelUp"><font color="3399CC">Level Up Me</font></a></td>
  31. +<td width=2 align=center><font color="505050">|</font></a></td><!--space-->
  32. +<td width=99 align=center><a action="bypass -h npc_%objectId%_change"><font color="3399CC">Change My Class</font></a></td>
  33. +</tr>
  34. +</table>
  35. +<img src="L2UI.SquareGray" width=300 height=1>
  36. +<table border=0 bgcolor=000000 width=300 height=25>
  37. +<tr>
  38. +<td width=99 align=center><a action="bypass -h npc_%objectId%_items"><font color="3399CC">Dress Me</font></a></td>
  39. +<td width=2 align=center><font color="505050">|</font></a></td><!--space-->
  40. +<td width=99 align=center><a action="bypass -h npc_%objectId%_buffs"><font color="3399CC">Buff Me</font></a></td>
  41. +</tr>
  42. +</table>
  43. +
  44. +<img src="L2UI.SquareGray" width=300 height=1>
  45. +
  46. +<br1>
  47. +<img src="L2UI.SquareGray" width=300 height=1>
  48. +<table border=0 bgcolor=000000 width=300 height=25>
  49. +<tr>
  50. +<td width=99 align=center><a action="bypass -h npc_%objectId%_teleport"><font color="3399CC">Teleport Me</font></a></td>
  51. +</table>
  52. +<img src="L2UI.SquareGray" width=300 height=1>
  53. +<br>
  54. +<img src="L2UI.SquareGray" width=300 height=1>
  55. +<table bgcolor=000000 width=300 height=37>
  56. +<tr>
  57. +<td align=center width=300>Vote for us : <font color=3399CC>www.lineage2.com</font></td>
  58. +</tr>
  59. +</table>
  60. +<img src="L2UI.SquareGray" width=300 height=1>
  61. +
  62. +</body></html>
  63. +
  64. Index: data/html/mods/NewbieNpc/changeclass.htm
  65. ===================================================================
  66. --- data/html/mods/NewbieNpc/changeclass.htm    (nonexistent)
  67. +++ data/html/mods/NewbieNpc/changeclass.htm    (working copy)
  68. @@ -0,0 +1,48 @@
  69. +<html>
  70. +   <head>
  71. +       <title>Newbies Service NPC</title>
  72. +   </head>
  73. +   <body>
  74. +<center>
  75. +<img src="L2UI.SquareGray" width=300 height=1>
  76. +<table bgcolor=000000 width=300 height=37>
  77. +<tr>
  78. +<td align=center width=300>Welcome Buddy! <font color=3399CC>Complete Your Classes & Be Ready!</font></td>
  79. +</tr>
  80. +</table>
  81. +<img src="L2UI.SquareGray" width=300 height=1>
  82. +<img src="l2ui_ch3.herotower_deco" width=256 height=32>
  83. +
  84. +
  85. +
  86. +<img src="L2UI.SquareGray" width=300 height=1>
  87. +
  88. +<table border=0 bgcolor=000000 width=300 height=25>
  89. +<tr>
  90. +<td width=99 align=center><a action="bypass -h npc_%objectId%_1stClass"><font color="3399CC">Get The First Class!</font></a></td>
  91. +<td width=2 align=center><font color="505050">|</font></a></td><!--space-->
  92. +<td width=99 align=center><a action="bypass -h npc_%objectId%_2ndClass"><font color="3399CC">Get The Second Class!</font></a></td>
  93. +</tr>
  94. +</table>
  95. +<img src="L2UI.SquareGray" width=300 height=1>
  96. +
  97. +<br1>
  98. +<img src="L2UI.SquareGray" width=300 height=1>
  99. +<table border=0 bgcolor=000000 width=300 height=25>
  100. +<tr>
  101. +<td width=99 align=center><a action="bypass -h npc_%objectId%_3rdClass"><font color="3399CC">Get The Third Class!</font></a></td>
  102. +</table>
  103. +<img src="L2UI.SquareGray" width=300 height=1>
  104. +<br>
  105. +<img src="L2UI.SquareGray" width=300 height=1>
  106. +<table bgcolor=000000 width=300 height=37>
  107. +<tr>
  108. +<td align=center width=300>Vote for us : <font color=3399CC>www.lineage2.com</font></td>
  109. +</tr>
  110. +</table>
  111. +<img src="L2UI.SquareGray" width=300 height=1>
  112. +
  113. +</body></html>
  114. +
  115. +
  116. +
  117. Index: data/html/mods/NewbieNpc/changeclass.htm
  118. ===================================================================
  119. --- data/html/mods/NewbieNpc/changeclass.htm    (nonexistent)
  120. +++ data/html/mods/NewbieNpc/changeclass.htm    (working copy)
  121. @@ -0,0 +1,48 @@
  122. +<html>
  123. +   <head>
  124. +       <title>Newbies Service NPC</title>
  125. +   </head>
  126. +   <body>
  127. +<center>
  128. +<img src="L2UI.SquareGray" width=300 height=1>
  129. +<table bgcolor=000000 width=300 height=37>
  130. +<tr>
  131. +<td align=center width=300>Welcome Buddy! <font color=3399CC>Complete Your Classes & Be Ready!</font></td>
  132. +</tr>
  133. +</table>
  134. +<img src="L2UI.SquareGray" width=300 height=1>
  135. +<img src="l2ui_ch3.herotower_deco" width=256 height=32>
  136. +
  137. +
  138. +
  139. +<img src="L2UI.SquareGray" width=300 height=1>
  140. +
  141. +<table border=0 bgcolor=000000 width=300 height=25>
  142. +<tr>
  143. +<td width=99 align=center><a action="bypass -h npc_%objectId%_1stClass"><font color="3399CC">Get The First Class!</font></a></td>
  144. +<td width=2 align=center><font color="505050">|</font></a></td><!--space-->
  145. +<td width=99 align=center><a action="bypass -h npc_%objectId%_2ndClass"><font color="3399CC">Get The Second Class!</font></a></td>
  146. +</tr>
  147. +</table>
  148. +<img src="L2UI.SquareGray" width=300 height=1>
  149. +
  150. +<br1>
  151. +<img src="L2UI.SquareGray" width=300 height=1>
  152. +<table border=0 bgcolor=000000 width=300 height=25>
  153. +<tr>
  154. +<td width=99 align=center><a action="bypass -h npc_%objectId%_3rdClass"><font color="3399CC">Get The Third Class!</font></a></td>
  155. +</table>
  156. +<img src="L2UI.SquareGray" width=300 height=1>
  157. +<br>
  158. +<img src="L2UI.SquareGray" width=300 height=1>
  159. +<table bgcolor=000000 width=300 height=37>
  160. +<tr>
  161. +<td align=center width=300>Vote for us : <font color=3399CC>www.lineage2.com</font></td>
  162. +</tr>
  163. +</table>
  164. +<img src="L2UI.SquareGray" width=300 height=1>
  165. +
  166. +</body></html>
  167. +
  168. +
  169. +
  170. Index: data/html/mods/NewbieNpc/50023.htm
  171. ===================================================================
  172. --- data/html/mods/NewbieNpc/50023.htm  (nonexistent)
  173. +++ data/html/mods/NewbieNpc/50023.htm  (working copy)
  174. @@ -0,0 +1,56 @@
  175. +
  176. +<html>
  177. +   <head>
  178. +       <title>Newbies Service NPC</title>
  179. +   </head>
  180. +   <body>
  181. +<center>
  182. +<img src="L2UI.SquareGray" width=300 height=1>
  183. +<table bgcolor=000000 width=300 height=37>
  184. +<tr>
  185. +<td align=center width=300>Welcome Buddy! <font color=3399CC>Get ready for our World!"</font></td>
  186. +</tr>
  187. +</table>
  188. +<img src="L2UI.SquareGray" width=300 height=1>
  189. +<img src="l2ui_ch3.herotower_deco" width=256 height=32>
  190. +
  191. +
  192. +
  193. +<img src="L2UI.SquareGray" width=300 height=1>
  194. +
  195. +<table border=0 bgcolor=000000 width=300 height=25>
  196. +<tr>
  197. +<td width=99 align=center><a action="bypass -h npc_%objectId%_LevelUp"><font color="3399CC">Level Up Me</font></a></td>
  198. +<td width=2 align=center><font color="505050">|</font></a></td><!--space-->
  199. +<td width=99 align=center><a action="bypass -h npc_%objectId%_change"><font color="3399CC">Change My Class</font></a></td>
  200. +</tr>
  201. +</table>
  202. +<img src="L2UI.SquareGray" width=300 height=1>
  203. +<table border=0 bgcolor=000000 width=300 height=25>
  204. +<tr>
  205. +<td width=99 align=center><a action="bypass -h npc_%objectId%_items"><font color="3399CC">Dress Me</font></a></td>
  206. +<td width=2 align=center><font color="505050">|</font></a></td><!--space-->
  207. +<td width=99 align=center><a action="bypass -h npc_%objectId%_buffs"><font color="3399CC">Buff Me</font></a></td>
  208. +</tr>
  209. +</table>
  210. +
  211. +<img src="L2UI.SquareGray" width=300 height=1>
  212. +
  213. +<br1>
  214. +<img src="L2UI.SquareGray" width=300 height=1>
  215. +<table border=0 bgcolor=000000 width=300 height=25>
  216. +<tr>
  217. +<td width=99 align=center><a action="bypass -h npc_%objectId%_teleport"><font color="3399CC">Teleport Me</font></a></td>
  218. +</table>
  219. +<img src="L2UI.SquareGray" width=300 height=1>
  220. +<br>
  221. +<img src="L2UI.SquareGray" width=300 height=1>
  222. +<table bgcolor=000000 width=300 height=37>
  223. +<tr>
  224. +<td align=center width=300>Vote for us : <font color=3399CC>www.lineage2.com</font></td>
  225. +</tr>
  226. +</table>
  227. +<img src="L2UI.SquareGray" width=300 height=1>
  228. +
  229. +</body></html>
  230. +
  231. Index: data/xml/npcs/50000-50999.xml
  232. ===================================================================
  233. --- data/xml/npcs/50000-50999.xml   (revision 5)
  234. +++ data/xml/npcs/50000-50999.xml   (working copy)
  235. @@ -108,4 +108,40 @@
  236.             <skill id="4416" level="18"/>
  237.         </skills>
  238.     </npc>
  239. +       <npc id="50023" idTemplate="30519" name="NIEWBIES HELPER" title="L2World">
  240. +       <set name="level" val="70"/>
  241. +       <set name="radius" val="7"/>
  242. +       <set name="height" val="18"/>
  243. +       <set name="rHand" val="0"/>
  244. +       <set name="lHand" val="0"/>
  245. +       <set name="type" val="L2NewbieNpc"/>
  246. +       <set name="exp" val="0"/>
  247. +       <set name="sp" val="0"/>
  248. +       <set name="hp" val="2444.46819"/>
  249. +       <set name="mp" val="1345.8"/>
  250. +       <set name="hpRegen" val="7.5"/>
  251. +       <set name="mpRegen" val="2.7"/>
  252. +       <set name="pAtk" val="688.86373"/>
  253. +       <set name="pDef" val="295.91597"/>
  254. +       <set name="mAtk" val="470.40463"/>
  255. +       <set name="mDef" val="216.53847"/>
  256. +       <set name="crit" val="4"/>
  257. +       <set name="atkSpd" val="253"/>
  258. +       <set name="str" val="40"/>
  259. +       <set name="int" val="21"/>
  260. +       <set name="dex" val="30"/>
  261. +       <set name="wit" val="20"/>
  262. +       <set name="con" val="43"/>
  263. +       <set name="men" val="20"/>
  264. +       <set name="corpseTime" val="7"/>
  265. +       <set name="walkSpd" val="50"/>
  266. +       <set name="runSpd" val="120"/>
  267. +       <set name="dropHerbGroup" val="0"/>
  268. +       <set name="attackRange" val="40"/>
  269. +       <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
  270. +       <skills>
  271. +           <skill id="4045" level="1"/>
  272. +           <skill id="4416" level="18"/>
  273. +       </skills>
  274. +   </npc>
  275.  </list>
  276. \ No newline at end of file
  277. #P aCis_gameserver
  278. Index: config/customs/newbies_system.properties
  279. ===================================================================
  280. --- config/customs/newbies_system.properties    (nonexistent)
  281. +++ config/customs/newbies_system.properties    (working copy)
  282. @@ -0,0 +1,16 @@
  283. +#=============================================================
  284. +#                          Newbies System
  285. +#=============================================================
  286. +# Value 81 for 80 lvl & 100%
  287. +NewbiesLevel = 81
  288. +
  289. +#Set of fighter buffs
  290. +FighterSet = 1087,1243,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1268,1036,1363,1240,1062,271,274,275,310,304,308,306,264,267,269,349,364,268,270,1416
  291. +
  292. +#Set of Mage buffs
  293. +MageSet = 1087,1243,1204,1040,1036,1048,1045,1389,1062,1363,1085,1059,1303,1304,273,276,365,268,270,349,264,267,268,306,308,1416
  294. +
  295. +# Telepot to location
  296. +LocX = 83278
  297. +LocY = 148273
  298. +LocZ = -3407
  299. \ No newline at end of file
  300. Index: java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java
  301. ===================================================================
  302. --- java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java  (revision 5)
  303. +++ java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java  (working copy)
  304. @@ -114,7 +114,7 @@
  305.             super.onBypassFeedback(player, command);
  306.     }
  307.    
  308. -   private static final void showHtmlMenu(L2PcInstance player, int objectId, int level)
  309. +   static final void showHtmlMenu(L2PcInstance player, int objectId, int level)
  310.     {
  311.         final NpcHtmlMessage html = new NpcHtmlMessage(objectId);
  312.        
  313. @@ -206,7 +206,7 @@
  314.         player.sendPacket(html);
  315.     }
  316.    
  317. -   private static final boolean checkAndChangeClass(L2PcInstance player, int val)
  318. +   static final boolean checkAndChangeClass(L2PcInstance player, int val)
  319.     {
  320.         final ClassId currentClassId = player.getClassId();
  321.         if (getMinLevel(currentClassId.level()) > player.getLevel() && !Config.ALLOW_ENTIRE_TREE)
  322. Index: java/net/sf/l2j/gameserver/model/actor/instance/L2NewbieNpcInstance.java
  323. ===================================================================
  324. --- java/net/sf/l2j/gameserver/model/actor/instance/L2NewbieNpcInstance.java    (nonexistent)
  325. +++ java/net/sf/l2j/gameserver/model/actor/instance/L2NewbieNpcInstance.java    (working copy)
  326. @@ -0,0 +1,435 @@
  327. +package net.sf.l2j.gameserver.model.actor.instance;
  328. +
  329. +import net.sf.l2j.Config;
  330. +import net.sf.l2j.gameserver.datatables.CharTemplateTable;
  331. +import net.sf.l2j.gameserver.datatables.SkillTable;
  332. +import net.sf.l2j.gameserver.model.L2Skill;
  333. +import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
  334. +import net.sf.l2j.gameserver.model.base.ClassId;
  335. +import net.sf.l2j.gameserver.model.base.Experience;
  336. +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
  337. +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
  338. +import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
  339. +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
  340. +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
  341. +
  342. +/**
  343. + * @author Baggos
  344. + */
  345. +public class L2NewbieNpcInstance extends L2NpcInstance
  346. +{
  347. +   public L2NewbieNpcInstance(int objectId, NpcTemplate template)
  348. +   {
  349. +       super(objectId, template);
  350. +   }
  351. +  
  352. +   @Override
  353. +   public void onBypassFeedback(L2PcInstance player, String command)
  354. +   {
  355. +      
  356. +       if (player == null)
  357. +           return;
  358. +      
  359. +       if (!Config.ALLOW_CLASS_MASTERS)
  360. +           return;
  361. +      
  362. +       if (command.equalsIgnoreCase("change"))
  363. +       {
  364. +           String filename = "data/html/mods/NewbieNpc/changeclass.htm";
  365. +          
  366. +           if (Config.ALLOW_CLASS_MASTERS)
  367. +               filename = "data/html/mods/NewbieNpc/changeclass.htm";
  368. +          
  369. +           final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
  370. +           html.setFile(filename);
  371. +           html.replace("%objectId%", getObjectId());
  372. +           player.sendPacket(html);
  373. +       }
  374. +       if (command.startsWith("1stClass"))
  375. +           L2ClassMasterInstance.showHtmlMenu(player, getObjectId(), 1);
  376. +       else if (command.startsWith("2ndClass"))
  377. +           L2ClassMasterInstance.showHtmlMenu(player, getObjectId(), 2);
  378. +       else if (command.startsWith("3rdClass"))
  379. +           L2ClassMasterInstance.showHtmlMenu(player, getObjectId(), 3);
  380. +       else if (command.startsWith("change_class"))
  381. +       {
  382. +           int val = Integer.parseInt(command.substring(13));
  383. +          
  384. +           if (L2ClassMasterInstance.checkAndChangeClass(player, val))
  385. +           {
  386. +               final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
  387. +               html.setFile("data/html/classmaster/ok.htm");
  388. +               html.replace("%name%", CharTemplateTable.getInstance().getClassNameById(val));
  389. +               player.sendPacket(html);
  390. +           }
  391. +       }
  392. +       else if (command.equalsIgnoreCase("LevelUp"))
  393. +           player.addExpAndSp(Experience.LEVEL[Config.NEWBIE_LVL], 0);
  394. +      
  395. +       else if (command.equalsIgnoreCase("items"))
  396. +       {
  397. +           final ClassId currentClassId = player.getClassId();
  398. +           if (currentClassId.level() < 3)
  399. +           {
  400. +               player.sendMessage("First Complete Your Third Class!");
  401. +               return;
  402. +           }
  403. +           if (player.getSp() >= 1)
  404. +           {
  405. +               player.sendMessage("You already took Items!");
  406. +               return;
  407. +           }
  408. +           ClassId classes = player.getClassId();
  409. +           switch (classes)
  410. +           {
  411. +               case adventurer:
  412. +               case sagittarius:
  413. +               case duelist:
  414. +               case titan:
  415. +               case grandKhauatari:
  416. +               case phoenixKnight:
  417. +               case moonlightSentinel:
  418. +               case fortuneSeeker:
  419. +               case maestro:
  420. +               case dreadnought:
  421. +               case hellKnight:
  422. +               case evaTemplar:
  423. +               case swordMuse:
  424. +               case windRider:
  425. +               case shillienTemplar:
  426. +               case spectralDancer:
  427. +               case ghostHunter:
  428. +               case ghostSentinel:
  429. +               case soultaker:
  430. +               case mysticMuse:
  431. +               case archmage:
  432. +               case arcanaLord:
  433. +               case elementalMaster:
  434. +               case cardinal:
  435. +               case stormScreamer:
  436. +               case spectralMaster:
  437. +               case shillienSaint:
  438. +               case dominator:
  439. +               case doomcryer:
  440. +                   NewbiesItems(player);
  441. +                   player.addExpAndSp(Experience.LEVEL[0], 1);
  442. +                   break;
  443. +           }
  444. +       }
  445. +      
  446. +       else if (command.equalsIgnoreCase("buffs"))
  447. +       {
  448. +           for (int id : (player.isMageClass() || player.getClassId() == ClassId.dominator || player.getClassId() == ClassId.doomcryer) ? Config.NEWBIE_MAGE_BUFFS : Config.NEWBIE_FIGHTER_BUFFS)
  449. +           {
  450. +               player.setCurrentHp(player.getMaxHp());
  451. +               player.setCurrentCp(player.getMaxCp());
  452. +               player.setCurrentMp(player.getMaxMp());
  453. +               L2Skill buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id));
  454. +               buff.getEffects(player, player);
  455. +               player.broadcastPacket(new MagicSkillUse(player, player, id, buff.getLevel(), 0, 0));
  456. +           }
  457. +       }
  458. +       else if (command.equalsIgnoreCase("teleport"))
  459. +       {
  460. +           final ClassId currentClassId = player.getClassId();
  461. +           if (currentClassId.level() < 3)
  462. +           {
  463. +               player.sendMessage("You Can't Leave! Your Character Isin't Complete!");
  464. +               return;
  465. +           }
  466. +           player.teleToLocation(Config.SETX, Config.SETY, Config.SETZ, 0);
  467. +           player.sendPacket(new ExShowScreenMessage("Your Character Are Ready For Our World!", 4000, 2, true));
  468. +       }
  469. +   }
  470. +  
  471. +   /**
  472. +    * @param player
  473. +    */
  474. +   private static void NewbiesItems(L2PcInstance player)
  475. +   {
  476. +       final int[] DaggerArmors =
  477. +       {
  478. +           6590,
  479. +           6379,
  480. +           6380,
  481. +           6381,
  482. +           6382,
  483. +           920,
  484. +           893,
  485. +           858,
  486. +           862,
  487. +           889
  488. +       };
  489. +       final int[] ArcherArmors =
  490. +       {
  491. +           7577,
  492. +           6379,
  493. +           6380,
  494. +           6381,
  495. +           6382,
  496. +           920,
  497. +           893,
  498. +           858,
  499. +           862,
  500. +           889
  501. +       };
  502. +       final int[] MageArmors =
  503. +       {
  504. +           6608,
  505. +           2407,
  506. +           5767,
  507. +           5779,
  508. +           512,
  509. +           920,
  510. +           893,
  511. +           858,
  512. +           862,
  513. +           889
  514. +       };
  515. +       final int[] DuelistArmor =
  516. +       {
  517. +           6580,
  518. +           6373,
  519. +           6374,
  520. +           6375,
  521. +           6376,
  522. +           6378,
  523. +           920,
  524. +           893,
  525. +           858,
  526. +           862,
  527. +           889
  528. +       };
  529. +       final int[] TitanArmor =
  530. +       {
  531. +           6605,
  532. +           6373,
  533. +           6374,
  534. +           6375,
  535. +           6376,
  536. +           6378,
  537. +           920,
  538. +           893,
  539. +           858,
  540. +           862,
  541. +           889
  542. +       };
  543. +       final int[] GrandKhaArmors =
  544. +       {
  545. +           6604,
  546. +           6379,
  547. +           6380,
  548. +           6381,
  549. +           6382,
  550. +           920,
  551. +           893,
  552. +           858,
  553. +           862,
  554. +           889
  555. +       };
  556. +       final int[] TankArmors =
  557. +       {
  558. +           6581,
  559. +           6373,
  560. +           6374,
  561. +           6375,
  562. +           6376,
  563. +           6377,
  564. +           6378,
  565. +           920,
  566. +           893,
  567. +           858,
  568. +           862,
  569. +           889
  570. +       };
  571. +       final int[] DwarfArmors =
  572. +       {
  573. +           6585,
  574. +           6373,
  575. +           6374,
  576. +           6375,
  577. +           6376,
  578. +           6377,
  579. +           6378,
  580. +           920,
  581. +           893,
  582. +           858,
  583. +           862,
  584. +           889
  585. +       };
  586. +       final int[] DreadArmors =
  587. +       {
  588. +           6601,
  589. +           6373,
  590. +           6374,
  591. +           6375,
  592. +           6376,
  593. +           6378,
  594. +           920,
  595. +           893,
  596. +           858,
  597. +           862,
  598. +           889
  599. +       };
  600. +       final int[] DancerArmors =
  601. +       {
  602. +           6580,
  603. +           6379,
  604. +           6380,
  605. +           6381,
  606. +           6382,
  607. +           920,
  608. +           893,
  609. +           858,
  610. +           862,
  611. +           889
  612. +       };
  613. +       ItemInstance items = null;
  614. +       ClassId classes = player.getClassId();
  615. +       switch (classes)
  616. +       {
  617. +           case adventurer:
  618. +           case windRider:
  619. +           case ghostHunter:
  620. +               for (int id : DaggerArmors)
  621. +               {
  622. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  623. +                   items = player.getInventory().getItemByItemId(id);
  624. +                   player.getInventory().equipItemAndRecord(items);
  625. +                   player.getInventory().reloadEquippedItems();
  626. +                   player.broadcastCharInfo();
  627. +                   new InventoryUpdate();
  628. +               }
  629. +               break;
  630. +           case sagittarius:
  631. +           case ghostSentinel:
  632. +           case moonlightSentinel:
  633. +               for (int id : ArcherArmors)
  634. +               {
  635. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  636. +                   items = player.getInventory().getItemByItemId(id);
  637. +                   player.getInventory().equipItemAndRecord(items);
  638. +                   player.getInventory().reloadEquippedItems();
  639. +                   player.broadcastCharInfo();
  640. +                   new InventoryUpdate();
  641. +               }
  642. +               break;
  643. +           case soultaker:
  644. +           case mysticMuse:
  645. +           case archmage:
  646. +           case arcanaLord:
  647. +           case elementalMaster:
  648. +           case cardinal:
  649. +           case stormScreamer:
  650. +           case spectralMaster:
  651. +           case shillienSaint:
  652. +           case dominator:
  653. +           case doomcryer:
  654. +               for (int id : MageArmors)
  655. +               {
  656. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  657. +                   items = player.getInventory().getItemByItemId(id);
  658. +                   player.getInventory().equipItemAndRecord(items);
  659. +                   player.getInventory().reloadEquippedItems();
  660. +                   player.broadcastCharInfo();
  661. +                   new InventoryUpdate();
  662. +               }
  663. +               break;
  664. +           case duelist:
  665. +               for (int id : DuelistArmor)
  666. +               {
  667. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  668. +                   items = player.getInventory().getItemByItemId(id);
  669. +                   player.getInventory().equipItemAndRecord(items);
  670. +                   player.getInventory().reloadEquippedItems();
  671. +                   player.broadcastCharInfo();
  672. +                   new InventoryUpdate();
  673. +               }
  674. +               break;
  675. +           case titan:
  676. +               for (int id : TitanArmor)
  677. +               {
  678. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  679. +                   items = player.getInventory().getItemByItemId(id);
  680. +                   player.getInventory().equipItemAndRecord(items);
  681. +                   player.getInventory().reloadEquippedItems();
  682. +                   player.broadcastCharInfo();
  683. +                   new InventoryUpdate();
  684. +               }
  685. +               break;
  686. +           case grandKhauatari:
  687. +               for (int id : GrandKhaArmors)
  688. +               {
  689. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  690. +                   items = player.getInventory().getItemByItemId(id);
  691. +                   player.getInventory().equipItemAndRecord(items);
  692. +                   player.getInventory().reloadEquippedItems();
  693. +                   player.broadcastCharInfo();
  694. +                   new InventoryUpdate();
  695. +               }
  696. +               break;
  697. +           case phoenixKnight:
  698. +           case hellKnight:
  699. +           case evaTemplar:
  700. +           case shillienTemplar:
  701. +               for (int id : TankArmors)
  702. +               {
  703. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  704. +                   items = player.getInventory().getItemByItemId(id);
  705. +                   player.getInventory().equipItemAndRecord(items);
  706. +                   player.getInventory().reloadEquippedItems();
  707. +                   player.broadcastCharInfo();
  708. +                   new InventoryUpdate();
  709. +               }
  710. +               break;
  711. +           case fortuneSeeker:
  712. +           case maestro:
  713. +               for (int id : DwarfArmors)
  714. +               {
  715. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  716. +                   items = player.getInventory().getItemByItemId(id);
  717. +                   player.getInventory().equipItemAndRecord(items);
  718. +                   player.getInventory().reloadEquippedItems();
  719. +                   player.broadcastCharInfo();
  720. +                   new InventoryUpdate();
  721. +               }
  722. +               break;
  723. +           case dreadnought:
  724. +               for (int id : DreadArmors)
  725. +               {
  726. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  727. +                   items = player.getInventory().getItemByItemId(id);
  728. +                   player.getInventory().equipItemAndRecord(items);
  729. +                   player.getInventory().reloadEquippedItems();
  730. +                   player.broadcastCharInfo();
  731. +                   new InventoryUpdate();
  732. +               }
  733. +               break;
  734. +           case spectralDancer:
  735. +           case swordMuse:
  736. +               for (int id : DancerArmors)
  737. +               {
  738. +                   player.getInventory().addItem("Armors", id, 1, player, null);
  739. +                   items = player.getInventory().getItemByItemId(id);
  740. +                   player.getInventory().equipItemAndRecord(items);
  741. +                   player.getInventory().reloadEquippedItems();
  742. +                   player.broadcastCharInfo();
  743. +                   new InventoryUpdate();
  744. +               }
  745. +               break;
  746. +       }
  747. +   }
  748. +  
  749. +   @Override
  750. +   public String getHtmlPath(int npcId, int val)
  751. +   {
  752. +       String filename = "";
  753. +      
  754. +       if (val == 0)
  755. +           filename = "" + npcId;
  756. +       else
  757. +           filename = npcId + "-" + val;
  758. +      
  759. +       return "data/html/mods/newbieNpc/" + filename + ".htm";
  760. +   }
  761. +}
  762. \ No newline at end of file
  763. Index: config/customs/newbies_system.properties
  764. ===================================================================
  765. --- config/customs/newbies_system.properties    (nonexistent)
  766. +++ config/customs/newbies_system.properties    (working copy)
  767. @@ -0,0 +1,16 @@
  768. +#=============================================================
  769. +#                          Newbies System
  770. +#=============================================================
  771. +# Value 81 for 80 lvl & 100%
  772. +NewbiesLevel = 81
  773. +
  774. +#Set of fighter buffs
  775. +FighterSet = 1087,1243,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1268,1036,1363,1240,1062,271,274,275,310,304,308,306,264,267,269,349,364,268,270,1416
  776. +
  777. +#Set of Mage buffs
  778. +MageSet = 1087,1243,1204,1040,1036,1048,1045,1389,1062,1363,1085,1059,1303,1304,273,276,365,268,270,349,264,267,268,306,308,1416
  779. +
  780. +# Telepot to location
  781. +LocX = 83278
  782. +LocY = 148273
  783. +LocZ = -3407
  784. \ No newline at end of file
  785. Index: build.xml
  786. ===================================================================
  787. --- build.xml   (revision 5)
  788. +++ build.xml   (working copy)
  789. @@ -56,6 +56,11 @@
  790.                 <include name="console.cfg" />
  791.             </fileset>
  792.         </copy>
  793. +                      <copy todir="${build.dist.game}/config/customs">
  794. +           <fileset dir="config/customs">
  795. +               <include name="newbies_system.properties" />
  796. +           </fileset>
  797. +           </copy>
  798.         <copy todir="${build.dist.login}/config">
  799.             <fileset dir="config">
  800.                 <include name="loginserver.properties" />
  801. Index: java/net/sf/l2j/Config.java
  802. ===================================================================
  803. --- java/net/sf/l2j/Config.java (revision 5)
  804. +++ java/net/sf/l2j/Config.java (working copy)
  805. @@ -47,11 +47,22 @@
  806.     public static final String GEOENGINE_FILE = "./config/geoengine.properties";
  807.     public static final String HEXID_FILE = "./config/hexid.txt";
  808.     public static final String LOGIN_CONFIGURATION_FILE = "./config/loginserver.properties";
  809. +   public static final String NEWBIE_FILE = "./config/customs/newbies_system.properties";
  810.     public static final String NPCS_FILE = "./config/npcs.properties";
  811.     public static final String PLAYERS_FILE = "./config/players.properties";
  812.     public static final String SERVER_FILE = "./config/server.properties";
  813.     public static final String SIEGE_FILE = "./config/siege.properties";
  814.    
  815. +   /** Newbie System */
  816. +   public static int NEWBIE_LVL;
  817. +   public static String NEWBIE_MAGE_SET;
  818. +   public static int[] NEWBIE_MAGE_BUFFS;
  819. +   public static String NEWBIE_FIGHTER_SET;
  820. +   public static int[] NEWBIE_FIGHTER_BUFFS;
  821. +   public static int SETX;
  822. +   public static int SETY;
  823. +   public static int SETZ;
  824. +  
  825.     // --------------------------------------------------
  826.     // Clans settings
  827.     // --------------------------------------------------
  828. @@ -687,6 +698,26 @@
  829.         {
  830.             _log.info("Loading gameserver configuration files.");
  831.            
  832. +           // Newbie system config
  833. +           ExProperties newbie = load(NEWBIE_FILE);
  834. +           NEWBIE_LVL = Integer.parseInt(newbie.getProperty("NewbiesLevel", "80"));
  835. +           NEWBIE_FIGHTER_SET = newbie.getProperty("FighterSet", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650");
  836. +           NEWBIE_MAGE_SET = newbie.getProperty("MageSet", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650");
  837. +          
  838. +           String[] NewFighterList = NEWBIE_FIGHTER_SET.split(",");
  839. +           NEWBIE_FIGHTER_BUFFS = new int[NewFighterList.length];
  840. +           for (int i = 0; i < NewFighterList.length; i++)
  841. +               NEWBIE_FIGHTER_BUFFS[i] = Integer.parseInt(NewFighterList[i]);
  842. +          
  843. +           String[] NewMageList = NEWBIE_MAGE_SET.split(",");
  844. +           NEWBIE_MAGE_BUFFS = new int[NewMageList.length];
  845. +           for (int i = 0; i < NewMageList.length; i++)
  846. +               NEWBIE_MAGE_BUFFS[i] = Integer.parseInt(NewMageList[i]);
  847. +          
  848. +           SETX = newbie.getProperty("LocX", 83278);
  849. +           SETY = newbie.getProperty("LocY", 148273);
  850. +           SETZ = newbie.getProperty("LocZ", -3407);
  851. +          
  852.             // Clans settings
  853.             ExProperties clans = load(CLANS_FILE);
  854.             ALT_CLAN_JOIN_DAYS = clans.getProperty("DaysBeforeJoinAClan", 5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement