Author Topic: [C+P] Overdrive Mode [C+P]  (Read 70 times)

Offline Chandlermaki

  • Rune Member
  • *
  • Posts: 129
  • Rep 6
  • You's trollin'.
  • Location: USA
    • View Profile
[C+P] Overdrive Mode [C+P]
« on: March 31, 2011, 04:24:11 pm »
Hey guys!
In this tutorial, I'm going to be showing you how to implement Orpheus' Overdrive mode.

Overdrive mode is a feature that allows you to do extra damage after acquiring a certain amount of points. You get points by attacking NPCs and other players. You get 5 points per hit, and you lose one point per second.

Difficulty: 1 (possibly more if you have to do any converting)
Classes modified: Client

First, add these (they'll go at the top of your Client class):

Code: [Select]
    public int overdriveBar = 0;
    public int overdriveTime = (getRageLevel() * 240);
    public int[] overdriveLevel = new int[25];
    public int[] overdriveXP = new int[25];
    public boolean overdriveOn = false;
    public boolean overdriveWas = false;
    public int overdriveXer = 2;

Then declare this int:

Code: [Select]
public int getoverdriveLevel() {
if (combat <= 50) {
return 1;
} else if (combat <= 75) {
return 2;
} else if (combat <= 100) {
return 3;
} else if (combat >= 100) {
return 4;
}
return 0;
}

This dictates how powerful the Overdrive is based on their combat level.

Then add these under your process() void:

Code: [Select]
overdriveXer--;
if (overdriveXer <= 0) {
if (overdriveBar > 0) {
overdriveBar--;
}
overdriveXer = 2;
}
if (overdriveBar >= 2500) {
overdriveOn = true;
overdriveWas = true;
overdriveBar = 0;
Send("@red@Overdrive activated!");

}
if (overdriveOn) {
overdriveTime--;
if (overdriveTime <= 0) {
overdriveTime = getoverdriveLevel() * 120;
overdriveOn = false;
}
}
if (overdriveOn) {
stillgfx(383, absY, absX);
startAnimation(1500);
playerSE = 1501;
playerSEW = 1851;
playerSER = 1851;
playerSEA = 1851;
} else if (overdriveWas) {
playerSE = 0x328;
playerSEW = 0x333;
playerSER = 0x338;
playerSEA = 0x326;
}

Then add this under your addSkillXP boolean, under int Runecrafting:

Code: [Select]
if (skill == 0 || skill == 1 || skill == 2 || skill == 3 || skill == 4) {
overdriveBar += getoverdriveLevel();
}

Then, find something that has to do with Dharok's effect, and add this under the closing bracket:

Code: [Select]
if (overdriveOn) {
MaxHit = MaxHit * (getoverdriveLevel() + 1);
}

I understand that using process() isn't a good idea, but this isn't
a lot of code. It won't be a problem unless your process() is already
stuffed with code.

The only think I'm going to leave up to you is making an interface
that shows how many Overdrive points you've accumulated.

If I forgot anything, let me know! I'll be happy to help out with adding this, too.
Insert clever signature here.

Share on Bluesky Share on Facebook


Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: [C+P] Overdrive Mode [C+P]
« Reply #1 on: March 31, 2011, 04:31:29 pm »
Nice mate :)
I will work on the Interface for the Points.  Could you tell me were i would start For making it: /  Like How would i get your points to show up :/

Offline Chandlermaki

  • Rune Member
  • *
  • Posts: 129
  • Rep 6
  • You's trollin'.
  • Location: USA
    • View Profile
Re: [C+P] Overdrive Mode [C+P]
« Reply #2 on: March 31, 2011, 04:36:45 pm »
Nice mate :)
I will work on the Interface for the Points.  Could you tell me were i would start For making it: /  Like How would i get your points to show up :/

Personally, I use a line in the quest tab.

Code: [Select]
        c.sendString("@gre@OD Points : @whi@" + Integer.toString(c.overdriveBar), 7338);

That's what mine looks like in my Text class. I'm not sure what it would look like in a Delta source, but it shouldn't be terribly hard to convert.
Insert clever signature here.

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: [C+P] Overdrive Mode [C+P]
« Reply #3 on: March 31, 2011, 05:01:21 pm »
i will try work on this then :)

plus look at my help topic

Offline Tampon Abuse

  • Dragon Member
  • *
  • Posts: 193
  • Rep 1
  • All vote for Rune-Kingdom!
  • Location: Oklahoma, Oklahoma City
    • View Profile
Re: [C+P] Overdrive Mode [C+P]
« Reply #4 on: April 04, 2011, 06:07:37 am »
Nice Nice

Everyone Vote For RUNE-KINGDOM at http://www.mmorpgtop200.com/in.php?site=6792

Offline Chandlermaki

  • Rune Member
  • *
  • Posts: 129
  • Rep 6
  • You's trollin'.
  • Location: USA
    • View Profile
Re: [C+P] Overdrive Mode [C+P]
« Reply #5 on: April 04, 2011, 03:28:42 pm »
Nice Nice

Thanks! Also, I'm open to any tutorial suggestions!
Insert clever signature here.