Thread: [317] [PI] Health Orb Not Draining

Results 1 to 3 of 3
  1. #1 [317] [PI] Health Orb Not Draining 
    Registered Member B E N's Avatar
    Join Date
    May 2012
    Posts
    142
    Thanks given
    14
    Thanks received
    3
    Rep Power
    36
    Whenever I lose health, the number goes down but the orb stays full. I ripped a drawhealth method out of another server that has health orb draining, but it still didnt work.

    Picture:







    Code:

    Code:
    public void drawHPOrb() {
    		String OrbDirectory = signlink.findcachedir()
    		+ "Sprites/GameFrame/Orbs/";
    		String s1 = RSInterface.interfaceCache[4016].message;
    		s1 = s1.replaceAll("%", "");
    		int j = Integer.parseInt(s1);
    		String s2 = RSInterface.interfaceCache[4017].message;
    		int health;
    		s2 = s2.replaceAll("%", "");
    		int k = Integer.parseInt(s2);
    		int i = (int) (((double) j / (double) k) * 100D);
    		String cHP = RSInterface.interfaceCache[4016].message;
    		int currentHP = Integer.parseInt(cHP);
    		String mHP = RSInterface.interfaceCache[4017].message;
    		int maxHP2 = Integer.parseInt(mHP);
    		health = (int) (((double) currentHP / (double) maxHP2) * 100D);
    		int x = isFullScreen ? 363 + extraWidth : 0;
    		int y = isFullScreen ? +32 : 0;
    
    		int xPos = isFullScreen ? 387 + extraWidth : 0;
    		int xPosTXT = isFullScreen ? 335 + extraWidth : 0;
    		int yPos = isFullScreen ? +32 : 0;
    		if (isFullScreen) {
    			emptyOrb = new Sprite("GameFrame/Orbs/ORBS 12");
    		} else {
    			emptyOrb = new Sprite("GameFrame/Orbs/emptyorb");
    		}
    		orbFill = new Sprite(OrbDirectory + "Orb 2.PNG", 27, getOrbFill(health));
    		/* Draws empty orb */
    		emptyOrb.drawSprite(170 + x, 13 + y);
    		/* Draws current HP text */
    		if (health <= 99999 && health >= 75) {
    			smallText.method382(65280, 213 + xPosTXT, cHP, 39 + yPos, true);
    		} else if (health <= 74 && health >= 50) {
    			smallText.method382(0xffff00, 213 + xPosTXT, cHP, 39 + yPos, true);
    		} else if (health <= 49 && health >= 25) {
    			smallText.method382(0xfca607, 213 + xPosTXT, cHP, 39 + yPos, true);
    		} else if (health <= 24 && health >= 0) {
    			smallText.method382(0xf50d0d, 213 + xPosTXT, cHP, 39 + yPos, true);
    		}
    		hitPointsFill.drawSprite(173 + xPos, 16 + yPos);
    		orbFill.drawSprite(173 + xPos, 16 + yPos);
    		/* Draws inside orb sprites */
    		if (i <= 20) {
    			if (loopCycle % 20 < 10) {
    				hitPointsIcon.drawSprite(179 + xPos, 24 + yPos);
    			}
    		} else {
    			hitPointsIcon.drawSprite(179 + xPos, 24 + yPos);
    		}
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member B E N's Avatar
    Join Date
    May 2012
    Posts
    142
    Thanks given
    14
    Thanks received
    3
    Rep Power
    36
    bump
    Reply With Quote  
     

  3. #3  
    Registered Member B E N's Avatar
    Join Date
    May 2012
    Posts
    142
    Thanks given
    14
    Thanks received
    3
    Rep Power
    36
    bump
    Reply With Quote  
     


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: 8
    Last Post: 09-18-2013, 11:45 PM
  2. Replies: 2
    Last Post: 09-04-2012, 12:30 AM
  3. Replies: 4
    Last Post: 03-25-2012, 04:40 AM
  4. [PI] Health Orb Functional
    By MecJr in forum Show-off
    Replies: 22
    Last Post: 01-17-2012, 03:51 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
  •