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();
   }

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...