Jump to content

[Share]Updated Quake PvP System


Recommended Posts

Hello.

First of all is not my work the basic code.

(MaestroLuke)

I made some funny and cool staff that maybe

have been shared again maybe not.

An example: Normal PvP Killing Spree System.

When you reach 30 Pvps in a row player setted hero

with full hero skills. When you make restart hero

and the hero skills dissapear. When you die you remain hero.

But your row Pvp kills start from the begginning.

If you reach again 30 Kills in a row and you are already hero

will be added like a normal buff, the skill SuperHaste Lvl2.

You change the skill to whatever you want. When you take the buff

your hero status will not dissappear. If you restart both buff & hero status will removed.

Also after the 30th kills, with each killing Spree announce your CP/MP/HP wil restored to full.

Only The basic code with changes i will post.

For the full code: http://maxcheaters.com/forum/index.php?topic=78071.0

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

Lets Start:

The orange lines have to be added to the normal code.

setPvpKills(getPvpKills() + 1);

quakeSystem++;

 

      switch(quakeSystem)

      {

        case 3:

        Announcements.announceToAll("" + this.getName()+ " is on a Killing Spree!");

        break;

        case 6:

        Announcements.announceToAll("" + this.getName()+ " is on a Rampage with 6 kill!");

        break;

        case 10:

        Announcements.announceToAll("" + this.getName()+ " is on a hunting Spree with 10 kills!");

        break;

        case 14:

        Announcements.announceToAll("" + this.getName()+ " is on a Monster Kill with 14 kills!");

        break;

        case 18:

        Announcements.announceToAll("" + this.getName()+ " is Unstoppable with 18 kills!");

        break;

        case 22:

        Announcements.announceToAll("" + this.getName()+ " is on an Ultra Kill with 22 kills!");

        break;

        case 26:

        Announcements.announceToAll("" + this.getName()+ " is Godlike with 26 kills!");

        break;

        case 30:

        {

        if (!isHero())

        {

        this.setHero(true);

        sendMessage("" + this.getName() + " you have granted with hero status until restart.");

        }

    else

        if (isHero())

        {

        L2Skill skill = SkillTable.getInstance().getInfo(7029, 2); // Superhaste Lvl 2

        if (skill != null)

        {

        skill.getEffects(this, this);

        sendMessage("" + this.getName() + " you feel the power of a GM. SuperHaste!!");

        }

        }

        this.setCurrentCp(this.getMaxCp());

        this.setCurrentHp(this.getMaxHp());

        this.setCurrentMp(this.getMaxMp());

        }

        Announcements.announceToAll("" + this.getName()+ " is Wicked Sick with 30 kills! WoW!");

        break;

        case 36:

        this.setCurrentCp(this.getMaxCp());

        this.setCurrentHp(this.getMaxHp());

        this.setCurrentMp(this.getMaxMp());

        Announcements.announceToAll("" + this.getName()+ " is a killer with 36 kills!");

        break;

        case 44:

        this.setCurrentCp(this.getMaxCp());

        this.setCurrentHp(this.getMaxHp());

        this.setCurrentMp(this.getMaxMp());

        Announcements.announceToAll("" + this.getName()+ " is a psycho with 44 kills!");

        break;

        case 52:

        this.setCurrentCp(this.getMaxCp());

        this.setCurrentHp(this.getMaxHp());

        this.setCurrentMp(this.getMaxMp());

        Announcements.announceToAll("" + this.getName()+ " is crazy with 52 kills!");

        break;

        case 60:

        this.setCurrentCp(this.getMaxCp());

        this.setCurrentHp(this.getMaxHp());

        this.setCurrentMp(this.getMaxMp());

        Announcements.announceToAll("" + this.getName()+ " is servers God with 60 kills!");

        default:

        ;

        }

 

It's a very easy code only for funs of KSS.

For me works 100%.

Have fun and not flame.

