Jump to content
  • 0

[help]how to make hero until restart


Question

Posted

hello mxc...

i have this code(copy paste from revenger )

if (activeChar.getPvpKills() >= 3000)
        {
        	activeChar.sendMessage("You are now on a killing spree!");
      Announcements.getInstance().announceToAll(activeChar.getName() + "Is now on a killing spree!");
        	activeChar.setHero(true); 
        }

how i can make it hero until restart ?

i am not sure but this is for the player when he get 3000 in a row or when he gain 3000?

 if (activeChar.getPvpKills() >= 3000)

 

 

Recommended Posts

  • 0
Posted
   /** The number of ppl killed in a row (Killing without dieing) */
   private int _specKill;

   /**
    * Return the PvP kills in a row count of the L2PcInstance (Number of PvPs in a row).<BR><BR>
    */
   private int getSpecKill()
   {
       return _specKill;
   }

   /**
    * Set the PvP kills in a row of the L2PcInstance (Number of PvPs in a row).<BR><BR>
    */
   private void setSpecKill(int kill)
   {
       _specKill = kill;
   }

=======================================
   @ public boolean doDie(L2Character killer)

   if (getSpecKill() > 0) {
   Announcements.getInstance().announceToAll(killer.getName()+" has stopped "+getName()+"'s Killing Spree of "+getSpecKills()+" kills in a row!);
   if (isFakeHero()) {
   setHero(false);
   setFakeHero(false); }
   setSpecKill(0);
   }

=======================================
   @ public void increasePvpKills()

   setSpecKills(getSpecKill() +1);
   if (getSpecKill() == 10){
   Announcements.getInstance().announceToAll(getName()+" is on a Killing Spree!");
   broadcastPacket(new SocialAction(this.getObjectId(), 16));
   broadcastUserInfo();	
   if (!isHero()) {
   setHero(true);
   setFakeHero(true); }
   sendSkillList();
   }

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..