Runescape Private Server
 
PortalHomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 New hp bars ready to add if you want.

View previous topic View next topic Go down 
AuthorMessage
skiller



Posts : 6
Reputation : 0
Join date : 2010-03-29

PostSubject: New hp bars ready to add if you want.   Tue Apr 06, 2010 10:06 pm

Here is the code for adding hp bars,

its realy easy it takes like 30 sec. to do it.


:

Client.java

First off declare this code:

Code:
public boolean HPBarToggle = true;


in client.java find:

Code:
if(((Class30_Sub2_Sub4_Sub1) (obj)).anInt1532 > anInt1161)

You should see this:






Code:
            if(((Class30_Sub2_Sub4_Sub1) (obj)).anInt1532 > anInt1161)
            {
                method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 + 15);
                if(anInt963 > -1)
                {
                    int i1 = (((Class30_Sub2_Sub4_Sub1) (obj)).anInt1533 * 30) / ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1534;
                    if(i1 > 30)
                        i1 = 30;
                    Class30_Sub2_Sub1.method336(5, anInt964 - 3, anInt963 - 15, 65280, i1, 0);
                    Class30_Sub2_Sub1.method336(5, anInt964 - 3, (anInt963 - 15) + i1, 0xff0000, 30 - i1, 0);
                }
            }


       


Replace all of that with this


Code:
            if(((Class30_Sub2_Sub4_Sub1) (obj)).anInt1532 > anInt1161)
            {
                if(anInt963 > -1)
                {
                        method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 + 15);
                        int i1 = (((Class30_Sub2_Sub4_Sub1) (obj)).anInt1533 * 30) / ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1534;
                        if(i1 > 30)
                            i1 = 30;
                        int HpPercent = (int)((((Class30_Sub2_Sub4_Sub1)(obj)).anInt1533 * 56) / ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1534);
                        if(HpPercent > 56)
                            HpPercent = 56;
                    if(!HPBarToggle){
                            Class30_Sub2_Sub1.method336(5, anInt964 - 3, anInt963 - 15, 65280, i1, 0);
                            Class30_Sub2_Sub1.method336(5, anInt964 - 3, (anInt963 - 15) + i1, 0xff0000, 30 - i1, 0);
                    } else {
                            HPBarEmpty.method348(anInt963 - 28, 16083, anInt964 - 3);
                        HPBarFull = new Class30_Sub2_Sub1_Sub1(sign.signlink.findcachedir() + "Sprites/HITPOINTS_0.PNG", HpPercent, 7);
                        HPBarFull.method348(anInt963 - 28, 16083, anInt964 - 3);
                    }
                }
            }
       



Declare these:


Code:
        private Class30_Sub2_Sub1_Sub1 HPBarFull;
        private Class30_Sub2_Sub1_Sub1 HPBarEmpty;

and

Code:
        HPBarFull = null;
        HPBarEmpty = null;
       
       


find 'Unpacking media' and add this under it:


Code:
        HPBarFull = new Class30_Sub2_Sub1_Sub1(sign.signlink.findcachedir() + "Sprites/HITPOINTS_0.PNG");
        HPBarEmpty = new Class30_Sub2_Sub1_Sub1(sign.signlink.findcachedir() + "Sprites/HITPOINTS_1.PNG");


In Class30_Sub2_Sub1_Sub1.java add this method:


Code:
    public Class30_Sub2_Sub1_Sub1(String s, int width, int height){
        try {
            Image image = Toolkit.getDefaultToolkit().createImage(FileOperations.ReadFile(s));
            anInt1440 = width;
            anInt1441 = height;
            anInt1444 = anInt1440;
            anInt1445 = anInt1441;
            anInt1442 = 0;
            anInt1443 = 0;
            anIntArray1439 = new int[anInt1440 * anInt1441];
            PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
            pixelgrabber.grabPixels();
        } catch(Exception exception) {
            exception.printStackTrace();
        }
    }
   

finaly download this sprites :

megaupload.com HXKAHBIY

The sprites are made by me.
And thanks to the 1 who made the code.



Its works great Very Happy:

Back to top Go down
View user profile
~ɱàtt™
Forum Mod.
Forum Mod.
avatar

Posts : 76
Reputation : 4
Join date : 2010-03-23
Age : 23
Location : Maryland

PostSubject: Re: New hp bars ready to add if you want.   Thu Apr 08, 2010 10:19 pm

We're a 317, we dont need these new RuneScape HP bars. They look like shit, not to be offensive, but I personally dont like them
Back to top Go down
View user profile http://rsps-epicscape.tk/
 
New hp bars ready to add if you want.
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Anit-Roll Bars vs. Better Set-up
» Norway sends complaint, Paris ready to bid
» Fight me! LETS GET READY TO RUMBLE ETC ETC! (Match Making Thread)
» Keep playing WOW
» woo! ready to play!

Permissions in this forum:You cannot reply to topics in this forum
Epic Scape :: Epic-Scape Forums! :: General :: Suggestions-
Jump to: