Jump to content

Recommended Posts

Posted
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

===================================================================

--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java   (revision 4194)

+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java   (working copy)

@@ -178,6 +179,7 @@

import com.l2jserver.gameserver.network.serverpackets.ExOlympiadUserInfo;

import com.l2jserver.gameserver.network.serverpackets.ExPrivateStoreSetWholeMsg;

import com.l2jserver.gameserver.network.serverpackets.ExSetCompassZoneCode;

+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;

import com.l2jserver.gameserver.network.serverpackets.ExSpawnEmitter;

import com.l2jserver.gameserver.network.serverpackets.ExStartScenePlayer;

import com.l2jserver.gameserver.network.serverpackets.ExStorageMaxCount;

@@ -313,6 +315,10 @@

   public static final int STORE_PRIVATE_BUY = 3;

   public static final int STORE_PRIVATE_MANUFACTURE = 5;

   public static final int STORE_PRIVATE_PACKAGE_SELL = 8;

+  

+   /** Kill for Hero System */

+   private static int KillsForAddHero = 0;

+   private static int KillsForRemoveHero = 0;

 

   /** The table containing all minimum level needed for each Expertise (None, D, C, B, A, S, S80, S84)*/

    private static final int[] EXPERTISE_LEVELS =

@@ -5596,6 +5608,9 @@

      // calculate death penalty buff

      calculateDeathPenaltyBuffLevel(killer);

     

+      if (Config.TEAMSRV_HERO_ENABLED)

+         KillsForHero(false);

+      

      stopRentPet();

      stopWaterTask();

     

@@ -5803,6 +5818,9 @@

      {

         // Add karma to attacker and increase its PK counter

         setPvpKills(getPvpKills() + 1);

+        

+         if (Config.TEAMSRV_HERO_ENABLED)

+            KillsForHero(true);

 

         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter

         sendPacket(new UserInfo(this));

@@ -5867,11 +5885,49 @@

      if (target instanceof L2PcInstance

            && AntiFeedManager.getInstance().check(this, target))

         setPkKills(getPkKills() + 1);

+      

+      if (Config.TEAMSRV_HERO_ENABLED)

+         KillsForHero(true);

 

      // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter

      sendPacket(new UserInfo(this));

      sendPacket(new ExBrExtraUserInfo(this));

   }

+  

+   private void KillsForHero(boolean b)

+    {

+      

+   /**

+    * @author -hyon-

+    * @web www.maxcheaters.com

+    * @version 2.0

+    *

+    */

+      

+      if(isHero() && !b)

+         ++KillsForRemoveHero;

+      

+      if (!isHero() && b)

+         ++KillsForAddHero;

+  

+      if (KillsForAddHero >= Config.TEAMSRV_HERO_KILLS)

+      {

+         setHero(true);

+         broadcastUserInfo();

+         KillsForAddHero = 0;

+         sendPacket(new ExShowScreenMessage("Congratulations! You killed " + Config.TEAMSRV_HERO_KILLS + " player! You gived Hero status!", 5000));

+         Announcements.getInstance().announceToAll("Congratulations "+ getName()+"! gived hero status.");

+      }

+        

+      if(KillsForRemoveHero >= Config.TEAMSRV_HERO_REMOVE)

+      {

+         setHero(false);

+         broadcastUserInfo();

+         KillsForRemoveHero = 0;

+         sendPacket(new ExShowScreenMessage("Sorry! You died " + Config.TEAMSRV_HERO_REMOVE + "x. Hero Status Removed.", 5000));

+         Announcements.getInstance().announceToAll("Sorry "+ getName()+"! removed hero status.");

+      }

+    }

 

   public int calculateKarmaLost(long exp)

   {

 

java/config/l2jmods.properties

 

# Mana Potion (item ID 728), using skill ID 9008.

EnableManaPotionSupport = False

 

+# ---------------------------------------------- #

+# Hero Status (until restart) for kills System [Author: -hyon]

+# ---------------------------------------------- #

+# Enabled Hero status for kills? (Default: False)

+HeroStatusForKills = False

+# Kills (PvP+PK) for Hero Status (Default: 20)

+HeroStatusForKillsCount = 20

+# Death for removed Hero Status (Default: 2)

+DeleteHeroStatusDeathCount = 2

 

net/sf/l2j/Config.java

 

               L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(L2JModSettings.getProperty("EnableManaPotionSupport", "false"));

+               TEAMSRV_HERO_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("HeroStatusForKills", "False"));

+   TEAMSRV_HERO_KILLS = Integer.parseInt(L2JModSettings.getProperty("HeroStatusForKillsCount", "10"));

+   TEAMSRV_HERO_REMOVE = Integer.parseInt(L2JModSettings.getProperty("DeleteHeroStatusDeathCount", "10"));

            }

            catch (Exception e)

Posted

Already Share

 

+   /**
+    * @author -hyon-
+    * @web www.maxcheaters.com
+    * @version 2.0
+    *
+    */

 

You make this share??? loool is Mentor from teamsrv sorry man you steal this share

 

WRONG CREDIT

Posted

Already Share

 

+   /**
+    * @author -hyon-
+    * @web www.maxcheaters.com
+    * @version 2.0
+    *
+    */

 

You make this share??? loool is Mentor from teamsrv sorry man you steal this share

 

WRONG CREDIT

he cp around 3-4 topics already

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock