Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis_gameserver
- Index: config/crystalia.properties
- ===================================================================
- --- config/crystalia.properties (revision 6)
- +++ config/crystalia.properties (working copy)
- @@ -186,4 +186,13 @@
- # Game server console report.
- # If set to true, game server console will get a report of
- # current vote count, votes needed for next reward and votes needed for first page.
- -AllowHopzoneGameServerReport = True
- \ No newline at end of file
- +AllowHopzoneGameServerReport = True
- +
- +# Cool Pvp Feature (by Crystalia)
- +AllowPvpFeature = False
- +# Pvp's count to show the reward table.
- +PvpForRewards = 100
- +# Option 2 rewards you with pk (set your pk amount).
- +PkForReward = 30
- +# Option 3 rewards you with pvp (set your pvp amount).
- +PvpForReward = 30
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 6)
- +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
- @@ -38,6 +38,7 @@
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- +import net.sf.l2j.gameserver.network.serverpackets.UserInfo;
- import net.sf.l2j.gameserver.util.GMAudit;
- public final class RequestBypassToServer extends L2GameClientPacket
- @@ -101,6 +102,28 @@
- {
- playerHelp(activeChar, _command.substring(12));
- }
- +
- + else if (_command.startsWith("reward1"))
- + {
- + activeChar.setHero(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("Congratulations, wise choise! Enjoy your reward.");
- + }
- +
- + else if (_command.startsWith("reward2"))
- + {
- + activeChar.setPkKills(activeChar.getPkKills() + Config.PK_FOR_REWARD);
- + activeChar.sendPacket(new UserInfo(activeChar));
- + activeChar.sendMessage("Congratulations, wise choise! Enjoy your reward.");
- + }
- +
- + else if (_command.startsWith("reward3"))
- + {
- + activeChar.setPvpKills(activeChar.getPvpKills() + Config.PVP_FOR_REWARD);
- + activeChar.sendPacket(new UserInfo(activeChar));
- + activeChar.sendMessage("Congratulations, wise choise! Enjoy your reward.");
- + }
- +
- else if (_command.startsWith("npc_"))
- {
- if (!activeChar.validateBypass(_command))
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java (revision 6)
- +++ java/net/sf/l2j/Config.java (working copy)
- @@ -559,6 +559,11 @@
- public static int HOPZONE_DUALBOXES_ALLOWED;
- public static boolean ALLOW_HOPZONE_GAME_SERVER_REPORT;
- + public static boolean ALLOW_PVP_FEATURE;
- + public static int PVP_FOR_REWARDS;
- + public static int PK_FOR_REWARD;
- + public static int PVP_FOR_REWARD;
- +
- //--------------------------------------------------
- // Server
- //--------------------------------------------------
- @@ -1462,6 +1467,12 @@
- }
- HOPZONE_DUALBOXES_ALLOWED = Integer.parseInt(crystalia.getProperty("HopzoneDualboxesAllowed", "1"));
- ALLOW_HOPZONE_GAME_SERVER_REPORT = Boolean.parseBoolean(crystalia.getProperty("AllowHopzoneGameServerReport", "false"));
- +
- + ALLOW_PVP_FEATURE = Boolean.parseBoolean(crystalia.getProperty("AllowPvpFeature", "False"));
- + PVP_FOR_REWARDS = Integer.parseInt(crystalia.getProperty("PvpForRewards", "100"));
- + PK_FOR_REWARD = Integer.parseInt(crystalia.getProperty("PkForReward", "30"));
- + PVP_FOR_REWARD = Integer.parseInt(crystalia.getProperty("PvpForReward", "30"));
- +
- }
- catch (Exception e)
- {
- Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 6)
- +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -258,6 +258,9 @@
- // Killing spree.
- private int killingSpreePvps = 0;
- + // Cool Pvp Feature by Crystalia
- + private int ConsecutiveKillCount = 0;
- +
- // VIP.
- private boolean vip = false;
- @@ -5020,6 +5023,16 @@
- // Add karma to attacker and increase its PK counter
- setPvpKills(getPvpKills() + 1);
- + ConsecutiveKillCount++;
- +
- + if (Config.ALLOW_PVP_FEATURE && ConsecutiveKillCount == Config.PVP_FOR_REWARDS)
- + Announcements.getInstance().announceToAll(getName()+", got "+Config.PVP_FOR_REWARDS+" pvp without to die! He got reward for his effort.");
- + {
- + String reward = HtmCache.getInstance().getHtm("data/html/reward.htm");
- + if (reward != null)
- + sendPacket(new NpcHtmlMessage(1, reward));
- + }
- +
- if (Config.ALLOW_KILLING_SPREE)
- {
- killingSpreePvp();
Advertisement
Add Comment
Please, Sign In to add comment