Dimensional merchant improvements.

This commit is contained in:
MobiusDevelopment
2021-01-25 18:25:56 +00:00
parent 74d7fee5fb
commit 8d3e8ca50e
3 changed files with 43 additions and 11 deletions

View File

@@ -1,6 +1,33 @@
<html><title>Dimensional Merchant</title><body>Dimensional Merchant:<br>
Hi! You can deal with <font color="LEVEL">Dimensional items</font> here. Dimensional items can be obtained in the item catalogue. However, if the inventory is full you can't put any Dimensional items in it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DimensionalMerchant package_deposit" msg="1040"><font color="LEVEL">Move Dimentional items to another character on the account</font></Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DimensionalMerchant package_withdraw"><font color="LEVEL">Get items</font></Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DimensionalMerchant attendance_rewards">Get Attendance reward</Button>
<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=317 background="L2UI_EPIC.HtmlWnd.HtmlWnd_PremiumManagerWnd02_IMG"></td></tr>
<tr><td height="15"></td></tr>
</table>
<table border=0 cellpadding=0 cellspacing=0 width="306">
<tr><td height="15"></td></tr>
<tr><td align="center" height="18"><font color="af9878">Here you can exchange, receive and transfer items.</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 -h Quest DimensionalMerchant package_deposit" value="Move items" width="271" height="31" back="L2UI_EPIC.HtmlWnd.HtmlWnd_DF_ItemEnchant_down" fore="L2UI_EPIC.HtmlWnd.HtmlWnd_DF_ItemEnchant_normal"></td>
</tr>
<tr><td height="10"></td></tr>
<tr><td align="center">
<button action="bypass -h Quest DimensionalMerchant package_withdraw" value="Get items" width="271" height="31" back="L2UI_EPIC.HtmlWnd.HtmlWnd_DF_Services_down" fore="L2UI_EPIC.HtmlWnd.HtmlWnd_DF_Services_normal"></td>
</tr>
<tr><td height="10"></td></tr>
<tr><td align="center">
<button action="bypass -h Quest DimensionalMerchant attendance_rewards" value="Get Attendance reward" width="271" height="31" back="L2UI_EPIC.HtmlWnd.HtmlWnd_DF_Store_down" fore="L2UI_EPIC.HtmlWnd.HtmlWnd_DF_Store_normal"></td>
</tr>
<tr><td height="10"></td></tr>
</table>
</td>
</tr>
</table>
</body></html>

View File

@@ -16,6 +16,7 @@
*/
package ai.others.DimensionalMerchant;
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;
@@ -27,6 +28,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass
import org.l2jmobius.gameserver.model.itemcontainer.PlayerFreight;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExPremiumManagerShowHtml;
import org.l2jmobius.gameserver.network.serverpackets.PackageToList;
import org.l2jmobius.gameserver.network.serverpackets.WareHouseWithdrawalList;
@@ -103,6 +105,13 @@ public class DimensionalMerchant extends AbstractNpcAI
return htmltext;
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
player.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html")));
return null;
}
@RegisterEvent(EventType.ON_PLAYER_BYPASS)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void OnPlayerBypass(OnPlayerBypass event)

View File

@@ -20,7 +20,7 @@ import org.l2jmobius.commons.network.PacketReader;
import org.l2jmobius.gameserver.cache.HtmCache;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import org.l2jmobius.gameserver.network.serverpackets.ExPremiumManagerShowHtml;
/**
* @author Mobius
@@ -43,10 +43,6 @@ public class ExOpenHtml implements IClientIncomingPacket
return;
}
// FIXME:
// client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html")));
final NpcHtmlMessage html = new NpcHtmlMessage();
html.setHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html"));
player.sendPacket(html);
client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html")));
}
}