508/525 Ancient curses 100% switching and icons server sided.

Go down

508/525 Ancient curses 100% switching and icons server sided.

Post  Nathan on Tue Nov 02, 2010 2:18 pm

508/525 Ancient curses, 100% switching and icons server sided.

Difficulty 1/10. just copying the code and replacing.

NOTE: You will have to change all protects to where they are now server sided. like changing pro melee. u would change all usingPrayer(19) to usingPrayer(9).

1.ActionButtons.java.

Search for case 271: replace all of case 271 with this.


Code:
/******************************************************************************/
                          /*Ancient Curses*/                              /******************************************************************************/
      case 271:
         int prayer = -1;
         String name = "";
         if (buttonId == 5) { //Protect Item                   
         prayer = 0;
         name = "Protect Item";
}

if (prayer == 0 && p.getLevelForXP(5) < 50) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 50 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 7) { //Sap Warrior
            prayer = 1;
            name = "Sap Warrior";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 1 && p.getLevelForXP(5) < 50) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 50 to use <col=000080>"+name, "", "", "");
}

         if (buttonId == 9) { //Sap Ranger
            prayer = 2;
            name = "Sap Ranger";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 2 && p.getLevelForXP(5) < 52) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 52 to use <col=000080>"+name, "", "", "");
}

         if (buttonId == 11) { //Sap Mage
            prayer = 3;
            name = "Sap Mage";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 3 && p.getLevelForXP(5) < 54) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 54 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 13) { //Sap Spirit
            prayer = 4;
            name = "Sap Spirit";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 25, 26}, prayer);
         }


if (prayer == 4 && p.getLevelForXP(5) < 56) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 56 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 15) { //Berserker
            prayer = 5;
            name = "Berserker";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {}, prayer);
         }

if (prayer == 5 && p.getLevelForXP(5) < 59) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 59 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 17) { //Deflect Summoning
            prayer = 6;
            name = "Deflect Summoning";
            if (!p.usingPrayer(prayer)) {
               p.switchPrayers(new int[] {17, 18, 22, 23, 24}, prayer);
               if (p.usingPrayer(7)) {
                  p.headIconPrayer = 10;
               } else if (p.usingPrayer(8)) {
                  p.headIconPrayer = 9;
               } else if (p.usingPrayer(9)) {
                  p.headIconPrayer = 8;
               } else {
                  p.headIconPrayer = 7;
               }
            } else {
               if (p.usingPrayer(7)) {
                  p.headIconPrayer = 2;
               } else if (p.usingPrayer(8)) {
                  p.headIconPrayer = 1;
               } else if (p.usingPrayer(9)) {
                  p.headIconPrayer = 0;
               } else {
                  p.headIconPrayer = -1;
               }
            }
         }

if (prayer == 6 && p.getLevelForXP(5) < 62) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 62 to use <col=000080>"+name, "", "", "");
}


if (buttonId == 19) { //Deflect Magic
            prayer = 7;
            name = "Deflect Magic";
            if (!p.usingPrayer(prayer)) {
               p.switchPrayers(new int[] {8, 9, 17, 18, 22, 23, 24}, prayer);
               if (p.usingPrayer(6)) {
                  p.headIconPrayer = 10;
               } else {
                  p.headIconPrayer = 2;
               }
            } else {
               if (p.usingPrayer(6)) {
                  p.headIconPrayer = 7;
               } else {
                  p.headIconPrayer = -1;
               }
            }
         }

if (prayer == 7 && p.getLevelForXP(5) < 65) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 65 to use <col=000080>"+name, "", "", "");
}

if (buttonId == 21) { //Deflect Missiles
            prayer = 8;
            name = "Deflect Missiles";
            if (!p.usingPrayer(prayer)) {
               p.switchPrayers(new int[] {7, 9, 17, 18, 22, 23, 24}, prayer);
               if (p.usingPrayer(6)) {
                  p.headIconPrayer = 9;
               } else {
                  p.headIconPrayer = 1;
               }
            } else {
               if (p.usingPrayer(6)) {
                  p.headIconPrayer = 7;
               } else {
                  p.headIconPrayer = -1;
               }
            }
         }

if (prayer == 8 && p.getLevelForXP(5) < 68) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 68 to use <col=000080>"+name, "", "", "");
}


if (buttonId == 23) { //Deflect Melee
            prayer = 9;
            name = "Deflect Melee";
            if (!p.usingPrayer(prayer)) {
               p.switchPrayers(new int[] {8, 7, 17, 18, 22, 23, 24}, prayer);
               if (p.usingPrayer(6)) {
                  p.headIconPrayer = 8;
               } else {
                  p.headIconPrayer = 0;
               }
            } else {
               if (p.usingPrayer(6)) {
                  p.headIconPrayer = 7;
               } else {
                  p.headIconPrayer = -1;
               }
            }
         }

if (prayer == 9 && p.getLevelForXP(5) < 71) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 71 to use <col=000080>"+name, "", "", "");
}
         
         if (buttonId == 25) { //Leech Attack
         prayer = 10;
         name = "Leech Attack";
                        if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 19}, prayer);
      }

