Thread: [Galkons] HP & Prayer Orbs draining

Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1 [Galkons] HP & Prayer Orbs draining 
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    if You want the run orb too - http://www.rune-server.org/runescape...ml#post2092124

    Code:
    public void drawPrayerOrb() {
    		int prayer;
    		String cP = RSInterface.interfaceCache[4012].message;
    		int currentPrayer = Integer.parseInt(cP);
    		int maxPrayer = Integer.parseInt(RSInterface.interfaceCache[4013].message);
    		prayer = (int)(((double)currentPrayer / (double)maxPrayer) * 100D);
    		int prayPercent = currentPrayer * 34 / maxPrayer;
    		Sprite orbDrawn = emptyOrb;
    		orbDrawn.drawSprite(184, 49);
    		orbDrawn = new Sprite("emptyorb", 57, 34 - prayPercent);
    		prayerFill.drawSprite(187, 52);
    		orbDrawn.drawSprite(184, 49);
    		int colour;
    		if(prayer >= 75)
    			colour = 65280;
    		else if(prayer >= 50)
    			colour = 0xffff00;
    		else if(prayer >= 25)
    			colour = 0xfca607;
    		else
    			colour = 0xf50d0d;
    		smallText.method382(colour, 227, cP, 75, true);
    		prayerIcon.drawSprite(191, 56);
    	}
    Code:
    public void drawHPOrb() {
    		int health;
    		String cHP = RSInterface.interfaceCache[4016].message;
    		int currentHP = Integer.parseInt(cHP);
    		int maxHP2 = Integer.parseInt(RSInterface.interfaceCache[4017].message);
    		health = (int)(((double)currentHP / (double)maxHP2) * 100D);
    		Sprite orbDrawn = emptyOrb;
    		int hpPercent = currentHP * 34 / maxHP2;
    		orbDrawn.drawSprite(170, 13);
    		orbDrawn = new Sprite("emptyorb", 57, 34 - hpPercent);
    		hitPointsFill.drawSprite(173, 16);
    		orbDrawn.drawSprite(170, 13);
    		int colour;
    		if(health >= 75)
    			colour = 65280;
    		else if(health >= 50)
    			colour = 0xffff00;
    		else if(health >= 25)
    			colour = 0xfca607;
    		else
    			colour = 0xf50d0d;
    		smallText.method382(colour, 213, cHP, 39, true);
    		/* Draws inside orb sprites */
    		hitPointsIcon.drawSprite(179, 24);
    	}
    Replace your old "public Sprite(String img, int width, int height)" with this:
    Code:
     public Sprite(String img, int width, int height)
        {
            try {
    	    Image image = Toolkit.getDefaultToolkit().getImage(location + img + ".png");
    	    myWidth = width;
    	    myHeight = height;
                anInt1444 = myWidth;
                anInt1445 = myHeight;
                anInt1442 = 0;
                anInt1443 = 0;
                myPixels = new int[myWidth * myHeight];
                PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0, myWidth, myHeight, myPixels, 0, myWidth);
                pixelgrabber.grabPixels();
    	    image = null;
            } catch(Exception _ex) {
                System.out.println(_ex);
            }
        }


    Spoiler for different picture now:
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    Added pictures/Reserved


    Spoiler for different picture now:
    Reply With Quote  
     

  4. #3  
    Client God

    Join Date
    Aug 2009
    Posts
    3,127
    Thanks given
    3
    Thanks received
    617
    Rep Power
    907



    Already had this though but nice
    Reply With Quote  
     

  5. #4  
    Registered Member
    felten's Avatar
    Join Date
    Nov 2009
    Posts
    528
    Thanks given
    8
    Thanks received
    4
    Rep Power
    92
    haha , i had this 2 but gj
    LessQQmoarPewPew
    Reply With Quote  
     

  6. #5  
    Registered Member

    Join Date
    Apr 2009
    Posts
    1,727
    Thanks given
    403
    Thanks received
    210
    Rep Power
    390
    Shit
    Now I have to reposition all of that stuff again...

    Thanks for this anyway
    Reply With Quote  
     

  7. #6  
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    Quote Originally Posted by K4rn4ge View Post
    Already had this though but nice
    Thanks, I added new hp bars and thought the sprite loading would work the same as this, and it did


    Spoiler for different picture now:
    Reply With Quote  
     

  8. #7  
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    Quote Originally Posted by Phat 4 u View Post
    Shit
    Now I have to reposition all of that stuff again...

    Thanks for this anyway
    What do you mean?


    Spoiler for different picture now:
    Reply With Quote  
     

  9. #8  
    Registered Member

    Join Date
    Apr 2009
    Posts
    1,727
    Thanks given
    403
    Thanks received
    210
    Rep Power
    390
    Quote Originally Posted by Shoes View Post
    What do you mean?
    I had all the orbs in a cutom place lul
    It actually wont take to long maybe 15 mins to move them
    Reply With Quote  
     

  10. #9  
    Banned
    Join Date
    Mar 2008
    Posts
    1,937
    Thanks given
    131
    Thanks received
    61
    Rep Power
    0
    good job, im using this lol
    Reply With Quote  
     

  11. #10  
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    Quote Originally Posted by Phat 4 u View Post
    I had all the orbs in a cutom place lul
    It actually wont take to long maybe 15 mins to move them
    Using this, it would actually take less then a min to change where on the screen they load tbh


    Spoiler for different picture now:
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •