Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: data/scripts/handlers/itemhandlers/AIOItem.java
- ===================================================================
- --- data/scripts/handlers/itemhandlers/AIOItem.java (revision 0)
- +++ data/scripts/handlers/itemhandlers/AIOItem.java (revision 0)
- @@ -0,0 +1,35 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package handlers.itemhandlers;
- +
- +import com.l2jserver.gameserver.handler.IItemHandler;
- +import com.l2jserver.gameserver.model.actor.L2Playable;
- +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jserver.gameserver.model.entity.AIO;
- +import com.l2jserver.gameserver.model.item.instance.L2ItemInstance;
- +
- +public class AIOItem implements IItemHandler
- +{
- + /**
- + *
- + * @see com.l2jserver.gameserver.handler.IItemHandler#useItem(com.l2jserver.gameserver.model.actor.L2Playable, com.l2jserver.gameserver.model.L2ItemInstance, boolean)
- + */
- + public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
- + {
- + L2PcInstance activeChar = (L2PcInstance) playable;
- + AIO x = new AIO();
- + x.showHTML(activeChar);
- + }
- +}
- \ No newline at end of file
- Index: Index: java/com/l2jserver/gameserver/model/network/clientpackets/RequstBypassToServer.java
- ===================================================================
- --- Index: java/com/l2jserver/gameserver/model/network/clientpackets/RequstBypassToServer.java (revision 5089)
- +++ Index: java/com/l2jserver/gameserver/model/network/clientpackets/RequstBypassToServer.java (working copy)
- @@ -33,6 +33,7 @@
- import com.l2jserver.gameserver.model.actor.instance.L2MerchantSummonInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.model.entity.Hero;
- +import com.l2jserver.gameserver.model.entity.AIO;
- import com.l2jserver.gameserver.network.SystemMessageId;
- import com.l2jserver.gameserver.network.communityserver.CommunityServerThread;
- import com.l2jserver.gameserver.network.communityserver.writepackets.RequestShowCommunityBoard;
- @@ -165,6 +166,12 @@
- }
- catch (NumberFormatException nfe) {}
- }
- +
- + if (_command.startsWith("aioItem")){
- +
- + AIO list = new AIO();
- + list.convert(activeChar,_command.substring(8));
- + }
- // Navigate through Manor windows
- else if (_command.startsWith("manor_menu_select"))
- {
- Index: C:/Users/Marwan/Desktop/Workspace/L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/AIO.java
- ===================================================================
- --- C:/Users/Marwan/Desktop/Workspace/L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/AIO.java (revision 0)
- +++ C:/Users/Marwan/Desktop/Workspace/L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/AIO.java (revision 0)
- @@ -0,0 +1,42 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package com.l2jserver.gameserver.model.entity;
- +import com.l2jserver.gameserver.cache.HtmCache;
- +
- +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
- +
- +
- +/**
- + * @author Marwan
- + *
- + */
- +public class AIO
- +{
- + public void showHTML(L2PcInstance activeChar){
- + String htmFile = "data/html/aio.htm";
- + String htmContent = HtmCache.getInstance().getHtm(htmFile);
- + String html = HtmCache.getInstance().getHtm("en", "data/html/aio.htm");
- + if (html == null)
- + html = "<html><body><br><br><center><font color=LEVEL>404:</font> File Not Found</center></body></html>";
- + activeChar.sendPacket(new NpcHtmlMessage(1, html));
- + }
- +
- + public void convert(L2PcInstance activeChar, String text)
- + {
- + showHTML(activeChar);
- + }
- +
- + }
Advertisement
Add Comment
Please, Sign In to add comment