Thread: [562/657] Full x10 Hp Orbs and all

Page 1 of 6 123 ... LastLast
Results 1 to 10 of 54
  1. #1 [562/657] Full x10 Hp Orbs and all 
    Registered Member Swoodc2's Avatar
    Join Date
    Aug 2009
    Posts
    95
    Thanks given
    3
    Thanks received
    1
    Rep Power
    1
    Credit goes out to Implosive and his hp fix thread i read a couple minutes ago, just found out how to have playerhits, npc hits, and poison do x10 damage. First off

    Go to Actionsender.java and look for

    Code:
    sendPlayerOption("Follow", 2, false);
    Below that add

    Code:
    sendConfig(5000, player.getHp()*10);
    sendSkillLevel(3);


    Then in Skills.java, replace

    Code:
    public void Heal(int hitDiff) {
    with

    Code:
    public void heal(int hitDiff) {
    		level[3] += hitDiff;
    		int max = getLevelForXp(3);
    		if(level[3] > max) {
    			level[3] = max;
    		}
    		int ten = level[3] * 10;
    		player.getActionSender().sendConfig(5000, level[3] * 10);
    		player.getUpdateFlags().setAppearanceUpdateRequired(true);
    		player.getActionSender().sendSkillLevel(3);
    	}
    and

    Code:
    public void hit(int hitDiff)
    with

    Code:
    public void hit(int hitDiff) {
    		level[3] -= hitDiff;
    		if(level[3] < 0) {
    			level[3] = 0;
    		}
    		player.getActionSender().sendConfig(5000, level[3] * 10);
    		player.getUpdateFlags().setAppearanceUpdateRequired(true);
    		player.getActionSender().sendSkillLevel(3);
    	}


    ~ One thing I did not do is mess with Player.java gethp, and getmaxhp because Impulses guide gave you 100x hp whenever you died.


    Now go to your Hits.java and change

    Code:
    public static class Hit {
    		
    		private HitType type;
    		private int damage;
    		
    		public Hit(int damage, HitType type) {
    			this.type = type;
    			this.damage = damage;
    		}
    		
    		public HitType getType() {
    			return type;
    		}
    		
    		public int getDamage() {
    			return damage;
    		}
    	}
    into

    Code:
    public static class Hit {
    		
    		private HitType type;
    		private int damage;
    		
    		public Hit(int damage, HitType type) {
    			this.type = type;
    			this.damage = damage * 10;
    		}
    		
    		public HitType getType() {
    			return type;
    		}
    		
    		public int getDamage() {
    			return damage * 10;
    		}
    	}

    and every hit you take will show up as x10 on your orb, ty

    This ones for impules ... To fix the "0"/"10"hp orb after you die from a player or npc, go to you DeathEvent.java and look for

    Code:
    p.getActionSender().sendMessage("Oh dear, you have died");
    under that or under the whole
    Code:
    public void execute() {
    branch add

    Code:
    p.getActionSender().sendConfig(5000, p.getHp()*10);
    	  p.getActionSender().sendSkillLevel(3);
    	  p.getUpdateFlags().setAppearanceUpdateRequired(true);
    and add these imports just incase

    Code:
    import com.rs2hd.model.Skills;
    import com.rs2hd.content.LevelUp;
    import com.rs2hd.net.ActionSender;


    My crappy fix to 3digit hits without last digit being 0, and working with orb. go to skills.java and change
    Code:
    public void hit(int hitDiff) {
    		level[3] -= hitDiff;
    		if(level[3] < 0) {
    			level[3] = 0;
    		}
    		player.getActionSender().sendConfig(5000, level[3] * 10);
    		player.getUpdateFlags().setAppearanceUpdateRequired(true);
    		player.getActionSender().sendSkillLevel(3);
    	}
    into
    Code:
    public void hit(int hitDiff) {
    		level[3] -= hitDiff;
    		if(level[3] < 0) {
    			level[3] = 0;
    		}
    		player.getActionSender().sendConfig(5000, level[3] * 11313131/1030310);
    		player.getUpdateFlags().setAppearanceUpdateRequired(true);
    		player.getActionSender().sendSkillLevel(3);
    	}
    and in hits.java change

    Code:
    public Hit(int damage, HitType type) {
    			this.type = type;
    			this.damage = damage * 10;
    		}
    into

    Code:
    public Hit(int damage, HitType type) {
    			this.type = type;
    			this.damage = damage * 11313131/1030310;
    		}

    edit: Thanks for the skillcapes emote player.java Miner
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Banned
    Join Date
    Jul 2010
    Age
    27
    Posts
    837
    Thanks given
    127
    Thanks received
    43
    Rep Power
    0
    Nice!, testing now.

    thanks!! It works great.
    Reply With Quote  
     

  4. #3  
    Banned
    Join Date
    Jul 2010
    Age
    27
    Posts
    837
    Thanks given
    127
    Thanks received
    43
    Rep Power
    0
    I found a bugg. When a npc hits you. your hp goes back to regular non x10. Fix?

    Found 2 Bugs:

    You need to fix the 10x hitting. It hits like: 220. It doesnt never add the last digit to a number for example

    Hit: 223
    Reply With Quote  
     

  5. #4  
    Registered Member Swoodc2's Avatar
    Join Date
    Aug 2009
    Posts
    95
    Thanks given
    3
    Thanks received
    1
    Rep Power
    1
    that problem with the npc hitting you and going back to normal had to do with player.java, i dont know how i fixed it, but it had something to do with a veteran skillcape snippet i added on this forum, i took it off, and i dont know why it doesnt hit anything other than 0 at the end, but i guess this a start lol. do u want me to give you my player java to see if itll work?

    edit. this is what my player looks like right now, i had the npc problem, changed my player.java, and fixed it, dont really know how tbh lol
    Code:
    public transient int dragondelay = -1;
    	public transient int Gdragondelay = -1;
    	public int getHp() {
    		return skills.getLevel(Skills.HITPOINTS);
    	}
    
    
    	public int getMaxHp() {
    		return skills.getLevelForXp(Skills.HITPOINTS);
    	}
    
    
    	public void setHp(int val) {
    		skills.set(Skills.HITPOINTS, val);
    	}
    Reply With Quote  
     

  6. #5  
    Banned
    Join Date
    Jul 2010
    Age
    27
    Posts
    837
    Thanks given
    127
    Thanks received
    43
    Rep Power
    0
    no lol cause its different... What about your heal methoid in player.java give me the code
    Reply With Quote  
     

  7. #6  
    Registered Member Swoodc2's Avatar
    Join Date
    Aug 2009
    Posts
    95
    Thanks given
    3
    Thanks received
    1
    Rep Power
    1
    my heal and hit is regular
    Code:
    public void heal(int amount) {
    		skills.heal(amount);
    	}
    Code:
    public void hit(int damage) {
    		if(damage > skills.getLevel(3)) {
    			damage = skills.getLevel(3);
    		}
    		if(skills.getLevel(3) <= 0) {
    			damage = 0;
    		}
    		if(damage == 0) {
    			hit(damage, Hits.HitType.NO_DAMAGE);
    		} else {
    			hit(damage, Hits.HitType.NORMAL_DAMAGE);
    		}
    	}
    Reply With Quote  
     

  8. #7  
    Banned
    Join Date
    Jul 2010
    Age
    27
    Posts
    837
    Thanks given
    127
    Thanks received
    43
    Rep Power
    0
    Found it. Its in hit. theres a extra heal methiod in that lol lemme delete. Thanks.
    Reply With Quote  
     

  9. #8  
    Banned
    Join Date
    Jul 2010
    Age
    27
    Posts
    837
    Thanks given
    127
    Thanks received
    43
    Rep Power
    0
    Now you just need to fix 10x hits.
    Reply With Quote  
     

  10. #9  
    Registered Member Swoodc2's Avatar
    Join Date
    Aug 2009
    Posts
    95
    Thanks given
    3
    Thanks received
    1
    Rep Power
    1
    oh paste the extra hit command, so i can check if i have it or not, and yea =\ i wanna make it more realistic
    Reply With Quote  
     

  11. #10  
    Banned
    Join Date
    Jul 2010
    Age
    27
    Posts
    837
    Thanks given
    127
    Thanks received
    43
    Rep Power
    0
    I dont know what to post. But can you help me out with somethen? How can u turn off where. When you click a npc and they come after u without u not even hitting them first. this weird same thing was on 317..
    Reply With Quote  
     

Page 1 of 6 123 ... LastLast

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: 27
    Last Post: 07-07-2011, 04:37 PM
  2. Replies: 3
    Last Post: 11-21-2009, 10:53 PM
  3. Replies: 21
    Last Post: 10-09-2009, 06:28 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
  •