Link to comment
Share on other sites

                 if (isHero())
                 {
                    L2Skill skill = SkillTable.getInstance().getInfo(7029, 2); // Superhaste Lvl 2
                    if (skill != null)
                    {
                       skill.getEffects(this, this);
                       sendMessage("" + this.getName() + " you feel the power of a GM. SuperHaste!!");
                    }

 

First of all, you should set quakesystem equal to zero there, if you want it to work like you said. Otherwise the above code should have been in case 60 and the heal code in case 90.

 

Besides this, the above coed is wrong, because if the player is hero himself(from the olympiad), then he will just get 30 pvps in a row to get super haste. Hence you have to make a variable to check if he is hero from quake system, in order to work.

 

But anyway, it's pointless to share sth already shared with 5-6 lines changed. You also in the wrong section too.

Link to comment
Share on other sites

                 if (isHero())
                 {
                    L2Skill skill = SkillTable.getInstance().getInfo(7029, 2); // Superhaste Lvl 2
                    if (skill != null)
                    {
                       skill.getEffects(this, this);
                       sendMessage("" + this.getName() + " you feel the power of a GM. SuperHaste!!");
                    }

 

First of all, you should set quakesystem equal to zero there, if you want it to work like you said. Otherwise the above code should have been in case 60 and the heal code in case 90.

 

 

Besides this, the above coed is wrong, because if the player is hero himself(from the olympiad), then he will just get 30 pvps in a row to get super haste. Hence you have to make a variable to check if he is hero from quake system, in order to work.

 

But anyway, it's pointless to share sth already shared with 5-6 lines changed. You also in the wrong section too.

 

Easy... Easyy... :D

First of all im learnig now java. Second the code is testedfrm me with no problem and as it is.

In 30 PvP you get hero status. If  you are already hero  Olympiad hero QuakeHero yes you will get Superaste 2 in 3 kills.

I do not understand clearly what you are saying to me so easy :)

Link to comment
Share on other sites

Easy... Easyy... :D

First of all im learnig now java. Second the code is testedfrm me with no problem and as it is.

In 30 PvP you get hero status. If  you are already hero  Olympiad hero QuakeHero yes you will get Superaste 2 in 3 kills.

I do not understand clearly what you are saying to me so easy :)

Didn't say anything, i understand. But the best way of learning java l2j is to try create sth unique.

 

If the code was meant to give super haste to ALL heroes(even if they haven't taken hero status from quake pvp system), then it's ok, but if it wasn't meant to be this way, you should have made a boolean variable, and check if this is true too except from checking if the player is a hero.

Link to comment
Share on other sites

Didn't say anything, i understand. But the best way of learning java l2j is to try create sth unique.

 

If the code was meant to give super haste to ALL heroes(even if they haven't taken hero status from quake pvp system), then it's ok, but if it wasn't meant to be this way, you should have made a boolean variable, and check if this is true too except from checking if the player is a hero.

Yes i know that.In case 30 if(!isHero) the player will setted hero.

Again in case 30 if (isHero) than the system automatically will give him a buff.

 

I did this in case if a player s already hero he cannot be hero again (Lol).

He has to be rewarded with somth else.

Link to comment
Share on other sites

Yes i know that.In case 30 if(!isHero) the player will setted hero.

Again in case 30 if (isHero) than the system automatically will give him a buff.

 

I did this in case if a player s already hero he cannot be hero again (Lol).

He has to be rewarded with somth else.

:D You still don't get me...

 

For example, i play in one server with this system. I have never been for pvping, i go to olympiad and become hero. Then i go pvping.. If i achieve 30 kills in a row, then i will get super haste skill without achieving 60 kills, just 30 because i would already be a hero without going to pvp.

 

But also, if i wasn't a hero and went for pvps, if i got 30 in a row i would become hero. But then to get super haste i would need to die and earn again 30 pvp kills. So what i want to say is to add this:

                 if (isHero())
                 {
                    L2Skill skill = SkillTable.getInstance().getInfo(7029, 2); // Superhaste Lvl 2
                    if (skill != null)
                    {
                       skill.getEffects(this, this);
                       sendMessage("" + this.getName() + " you feel the power of a GM. SuperHaste!!");
                    }

 

in case 60, because the player won't have to die to get super haste, but just earn 30 more pvp kills in a row.

 

About the first thing, do it like this:

 

Create above increasePvpKills() method this:

private boolean quakeHero = false;

 

Then change this:

                 if (isHero())
                 {
                    L2Skill skill = SkillTable.getInstance().getInfo(7029, 2); // Superhaste Lvl 2
                    if (skill != null)
                    {
                       skill.getEffects(this, this);
                       sendMessage("" + this.getName() + " you feel the power of a GM. SuperHaste!!");
                    }
                 }
                 this.setCurrentCp(this.getMaxCp());
                 this.setCurrentHp(this.getMaxHp());
                 this.setCurrentMp(this.getMaxMp());
              }

 

To this:

                 if (isHero() && quakeHero)
                 {
                    L2Skill skill = SkillTable.getInstance().getInfo(7029, 2); // Superhaste Lvl 2
                    if (skill != null)
                    {
                       skill.getEffects(this, this);
                       sendMessage("" + this.getName() + " you feel the power of a GM. SuperHaste!!");
                    }
                 }
                 this.setCurrentCp(this.getMaxCp());
                 this.setCurrentHp(this.getMaxHp());
                 this.setCurrentMp(this.getMaxMp());
              }

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
Reply to this topic...

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