Photobucket
Moparscape
March 20, 2010, 02:42:35 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Moparscape!
Join today for the ride of you life!
Please read this!!!
 
  Home Help Search Arcade Gallery Why should you join? Staff List Login Register  

Basic 50% Prayer


Pages: [1]
  Print  
Author Topic: Basic 50% Prayer  (Read 37 times)
Full Metalst
Global Moderator
Newbie
*****

Rep: 1
Offline Offline

Posts: 22


View Profile
« on: December 09, 2008, 01:36:03 am »

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 Wink.
-----------------------------------------------------------------------------------------------
TABLE OF CONTENTS[/u]

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

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 Wink.
-----------------------------------------------------------------------------------------------
Step 2: client.java[/u]

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[/u]

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[/u]

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[/u]

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

60% Prima/primadude
30% Cleaned Project Czar
10% to forums that helped me out along the way.
Share Report Spam   Logged
moparman
Administrator
Hero Member
*****

Rep: 15
Offline Offline

Posts: 10013



View Profile
« Reply #1 on: December 09, 2008, 03:46:59 pm »

Good job. I looked over and I don't think you have any errors. So good job on this Smiley
Report Spam   Logged
Full Metalst
Global Moderator
Newbie
*****

Rep: 1
Offline Offline

Posts: 22


View Profile
« Reply #2 on: December 15, 2008, 09:54:44 am »

Ty Mopar ;].
Report Spam   Logged
moparman
Administrator
Hero Member
*****

Rep: 15
Offline Offline

Posts: 10013



View Profile
« Reply #3 on: December 16, 2008, 11:06:50 am »

Np
Report Spam   Logged
Pages: [1]
  Print  
 
Jump to:  

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Hostgator Hosting