Skip to content

Instantly share code, notes, and snippets.

@St3eT
Last active December 16, 2015 09:38
Show Gist options
  • Save St3eT/5414124 to your computer and use it in GitHub Desktop.
Save St3eT/5414124 to your computer and use it in GitHub Desktop.
L2FameManagerInstance moved from core to dp
### Eclipse Workspace Patch 1.0
#P L2J_Server_BETA
Index: java/com/l2jserver/gameserver/model/L2Object.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Object.java (revision 5933)
+++ java/com/l2jserver/gameserver/model/L2Object.java (working copy)
@@ -151,7 +151,6 @@
L2AdventurerInstance(L2NpcInstance),
L2AuctioneerInstance(L2Npc),
L2ClanHallManagerInstance(L2MerchantInstance),
- L2FameManagerInstance(L2Npc),
L2FishermanInstance(L2MerchantInstance),
L2ManorManagerInstance(L2MerchantInstance),
L2ObservationInstance(L2Npc),
Index: java/com/l2jserver/gameserver/model/actor/instance/L2FameManagerInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2FameManagerInstance.java (revision 5933)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2FameManagerInstance.java (working copy)
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2004-2013 L2J Server
- *
- * This file is part of L2J Server.
- *
- * L2J Server 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 Server 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.actor.instance;
-
-import java.util.StringTokenizer;
-
-import com.l2jserver.gameserver.model.actor.L2Npc;
-import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
-import com.l2jserver.gameserver.network.SystemMessageId;
-import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
-import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
-import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
-import com.l2jserver.gameserver.network.serverpackets.UserInfo;
-
-/**
- * Reputation score manager
- * @author Kerberos
- */
-public class L2FameManagerInstance extends L2Npc
-{
- public L2FameManagerInstance(int objectId, L2NpcTemplate template)
- {
- super(objectId, template);
- setInstanceType(InstanceType.L2FameManagerInstance);
- }
-
- @Override
- public void onBypassFeedback(L2PcInstance player, String command)
- {
- StringTokenizer st = new StringTokenizer(command, " ");
- String actualCommand = st.nextToken();
- if (actualCommand.equalsIgnoreCase("PK_Count"))
- {
- NpcHtmlMessage html = new NpcHtmlMessage(1);
- if ((player.getFame() >= 5000) && (player.getClassId().level() >= 2) && (player.getClan() != null) && (player.getClan().getLevel() >= 5))
- {
- if (player.getPkKills() > 0)
- {
- player.setFame(player.getFame() - 5000);
- player.setPkKills(player.getPkKills() - 1);
- player.sendPacket(new UserInfo(player));
- player.sendPacket(new ExBrExtraUserInfo(player));
- html.setFile(player.getHtmlPrefix(), "data/html/famemanager/" + getNpcId() + "-3.htm");
- }
- else
- {
- html.setFile(player.getHtmlPrefix(), "data/html/famemanager/" + getNpcId() + "-4.htm");
- }
- }
- else
- {
- html.setFile(player.getHtmlPrefix(), "data/html/famemanager/" + getNpcId() + "-lowfame.htm");
- }
-
- sendHtmlMessage(player, html);
- return;
- }
- else if (actualCommand.equalsIgnoreCase("CRP"))
- {
- NpcHtmlMessage html = new NpcHtmlMessage(1);
- if ((player.getClan() != null) && (player.getClan().getLevel() >= 5))
- {
- if ((player.getFame() >= 1000) && (player.getClassId().level() >= 2))
- {
- player.setFame(player.getFame() - 1000);
- player.sendPacket(new UserInfo(player));
- player.sendPacket(new ExBrExtraUserInfo(player));
- player.getClan().addReputationScore(50, true);
- player.sendPacket(SystemMessageId.ACQUIRED_50_CLAN_FAME_POINTS);
- html.setFile(player.getHtmlPrefix(), "data/html/famemanager/" + getNpcId() + "-5.htm");
- }
- else
- {
- html.setFile(player.getHtmlPrefix(), "data/html/famemanager/" + getNpcId() + "-lowfame.htm");
- }
- }
- else
- {
- html.setFile(player.getHtmlPrefix(), "data/html/famemanager/" + getNpcId() + "-noclan.htm");
- }
-
- sendHtmlMessage(player, html);
- return;
- }
- else
- {
- super.onBypassFeedback(player, command);
- }
- }
-
- private void sendHtmlMessage(L2PcInstance player, NpcHtmlMessage html)
- {
- html.replace("%objectId%", String.valueOf(getObjectId()));
- player.sendPacket(html);
- }
-
- @Override
- public void showChatWindow(L2PcInstance player)
- {
- player.sendPacket(ActionFailed.STATIC_PACKET);
- String filename = "data/html/famemanager/" + getNpcId() + "-lowfame.htm";
-
- if (player.getFame() > 0)
- {
- filename = "data/html/famemanager/" + getNpcId() + ".htm";
- }
-
- NpcHtmlMessage html = new NpcHtmlMessage(1);
- html.setFile(player.getHtmlPrefix(), filename);
- html.replace("%objectId%", String.valueOf(getObjectId()));
- player.sendPacket(html);
- }
-}
\ No newline at end of file
#P L2J_DataPack_BETA
Index: dist/sql/game/npc.sql
===================================================================
--- dist/sql/game/npc.sql (revision 9631)
+++ dist/sql/game/npc.sql (working copy)
@@ -10393,8 +10393,8 @@
(36476, 36476, "Wyvern Manager", 0, "Demon Fortress", 0, "LineageNPC.a_fighterguild_teacher_MHuman", 8, 23, 75, "male", "L2FortWyvernManager", 40, 2676.65854, 1507.8, 8.5, 3, 40, 43, 30, 21, 20, 20, 0, 0, 794.70901, 319.24623, 542.68324, 233.61053, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
(36477, 36477, "Wyvern Manager", 0, "Monastic Fortress", 0, "LineageNPC.a_fighterguild_teacher_MHuman", 8, 23, 75, "male", "L2FortWyvernManager", 40, 2676.65854, 1507.8, 8.5, 3, 40, 43, 30, 21, 20, 20, 0, 0, 794.70901, 319.24623, 542.68324, 233.61053, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
(36478, 36478, "Mickey", 0, "Pet Trader", 0, "LineageNPC.e_collector_teacher_FDwarf", 8, 17.5, 70, "female", "L2PetManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
-(36479, 36479, "Rapidus", 0, "Reputation Manager", 0, "LineageNPC.a_fighterguild_master_Mhuman", 8, 23.5, 70, "male", "L2FameManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
-(36480, 36480, "Scipio", 0, "Reputation Manager", 0, "LineageNPC.a_fighterguild_master_Mhuman", 8, 23.5, 70, "male", "L2FameManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
+(36479, 36479, "Rapidus", 0, "Reputation Manager", 0, "LineageNPC.a_fighterguild_master_Mhuman", 8, 23.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
+(36480, 36480, "Scipio", 0, "Reputation Manager", 0, "LineageNPC.a_fighterguild_master_Mhuman", 8, 23.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
(36481, 36481, "Mercenary Captain", 0, "Gludio", 0, "LineageMonster3.Kight_of_Dawn", 12, 24.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 2500, 6377, 0, 36.48, 160, 0, 1),
(36482, 36482, "Mercenary Captain", 0, "Dion", 0, "LineageMonster3.Kight_of_Dawn", 12, 24.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 2500, 6377, 0, 36.48, 160, 0, 1),
(36483, 36483, "Mercenary Captain", 0, "Giran", 0, "LineageMonster3.Kight_of_Dawn", 12, 24.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 2500, 6377, 0, 36.48, 160, 0, 1),
Index: dist/game/data/html/famemanager/36480-lowfame.htm
===================================================================
--- dist/game/data/html/famemanager/36480-lowfame.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480-lowfame.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-You have not yet met the qualifications. (Requires completion of second class transfer and Clan Fame level above 40.)<br><br>
-<a action="bypass -h npc_%objectId%_Link famemanager/36480-2.htm">Ask how to obtain Clan Fame points.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36480-05.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480-05.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480-05.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Scipio:<br>
+You do not need to ask for forgiveness by lowering your Clan Fame if you did not commit an offense.
+</body></html>
Index: dist/game/data/scripts/ai/npc/FameManager/36479-01.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479-01.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479-01.html (working copy)
@@ -0,0 +1,4 @@
+<html><body>Reputation Manager Rapidus:<br>
+You have not yet met the qualifications. (Requires completion of second class transfer and Clan Fame level above 40.)<br><br>
+<a action="bypass -h Quest FameManager 36479-07.html">Ask how to obtain Clan Fame points.</a>
+</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36479-2.htm
===================================================================
--- dist/game/data/html/famemanager/36479-2.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479-2.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-Fame comes naturally when one takes an active part in battles with others. If you have clan members with the same goal, consider participating in Castle Sieges, Fortress Battles and Clan Hall Battles. If you have party members who work extremely well together, try your luck in the Underground Coliseum Game or the Festival of Darkness. If you are alone, demonstrate your prowess by participating in the Olympiad.<br>
-You can use Clan Reputation Points earned in any of the above games to help increase your clan's fame or improve your own PVP capabilities.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36480-06.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480-06.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480-06.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Scipio:<br>
+You have committed a serious crime! No matter the circumstances, murder is inexcusable. I will forgive you this once, but do not do this again or the consequences will be dire...
+</body></html>
Index: dist/game/data/scripts/ai/npc/FameManager/36480-03.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480-03.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480-03.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Scipio:<br>
+Whether or not you are a member of a clan, your victory cannot be acknowledged unless you possess Clan Reputation Points. Work harder for the benefit of your clan and fame will follow.
+</body></html>
Index: dist/game/data/html/famemanager/36479-noclan.htm
===================================================================
--- dist/game/data/html/famemanager/36479-noclan.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479-noclan.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-If you are not part of a clan, or if your clan status is too low, your victory cannot be recognized.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36480-04.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480-04.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480-04.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Scipio:<br>
+You are the pride of your clan!
+</body></html>
Index: dist/game/data/html/famemanager/36479-lowfame.htm
===================================================================
--- dist/game/data/html/famemanager/36479-lowfame.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479-lowfame.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-Diplomacy is sometimes wiser than fighting. Nevertheless, Warriors need power if they are to protect those who depend on them. (Requires completion of second class transfer and Clan Fame level above 40.)<br><br>
-<a action="bypass -h npc_%objectId%_Link famemanager/36479-2.htm">Ask how to obtain Clan Fame points.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36479-04.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479-04.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479-04.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Rapidus:<br>
+Your clan will be proud of you.
+</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36479-06.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479-06.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479-06.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Rapidus:<br>
+No matter what excuses you make, there is no justifying murder. From now on, make every effort to obey the law. Do not fail!
+</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36480-07.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480-07.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480-07.html (working copy)
@@ -0,0 +1,5 @@
+<html><body>Reputation Manager Scipio:<br>
+Fame comes naturally when one takes an active part in battles with others. If you have clan members with the same goal, consider jointly participating in Castle Sieges, Fortress Battles and Clan Hall Battles. If you have party members who work extremely well together, try your luck in the Underground Coliseum Game or at the Festival of Darkness. If you are alone, demonstrate your prowess by participating in the Olympiad.<br>
+You can use Clan Reputation Points earned in any of the above games to help increase your clan's fame or improve your own PvP capabilities.
+</body></html>
+
Index: dist/game/data/html/famemanager/36480-3.htm
===================================================================
--- dist/game/data/html/famemanager/36480-3.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480-3.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-Your PK count was reduced.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36480.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480.html (working copy)
@@ -0,0 +1,7 @@
+<html><body>Reputation Manager Scipio:<br>
+Warrior, are you confident that your actions are undertaken for the sake of peace rather than to serve your own greed? If so, your reward shall be as great as your accomplishment. What do you seek?<br>
+<a action="bypass -h Quest FameManager 36479-02.html">Examine PVP exclusive items.</a><br>
+<a action="bypass -h Quest FameManager decreasePk">Decrease PK count by 1 (5,000 Fame Points).</a><br>
+<a action="bypass -h Quest FameManager clanRep">Increase Clan Fame (1,000 Fame Points).</a><br>
+<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
+</body></html>
Index: dist/game/data/html/famemanager/36480-2.htm
===================================================================
--- dist/game/data/html/famemanager/36480-2.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480-2.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-Fame comes naturally when one takes an active part in battles with others. If you have clan members with the same goal, consider participating in Castle Sieges, Fortress Battles and Clan Hall Battles. If you have party members who work extremely well together, try your luck in the Underground Coliseum Game or the Festival of Darkness. If you are alone, demonstrate your prowess by participating in the Olympiad.<br>
-You can use Clan Reputation Points earned in any of the above games to help increase your clan's fame or improve your own PVP capabilities.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts.cfg
===================================================================
--- dist/game/data/scripts.cfg (revision 9631)
+++ dist/game/data/scripts.cfg (working copy)
@@ -20,6 +20,7 @@
ai/npc/ClanTrader/ClanTrader.java
ai/npc/Dorian/Dorian.java
ai/npc/DragonVortex/DragonVortex.java
+ai/npc/FameManager/FameManager.java
ai/npc/ForgeOfTheGods/ForgeOfTheGods.java
ai/npc/ForgeOfTheGods/Rooney.java
ai/npc/ForgeOfTheGods/TarBeetle.java
Index: dist/game/data/html/famemanager/36480-noclan.htm
===================================================================
--- dist/game/data/html/famemanager/36480-noclan.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480-noclan.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-Whether or not you are a member of a clan, your victory cannot be acknowledged unless you possess Clan Reputation Points. Work harder for the benefit of your clan and fame will follow.
-</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36479.htm
===================================================================
--- dist/game/data/html/famemanager/36479.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479.htm (working copy)
@@ -1,7 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-O victorious one, have you set your next goal? I have prepared something for you. You will be awarded according to your distinguished service. What is it that you seek?<br>
-<a action="bypass -h npc_%objectId%_Link famemanager/36479-1.htm">Examine PVP exclusive items.</a><br>
-<a action="bypass -h npc_%objectId%_PK_Count">Decrease PK count by 1 (5,000 Reputation Points).</a><br>
-<a action="bypass -h npc_%objectId%_CRP">Increase Clan Reputation (1,000 Reputation Points).</a><br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36480-5.htm
===================================================================
--- dist/game/data/html/famemanager/36480-5.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480-5.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-You are the pride of your clan!
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36479-02.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479-02.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479-02.html (working copy)
@@ -0,0 +1,7 @@
+<html><body>Reputation Manager Rapidus:<br>
+Tell me what you want, and if you are worthy I will help you.<br>
+If you have already <font color="LEVEL">bestowed them with a special ability</font>, <font color="LEVEL">top-grade weapons and armor</font can be enhanced <font color="LEVEL">beyond A-Grade</font> especially for PvP combat. Once a multi-user item is specialized, you will still be able to enchant the item. However, you cannot augment, crystallize, convert or add an attribute to it.</font> Think carefully before making a decision...<br><br>
+<a action="bypass -h npc_%objectId%_exc_multisell 364790001">Enhance weapons and armor for PvP.</a><br>
+<a action="bypass -h npc_%objectId%_exc_multisell 364790002">Cancel enhancement.</a><br>
+<a action="bypass -h npc_%objectId%_multisell 364790003">Obtain consumable item.</a>
+</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36479-05.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479-05.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479-05.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Rapidus:<br>
+You have no sins for which you need to atone.
+</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36479-03.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479-03.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479-03.html (working copy)
@@ -0,0 +1,3 @@
+<html><body>Reputation Manager Rapidus:<br>
+If you are not part of a clan, or if your clan status is too low, your victory cannot be recognized.
+</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36480-1.htm
===================================================================
--- dist/game/data/html/famemanager/36480-1.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480-1.htm (working copy)
@@ -1,8 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-If you need something, please let me know.<br>
-Weapons and armor can be enhanced <font color="LEVEL">beyond Grade A</font> for <font color="LEVEL">top-grade items</font> and specialized for PvP. Weapons must have <font color="LEVEL">bestowed special abilities</font>... Once it is enhanced, an item <font color="LEVEL">can only be used by its owner</font>.<br>
-And once a multi-user item is specialized, <font color="LEVEL">you can use enhanced Spellbooks, but you cannot refine, soul crystalize or convert it</font>. Be careful so that you don't have to cancel the effect.<br><br>
-<a action="bypass -h npc_%objectId%_exc_multisell 364790001">Enhance weapons and armor for PvP.</a><br>
-<a action="bypass -h npc_%objectId%_exc_multisell 364790002">Cancel enhancement.</a><br>
-<a action="bypass -h npc_%objectId%_multisell 364790003">Obtain consumable item.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36479-07.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479-07.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479-07.html (working copy)
@@ -0,0 +1,4 @@
+<html><body>Reputation Manager Rapidus:<br>
+Fame comes naturally when one takes an active part in battles with others. If you have clan members with the same goal, consider participating in Castle Sieges, Fortress Battles and Clan Hall Battles. If you have party members who work extremely well together, try your luck in the Underground Coliseum Game or the Festival of Darkness. If you are alone, demonstrate your prowess by participating in the Olympiad.<br>
+You can use Clan Reputation Points earned in any of the above games to help increase your clan's fame or improve your own PVP capabilities.
+</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36480-4.htm
===================================================================
--- dist/game/data/html/famemanager/36480-4.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480-4.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-You dont have enough PK.
-</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36479-3.htm
===================================================================
--- dist/game/data/html/famemanager/36479-3.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479-3.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-Your PK count was reduced.
-</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36479-4.htm
===================================================================
--- dist/game/data/html/famemanager/36479-4.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479-4.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-You dont have enough PK.
-</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36480.htm
===================================================================
--- dist/game/data/html/famemanager/36480.htm (revision 9631)
+++ dist/game/data/html/famemanager/36480.htm (working copy)
@@ -1,7 +0,0 @@
-<html><body>Reputation Manager Scipio:<br>
-Warrior, are you confident that your actions are undertaken for the sake of peace rather than to serve your own greed? If so, your reward shall be as great as your accomplishment. What do you seek?<br>
-<a action="bypass -h npc_%objectId%_Link famemanager/36480-1.htm">Examine PVP exclusive items.</a><br>
-<a action="bypass -h npc_%objectId%_PK_Count">Decrease PK count by 1 (5,000 Reputation Points).</a><br>
-<a action="bypass -h npc_%objectId%_CRP" msg="2792;">Increase Clan Reputation (1,000 Reputation Points).</a><br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36480-01.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480-01.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480-01.html (working copy)
@@ -0,0 +1,4 @@
+<html><body>Reputation Manager Scipio:<br>
+Diplomacy is sometimes wiser than fighting. Nevertheless, Warriors need power if they are to protect those who depend on them. (Requires completion of second class transfer and Clan Fame level above 40.)<br><br>
+<a action="bypass -h Quest FameManager 36480-07.html">Ask how to obtain Clan Fame points.</a>
+</body></html>
Index: dist/game/data/scripts/ai/npc/FameManager/36479.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36479.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36479.html (working copy)
@@ -0,0 +1,7 @@
+<html><body>Reputation Manager Rapidus:<br>
+O victorious one, have you set your next goal? I have prepared something for you. You will be awarded according to your distinguished service. What is it that you seek?<br>
+<a action="bypass -h Quest FameManager 36479-02.html">Examine PVP exclusive items.</a><br>
+<a action="bypass -h Quest FameManager decreasePk">Decrease PK count by 1 (5,000 Fame Points).</a><br>
+<a action="bypass -h Quest FameManager clanRep">Increase Clan Fame (1,000 Fame Points).</a><br>
+<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
+</body></html>
\ No newline at end of file
Index: dist/game/data/html/famemanager/36479-5.htm
===================================================================
--- dist/game/data/html/famemanager/36479-5.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479-5.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-Your clan will be proud of you.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/FameManager.java
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/FameManager.java (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/FameManager.java (working copy)
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2004-2013 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.FameManager;
+
+import ai.npc.AbstractNpcAI;
+
+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.UserInfo;
+
+/**
+ * Fame Manager AI.
+ * @author St3eT
+ */
+public class FameManager extends AbstractNpcAI
+{
+ // Npc
+ private static final int[] FAME_MANAGER =
+ {
+ 36479, // Rapidus
+ 36480, // Scipio
+ };
+
+ // Misc
+ private static final int MIN_LVL = 40;
+ private static final int DECREASE_COST = 5000;
+ private static final int REPUTATION_COST = 1000;
+
+ private FameManager(String name, String descr)
+ {
+ super(name, descr);
+ addStartNpc(FAME_MANAGER);
+ addTalkId(FAME_MANAGER);
+ addFirstTalkId(FAME_MANAGER);
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ String htmltext = null;
+ switch (event)
+ {
+ case "36479.html":
+ case "36479-02.html":
+ case "36479-07.html":
+ case "36480.html":
+ case "36480-02.html":
+ case "36480-07.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "decreasePk":
+ {
+ if (player.getPkKills() > 0)
+ {
+ if ((player.getFame() >= DECREASE_COST) && (player.getLevel() >= MIN_LVL) && (player.getClassId().level() >= 2))
+ {
+ player.setFame(player.getFame() - DECREASE_COST);
+ player.setPkKills(player.getPkKills() - 1);
+ player.sendPacket(new UserInfo(player));
+ htmltext = npc.getNpcId() + "-06.html";
+ }
+ else
+ {
+ htmltext = npc.getNpcId() + "-01.html";
+ }
+ }
+ else
+ {
+ htmltext = npc.getNpcId() + "-05.html";
+ }
+ break;
+ }
+ case "clanRep":
+ {
+ if ((player.getClan() != null) && (player.getClan().getLevel() >= 5))
+ {
+ if ((player.getFame() >= REPUTATION_COST) && (player.getLevel() >= MIN_LVL) && (player.getClassId().level() >= 2))
+ {
+ player.setFame(player.getFame() - REPUTATION_COST);
+ player.getClan().addReputationScore(50, true);
+ player.sendPacket(new UserInfo(player));
+ player.sendPacket(SystemMessageId.ACQUIRED_50_CLAN_FAME_POINTS);
+ htmltext = npc.getNpcId() + "-04.html";
+
+ }
+ else
+ {
+ htmltext = npc.getNpcId() + "-01.html";
+ }
+ }
+ else
+ {
+ htmltext = npc.getNpcId() + "-03.html";
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onFirstTalk(L2Npc npc, L2PcInstance player)
+ {
+ return ((player.getFame() > 0) && (player.getLevel() >= MIN_LVL) && (player.getClassId().level() >= 2)) ? npc.getNpcId() + ".html" : npc.getNpcId() + "-01.html";
+ }
+
+ public static void main(String[] args)
+ {
+ new FameManager(FameManager.class.getSimpleName(), "ai/npc");
+ }
+}
\ No newline at end of file
Index: dist/game/data/html/famemanager/36479-1.htm
===================================================================
--- dist/game/data/html/famemanager/36479-1.htm (revision 9631)
+++ dist/game/data/html/famemanager/36479-1.htm (working copy)
@@ -1,7 +0,0 @@
-<html><body>Reputation Manager Rapidus:<br>
-Tell me what you want, and if you are worthy I will help you.<br>
-If you have already <font color="LEVEL">bestowed them with a special ability</font>, <font color="LEVEL">top-grade weapons and armor</font> can be enhanced <font color="LEVEL">beyond A-Grade</font> especially for PvP combat. Once a multi-user item is specialized, you will still be able to enchant the item. However, you cannot refine, crystallize, convert or add an attribute to it.</font> Think carefully before making a decision...<br><br>
-<a action="bypass -h npc_%objectId%_exc_multisell 364790001">Enhance weapons and armor for PvP.</a><br>
-<a action="bypass -h npc_%objectId%_exc_multisell 364790002">Cancel enhancement.</a><br>
-<a action="bypass -h npc_%objectId%_multisell 364790003">Obtain consumable item.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/FameManager/36480-02.html
===================================================================
--- dist/game/data/scripts/ai/npc/FameManager/36480-02.html (revision 0)
+++ dist/game/data/scripts/ai/npc/FameManager/36480-02.html (working copy)
@@ -0,0 +1,8 @@
+<html><body>Reputation Manager Scipio:<br>
+If you need something, please let me know.<br>
+Weapons and armor can be enhanced <font color="LEVEL">beyond Grade A</font> for <font color="LEVEL">top-grade items</font> and specialized for PvP. Weapons must have <font color="LEVEL">bestowed special abilities</font>... Once it is enhanced, an item <font color="LEVEL">can only be used by its owner</font>.<br>
+And once a multi-user item is specialized, <font color="LEVEL">you can use enhanced Spellbooks, but you cannot augment, soul crystalize or convert it</font>. Be careful so that you don't have to cancel the effect.<br><br>
+<a action="bypass -h npc_%objectId%_exc_multisell 364790001">Enhance weapons and armor for PvP.</a><br>
+<a action="bypass -h npc_%objectId%_exc_multisell 364790002">Cancel enhancement.</a><br>
+<a action="bypass -h npc_%objectId%_multisell 364790003">Obtain consumable item.</a>
+</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment