Jump to content
  • 0

[help]how to make hero until restart


jossoo

Question

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)

 

 

Link to comment
Share on other sites

Recommended Posts

  • 0

how i can make it in a row ?

example 50 pvp's ina row..

in the increasePvpKills method: killstreak++. After that check if it is ==50 and execute your code (sethero, change title, etc). In the dodie method add killstreak=0.

Link to comment
Share on other sites

  • 0

well this didnt help me  http://www.maxcheaters.com/forum/index.php?topic=126820.0

i want to create my code...i just need to understand what methods what imports and what everything i must do to make all thinks better(for me) coz i am trying to learn java..i am not a pro..

can any1 help me ?

Link to comment
Share on other sites

  • 0

Something like that will prolly work.

 

find public void increasePvpKills() inside L2PcInstance

 

        int KillsInARow = 0;
        KillsInARow++;
        if (KillsInARow > put your number here)
        {
        	setHero(true);
        }

Link to comment
Share on other sites

  • 0

Also dont forget to add a check on rr / logout..

if (KillsInARow > 0) KillsInARow = 0;

idk about this but it might not reset the Kills count on exit/rr.

Horus knows the best , he'll tell u :P

Link to comment
Share on other sites

  • 0

It does.

The L2PcInstance class is cast on each 'player'. Meaning, a new class is created. Hence when the player leaves all classes related to him (including L2PcInstance) are deleted.

Link to comment
Share on other sites

  • 0

However you do have to reset the kill spree counter on death.

Find doDie() in L2PcInstace and add the reset.

 

If you want send me a .patch and I'll see if its correct else, just make sure you don't make public vars that don't need to be public (just make getters and setters) and be sure to add your code after the checks. Good luck.

Link to comment
Share on other sites

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...