Thread: [Elvarg] Combat HP Overlay

Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Appreciate the release. Good job.
    Reply With Quote  
     

  2. #12  
    Extreme Donator

    Kiana's Avatar
    Join Date
    May 2015
    Posts
    1,050
    Thanks given
    147
    Thanks received
    187
    Rep Power
    223
    Thanks, will come in handy.
    Reply With Quote  
     

  3. #13  
    Extreme Donator


    Join Date
    Dec 2016
    Posts
    383
    Thanks given
    99
    Thanks received
    66
    Rep Power
    340
    great thank you mann
    Reply With Quote  
     

  4. #14  
    Registered Member

    Join Date
    Sep 2016
    Posts
    384
    Thanks given
    1
    Thanks received
    117
    Rep Power
    311
    Quote Originally Posted by My3rdLegIsTiny View Post
    Tried adding this to my client, i cant find the hitmarks554 method and when i added the piece of code it had lots of errors, probably because of my client but yeah is there other client i cud leached from thats compatible :/ im new soz gj tho
    Look where hitmarks are being handled. Iirc, it should be in updateEntities.

    Quote Originally Posted by My3rdLegIsTiny View Post
    Tried adding this to my client, i cant find the hitmarks554 method and when i added the piece of code it had lots of errors, probably because of my client but yeah is there other client i cud leached from thats compatible :/ im new soz gj tho
    Look where hitmarks are being handled. Iirc, it should be in updateEntities.
    Reply With Quote  
     

  5. #15  
    Registered Member
    Join Date
    May 2018
    Posts
    53
    Thanks given
    27
    Thanks received
    0
    Rep Power
    29
    Thanks a lot worked beautifully, I thank'd the post
    Attached image
    Reply With Quote  
     

  6. #16  
    Donator

    H1N1's Avatar
    Join Date
    Oct 2009
    Posts
    793
    Thanks given
    25
    Thanks received
    61
    Rep Power
    153
    can this work for ruse
    Attached image
    Reply With Quote  
     

  7. #17  
    Blurite

    Corey's Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,491
    Thanks given
    1,245
    Thanks received
    1,729
    Rep Power
    5000
    Quote Originally Posted by H1N1 View Post
    can this work for ruse
    Java is Java.
    Also both clients are 317.
    Attached image
    Reply With Quote  
     

  8. #18  
    Registered Member
    Join Date
    Sep 2018
    Posts
    22
    Thanks given
    11
    Thanks received
    0
    Rep Power
    11
    well its good thing to have into server but my server cant read Rasterizer2D and mob well u help me ?
    Reply With Quote  
     

  9. #19  
    Donator


    Join Date
    Jan 2010
    Age
    29
    Posts
    4,122
    Thanks given
    274
    Thanks received
    551
    Rep Power
    738
    Quote Originally Posted by guthixpk View Post
    well its good thing to have into server but my server cant read Rasterizer2D and mob well u help me ?
    Mob should be Entity, and Rasterizer2D i believe is DrawingArea
    Reply With Quote  
     

  10. #20  
    Registered Member
    Join Date
    Jan 2018
    Posts
    136
    Thanks given
    143
    Thanks received
    10
    Rep Power
    58
    Quote Originally Posted by Professor Oak View Post
    What you're adding:

    Attached image

    Client.java, add this piece of code:
    Code:
    /**
    	 * Draws information about our current target
    	 * during combat.
    	 */
    	public static void drawCombatBox(Mob mob) {
    		//Get health..
    		int currentHp = mob.currentHealth;
    		int maxHp = mob.maxHealth;
    		
    		//Make sure the mob isn't dead!
    		if(currentHp == 0) {
    			return;
    		}
    		
    		//Get name..
    		String name = null;
    		if(mob instanceof Player) {
    			name = ((Player)mob).name;
    		} else if(mob instanceof Npc) {
    			if(((Npc)mob).desc != null) {
    				name = ((Npc)mob).desc.name;
    			}
    		}
    		
    		//Make sure the mob has a name!
    		if(name == null) {
    			return;
    		}
    		
    		//Positioning..
    		int height = 50;
    		int width = 125;
    		int xPos = 7;
    		int yPos = 20;
    		
    		//Draw box ..
    		Rasterizer2D.drawTransparentBox(xPos, yPos, width, height, 000000, 50);
    		
    		//Draw name..
    		if(name != null) {
    			Client.instance.newSmallFont.drawCenteredString(name, xPos+(width/2), yPos + 12, 16777215, 0);
    		}
    		
    		//Draw health..
    		Client.instance.newBoldFont.drawCenteredString(currentHp + "/" + maxHp, xPos+(width/2), yPos + 30, 16777215, 0);
    		
    		//Draw red and green pixels..
    		
    		//Draw missing health
    		Rasterizer2D.drawBox(xPos + 2, yPos + 38, width - 4, 10, 11740160);
    		
    		//Draw existing health
    		int pixelsLength = (int) (((double) currentHp / (double) maxHp) * (width - 4));
    		if(pixelsLength > (width - 4)) {
    			pixelsLength = (width - 4);
    		}
    		Rasterizer2D.drawBox(xPos + 2, yPos + 38, pixelsLength, 10, 31744);
    	}
    Now search for:
    Code:
    if (!Configuration.hitmarks554) {
    Above it, add the following:
    Code:
    //Drawing combat overlay..
    				if(obj instanceof Npc) {
    					Npc npc = ((Npc)obj);
    					if(localPlayer.interactingEntity == -1) {
    						
    						//Is the npc interacting with us?
    						//If we aren't interacting with others,
    						//show combat box.
    						if((npc.interactingEntity - 32768) == localPlayerIndex) {
    							drawCombatBox(npc);
    						}
    						
    					} else {
    						
    						//Are we interacting with the npc?
    						//Show combat box.
    						if(npc.index == localPlayer.interactingEntity) {
    							drawCombatBox(npc);
    						}
    					}
    				} else if(obj instanceof Player) {
    					Player player = ((Player)obj);
    					if(localPlayer.interactingEntity == -1) {
    						
    						//Is the player interacting with us?
    						//If we aren't interacting with others,
    						//show combat box.
    						if((player.interactingEntity - 32768) == localPlayerIndex) {
    							drawCombatBox(player);
    						}
    						
    					} else {
    						//Are we interacting with the player?
    						//Show combat box.
    						if(player.index == localPlayer.interactingEntity - 32768) {
    							drawCombatBox(player);
    						}
    					}
    				}
    Should be done.
    Thank you!
    Reply With Quote  
     

Page 2 of 2 FirstFirst 12

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. osbuddy hp overlay
    By ekram123 in forum Help
    Replies: 4
    Last Post: 07-09-2016, 04:06 PM
  2. Hp overlay will Rep+Thx
    By SkyDog in forum Help
    Replies: 3
    Last Post: 04-03-2016, 09:02 PM
  3. HP Overlay will REP+THX
    By SkyDog in forum Help
    Replies: 0
    Last Post: 04-03-2016, 08:11 PM
  4. HP Overlay
    By Riley in forum Help
    Replies: 5
    Last Post: 03-22-2016, 09:48 PM
  5. OSBuddy HP overlay.
    By myth in forum Buying
    Replies: 5
    Last Post: 11-03-2015, 05:04 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •