Advertisement
-JRGames-

Buff Coin Acis 382

May 20th, 2023
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.04 KB | None | 0 0
  1. Parte da System
  2. itemname-e.dat
  3. 9319 Buffer Coin a,Double click to view content.\0 -1 a, a, a, a, 0 0 0 a,
  4.  
  5. etcitemgrp.dat
  6. 2 9319 0 3 2 5 0 dropitems.drop_sack_m00 dropitemstex.drop_sack_t00 icon.skill0228 0 0 18 0 0 1 1 ItemSound.itemdrop_sack 2 0 0
  7.  
  8. Parte do server.
  9. diff --git a/aCis_gameserver/data/html/mods/buffsCustom/buff.htm b/aCis_gameserver/data/html/mods/buffsCustom/buff.htm
  10. new file mode 100644
  11. index 0000000..084a556
  12. --- /dev/null
  13. +++ b/aCis_gameserver/data/html/mods/buffsCustom/buff.htm
  14. @@ -0,0 +1,79 @@
  15. +<html>
  16. + <body>
  17. + <center>
  18. + <img src=L2UI.SquareGray width=300 height=1><br>
  19. + <img src=L2UI_CH3.herotower_deco width=256 height=32>
  20. + <font color=LEVEL>Buff Menu</font>
  21. + <table width=170>
  22. + <tr>
  23. + <td valign=top><img src=icon.skill1204 width=32 height=32 align=left></td>
  24. + <td><button value="Wind Walk" action="bypass -h buffCommand 1204" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  25. + <td valign=top><img src=icon.skill1068 width=32 height=32 align=left></td>
  26. + <td><button value="Might" action="bypass -h buffCommand 1068" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  27. + </tr><tr><td></td></tr>
  28. + <tr>
  29. + <td valign=top><img src=icon.skill1040 width=32 height=32 align=left></td>
  30. + <td><button value="Shield" action="bypass -h buffCommand 1040" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  31. + <td valign=top><img src=icon.skill1035 width=32 height=32 align=left></td>
  32. + <td><button value="Mental Shield" action="bypass -h buffCommand 1035" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  33. + </tr><tr><td></td></tr>
  34. + <tr>
  35. + <td valign=top><img src=icon.skill1045 width=32 height=32 align=left></td>
  36. + <td><button value="Blessed Body" action="bypass -h buffCommand 1045" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  37. + <td valign=top><img src=icon.skill1048 width=32 height=32 align=left></td>
  38. + <td><button value="Blessed Soul" action="bypass -h buffCommand 1048" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  39. + </tr><tr><td></td></tr>
  40. + <tr>
  41. + <td valign=top><img src=icon.skill1036 width=32 height=32 align=left></td>
  42. + <td><button value="Magic Barrier" action="bypass -h buffCommand 1036" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  43. + <td valign=top><img src=icon.skill1078 width=32 height=32 align=left></td>
  44. + <td><button value="Concentration" action="bypass -h buffCommand 1078" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  45. + </tr><tr><td></td></tr>
  46. + <tr>
  47. + <td valign=top><img src=icon.skill1062 width=32 height=32 align=left></td>
  48. + <td><button value="Berserker Spirit" action="bypass -h buffCommand 1062" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  49. + <td valign=top><img src=icon.skill1268 width=32 height=32 align=left></td>
  50. + <td><button value="Vampiric Rage" action="bypass -h buffCommand 1268" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  51. + </tr><tr><td></td></tr>
  52. + <tr>
  53. + <td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td>
  54. + <td><button value="Acumen" action="bypass -h buffCommand 1085" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  55. + <td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td>
  56. + <td><button value="Empower" action="bypass -h buffCommand 1059" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  57. + </tr><tr><td></td></tr>
  58. + <tr>
  59. + <td valign=top><img src=icon.skill1077 width=32 height=32 align=left></td>
  60. + <td><button value="Focus" action="bypass -h buffCommand 1077" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  61. + <td valign=top><img src=icon.skill1242 width=32 height=32 align=left></td>
  62. + <td><button value="Death Whisper" action="bypass -h buffCommand 1242" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  63. + </tr><tr><td></td></tr>
  64. + <tr>
  65. + <td valign=top><img src=icon.skill1086 width=32 height=32 align=left></td>
  66. + <td><button value="Haste" action="bypass -h buffCommand 1086" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  67. + <td valign=top><img src=icon.skill1240 width=32 height=32 align=left></td>
  68. + <td><button value="Guidance" action="bypass -h buffCommand 1240" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  69. + </tr><tr><td></td></tr>
  70. + <tr>
  71. + <td valign=top><img src=icon.skill1388 width=32 height=32 align=left></td>
  72. + <td><button value="Greater Might" action="bypass -h buffCommand 1388" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td><br>
  73. + <td valign=top><img src=icon.skill1389 width=32 height=32 align=left></td>
  74. + <td><button value="Greater Shield" action="bypass -h buffCommand 1389" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td><br>
  75. + </tr><tr><td></td></tr>
  76. + <tr>
  77. + <td valign=top><img src=icon.skill1087 width=32 height=32 align=left></td>
  78. + <td><button value="Agility" action="bypass -h buffCommand 1087" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  79. + <td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td>
  80. + <td><button value="Wild Magic" action="bypass -h buffCommand 1303" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  81. + </tr><tr><td></td></tr>
  82. + <tr>
  83. + <td valign=top><img src=icon.skill1259 width=32 height=32 align=left></td>
  84. + <td><button value="Resist Shock" action="bypass -h buffCommand 1259" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  85. + <td valign=top><img src=icon.skill1397 width=32 height=32 align=left></td>
  86. + <td><button value="Clarity" action="bypass -h buffCommand 1397" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
  87. + </tr>
  88. + </table>
  89. + <br><br>
  90. + <img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left align=left>
  91. + </center>
  92. + </body>
  93. +</html>
  94. \ No newline at end of file
  95. diff --git a/aCis_gameserver/data/xml/items/ItemServer.xml b/aCis_gameserver/data/xml/items/ItemServer.xml
  96. index 904add5..282ad82 100644
  97. --- a/aCis_gameserver/data/xml/items/ItemServer.xml
  98. +++ b/aCis_gameserver/data/xml/items/ItemServer.xml
  99. @@ -113,4 +109,14 @@
  100. <set name="is_oly_restricted" val="true" />
  101. <set name="handler" val="LuckBox" />
  102. </item>
  103. + <item id="9319" type="EtcItem" name="Buffer Coin">
  104. + <set name="icon" val="icon.skill0228" />
  105. + <set name="default_action" val="show_html" />
  106. + <set name="material" val="LIQUID" />
  107. + <set name="weight" val="10" />
  108. + <set name="price" val="1" />
  109. + <set name="is_dropable" val="false" />
  110. + <set name="handler" val="BuffsCustom" />
  111. + </item>
  112. +
  113. </list>
  114. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
  115. index b99d7af..aae8465 100644
  116. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
  117. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
  118. @@ -8,6 +8,7 @@
  119. import net.sf.l2j.gameserver.handler.itemhandlers.BeastSpiritShot;
  120. import net.sf.l2j.gameserver.handler.itemhandlers.BlessedSpiritShot;
  121. import net.sf.l2j.gameserver.handler.itemhandlers.Book;
  122. +import net.sf.l2j.gameserver.handler.itemhandlers.BuffsCustom;
  123. import net.sf.l2j.gameserver.handler.itemhandlers.Calculator;
  124. import net.sf.l2j.gameserver.handler.itemhandlers.Elixir;
  125. import net.sf.l2j.gameserver.handler.itemhandlers.EnchantScrolls;
  126. @@ -66,6 +67,7 @@
  127. registerHandler(new SpiritShot());
  128. registerHandler(new SummonItems());
  129. registerHandler(new LuckBox());
  130. + registerHandler(new BuffsCustom());
  131.  
  132. registerHandler(new HeroCoin());
  133.  
  134. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BuffsCustom.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BuffsCustom.java
  135. new file mode 100644
  136. index 0000000..3e72a4b
  137. --- /dev/null
  138. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BuffsCustom.java
  139. @@ -0,0 +1,34 @@
  140. +package net.sf.l2j.gameserver.handler.itemhandlers;
  141. +
  142. +import net.sf.l2j.gameserver.enums.ZoneId;
  143. +import net.sf.l2j.gameserver.handler.IItemHandler;
  144. +import net.sf.l2j.gameserver.model.actor.Playable;
  145. +import net.sf.l2j.gameserver.model.actor.Player;
  146. +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
  147. +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
  148. +
  149. +public class BuffsCustom implements IItemHandler
  150. +{
  151. + @Override
  152. + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
  153. + {
  154. + if (!(playable instanceof Player))
  155. + return;
  156. +
  157. + final Player player = (Player) playable;
  158. +
  159. + sendHtml(player);
  160. + }
  161. +
  162. + public static boolean check(Player p)
  163. + {
  164. + return p.isInsideZone(ZoneId.PEACE) && !p.isInCombat() && !p.isInOlympiadMode() && !p.isDead();
  165. + }
  166. +
  167. + public static void sendHtml(Player player)
  168. + {
  169. + NpcHtmlMessage html = new NpcHtmlMessage(0);
  170. + html.setFile("data/html/mods/buffsCustom/buff.htm");
  171. + player.sendPacket(html);
  172. + }
  173. +}
  174. \ No newline at end of file
  175. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  176. index e65d706..f1f4248 100644
  177. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  178. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  179. @@ -16,6 +16,7 @@
  180. import net.sf.l2j.Skin.handler.CustomBypassHandler;
  181. import net.sf.l2j.gameserver.communitybbs.CommunityBoard;
  182. import net.sf.l2j.gameserver.data.ItemTable;
  183. +import net.sf.l2j.gameserver.data.SkillTable;
  184. import net.sf.l2j.gameserver.data.cache.HtmCache;
  185. import net.sf.l2j.gameserver.data.manager.HeroManager;
  186. import net.sf.l2j.gameserver.data.xml.AdminData;
  187. @@ -26,6 +27,7 @@
  188. import net.sf.l2j.gameserver.handler.IBypassHandler;
  189. import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
  190. import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
  191. +import net.sf.l2j.gameserver.handler.itemhandlers.BuffsCustom;
  192. import net.sf.l2j.gameserver.model.World;
  193. import net.sf.l2j.gameserver.model.WorldObject;
  194. import net.sf.l2j.gameserver.model.actor.Npc;
  195. @@ -94,6 +96,13 @@
  196.  
  197. ach.useAdminCommand(_command, player);
  198. }
  199. + else if (_command.startsWith("buffCommand") && BuffsCustom.check(player))
  200. + {
  201. + String idBuff = _command.substring(12);
  202. + int parseIdBuff = Integer.parseInt(idBuff);
  203. + SkillTable.getInstance().getInfo(parseIdBuff, SkillTable.getInstance().getMaxLevel(parseIdBuff)).getEffects(player, player);
  204. + BuffsCustom.sendHtml(player);
  205. + }
  206. else if (_command.startsWith("player_help "))
  207. {
  208. final String path = _command.substring(12);
  209.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement