Adblock breaks this site

Basic 50% Prayer

Discussion in 'RuneScape Miscellaneous' started by Full Metalst, Dec 9, 2008.

Thread Status:
Not open for further replies.
  1. Full Metalst

    Full Metalst Guest

    Referrals:
    0
    Basic 50% Prayer

    Basic Prayer

    Purpose: For you to finally know the basics of Prayer.

    (Note: If this is wrong, please tell me, and I'll ask a Mod to remove, I guarantee this is right though.)

    Difficulty: 6/10

    Assumed Knowledge: Patience, coding experience, learning NOT to leech TuTs(Dark 4 lif3), and knowing Java conventions.

    File(s) Modified: client.java

    Source(s) Tested: Summon-Pkz: Cleaned Project Czar - Full credits to Prima/primadude for the source - THANK YOU PRIMA! Also, I got no permission from him, so if you want to flame me, go ahead, because leech isn't leech if you gave credits ;).
    -----------------------------------------------------------------------------------------------
    TABLE OF CONTENTS

    Step 1................................................................Introduction
    Step 2................................................................client.java
    Step 3................................................................Searching
    Step 4................................................................Adding basic Prayer
    Step 5................................................................Conclusion
    -----------------------------------------------------------------------------------------------
    Step 1: Introduction

    In servers like Delta or Summon-Pkz, you might see that they added Prayer in their client.java. That is right. I will be showing you how to make the BASIC Prayer, if this doesn't work, or if you get errors, just tell me, and I should fix them for you.

    Note: I give FULL credits to Prima/primadude for source, I TAKE NO CREDITS FOR THESE METHODS!

    Basic Prayer is pretty easy actually, and I made this short and simple from Summon-Pkz's client.java. Again, I take no credits for these methods. All you have to do is search and copy and paste. Good luck, and I hope you do this right ;).
    -----------------------------------------------------------------------------------------------
    Step 2: client.java

    This one is pretty easy actually. Go into your source files. Next, find client.java. (Client - Java File for Newbies). If you are using a different source and get errors, just tell me, and I might fix them for you. If you have Delta, you will not need to add these methods.
    ------------------------------------------------------------------------------------------------
    Step 3: Searching

    Now, by pressing and holding Ctrl + F, search either for

    Code:
    prayer
    Code:
    magic
    If you can't find that, than just simply declare my methods.

    Note: You MIGHT get a "reached end of file while parsing" error from declaring, so look for another method, and after the LAST "}", add the code I will tell you to.
    ----------------------------------------------------------------------------------------------
    Step 4: Adding basic prayer

    Either you declared, or found a different bracket, add these methods:

    Code:
    /*PRAYER STUFF*/
    public int currentpray = playerLevel[5];
    public int maxpray = getLevelForXP(playerXP[5]);
    public int PrayerDrain = 0;
    public int PrayerTimer = 0;
    public int NewDrain = 0;
    public boolean Str1 = false;
    public boolean Str2 = false; 
    public boolean Str3 = false;
    public boolean Skin = false;
    public boolean Rock = false;
    public boolean Steel = false;
    public boolean Clarity = false;
    public boolean Reflex2 = false;
    public boolean Reflex3 = false;
    public boolean ProtItem = false;
    public boolean RapidRestore = false; 
    public boolean RapidHeal = false;
    public boolean Retribution = false;
    public boolean Redemption = false;
    public boolean DrainPray = false;
    public boolean ProtMage = false;
    public boolean ProtRange = false;
    public boolean ProtMelee = false;
    public boolean Smite = false;
    public boolean Noprayer = true;
    
    public void ResetProtPrayers()
    {
    ProtMage = false;
    ProtRange = false;
    ProtMelee = false;
    Str1 = false;
    Str2 = false; 
    Str3 = false;
    Skin = false;
    Rock = false;
    Steel = false;
    Clarity = false;
    Reflex2 = false;
    Reflex3 = false;
    ProtItem = false;
    RapidRestore = false; 
    RapidHeal = false;
    Retribution = false;
    Redemption = false;
    Piety = false;
    }
    
    public void noprayer()
    {
    if(
    ProtMage == false &&
    ProtRange == false &&
    ProtMelee == false &&
    Str1 == false &&
    Str2 == false && 
    Str3 == false &&
    Skin == false &&
    Rock == false &&
    Steel == false &&
    Clarity == false &&
    Reflex2 == false &&
    Reflex3 == false &&
    ProtItem == false &&
    RapidRestore == false && 
    RapidHeal == false &&
    Retribution == false &&
    Redemption == false)
    {
    Noprayer = true;
    DrainPray = false;
    }
    else
    {
    Noprayer = false;
    }
    }
    
    public void newdrain() // this makes it so when the player activates a new prayer if the new drain rate is faster it uses that one ;)
    {
    int OldDrain = PrayerDrain;
    if(NewDrain > OldDrain && Noprayer == false)
    {
    PrayerDrain = OldDrain;
    }
    else if (NewDrain <= OldDrain || Noprayer == true)
    {
    PrayerDrain = NewDrain;
    }
    }
    
    /*END OF PRAYER STUFF*/
    Again, I take NO credits for this. If it says that it can't find the ints, then simply declare these:

    Code:
    public int currentpray = playerLevel[5];
    public int maxpray = getLevelForXP(playerXP[5]);
    public int PrayerDrain = 0;
    public int PrayerTimer = 0;
    public int NewDrain = 0;
    public void noprayer()
    If you don't have it, or get an error from it. I believe this is about 50% Prayer, I'm not really sure, I don't think it has Piety and some other prayers, you can check if you want.
    ----------------------------------------------------------------------------------------
    Step 5: Conclusion

    This is my BASIC Prayer Tutorial, you might need to add more for it to function properly. At least I started for you ;). Again, I give FULL credits to Prima(primadude) from MoparScape, for his methods. Good luck, and I hope you get no errors.
    ----------------------------------------------------------------------------------------
    Credits

    60% Prima/primadude
    30% Cleaned Project Czar
    10% to forums that helped me out along the way.
     
< Basic Woodcutting | MayhewScape 508 HD >
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site