Author Topic: adding the new 614 combat of *10  (Read 159 times)

Offline Amoridan

  • Mithril Member
  • *
  • Posts: 66
  • Rep 0
  • <<>><<>> I see you
  • Location: Seattle, WA // Tokyo, Japan
    • View Profile
adding the new 614 combat of *10
« on: March 28, 2011, 11:54:02 pm »
What You Are Adding:
You are adding the *10 update that runescape introduced in the late 570 revisions.

If you hit 10, you will now hit 100
Instead of your hp being 99 (when your level is 99) it will be 990.


first location: Skills.java
*Making Your Hp multiply by 10*
Find

Code:
public void heal(int hitDiff) {               
try {               
level[3] += hitDiff;               
 int max = getLevelForXp(3);               
 if(level[3] > max) {                       
level[3] = max;               
}               
player.getActionSender().sendSkillLevels();               
player.getUpdateFlags().setAppearanceUpdateRequired(true);                } catch
(Exception e) {               
}       
}

Replace with:

Code:
public void heal(int hitDiff) {               
try {               
level[3] += hitDiff;               
int max = getLevelForXp(3)*10;
               if(level[3] > max) {
                        level[3] = max;
               }
               player.getActionSender().sendSkillLevels();
                player.getUpdateFlags().setAppearanceUpdateRequired(true);
                } catch(Exception e) {               
 }
        }

Add this below it as well

Code:
 public void hit(int hitDiff) {               
 try {               
level[3] -= hitDiff;               
if(level[3] < 0) {                       
level[3] = 0;               
}               
player.getActionSender().sendSkillLevels();               
player.getUpdateFlags().setAppearanceUpdateRequired(true);               
}
catch(Exception e) {               
}       
}

