Thread: Full prayer with levels (Xp rate) (not icons!)

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1 Full prayer with levels (Xp rate) (not icons!) 
    littleplop
    Guest
    Rules call me a leech, or say this is useless (remove)
    Remove any thing if asked


    Prayer with head icons and levels!

    Right im going to make this in to a noob guild so, heres a color code of what hard.
    0
    5
    10

    Things that are red you should not skip! (read them)
    things that are orange you should not skip but that not as hard.. (read them as well)
    green things are mostly comments etc (there should be nothing you would have to add in green)


    [)--------------------------------------------(]
    Lets start

    Step 1
    First of search for,

    Code:
    /*PRAYER STUFF*/

    And replaces that code all the way down to

    Code:
    /*END OF PRAYER STUFF*/
    With this code

    Code:
    /*PRAYER STUFF*/
    /* PRAYER */
    public int prayernow = playerLevel[5];
    public int maxprayer = getLevelForXP(playerXP[5]);
    public int PDrain = 0;
    public int PTimer = 0;
    public int NewDrain = 0;
    public int PrayerTimer = 0;
    public boolean Noprayer = true;
    public boolean DrainPray = false;
    
    //PrayerBooleans
    
    public boolean Def1 = false;
    public boolean Str1 = false;
    public boolean Att1 = false;
    public boolean Def2 = false;
    public boolean Str2 = false;
    public boolean Att2 = false;
    public boolean Def3 = false;
    public boolean Str3 = false;
    public boolean Att3 = false;
    public boolean Protect = false;
    public boolean RRestore = false;
    public boolean RHeal = false;
    public boolean PItem = false;
    public boolean Retribution = false;
    public boolean Redemption = false;
    public boolean PMage = false;
    public boolean PRange = false;
    public boolean PMelee = false;
    public boolean Smite = false;
    
    public void ResetProtPrayers()
    {
    PMage = false;
    PRange = false;
    PMelee = false;
    Str1 = false;
    Str2 = false; 
    Str3 = false;
    Def1 = false;
    Def2 = false;
    Def3 = false;
    Att1 = false;
    Att2 = false;
    Att3 = false;
    Protect = false;
    RRestore = false; 
    RHeal = false;
    PItem = false;
    Retribution = false;
    Redemption = false;
    }
    
    public void noprayer()
    {
    if(PMage == false 
    && PRange == false 
    && PMelee == false 
    && Str1 == false 
    && Str2 == false 
    &&  Str3 == false 
    && Def1 == false 
    && Def2 == false 
    && Def3 == false 
    && Att1 == false 
    && Att2 == false 
    && Att3 == false 
    && Protect == false 
    && RRestore == false 
    && RHeal == false 
    && PItem == false 
    && Retribution == false 
    && Redemption == false)
    {
    Noprayer = true;
    DrainPray = false;
    }
    else
    {
    Noprayer = false;
    }
    }
    
    public void newdrain()
    {
    int OldDrain = PDrain;
    if(NewDrain > OldDrain && Noprayer == false)
    {
    PDrain = OldDrain;
    }
    else if(NewDrain <= OldDrain || Noprayer == true)
    {
    PDrain = NewDrain;
    }
    }
    /*END OF PRAYER STUFF*/
    Now search for,
    Code:
    public void CalculateMaxHit() {
    And just below that you should see
    Code:
    		if (StrPrayer == 1) { //Burst Of Strength
    			MaxHit += (double)(Strength * 0.005);
    		} else if (StrPrayer == 2) { //Super Human Strength
    			MaxHit += (double)(Strength * 0.01);
    		} else if (StrPrayer == 3) { //Ultimate Strength
    			MaxHit += (double)(Strength * 0.015);
    		}
    Now replaces that code with this,
    Code:
    		if (Str1) { //Burst Of Strength
    			MaxHit += (double)(Strength * 0.005);
    		} else if (Str2) { //Super Human Strength
    			MaxHit += (double)(Strength * 0.01);
    		} else if (Str3) { //Ultimate Strength
    			MaxHit += (double)(Strength * 0.015);
    		}
    Now search for
    Code:
    case 21233:

    you should then see below that all the prayer cases

    Code:
    /*PRAYERS*/
    // Lower the prayer drain the faster it goes
    case 21233: // Thick Skin
    if(Skin == false)
    {
    noprayer();
    NewDrain = 40;
    DrainPray = true;
    Skin = true;
    newdrain();
    }
    else if(Skin == true)
    {
    Skin = false;
    }
    break;
    //---------------------------------------------------------//
    Now replaces them all, all the way down to smite
    Code:
    case 2173: // Smite
    if(Smite == false)
    {
    noprayer();
    NewDrain = 10;
    DrainPray = true;
    Smite = true;
    newdrain();
    }
    else if(Smite == true)
    {
    Smite = false;
    }
    break;
    //---------------------------------------------------------//

    With my prayer cases

    Code:
    /*[) ----- Start of pray ----- (]*/	
    /*[) ---------- Level 1 Think Skin ----------(]*/
    case 21233: // Thick Skin //Increases your defence by 5%
    if(playerXP[5] >= 0)
    {
    if(Def1 == false)
    {
    noprayer();
    NewDrain = 40;
    DrainPray = true;
    Def1 = true;
    newdrain();
    }
    else if(Def1 == true)
    {
    Def1 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 1 to use this.");
    }
    break;
    /*[) ---------- Level 4 Burst Of Strength ----------(]*/
    case 21234: // Burst Of Strength //Increases strength your  by 5%
    if(playerXP[5] >= 330)
    {
    if(Str1 == false)
    {
    noprayer();
    NewDrain = 38;
    DrainPray = true;
    Str1 = true;
    newdrain();
    }
    else if(Str1 == true)
    {
    Str1 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 4 to use this.");
    }
    break;
    /*[) ---------- Level 7 Clarity Of Thought ----------(]*/
    case 21235: // Clarity Of Thought //Increases Attack your  by 5%
    if(playerXP[5] >= 650)
    {
    if(Att1 == false)
    {
    noprayer();
    NewDrain = 36;
    DrainPray = true;
    Att1 = true;
    newdrain();
    }
    else if(Att1 == true)
    {
    Att1 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 7 to use this.");
    }
    break;
    /*[) ---------- Level 10 Rock Skin ----------(]*/
    case 21236: // Rock Skin //Increases your defence by 10%
    if(playerXP[5] >= 1154)
    {
    if(Def2 == false)
    {
    noprayer();
    NewDrain = 34;
    DrainPray = true;
    Def2 = true;
    newdrain();
    }
    else if(Def2 == true)
    {
    Def2 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 10 to use this.");
    }
    break;
    /*[) ---------- Level 13 Superhuman Strength ----------(]*/
    case 21237: // Superhuman Strength //Increases strength your  by 10%
    if(playerXP[5] >= 1833)
    {
    if(Str2 == false)
    {
    noprayer();
    NewDrain = 32;
    DrainPray = true;
    Str2 = true;
    newdrain();
    }
    else if(Str2 == true)
    {
    Str2 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 13 to use this.");
    }
    break;
    /*[) ---------- Level 16 Improved Reflexes ----------(]*/
    case 21238: // Improved Reflexes //Increases Attack your  by `0%
    if(playerXP[5] >= 2746)
    {
    if(Att2 == false)
    {
    noprayer();
    NewDrain = 30;
    DrainPray = true;
    Att2 = true;
    newdrain();
    }
    else if(Att2 == true)
    {
    Att2 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 16 to use this.");
    }
    break;
    /*[) ---------- Level 19 Rapid Restore ----------(]*/
    case 21239: // Rapid Restore // 2x restore rate for all stats except hitpoints and prayer
    if(playerXP[5] >= 3973)
    {
    if(RRestore == false)
    {
    noprayer();
    NewDrain = 28;
    DrainPray = true;
    RRestore = true;
    newdrain();
    }
    else if(RRestore == true)
    {
    RRestore = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 19 to use this.");
    }
    break;
    /*[) ---------- level 22 Rapid Heal ----------(]*/
    case 21240: // Rapid Heal // 2x restore rate for hitpoints stat
    if(playerXP[5] >= 5624)
    {
    if(RHeal == false)
    {
    noprayer();
    NewDrain = 26;
    DrainPray = true;
    RHeal = true;
    newdrain();
    }
    else if(RHeal == true)
    {
    RHeal = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 22 to use this.");
    }
    break;
    /*[) ---------- Level 25 Protect Item ----------(]*/
    case 21241: //Protect Item //Keep 1 extra item if you die
    if(playerXP[5] >= 7842)
    {
    if(PItem == false)
    {
    noprayer();
    NewDrain = 24;
    DrainPray = true;
    PItem = true;
    newdrain();
    }
    else if(PItem == true)
    {
    PItem = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 25 to use this.");
    }
    break;
    /*[) ---------- Level 28 Steel Skin ----------(]*/
    case 21242: // Steel Skin // Increases your defence by 15%
    if(playerXP[5] >= 9730)
    {
    if(Def3 == false)
    {
    noprayer();
    NewDrain = 22;
    DrainPray = true;
    Def3 = true;
    newdrain();
    }
    else if(Def3 == true)
    {
    Def3 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 28 to use this.");
    }
    break;
    /*[) ---------- Level 31 Ultimate Strength ----------(]*/
    case 21243: // Ultimate Strength //Increases strength your  by 15%
    if(playerXP[5] >= 14833)
    {
    if(Str3 == false)
    {
    noprayer();
    NewDrain = 20;
    DrainPray = true;
    Str3 = true;
    newdrain();
    }
    else if(Str3 == true)
    {
    Str3 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 31 to use this.");
    }
    break;
    /*[) ---------- Level 34 Incredible Reflexes ----------(]*/
    case 21244: // Incredible Reflexes //Increases Attack your  by 15%
    if(playerXP[5] >= 20224)
    {
    if(Att3 == false)
    {
    noprayer();
    NewDrain = 18;
    DrainPray = true;
    Att3 = true;
    newdrain();
    }
    else if(Att3 == true)
    {
    Att3 = false;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 34 to use this.");
    }
    break;
    /*[) ---------- Level 37 Protect From Magic ----------(]*/
    case 21245: // Protect From Magic // protection from magical attacks
    if(playerXP[5] >= 27473)
    {
    if(PMage == true)
    {
    appearanceUpdateRequired = true;
    PMage = false;
    headIcon = 0;
    }
    else if(PMage == false)
    {
    noprayer();
    ResetProtPrayers();
    NewDrain = 16;
    DrainPray = true;
    PMage = true;
    newdrain();
    headIcon = 4;
    appearanceUpdateRequired = true;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 37 to use this.");
    }
    break;
    /*[) ---------- Level 40 Protect From Range ----------(]*/
    case 21246: // Protect From Range // protection from ranged attacks
    if(playerXP[5] >= 37224)
    {
    if(PRange== true)
    {
    appearanceUpdateRequired = true;
    PRange = false;
    headIcon = 0;
    }
    else if(PRange == false)
    {
    noprayer();
    ResetProtPrayers();
    NewDrain = 14;
    DrainPray = true;
    PRange = true;
    newdrain();
    headIcon = 2;
    appearanceUpdateRequired = true;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 40 to use this.");
    }
    break;
    /*[) ---------- Level 43 Protect From Melee ----------(]*/
    case 21247: // Protect From Melee // protection from close attacks
    if(playerXP[5] >= 50339)
    {
    if(PMelee == true)
    {
    appearanceUpdateRequired = true;
    PMelee = false;
    headIcon = 0;
    }
    else if(PMelee == false)
    {
    noprayer();
    ResetProtPrayers();
    NewDrain = 12;
    DrainPray = true;
    PMelee = true;
    newdrain();
    headIcon = 1;
    appearanceUpdateRequired = true;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 43 to use this.");
    }
    break;
    /*[) ---------- Level 46 Retribution ----------(]*/
    case 2171: // Retribution // Inflicts damage to nearby targets if you die
    if(playerXP[5] >= 67983)
    {
    if(Retribution == true)
    {
    appearanceUpdateRequired = true;
    Retribution = false;
    headIcon = 0;
    }
    else if(Retribution == false)
    {
    noprayer();
    ResetProtPrayers();
    NewDrain = 10;
    DrainPray = true;
    Retribution = true;
    newdrain();
    headIcon = 8;
    appearanceUpdateRequired = true;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 46 to use this.");
    }
    break;
    /*[) ----------  Level 49 Redemption ----------(]*/
    case 2172: // Redemption //Heals you if your health falls below 10%
    if(playerXP[5] >= 91721)
    {
    if(Redemption == true)
    {
    appearanceUpdateRequired = true;
    Redemption = false;
    headIcon = 0;
    }
    else if(Redemption == false)
    {
    noprayer();
    ResetProtPrayers();
    NewDrain = 8;
    DrainPray = true;
    Redemption = true;
    newdrain();
    headIcon = 32;
    appearanceUpdateRequired = true;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 49 to use this.");
    }
    break;
    /*[) ---------- Level 52 Smite ----------(]*/
    case 2173: // Smite //1/4 damage dealt is also removed from opponet's Prayer
    if(playerXP[5] >= 123660)
    {
    if(Smite == true)
    {
    appearanceUpdateRequired = true;
    Smite = false;
    headIcon = 0;
    }
    else if(Smite == false)
    {
    noprayer();
    ResetProtPrayers();
    NewDrain = 6;
    DrainPray = true;
    Smite = true;
    newdrain();
    headIcon = 16;
    appearanceUpdateRequired = true;
    }
    }
    else
    {
    sendMessage("You need a Prayer level of 52 to use this.");
    }
    break;
    /*[) ---------- End of all pray ----------(]*/
    Now search for
    Code:
    else if (command.equalsIgnoreCase("prayerstats"))
    And
    Code:
    else if (command.equalsIgnoreCase("drainme"))

    And replace them both with
    Code:
    else if (command.equalsIgnoreCase("prayerstats"))
    {
    sendMessage("PrayerDrain = "+PDrain);
    sendMessage("Prayer Points = "+prayernow);
    }
    else if (command.equalsIgnoreCase("drainme"))
    {
    sendMessage("Your prayer gets drained.");
    playerLevel[playerPrayer] -= 1;
    prayernow -= 1;
    refreshSkills();
    updateRequired = true; 
    }
    Now search for
    Code:
    You have run out of prayer points
    And scroll up to (look a little up from there)
    Code:
    
    noprayer();
    
    PrayerTimer -= 1;
    
    if(DrainPray == true && PrayerTimer <= 1 && playerLevel[5] > 0)
    And copy that up down to..
    Code:
    ResetProtPrayers();
    sendMessage("You have run out of prayer points");
    }
    And remove it and in its places put,
    Code:
    PrayerTimer -= 1;
    
    		if(PrayerTimer < 0 && playerLevel[5] < getLevelForXP(playerXP[5])){
    			PrayerTimer = 40;
    		}
    		if(PrayerTimer == 0 && playerLevel[5] < getLevelForXP(playerXP[5])){
    			playerLevel[5] += 1;
    			addSkillXP(0, 5);
    		}
    
    		noprayer();
    
    PrayerTimer -= 1;
    
    if(DrainPray == true && PrayerTimer <= 1 && playerLevel[5] > 0)
    {
    PrayerTimer = PDrain;
    playerLevel[playerPrayer]--;
    prayernow--;
    refreshSkills();
    updateRequired = true;
    }
    if(DrainPray == true && playerLevel[5] == 0) {
    PrayerTimer = 0;
    DrainPray = false;
    ResetProtPrayers();
    headIcon = 0;
    sendMessage("You have run out of prayer points");
    }

    Right thats the main part dun,

    Right now to make sure that noobs who like to change the frame names add this void
    NOTE: Leave the commented one as they are the "\n" is not in your server,

    Code:
    	public void prayername()
    	{
    	//sendQuest("Level 1\nThick Skin", 688);
    	sendQuest("Increases your defence by 5%",5655);
    	//sendQuest("Level 4\nBurst of Strength",689);
    	sendQuest("Increases your strength by 5%",5659);
    	//sendQuest("Level 7\nClarity of Thought",690);
    	sendQuest("Increases your attack by 5%",5663);
    	//sendQuest("Level 10\nRock Skin",691);
    	sendQuest("Increases your defence by 10%",5667);
    	//sendQuest("Level 13\nSuperhuman Strength",692);
    	sendQuest("Increases your strength by 10%",5671);
    	//sendQuest("Level 16\nImproved Reflexes",693);
    	sendQuest("Increases your attack by 10%",5675);
    	//sendQuest("Level 19\nRapid Restore",694);
    	//sendQuest("2x restore rate for all stats\nexcept hitpoints and prayer",5679);
    	//sendQuest("Level 22\nRapid Heal",695);
    	sendQuest("2x restore rate for hitpoints stat",5683);
    	//sendQuest("Level 25\nProtect Items",696);
    	sendQuest("Keep 1 extra item if you die",5687);
    	//sendQuest("Level 28\nSteel Skin",697);
    	sendQuest("Increases your defence by 15%",5691);
    	//sendQuest("Level 31\nUltimate Strength",698);
    	sendQuest("Increases your strength by 15%",5695);
    	//sendQuest("Level 34\nIncredible Reflexes",699);
    	sendQuest("Increases your attack by 15%",5699);
    	//sendQuest("Level 37\nProtect from Magic",700);
    	sendQuest("Protection from magical attacks",5703);
    	//sendQuest("Level 40\nProtect from Missiles",701);
    	sendQuest("Protection from ranged attacks",702);
    	//sendQuest("Level 43\nProtect from Melee",704);
    	sendQuest("Protection from close attacks",705);
    	//sendQuest("Level 46\nRetribution",708);
    	//sendQuest("Inflicts damage to nearby\ntargets if you die",709);
    	//sendQuest("Level 49\nRedemption",712);
    	//sendQuest("Heals you if your health\nfalls below 10%",713);
    	//sendQuest("Level 52\nSmite",1741);
    	//sendQuest("1/4 of damage dealt is also\n removed from opponent's Prayer",1742);
    	}
    Next to make the frame on the prayer interface drain as you use it,
    Search for
    Code:
    public void refreshSkills() {
    And in there add
    Code:
    sendQuest("Prayer: "+playerLevel[5]+"/"+getLevelForXP(playerXP[5])+"", 687);//Prayer frame

    Right i think thats every thing, if you get any errors don't panic i will help you.

    I would like to thank who ever made th ebasic pray system i started from,
    Other Credit: (poeple from mopar!)

    I Loot I
    Javas Java
    Hi123
    uber killer

    Thanks

    (I made this some time ago!) i only cdedit the poeple above because they have hade ago at remaking prayer (that is the only resaon) i made this my self!
     

  2. #2  
    Community Veteran


    Join Date
    Jul 2006
    Posts
    789
    Thanks given
    31
    Thanks received
    80
    Rep Power
    177
    Quote Originally Posted by Nimion View Post
    Well what can i say?
    comments suggests ect, that was simply spam, good job fool
     

  3. #3  
    ~Kajakas~
    Guest
    nice work....i needed it.
     

  4. #4  
    project-rs owner
    Join Date
    Sep 2006
    Age
    29
    Posts
    914
    Thanks given
    4
    Thanks received
    4
    Rep Power
    49
    leeched?? because you say {no icons} in the title
    and in the source headIcon = 32;
     

  5. #5  
    Registered Member
    Big J's Avatar
    Join Date
    Nov 2006
    Age
    28
    Posts
    512
    Thanks given
    0
    Thanks received
    0
    Rep Power
    143
    Kind of long but definitely rewarding in the end. Rep+ for you!
    Latest

    Favorite

     

  6. #6  
    Community Veteran


    Join Date
    Jun 2007
    Posts
    1,148
    Thanks given
    1
    Thanks received
    19
    Rep Power
    812
    Quote Originally Posted by laurens View Post
    leeched?? because you say {no icons} in the title
    and in the source headIcon = 32;
    Defines what icon is used in server to click and which one turns off and on and i think means no icons as in No Overhead or tabbed icons(visual) (i think)

    [Only registered and activated users can see links. ]
     

  7. #7  
    littleplop
    Guest
    rule call me a leetch and i remove it in 00000000.00001 secounds! rule 2 follow rule 1!

    and i say no icons just to basicly tel you thats it not a tut to add icons its a tut for the levels as well, and i swear to god call me a leetch =.= and its going down i hate that!! i sit here making this crap for you guys and you call me a leetch (not saying you are) "some of you guys are nice" but then some of you are right arse holes that just like to **** poeple over :@

    oh and it dose saport icons but you need a client that has headicon_prayer in the main class "client.java" server side
    Last edited by littleplop; 06-13-2007 at 08:17 PM. Reason: Double posting is not allowed!
     

  8. #8  
    wat
    yolofan123's Avatar
    Join Date
    Dec 2006
    Posts
    78
    Thanks given
    4
    Thanks received
    1
    Rep Power
    20
    i got an error

    client.java:16778: illegal start of expression
    private boolean packetProcess() {
    ^
    1 error
    Press any key to continue . . .
    hi
     

  9. #9  
    JavaŠ
    Guest
    Quote Originally Posted by laurens View Post
    leeched?? because you say {no icons} in the title
    and in the source headIcon = 32;
    That Means If You're Using A Client With Icons, Lets Say Project X, The Icons Would Show
     

  10. #10  
    I'm unique


    Join Date
    Oct 2006
    Age
    29
    Posts
    708
    Thanks given
    0
    Thanks received
    1
    Rep Power
    82
    Umm... Nice thanks for posting

    ~Simox
    Sincerly yours,
    Simox.
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 3
    Last Post: 11-21-2009, 10:53 PM
  2. Replies: 9
    Last Post: 09-05-2008, 11:46 PM
  3. Prayer Icons/ PK Skull Icons
    By Mrquarter in forum Tutorials
    Replies: 12
    Last Post: 09-05-2008, 05:59 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •