Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Parte da System
- itemname-e.dat
- 9319 Buffer Coin a,Double click to view content.\0 -1 a, a, a, a, 0 0 0 a,
- etcitemgrp.dat
- 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
- Parte do server.
- diff --git a/aCis_gameserver/data/html/mods/buffsCustom/buff.htm b/aCis_gameserver/data/html/mods/buffsCustom/buff.htm
- new file mode 100644
- index 0000000..084a556
- --- /dev/null
- +++ b/aCis_gameserver/data/html/mods/buffsCustom/buff.htm
- @@ -0,0 +1,79 @@
- +<html>
- + <body>
- + <center>
- + <img src=L2UI.SquareGray width=300 height=1><br>
- + <img src=L2UI_CH3.herotower_deco width=256 height=32>
- + <font color=LEVEL>Buff Menu</font>
- + <table width=170>
- + <tr>
- + <td valign=top><img src=icon.skill1204 width=32 height=32 align=left></td>
- + <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>
- + <td valign=top><img src=icon.skill1068 width=32 height=32 align=left></td>
- + <td><button value="Might" action="bypass -h buffCommand 1068" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1040 width=32 height=32 align=left></td>
- + <td><button value="Shield" action="bypass -h buffCommand 1040" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + <td valign=top><img src=icon.skill1035 width=32 height=32 align=left></td>
- + <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>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1045 width=32 height=32 align=left></td>
- + <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>
- + <td valign=top><img src=icon.skill1048 width=32 height=32 align=left></td>
- + <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>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1036 width=32 height=32 align=left></td>
- + <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>
- + <td valign=top><img src=icon.skill1078 width=32 height=32 align=left></td>
- + <td><button value="Concentration" action="bypass -h buffCommand 1078" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1062 width=32 height=32 align=left></td>
- + <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>
- + <td valign=top><img src=icon.skill1268 width=32 height=32 align=left></td>
- + <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>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td>
- + <td><button value="Acumen" action="bypass -h buffCommand 1085" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + <td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td>
- + <td><button value="Empower" action="bypass -h buffCommand 1059" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1077 width=32 height=32 align=left></td>
- + <td><button value="Focus" action="bypass -h buffCommand 1077" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + <td valign=top><img src=icon.skill1242 width=32 height=32 align=left></td>
- + <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>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1086 width=32 height=32 align=left></td>
- + <td><button value="Haste" action="bypass -h buffCommand 1086" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + <td valign=top><img src=icon.skill1240 width=32 height=32 align=left></td>
- + <td><button value="Guidance" action="bypass -h buffCommand 1240" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1388 width=32 height=32 align=left></td>
- + <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>
- + <td valign=top><img src=icon.skill1389 width=32 height=32 align=left></td>
- + <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>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1087 width=32 height=32 align=left></td>
- + <td><button value="Agility" action="bypass -h buffCommand 1087" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + <td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td>
- + <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>
- + </tr><tr><td></td></tr>
- + <tr>
- + <td valign=top><img src=icon.skill1259 width=32 height=32 align=left></td>
- + <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>
- + <td valign=top><img src=icon.skill1397 width=32 height=32 align=left></td>
- + <td><button value="Clarity" action="bypass -h buffCommand 1397" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
- + </tr>
- + </table>
- + <br><br>
- + <img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left align=left>
- + </center>
- + </body>
- +</html>
- \ No newline at end of file
- diff --git a/aCis_gameserver/data/xml/items/ItemServer.xml b/aCis_gameserver/data/xml/items/ItemServer.xml
- index 904add5..282ad82 100644
- --- a/aCis_gameserver/data/xml/items/ItemServer.xml
- +++ b/aCis_gameserver/data/xml/items/ItemServer.xml
- @@ -113,4 +109,14 @@
- <set name="is_oly_restricted" val="true" />
- <set name="handler" val="LuckBox" />
- </item>
- + <item id="9319" type="EtcItem" name="Buffer Coin">
- + <set name="icon" val="icon.skill0228" />
- + <set name="default_action" val="show_html" />
- + <set name="material" val="LIQUID" />
- + <set name="weight" val="10" />
- + <set name="price" val="1" />
- + <set name="is_dropable" val="false" />
- + <set name="handler" val="BuffsCustom" />
- + </item>
- +
- </list>
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- index b99d7af..aae8465 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- @@ -8,6 +8,7 @@
- import net.sf.l2j.gameserver.handler.itemhandlers.BeastSpiritShot;
- import net.sf.l2j.gameserver.handler.itemhandlers.BlessedSpiritShot;
- import net.sf.l2j.gameserver.handler.itemhandlers.Book;
- +import net.sf.l2j.gameserver.handler.itemhandlers.BuffsCustom;
- import net.sf.l2j.gameserver.handler.itemhandlers.Calculator;
- import net.sf.l2j.gameserver.handler.itemhandlers.Elixir;
- import net.sf.l2j.gameserver.handler.itemhandlers.EnchantScrolls;
- @@ -66,6 +67,7 @@
- registerHandler(new SpiritShot());
- registerHandler(new SummonItems());
- registerHandler(new LuckBox());
- + registerHandler(new BuffsCustom());
- registerHandler(new HeroCoin());
- 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
- new file mode 100644
- index 0000000..3e72a4b
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BuffsCustom.java
- @@ -0,0 +1,34 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.gameserver.enums.ZoneId;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- +
- +public class BuffsCustom implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + if (!(playable instanceof Player))
- + return;
- +
- + final Player player = (Player) playable;
- +
- + sendHtml(player);
- + }
- +
- + public static boolean check(Player p)
- + {
- + return p.isInsideZone(ZoneId.PEACE) && !p.isInCombat() && !p.isInOlympiadMode() && !p.isDead();
- + }
- +
- + public static void sendHtml(Player player)
- + {
- + NpcHtmlMessage html = new NpcHtmlMessage(0);
- + html.setFile("data/html/mods/buffsCustom/buff.htm");
- + player.sendPacket(html);
- + }
- +}
- \ No newline at end of file
- 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
- index e65d706..f1f4248 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- @@ -16,6 +16,7 @@
- import net.sf.l2j.Skin.handler.CustomBypassHandler;
- import net.sf.l2j.gameserver.communitybbs.CommunityBoard;
- import net.sf.l2j.gameserver.data.ItemTable;
- +import net.sf.l2j.gameserver.data.SkillTable;
- import net.sf.l2j.gameserver.data.cache.HtmCache;
- import net.sf.l2j.gameserver.data.manager.HeroManager;
- import net.sf.l2j.gameserver.data.xml.AdminData;
- @@ -26,6 +27,7 @@
- import net.sf.l2j.gameserver.handler.IBypassHandler;
- import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
- import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
- +import net.sf.l2j.gameserver.handler.itemhandlers.BuffsCustom;
- import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.WorldObject;
- import net.sf.l2j.gameserver.model.actor.Npc;
- @@ -94,6 +96,13 @@
- ach.useAdminCommand(_command, player);
- }
- + else if (_command.startsWith("buffCommand") && BuffsCustom.check(player))
- + {
- + String idBuff = _command.substring(12);
- + int parseIdBuff = Integer.parseInt(idBuff);
- + SkillTable.getInstance().getInfo(parseIdBuff, SkillTable.getInstance().getMaxLevel(parseIdBuff)).getEffects(player, player);
- + BuffsCustom.sendHtml(player);
- + }
- else if (_command.startsWith("player_help "))
- {
- final String path = _command.substring(12);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement