Re-Release Of Demises LVLing By Skills Tab

Discussion in 'RuneScape Miscellaneous' started by Paralysisâ„¢, Nov 16, 2011.

Re-Release Of Demises LVLing By Skills Tab
  1. Unread #1 - Nov 16, 2011 at 11:31 PM
  2. Paralysisâ„¢
    Joined:
    Sep 16, 2011
    Posts:
    1,033
    Referrals:
    1
    Sythe Gold:
    0

    Paralysisâ„¢ Guru
    Banned

    Re-Release Of Demises LVLing By Skills Tab

    [​IMG]

    Download My BankX2 class: http://uppit.com/xfb9z6z4zepj/BankX2.java

    This is what you will be adding.
    (Posted because loads of people cant be bothered to convert from my delta release, and it allows people who wouldn't be able to convert a chance to use)

    This code is messy but it works, if all your going to do is point out that it needs some organisation; leave. Although, feel free to correct/redo this tutorial if you deem it necessary.

    Step One.
    Declaring the skill booleans

    Go into the client class and search for

    Code:
    public boolean
    Above it, add this.

    Code:
    public boolean attackSkill = false;
    public boolean strengthSkill = false;
    public boolean defenceSkill = false;
    public boolean mageSkill = false;
    public boolean rangeSkill = false;
    public boolean prayerSkill = false;
    public boolean healthSkill = false;
    Step Two.
    Making the skill buttons clickable
    Go into the ClickingButtons class, and search for this.

    Code:
    case 33206:
    If you cant find it, skip this part. If you do find it, remove these cases from your class.

    Code:
    case 33206:
    case 33209:
    case 33212:
    case 33215:
    case 33218:
    case 33221:
    case 33207:
    Now search for

    Code:
    switch (actionButtonId){
    And add these under the {

    Code:
    case 33206:
    c.outStream.createFrame(27);
    c.attackSkill = true;
    break;
    case 33209:
    c.outStream.createFrame(27);
    c.strengthSkill = true;
    break;
    case 33212:
    c.outStream.createFrame(27);
    c.defenceSkill = true;
    break;
    case 33215:
    c.outStream.createFrame(27);
    c.rangeSkill = true;
    break;
    case 33218:
    c.outStream.createFrame(27);
    c.prayerSkill = true;
    break;
    case 33221:
    c.outStream.createFrame(27);
    c.mageSkill = true;
    break;
    case 33207:
    c.outStream.createFrame(27);
    c.healthSkill = true;
    break;
    
    These create the enter amount frame and declare each boolean that would be used for that specific case as true.

    Step Three.
    Finishing Up
    Go into your bankX2 class and under this

    Code:
    if (amount == 0) {
    			amount = 1;
    		}
    Add this clump of unsystematic haphazard

    Code:
    		if(c.attackSkill) {
    				if (c.inWild())
    					return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please remove all your equipment before using this command.");
    						return;
    					}
    				}
    				try {	
    				int skill = 0;
    				int level = amount;
    				if (level > 99)
    					level = 99;
    				else if (level < 0)
    					level = 1;
    				c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    				c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    				c.getPA().refreshSkill(skill);
    				c.attackSkill = false;
    				} catch (Exception e){}
    		}
    		if(c.defenceSkill) {
    						if (c.inWild())
    					return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please remove all your equipment before using this command.");
    						return;
    					}
    				}
    				try {	
    				int skill = 1;
    				int level = amount;
    				if (level > 99)
    					level = 99;
    				else if (level < 0)
    					level = 1;
    				c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    				c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    				c.getPA().refreshSkill(skill);
    				c.defenceSkill = false;
    				} catch (Exception e){}
    		}
    				if(c.strengthSkill) {
    						if (c.inWild())
    					return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please remove all your equipment before using this command.");
    						return;
    					}
    				}
    				try {	
    				int skill = 2;
    				int level = amount;
    				if (level > 99)
    					level = 99;
    				else if (level < 0)
    					level = 1;
    				c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    				c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    				c.getPA().refreshSkill(skill);
    				c.strengthSkill = false;
    				} catch (Exception e){}
    		}
    				if(c.healthSkill) {
    						if (c.inWild())
    					return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please remove all your equipment before using this command.");
    						return;
    					}
    				}
    				try {	
    				int skill = 3;
    				int level = amount;
    				if (level > 99)
    					level = 99;
    				else if (level < 0)
    					level = 1;
    				c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    				c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    				c.getPA().refreshSkill(skill);
    				c.healthSkill = false;
    				} catch (Exception e){}
    		}
    				if(c.rangeSkill) {
    						if (c.inWild())
    					return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please remove all your equipment before using this command.");
    						return;
    					}
    				}
    				try {	
    				int skill = 4;
    				int level = amount;
    				if (level > 99)
    					level = 99;
    				else if (level < 0)
    					level = 1;
    				c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    				c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    				c.getPA().refreshSkill(skill);
    				c.rangeSkill = false;
    				} catch (Exception e){}
    		}
    				if(c.prayerSkill) {
    						if (c.inWild())
    					return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please remove all your equipment before using this command.");
    						return;
    					}
    				}
    				try {	
    				int skill = 5;
    				int level = amount;
    				if (level > 99)
    					level = 99;
    				else if (level < 0)
    					level = 1;
    				c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    				c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    				c.getPA().refreshSkill(skill);
    				c.prayerSkill = false;
    				} catch (Exception e){}
    		}
    				if(c.mageSkill) {
    						if (c.inWild())
    					return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please remove all your equipment before using this command.");
    						return;
    					}
    				}
    				try {	
    				int skill = 6;
    				int level = amount;
    				if (level > 99)
    					level = 99;
    				else if (level < 0)
    					level = 1;
    				c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    				c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    				c.getPA().refreshSkill(skill);
    				c.mageSkill = false;
    				} catch (Exception e){}
    		}
    
    
    This checks if your using the skill interfaces and if so, increases the selected skill. It also checks if its above 99 and if its less then 0, to prevent exceptions.

    Now your done! Have fun with your new levelling system! :awesome:

    100% To Demise :)
     
< [PI] Clicking SkillCape Buttons Quick Chat | Maxed dh pure? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site