Other Location Player.java
*adding so you hit *10 against players*
Find:
Code:
public void hit(int damage, Hits.HitType type) {                try {                int hp = this.getSkills().getLevelForXp(Skills.HITPOINTS);                if(damage > hp) {                        damage = hp;                }                if(!updateFlags.isHitUpdateRequired()) {                        getHits().setHit1(new Hit(damage, type));                        updateFlags.setHitUpdateRequired(true);                } else {                        if(!updateFlags.isHit2UpdateRequired()) {                                getHits().setHit2(new Hit(damage, type));                                updateFlags.setHit2UpdateRequired(true);                        } else {                                queuedHits.add(new Hit(damage, type));                        }                }                skills.hit(damage);

Replace with:

Code:
public void hit(int damage, Hits.HitType type) {                try {                int hp = this.getSkills().getLevelForXp(Skills.HITPOINTS)*10;                if(damage > hp) {                        damage = hp;                }                if(!updateFlags.isHitUpdateRequired()) {                        getHits().setHit1(new Hit(damage*10, type));                        updateFlags.setHitUpdateRequired(true);                } else {                        if(!updateFlags.isHit2UpdateRequired()) {                                getHits().setHit2(new Hit(damage*10, type));                                updateFlags.setHit2UpdateRequired(true);                        } else {                                queuedHits.add(new Hit(damage*10, type));                        }                }                skills.hit(damage*10);

*Making your hp return back to full (990)

Now Find:

Code:
 [Select]public int getHp() {                return this.getSkills().getLevel(Skills.HITPOINTS);        }        public int getMaxHp() {                return this.getSkills().getLevelForXp(Skills.HITPOINTS);        }

Replace with:

Code:
public int getHp() {                return this.getSkills().getLevel(Skills.HITPOINTS)*10;        }        public int getMaxHp() {                return this.getSkills().getLevelForXp(Skills.HITPOINTS)*10;        }

*Making xp 10 times less then it was before, to equal out with the update*

Now Find:

Code:
public void addHitExp(Player p, int hit) {        int skill = 0;                                if(getEquipment().getAttStyle().equals("Attack"))                                        skill = 0;                                else if(getEquipment().getAttStyle().equals("Strength"))                                        skill = 2;                                else if(getEquipment().getAttStyle().equals("Defence"))                                        skill = 1;                                else if(getEquipment().getAttStyle().equals("Ranged"))                                        skill = 4;                                else if(getEquipment().getAttStyle().equals("Shared")) {                                        p.getSkills().addXp(Skills.ATTACK, hit);                                        p.getSkills().addXp(Skills.DEFENCE, hit);                                        p.getSkills().addXp(Skills.STRENGTH, hit);                                        p.getSkills().addXp(Skills.HITPOINTS, hit);                                        return;                                }else if(getEquipment().getAttStyle().equals("RangedDefence")) {                                        double exp = (double) (1500 * hit), hpExp = (double) (1250 * hit);                                        p.getSkills().addXp(Skills.DEFENCE, exp);                                        p.getSkills().addXp(Skills.RANGE, exp);                                        p.getSkills().addXp(Skills.HITPOINTS, hpExp);                                        return;                                }                                        double exp = (double) (1600 * hit), hpExp = (double) (1300 * hit);                                        p.getSkills().addXp(skill, exp);                                        p.getSkills().addXp(Skills.HITPOINTS, hpExp);                                }

Replace with:

Code:
public void addHitExp(Player p, int hit) {        int skill = 0;                                if(getEquipment().getAttStyle().equals("Attack"))                                        skill = 0;                                else if(getEquipment().getAttStyle().equals("Strength"))                                        skill = 2;                                else if(getEquipment().getAttStyle().equals("Defence"))                                        skill = 1;                                else if(getEquipment().getAttStyle().equals("Ranged"))                                        skill = 4;                                else if(getEquipment().getAttStyle().equals("Shared")) {                                        p.getSkills().addXp(Skills.ATTACK, hit/10);                                        p.getSkills().addXp(Skills.DEFENCE, hit/10);                                        p.getSkills().addXp(Skills.STRENGTH, hit/10);                                        p.getSkills().addXp(Skills.HITPOINTS, hit/10);                                        return;                                }else if(getEquipment().getAttStyle().equals("RangedDefence")) {                                        double exp = (double) (1500 * hit), hpExp = (double) (1250 * hit/10);                                        p.getSkills().addXp(Skills.DEFENCE, exp/10);                                        p.getSkills().addXp(Skills.RANGE, exp/10);                                        p.getSkills().addXp(Skills.HITPOINTS, hpExp/10);                                        return;                                }                                        double exp = (double) (1600 * hit), hpExp = (double) (1300 * hit/10);                                        p.getSkills().addXp(skill, exp/10);                                        p.getSkills().addXp(Skills.HITPOINTS, hpExp/10);                                }
Now in Playervsnpc.java
*making player hit ten times more against npcs*

Find the following codes:

Code:
 n.hit(magichit);

Replace all the codes containing that with,

Code:
 n.hit(magichit*10);
Replace:
Code:
p2.hit(Misc.random(p.NPCMaxHitRange() * 1.50));
With:
Code:
p2.hit(Misc.random(p.NPCMaxHitRange()*10 * 1.50));
Find:
Code:
 p2.hit(Misc.random(p.NPCMaxHitRange()));
Replace with:
Code:
p2.hit(Misc.random(p.NPCMaxHitRange()*10));
Find:
Code:
p2.hit(Misc.random(p.MaxHitRange()));
Replace with:
Code:
p2.hit(Misc.random(p.MaxHitRange()*10));
Find:
Code:
int meleeDamage = Misc.random(p.NPCMaxHitMelee());                                                int meleeDamage2 = Misc.random(p.NPCMaxHitMelee());
Replace with:
Code:
int meleeDamage = Misc.random(p.NPCMaxHitMelee()*10);                                                int meleeDamage2 = Misc.random(p.NPCMaxHitMelee()*10);

Next location NPC.java

*Making npcs hp multiplied by 10*

Find:

Code:
 public int getHp() {                return this.definition.getHitpoints();        }        public int getMaxHp() {                return this.definition.getHitpoints();        }

Replace with:

Code:
public int getHp() {                return this.definition.getHitpoints()*10;        }        public int getMaxHp() {                return this.definition.getHitpoints()*10;        }
NpcDefinition.java

Find:

Code:
public int getHitpoints() {                return hitpoints;        }
Replace with:
Code:
public int getHitpoints() {                return hitpoints*10;        }
your hp bar will max at 250-267 ish, and will not appear as 990)

I did this with my 562 server but then  i changed it back because my client wouldnt except it amybe yours will...

but thats my coding anyway.
btw this looks similar to other TuT's but i made this a while ago
enjoy
credits 90% me
credits 10% staff members of Project Life
Owner and Coder of Project Life,
Amoridan

To apply for Project Life,
http://www.projectlifersps.smfnew.com/
we are a team who release clients and servers to those people who dont know how to do it themselves. And we are non prophit team of programmers, GFX designers, and 3D artists.
To check out are 562 project which we be putting online soon and also we will be releasing after we feel that we dont want it anymore is at: http://www.projectlife562.smfnew.com/

Share on Bluesky Share on Facebook


Offline Sajon

  • Rune Member
  • *
  • Posts: 166
  • Rep -1
  • Never Back down
  • Location: United Kingdom
    • View Profile
Re: adding the new 614 combat of *10
« Reply #1 on: March 29, 2011, 01:06:58 am »
that looks hard and use this code  ['code][/code'] but take the ' off ;)
« Last Edit: March 29, 2011, 01:11:46 am by Sajon »

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: adding the new 614 combat of *10
« Reply #2 on: April 10, 2011, 10:19:23 am »
Locked..
You can unlock on request.