if (prayer == 10 && p.getLevelForXP(5) < 74) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 74 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 27) { //Leech Range
            prayer = 11;
            name = "Leech Range";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 11 && p.getLevelForXP(5) < 76) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 76 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 29) { //Leech Magic
            prayer = 12;
            name = "Leech Magic";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 12 && p.getLevelForXP(5) < 78) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 78 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 31) { //Leech Defence
            prayer = 13;
            name = "Leech Defence";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 19, 25, 26}, prayer);
         }

if (prayer == 13 && p.getLevelForXP(5) < 80) {

p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 80 to use <col=000080>"+name, "", "", "");

break;
      }
         if (buttonId == 33) { //Leech Strength
            prayer = 14;
            name = "Leech Strength";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 14 && p.getLevelForXP(5) < 82) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 82 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 35) { //Leech Energy
            prayer = 15;
            name = "Leech Energy";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 15 && p.getLevelForXP(5) < 84) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 84 to use <col=000080>"+name, "", "", "");
}
         if (buttonId == 53) { //Leech Attack
            prayer = 16;
            name = "Leech Attack";
            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 19, 20, 21, 25, 26}, prayer);
         }

if (prayer == 16 && p.getLevelForXP(5) < 86) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 86 to use <col=000080>"+name, "", "", "");
}

if (buttonId == 37) { //Wrath
            prayer = 17;
            name = "Wrath";
            if (!p.usingPrayer(prayer)) {
               p.switchPrayers(new int[] {7, 6, 8, 9, 18, 22, 23, 24}, prayer);
                  p.headIconPrayer = 5;
            } else {
               p.headIconPrayer = -1;
            }
}

if (prayer == 17 && p.getLevelForXP(5) < 89) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 89 to use <col=000080>"+name, "", "", "");
break;
}

if (buttonId == 39) { // Soul Split
            prayer = 18;
            name = "Soul split";
            if (!p.usingPrayer(prayer)) {
               p.switchPrayers(new int[] {6, 7, 8, 9, 17, 22, 23, 24}, prayer);
                  p.headIconPrayer = 4;
            } else {
               p.headIconPrayer = -1;
            }
         }

         
         if (buttonId == 41) { //Turmoil
            prayer = 19;
            name = "Turmoil";
            if (!p.usingPrayer(19) && p.skillLvl[5] > 0 && p.skillLvl[1] > 69) {
                                  p.requestAnim(725, 1);
                                  p.requestGFX(658, 0 );                     
}
                            if (!p.usingPrayer(prayer)) p.switchPrayers(new int[] {1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16, 20, 21, 25}, prayer);
if (prayer == 19 && p.getLevelForXP(5) < 95) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 95 to use <col=000080>"+name, "", "", "");
}
}
         if (!p.canPray(prayer)) {
            p.headIconPrayer = -1;
            if (p.getLevelForXP(5) < p.prayers[prayer][0] && p.skillLvl[5] > 0) {
            }
if (prayer == 18 && p.getLevelForXP(5) < 92) {
  p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 92 to use <col=000080>"+name, "", "", "");
  break;

}
break;
}

if (prayer == 19 && p.getLevelForXP(5) < 95) {
p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Prayer</col> level of 95 to use <col=000080>"+name, "", "", "");
}
 if (prayer == 19 && p.getLevelForXP(1) < 45) {
  p.getActionSender().dialogue(p, -1, -1, "", 1, "You need a <col=000080>Defence</col> level of 45 to use <col=000080>"+name, "", "", "");
  break;
  }

         p.togglePrayer(prayer, p.usingPrayer(prayer) ? 0 : 1);
         if (p.usingPrayer(prayer)) {
            p.prayerSounds(prayer);
         } else {
            p.getActionSender().addSoundEffect(p, 2663, 1, 0, 0);
         }
         p.updateReq = true;
         p.appearanceUpdateReq = true;
         break;

/******************************************************************************/
                            /*End Of Ancient Curses*/   

I am not giving u my ancient curses client because icba to upload.

Result.


Nathan
Registered Member
Registered Member

Posts : 3
Join date : 2010-10-30

View user profile

Back to top Go down

Re: 508/525 Ancient curses 100% switching and icons server sided.

Post  Ix Hybrid Xi on Tue Nov 02, 2010 3:28 pm

Another good tutorial Repped++ Very useful to the new coder.

_________________
avatar
Ix Hybrid Xi
Forum Administrator
Forum Administrator

Posts : 43
Join date : 2010-10-06

View user profile

Back to top Go down

Re: 508/525 Ancient curses 100% switching and icons server sided.

Post  Nathan on Tue Nov 02, 2010 4:19 pm

Ix Hybrid Xi wrote:Another good tutorial Repped++ Very useful to the new coder.

Thanks mate i will post more tuts after i get my new comp because atm i cant code with the comp i got.

Nathan
Registered Member
Registered Member

Posts : 3
Join date : 2010-10-30

View user profile

Back to top Go down

Re: 508/525 Ancient curses 100% switching and icons server sided.

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum