Updated Game Assistant to retail.
Contributed by CostyKiller.
This commit is contained in:
@@ -4,7 +4,7 @@ Looking for a Dragon Shirt that is infused with the power of dragons? If you bri
|
||||
If you bring a <font color="LEVEL">+9 T-shirt</font>, I'll exchange it for a <font color="LEVEL">Dragon Leather Shirt</font>, which is better then Dragon Shirt. And if you bring <font color="LEVEL">+10 T-shirt</font>, I'll give you <font color="LEVEL">Radiant Rind Upgrade Stone</font> along with the Dragon Leather Shirt.<br>
|
||||
The <font color="LEVEL">Radiant Rind Upgrade Stone is an essential ingredient for upgrading the Dragon Leather Shirt.</font> Don't miss the opportunity to upgrade the shirt to a stronger one. <br>
|
||||
In addition, I also exchange the Blessed Dragon Shirt Enchant Scroll that is used to Enhance the Dragon Shirt. Keep that in mind.
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780010"><font color="LEVEL">"Exchange Dragon Shirt Upgrade Stone"</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780010"><font color="f96464">"Exchange Dragon Shirt Upgrade Stone"</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780011">"Exchange Dragon Shirt"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780012">"Exchange Blessed Dragon Shirt Enchant Scroll"</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest GameAssistant 32478.html">"Back"</Button>
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<html><body>Game Assistant:<br>
|
||||
Do you have a circlet enchanted to +5? If you want, I can exchange it for a Circlet Upgrade Stone.<br>
|
||||
Maybe you have extra circlets? Then exchange them for Circlet Upgrade Stones, it will come in handy!<br>
|
||||
<font color="LEVEL">Items for Noble Circlet Upgrade Stone exchange</font><br1>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant warrior">Exchange +5 Warrior's Circlet</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant wizard">Exchange +5 Wizard's Circlet</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant knight">Exchange +5 Knight's Circlet</Button>
|
||||
<font color="LEVEL">Items for Radiant Circlet Upgrade Stone exchange</font><br1>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant nobleWarrior">Exchange +5 Noble Warrior's Circlet</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant nobleWizard">Exchange +5 Noble Wizard's Circlet</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant nobleKnight">Exchange +5 Noble Knight's Circlet</Button>
|
||||
<html><body>Game Assistant:<br><br>
|
||||
If you want to change a vitality item, it have to be in the <font color="LEVEL">character's inventory</font>.<br1>
|
||||
This rule applies for exchangeable items. Pay attention to items such as <font color="LEVEL">Birthday Vitality Potion, Freya's Refreshing Breeze, Pa'agrio's Warm Breeze, Sweet Chocolate, Returning Hero's Vitality Replenishing Juice and Pirate Elixir and Nevit's Hourglass.</font><br>
|
||||
They cannot be changed after exchange.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780013">Exchange a vitality item</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest GameAssistant 32478.html">Back</Button>
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Game Assistant:<br>
|
||||
Exchange successful.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Game Assistant:<br>
|
||||
I can exchange only a circlet enchanted to +5.<br>
|
||||
By the way, we have a deal only if you have one circlet. Drop extra circlets into warehouse.
|
||||
</body></html>
|
@@ -1,7 +0,0 @@
|
||||
<html><body>Game Assistant:<br><br>
|
||||
If you want to change a vitality item, it have to be in the <font color="LEVEL">character's inventory</font>.<br1>
|
||||
This rule applies for exchangeable items. Pay attention to items such as <font color="LEVEL">Birthday Vitality Potion, Freya's Refreshing Breeze, Pa'agrio's Warm Breeze, Sweet Chocolate, Returning Hero's Vitality Replenishing Juice and Pirate Elixir and Nevit's Hourglass.</font><br>
|
||||
Thay cannot be changed after exchange.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780013">Exchange a vitality item</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest GameAssistant 32478.html">Back</Button>
|
||||
</body></html>
|
37
L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/ai/others/GameAssistant/32478-button.html
vendored
Normal file
37
L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/ai/others/GameAssistant/32478-button.html
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<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=315 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 GameAssistant Chat_Event" value="Event" width="230" height="30" back="L2UI_NewTex.Button36_Down" fore="L2UI_NewTex.Button36_DF"></td>
|
||||
</tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr><td align="center">
|
||||
<button action="bypass -h Quest GameAssistant Chat_ClaimItemsShop" value="Claim items from 4game Store" width="230" height="30" back="L2UI_NewTex.Button36_Down" fore="L2UI_NewTex.Button36_DF"></td>
|
||||
</tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr><td align="center">
|
||||
<button action="bypass -h Quest GameAssistant Chat_ItemsTransfer" value="Transfer items within the account" width="230" height="30" back="L2UI_NewTex.Button36_Down" fore="L2UI_NewTex.Button36_DF"></td>
|
||||
</tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr><td align="center">
|
||||
<button action="bypass -h Quest GameAssistant Chat_ClaimItemsTransfer" value="Claim transferred items" width="230" height="30" back="L2UI_NewTex.Button36_Down" fore="L2UI_NewTex.Button36_DF"></td>
|
||||
</tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body></html>
|
28
L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/ai/others/GameAssistant/32478-button1.html
vendored
Normal file
28
L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/ai/others/GameAssistant/32478-button1.html
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<html><title>Einhasad Store</title><body>
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=290 height=250 background="L2UI_CT1.GroupBox.GroupBox_DF">
|
||||
<tr>
|
||||
<td valign="center" align="center">
|
||||
<table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td width="290" height="128" background="L2UI_NewTex.GlobalEventImg"></td></tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
</table>
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=290 height=200 background="L2UI_CT1.GroupBox.GroupBox_DF">
|
||||
<tr><td valign="center" align="center">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width="290" height="220" background="L2UI_CT1.Windowpattern">
|
||||
<tr><td height="25"></td><td></td></tr>
|
||||
<tr><td valign="center" align="center">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=250 height=30 background="L2UI_CT1.GroupBox.GroupBox_DF">
|
||||
<tr>
|
||||
<td width="200" align="center">Heir's Radiance Shards</td>
|
||||
<td width="50" align="center"><button align="center" action="bypass -h Quest GameAssistant Chat_HeirShards" value=" " width="50" height="30" back="L2UI_NewTex.GlobalEventBtn_Down" fore="L2UI_NewTex.GlobalEventBtn_Normal"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td height="130"></td><td></td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body></html>
|
@@ -1,19 +1,18 @@
|
||||
<html><body>Game Assistant:<br>
|
||||
Pleased to meet you! We are the <font color="LEVEL">Game Assistants</font> who help adventurers in Elmoreden.<br>
|
||||
We have various services, so pick and choose.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant getDimensonalItem"><font color="ffa500">"I want to get a Special Offer item."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant package_deposit" msg="1040"><font color="LEVEL">"I want to share a Dimensional Item with another character on the account."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant package_withdraw"><font color="LEVEL">"I want to withdraw a Dimensional Item from another character on the account."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant package_deposit" msg="1040"><font color="LEVEL">"I want to transfer item on the account."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant package_withdraw"><font color="LEVEL">"I want to withdraw item on the account."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780014">"I want to upgrade my Ancient Kingdom Cloak into a Legendary one."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780015">"I want to exchange Upgrade Stone."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780001">"I want to use a Paulina's Weapon/Armor Coupon."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780002">"I want to exchange Hero's Marks for equipment and some consumables."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant 32478-20.html"><font color="LEVEL">"Tell me about a Dragon Shirt."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant 32478-21.html">"I want to get a Circlet Upgrade Stone."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant 32478-20.html">"Tell me about a Dragon Shirt."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780003">"I want to buy a Honey Vitality Beer."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780004">"I want to buy a Forgotten Spellbook Chapter 2/3."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780006"><font color="LEVEL">"I want to exchange an old Agathion Charm for a new one."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780007"><font color="LEVEL">"I want to exchange an Evolved Aghation Bracelet."</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant 32478-22.html">"I want to exchange long-term Vitality items for the short-term ones."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780006">"I want to exchange an old Agathion Charm for a new one."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780007">"I want to exchange an Evolved Aghation Bracelet."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant 32478-21.html">"I want to exchange long-term Vitality items for the short-term ones."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 324780009">"I want to get a Dark Assasin Appearance Stone."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GameAssistant 32478-01.html">"I want to use a Minion Coupon or Rose Spirit Coupon."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 324780014"><font color="f96464">"I want to exchange an Ancient Kingdom Cloak into a Legendary grade one."</font></Button>
|
||||
</body></html>
|
@@ -16,13 +16,18 @@
|
||||
*/
|
||||
package ai.others.GameAssistant;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.MultisellData;
|
||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import org.l2jmobius.gameserver.handler.ItemHandler;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
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.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.PlayerFreight;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
@@ -40,6 +45,8 @@ public class GameAssistant extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int MERCHANT = 32478; // Game Assistant
|
||||
// Multisells
|
||||
private static final int HEIR_SHARDS = 324780016;
|
||||
// Items
|
||||
private static final int MINION_COUPON = 13273; // Minion Coupon (5-hour)
|
||||
private static final int MINION_COUPON_EV = 13383; // Minion Coupon (5-hour) (Event)
|
||||
@@ -47,9 +54,8 @@ public class GameAssistant extends AbstractNpcAI
|
||||
private static final int SUP_MINION_COUPON_EV = 14074; // Superior Minion Coupon (Event) - 5-hour
|
||||
private static final int ENH_MINION_COUPON = 20914; // Enhanced Rose Spirit Coupon (5-hour)
|
||||
private static final int ENH_MINION_COUPON_EV = 22240; // Enhanced Rose Spirit Coupon (5-hour) - Event
|
||||
private static final int NOBLE_UPG_STONE = 48212; // Noble Upgrade Stone
|
||||
private static final int RADIANT_UPG_STONE = 48213; // Radiant Upgrade Stone
|
||||
// Others
|
||||
private static final String COMMAND_BYPASS = "Quest GameAssistant ";
|
||||
private static final HashMap<String, Integer> MINION_EXCHANGE = new HashMap<>();
|
||||
static
|
||||
{
|
||||
@@ -70,18 +76,6 @@ public class GameAssistant extends AbstractNpcAI
|
||||
MINION_EXCHANGE.put("lapham", 20919); // Enhanced Rose Necklace: Lapham
|
||||
MINION_EXCHANGE.put("mafum", 20920); // Enhanced Rose Necklace: Mafum
|
||||
}
|
||||
private static final HashMap<String, Integer> CIRCLET_EXCHANGE = new HashMap<>();
|
||||
static
|
||||
{
|
||||
// Normal
|
||||
CIRCLET_EXCHANGE.put("warrior", 48202); // Warrior's Circlet
|
||||
CIRCLET_EXCHANGE.put("wizard", 48205); // Wizard's Circlet
|
||||
CIRCLET_EXCHANGE.put("knight", 48208); // Knight's Circlet
|
||||
// Noble
|
||||
CIRCLET_EXCHANGE.put("nobleWarrior", 48203); // Noble Warrior's Circlet
|
||||
CIRCLET_EXCHANGE.put("nobleWizard", 48206); // Noble Wizard's Circlet
|
||||
CIRCLET_EXCHANGE.put("nobleKnight", 48209); // Noble Knight's Circlet
|
||||
}
|
||||
|
||||
private GameAssistant()
|
||||
{
|
||||
@@ -118,11 +112,21 @@ public class GameAssistant extends AbstractNpcAI
|
||||
case "32478-19.html":
|
||||
case "32478-20.html":
|
||||
case "32478-21.html":
|
||||
case "32478-22.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "Chat_Event":
|
||||
{
|
||||
htmltext = "32478-button1.html";
|
||||
break;
|
||||
}
|
||||
case "Chat_HeirShards":
|
||||
{
|
||||
MultisellData.getInstance().separateAndSend(HEIR_SHARDS, player, null, false);
|
||||
break;
|
||||
}
|
||||
case "Chat_ClaimItemsShop":
|
||||
case "getDimensonalItem":
|
||||
{
|
||||
if (player.getPremiumItemList().isEmpty())
|
||||
@@ -160,16 +164,7 @@ public class GameAssistant extends AbstractNpcAI
|
||||
htmltext = giveMinion(player, event, ENH_MINION_COUPON, ENH_MINION_COUPON_EV);
|
||||
break;
|
||||
}
|
||||
case "warrior":
|
||||
case "wizard":
|
||||
case "knight":
|
||||
case "nobleWarrior":
|
||||
case "nobleWizard":
|
||||
case "nobleKnight":
|
||||
{
|
||||
htmltext = giveCircletStone(player, event);
|
||||
break;
|
||||
}
|
||||
case "Chat_ItemsTransfer":
|
||||
case "package_deposit":
|
||||
{
|
||||
if (player.getAccountChars().size() < 1)
|
||||
@@ -182,6 +177,7 @@ public class GameAssistant extends AbstractNpcAI
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "Chat_ClaimItemsTransfer":
|
||||
case "package_withdraw":
|
||||
{
|
||||
final PlayerFreight freight = player.getFreight();
|
||||
@@ -231,53 +227,15 @@ public class GameAssistant extends AbstractNpcAI
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
private String giveCircletStone(Player player, String event)
|
||||
@RegisterEvent(EventType.ON_PLAYER_BYPASS)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerBypass(OnPlayerBypass event)
|
||||
{
|
||||
String htmltext = null;
|
||||
final int circletId = CIRCLET_EXCHANGE.get(event);
|
||||
final Collection<Item> circletNum = player.getInventory().getAllItemsByItemId(circletId);
|
||||
final Collection<Item> enchCircletNum = player.getInventory().getAllItemsByItemId(circletId, 5);
|
||||
if (circletNum.size() == enchCircletNum.size())
|
||||
final Player player = event.getPlayer();
|
||||
if (event.getCommand().startsWith(COMMAND_BYPASS))
|
||||
{
|
||||
switch (enchCircletNum.size())
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
{
|
||||
htmltext = "32478-21b.html";
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
switch (circletId)
|
||||
{
|
||||
case 48202: // Warrior's Circlet
|
||||
case 48205: // Wizard's Circlet
|
||||
case 48208: // Knight's Circlet
|
||||
{
|
||||
takeItems(player, circletId, 1);
|
||||
giveItems(player, NOBLE_UPG_STONE, 1);
|
||||
break;
|
||||
}
|
||||
case 48203: // Noble Warrior's Circlet
|
||||
case 48206: // Noble Wizard's Circlet
|
||||
case 48209: // Noble Knight's Circlet
|
||||
{
|
||||
takeItems(player, circletId, 1);
|
||||
giveItems(player, RADIANT_UPG_STONE, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
htmltext = "32478-21a.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
notifyEvent(event.getCommand().replace(COMMAND_BYPASS, ""), null, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32478-21b.html";
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
Reference in New Issue
Block a user