This commit is contained in:
5
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-01.html
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-01.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Clan Trader Mulia:<br>
|
||||
I seek the leader of a Clan!<br>
|
||||
That person alone can validate their Clan's reputation and be justly rewarded for doing so...<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a><br>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-02.html
vendored
Normal file
9
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-02.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Clan Trader Mulia:<br>
|
||||
There are many ways to increase your clan's reputation, from capturing a castle or fortress in battle, to helping out wandering newbies. Protecting a territory is also laudable, and in that spirit I wish to make you an offer if you can bring me these items:<br><br>
|
||||
<font color = "LEVEL">1 Blood Alliance</font> to prove that you have successfully defended a castle, <font color = "LEVEL">10 Blood Oaths gained by preserving civic order in a territory</font>, and finally <font color = "LEVEL">100 Knight's Epaulettes to prove that you are invincible in battle</font>.<br><br>
|
||||
Bring me these things, and I will personally see to it that your reputation increases.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader exchange-ba">Provide 1 Blood Alliance.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader exchange-bo">Provide 10 Blood Oaths.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader exchange-ke">Provide 100 Knight's Epaulettes.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader 32024.html">Back.</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Clan Trader Mulia:<br>
|
||||
You have not brought a sufficient number of the items I requested to justify an increase in reputation.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader 32024.html">Back.</a><br>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-04.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-04.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Clan Trader Mulia:<br>
|
||||
Your reputation has been increased.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader 32024.html">Back.</a><br>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-05.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024-05.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Clan Trader Mulia:<br>
|
||||
The maximum clan level for raising reputation is 5.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader 32024.html">Back.</a><br>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024.html
vendored
Normal file
8
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32024.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Clan Trader Mulia:<br>
|
||||
Oh, renowned leader of the clan! What business do you have with me?<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 1235">Buy a Clan Item.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 1236">Upgrade a clan item.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader repinfo">Ask about Clan Reputation Points.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the local lord and tax rate.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest.</a><br>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-01.html
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-01.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Clan Trader Ilia:<br>
|
||||
I seek a partner to a blood oath, the most sacred pledge of allegiance!<br>
|
||||
I will not release any item to anyone else! Our reputation depends on it!<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a><br>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-02.html
vendored
Normal file
9
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-02.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Clan Trader Ilia:<br>
|
||||
There are many ways to increase your clan's reputation, from capturing a castle or fortress in battle, to helping out wandering newbies. Protecting a territory is also laudable, and in that spirit I wish to make you an offer if you can bring me these items:<br><br>
|
||||
<font color = "LEVEL">1 Blood Alliance</font> to prove that you have successfully defended a castle, <font color = "LEVEL">10 Blood Oaths gained by preserving civic order in a territory</font>, and finally <font color = "LEVEL">100 Knight's Epaulettes to prove that you are invincible in battle</font>.<br><br>
|
||||
Bring me these things, and I will personally see to it that your reputation increases.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader exchange-ba">Provide 1 Blood Alliance.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader exchange-bo">Provide 10 Blood Oaths.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader exchange-ke">Provide 100 Knight's Epaulettes.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader 32025.html">Back.</a><br>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Clan Trader Ilia:<br>
|
||||
You have not brought a sufficient number of the items I requested to justify an increase in reputation.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader 32025.html">Back.</a><br>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-04.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-04.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Clan Trader Ilia:<br>
|
||||
Your reputation has been increased.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader 32025.html">Back.</a><br>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-05.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025-05.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Clan Trader Ilia:<br>
|
||||
The maximum clan level for raising reputation is 5.<br><br>
|
||||
<a action="bypass -h Quest ClanTrader 32025.html">Back.</a><br>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025.html
vendored
Normal file
8
trunk/dist/game/data/scripts/ai/npc/ClanTrader/32025.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Clan Trader Ilia:<br>
|
||||
We swore the blood oath together, did we not? If you are that oath-holder, come speak with me.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 1235">Buy a Clan Item.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 1236">Upgrade a clan item.</a><br>
|
||||
<a action="bypass -h Quest ClanTrader repinfo">Ask about Clan Reputation Points.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the local lord and tax rate.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest.</a><br>
|
||||
</body></html>
|
125
trunk/dist/game/data/scripts/ai/npc/ClanTrader/ClanTrader.java
vendored
Normal file
125
trunk/dist/game/data/scripts/ai/npc/ClanTrader/ClanTrader.java
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.ClanTrader;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.ClanPrivilege;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* Clan Trader AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class ClanTrader extends AbstractNpcAI
|
||||
{
|
||||
// Npc
|
||||
private static final int[] CLAN_TRADER =
|
||||
{
|
||||
32024, // Mulia
|
||||
32025, // Ilia
|
||||
};
|
||||
// Items
|
||||
private static final int BLOOD_ALLIANCE = 9911; // Blood Alliance
|
||||
private static final int BLOOD_ALLIANCE_COUNT = 1; // Blood Alliance Count
|
||||
private static final int BLOOD_OATH = 9910; // Blood Oath
|
||||
private static final int BLOOD_OATH_COUNT = 10; // Blood Oath Count
|
||||
private static final int KNIGHTS_EPAULETTE = 9912; // Knight's Epaulette
|
||||
private static final int KNIGHTS_EPAULETTE_COUNT = 100; // Knight's Epaulette Count
|
||||
|
||||
private ClanTrader()
|
||||
{
|
||||
super(ClanTrader.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(CLAN_TRADER);
|
||||
addTalkId(CLAN_TRADER);
|
||||
addFirstTalkId(CLAN_TRADER);
|
||||
}
|
||||
|
||||
private String giveReputation(L2Npc npc, L2PcInstance player, int count, int itemId, int itemCount)
|
||||
{
|
||||
if (getQuestItemsCount(player, itemId) >= itemCount)
|
||||
{
|
||||
takeItems(player, itemId, itemCount);
|
||||
player.getClan().addReputationScore(count, true);
|
||||
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_ADDED_S1_POINT_S_TO_ITS_CLAN_REPUTATION);
|
||||
sm.addInt(count);
|
||||
player.sendPacket(sm);
|
||||
return npc.getId() + "-04.html";
|
||||
}
|
||||
return npc.getId() + "-03.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32024.html":
|
||||
case "32024-02.html":
|
||||
case "32025.html":
|
||||
case "32025-02.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "repinfo":
|
||||
{
|
||||
htmltext = (player.getClan().getLevel() > 4) ? npc.getId() + "-02.html" : npc.getId() + "-05.html";
|
||||
break;
|
||||
}
|
||||
case "exchange-ba":
|
||||
{
|
||||
htmltext = giveReputation(npc, player, Config.BLOODALLIANCE_POINTS, BLOOD_ALLIANCE, BLOOD_ALLIANCE_COUNT);
|
||||
break;
|
||||
}
|
||||
case "exchange-bo":
|
||||
{
|
||||
htmltext = giveReputation(npc, player, Config.BLOODOATH_POINTS, BLOOD_OATH, BLOOD_OATH_COUNT);
|
||||
break;
|
||||
}
|
||||
case "exchange-ke":
|
||||
{
|
||||
htmltext = giveReputation(npc, player, Config.KNIGHTSEPAULETTE_POINTS, KNIGHTS_EPAULETTE, KNIGHTS_EPAULETTE_COUNT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.isClanLeader() || player.hasClanPrivilege(ClanPrivilege.CL_TROOPS_FAME))
|
||||
{
|
||||
return npc.getId() + ".html";
|
||||
}
|
||||
return npc.getId() + "-01.html";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new ClanTrader();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user