Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: dist/game/data/scripts/ai/others/EinhasadStore/34487.html
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/dist/game/data/scripts/ai/others/EinhasadStore/34487.html b/dist/game/data/scripts/ai/others/EinhasadStore/34487.html
- new file mode 100644
- --- /dev/null
- +++ b/dist/game/data/scripts/ai/others/EinhasadStore/34487.html
- @@ -0,0 +1,49 @@
- +<html><title>Game Assistant</title><body>
- +<table border=0 cellpadding=0 cellspacing=0 width=306 height=493 background="L2UI_CT1.GroupBox.GroupBox_DF">
- + <tr>
- + <td valign="center" align="center">
- + <table border=0 cellpadding=0 cellspacing=0>
- + <tr><td height="15"></td></tr>
- + <tr><td width=306 height=260 background="L2UI_EPIC.HtmlWnd.HtmlWnd_Einhasad_IMG"></td></tr>
- + <tr><td height="0"></td></tr>
- + </table>
- + <table border=0 cellpadding=0 cellspacing=0 width="306">
- + <tr><td height="0"></td></tr>
- + <tr><td align="center" height="18"><font color="af9878">May the Power of Light guide your way!</font></td></tr>
- + <tr><td height="15"></td></tr>
- + </table>
- + <table border=0 cellpadding=0 cellspacing=0 width="295" height="128" background="L2UI_CT1.GroupBox.GroupBox_DF">
- + <tr><td height="15"></td></tr>
- + <tr><td align="center">
- + <button action="bypass Quest EinhasadStore Chat_Jewell_Stones" value="Jewels" width="271" height="25" back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
- + </tr>
- + <tr><td height="10"></td></tr>
- + <tr><td align="center">
- + <button action="bypass Quest EinhasadStore Chat_Accessories" value="Accessories / Agathions / Artifacts" width="271" height="25" back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
- + </tr>
- + <tr><td height="10"></td></tr>
- + <tr><td align="center">
- + <button action="bypass Quest EinhasadStore Chat_Scrolls" value="Enchant Scrolls / Item Enhancement" width="271" height="25" back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
- + </tr>
- + <tr><td height="10"></td></tr>
- + <tr><td height="10"></td></tr>
- + <tr><td align="center">
- + <button action="bypass Quest EinhasadStore Chat_Enhancement" value="Item Augmentation / Skill Enchantment" width="271" height="25" back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
- + </tr>
- + <tr><td height="10"></td></tr>
- + <tr><td height="10"></td></tr>
- + <tr><td align="center">
- + <button action="bypass Quest EinhasadStore Chat_Others" value="Time Stones / Supplies / Misc" width="271" height="25" back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
- + </tr>
- + <tr><td height="10"></td></tr>
- + <tr><td height="10"></td></tr>
- + <tr><td align="center">
- + <button action="bypass Quest EinhasadStore Chat_Cloak" value="Cloaks of Ancient Kingdoms" width="271" height="25" back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
- + </tr>
- + <tr><td height="10"></td></tr>
- + </table>
- + </td>
- + </tr>
- +</table>
- +</body></html>
- +
- Index: dist/game/data/scripts/ai/others/EinhasadStore/EinhasadStore.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/dist/game/data/scripts/ai/others/EinhasadStore/EinhasadStore.java b/dist/game/data/scripts/ai/others/EinhasadStore/EinhasadStore.java
- new file mode 100644
- --- /dev/null
- +++ b/dist/game/data/scripts/ai/others/EinhasadStore/EinhasadStore.java
- @@ -0,0 +1,124 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * 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 ai.others.EinhasadStore;
- +
- +import ai.AbstractNpcAI;
- +import org.l2jmobius.gameserver.cache.HtmCache;
- +import org.l2jmobius.gameserver.data.xml.MultisellData;
- +import org.l2jmobius.gameserver.model.actor.Npc;
- +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.model.events.EventType;
- +import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
- +import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
- +import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
- +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass;
- +import org.l2jmobius.gameserver.network.serverpackets.ExPremiumManagerShowHtml;
- +
- +/**
- + */
- +public class EinhasadStore extends AbstractNpcAI
- +{
- + // NPC
- + private static final int MERCHANT = 34487;
- + // Items
- + // Multisells
- + private static final int JEWELS_STONE = 34487001;
- + private static final int ACCESSORIES = 34487002;
- + private static final int SCROLLS = 34487003;
- + private static final int ENHANCEMENT = 34487004;
- + private static final int OTHER = 34487005;
- + private static final int CLOAK = 34487006;
- + // Others
- + private static final String COMMAND_BYPASS = "Quest EinhasadStore ";
- +
- + private EinhasadStore()
- + {
- + addStartNpc(MERCHANT);
- + addFirstTalkId(MERCHANT);
- + addTalkId(MERCHANT);
- + }
- +
- + @Override
- + public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- + {
- + final String htmltext = null;
- + switch (event)
- + {
- +
- + case "back":
- + {
- + player.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html")));
- + break;
- + }
- + // Bypass
- + case "Chat_Jewell_Stones":
- + {
- + MultisellData.getInstance().separateAndSend(JEWELS_STONE, player, null, false);
- + break;
- + }
- + case "Chat_Accessories":
- + {
- + MultisellData.getInstance().separateAndSend(ACCESSORIES, player, null, false);
- + break;
- + }
- + case "Chat_Scrolls":
- + {
- + MultisellData.getInstance().separateAndSend(SCROLLS, player, null, false);
- + break;
- + }
- + case "Chat_Enhancement":
- + {
- + MultisellData.getInstance().separateAndSend(ENHANCEMENT, player, null, false);
- + break;
- + }
- + case "Chat_Others":
- + {
- + MultisellData.getInstance().separateAndSend(OTHER, player, null, false);
- + break;
- + }
- + case "Chat_Cloak":
- + {
- + MultisellData.getInstance().separateAndSend(CLOAK, player, null, false);
- + break;
- + }
- + }
- + return htmltext;
- + }
- +
- + @Override
- + public String onFirstTalk(Npc npc, PlayerInstance player)
- + {
- + player.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html")));
- + return null;
- + }
- +
- + @RegisterEvent(EventType.ON_PLAYER_BYPASS)
- + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
- + public void OnPlayerBypass(OnPlayerBypass event)
- + {
- + final PlayerInstance player = event.getPlayer();
- + if (event.getCommand().startsWith(COMMAND_BYPASS))
- + {
- + notifyEvent(event.getCommand().replace(COMMAND_BYPASS, ""), null, player);
- + }
- + }
- +
- + public static void main(String[] args)
- + {
- + new EinhasadStore();
- + }
- +}
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement