Emily
September 25th, 2010, 21:00
Since I've quit Rsps, I've decided to start sharing small bits of what I know every so often. Instead of just releasing things which seems to get pissed, ill just share the knowledge and let you use it as you wish. Now this tutorial is EXTREMELY easy, but not many people are aware of it, so why not start here lul.
First its a good idea to have these ids in mind:
Attack Emote
Defense Emote
Walk Emote
Run Emote
2h or no?
Projectile sent or no?
Custom Gfx on attack?
File: Equipment.java
Found in the folder "model"
Changing the Walk Emote:
Search
public int getWalkAnim() {
After
try {
if(this.tempWalkAnim != -1) {
return this.tempWalkAnim;
} if(get(3) == null) {
return 0x333;
} Item item = get(3);
String weapon = item.getDefinition().getName();
int id = item.getDefinition().getId();
if(weapon.equals("Saradomin staff") || weapon.equals("Guthix staff") || weapon.equals("Zamorak staff")) {
return 0x333;
Add this:
} else if (id == 4755) {
return 2060;
4755 is the Weapon Id
2060 is the Walk Animation Id
Now Search For:
public int getRunAnim() {
After
try {
if(this.tempWalkAnim != -1) {
return this.tempWalkAnim;
} if(get(3) == null) {
return 0x338;
} Item item = get(3);
String weapon = item.getDefinition().getName();
int id = item.getDefinition().getId();
if (id == 4718 || weapon.endsWith("2h sword") || id == 10858 || id == 8880 || id == 6528 || weapon.endsWith("godsword") || weapon.equals("Saradomin sword")) {
return 7039;
Add:
} else if (id == 4153) {
return 1664;
4153 is the Weapon Id
1664 is the Run Animation Id
Changing Defense Animation:
Search
public int getDefenceAnimation() {
Under:
try {
int weapon = this.get(Equipment.SLOT_WEAPON) != null ? this.get(Equipment.SLOT_WEAPON).getId() : -1;
int shield = this.get(Equipment.SLOT_SHIELD) != null ? this.get(Equipment.SLOT_SHIELD).getId() : -1;
if(weapon == -1 && shield == -1) {
return 404;
Add:
if(weapon == 11694) {
return 3939;
}
11694 = Item Id
3939 = Defense Emote
Now if you want to make a shield have a certain defense emote, then it would just be
if(shield == 1189) {
return 1156;
}
Now if you want the Item to be 2h Do this:
Find:
public static boolean isTwoHanded(ItemDefinition def) {
After:
String wepEquiped = def.getName();
int itemId = def.getId();
if (itemId == 4212)
return true;
Add:
else if (itemId == 8880)
return true;
8880 = Item Id
True means it will be 2h, if its a 2h weapon and you want it to be single handed, then make it false
Now Changing the Attack Animation:
Search
public int getAttackAnimation() {
Under:
public int getAttackAnimation() {
try {
int weapon = this.get(Equipment.SLOT_WEAPON) != null ? this.get(Equipment.SLOT_WEAPON).getId() : -1;
int fightStyle = this.player.getAttackStyle();
switch(weapon) {
Add:
case 4151://Abbysal Whip
return 55;
4151 or the case number, is the item Id
55 is the animation you want the weapon to attack with
Now if you want to add a gfx while it attacks make it look like this:
case 4151:
player.graphics(139);
return 55;
The 139 is the Gfx Id it will attack with.
Changing the attack speed:
Search
public int getAttackSpeed() {
Under:
try {
int weapon = this.get(Equipment.SLOT_WEAPON) != null ? this.get(Equipment.SLOT_WEAPON).getId() : -1;
switch(weapon) {
Add:
case 4151:
return 3;
4151 is the item id
3 is the speed it will attack with
Looks like:
Only the registered members can see the link.
First its a good idea to have these ids in mind:
Attack Emote
Defense Emote
Walk Emote
Run Emote
2h or no?
Projectile sent or no?
Custom Gfx on attack?
File: Equipment.java
Found in the folder "model"
Changing the Walk Emote:
Search
public int getWalkAnim() {
After
try {
if(this.tempWalkAnim != -1) {
return this.tempWalkAnim;
} if(get(3) == null) {
return 0x333;
} Item item = get(3);
String weapon = item.getDefinition().getName();
int id = item.getDefinition().getId();
if(weapon.equals("Saradomin staff") || weapon.equals("Guthix staff") || weapon.equals("Zamorak staff")) {
return 0x333;
Add this:
} else if (id == 4755) {
return 2060;
4755 is the Weapon Id
2060 is the Walk Animation Id
Now Search For:
public int getRunAnim() {
After
try {
if(this.tempWalkAnim != -1) {
return this.tempWalkAnim;
} if(get(3) == null) {
return 0x338;
} Item item = get(3);
String weapon = item.getDefinition().getName();
int id = item.getDefinition().getId();
if (id == 4718 || weapon.endsWith("2h sword") || id == 10858 || id == 8880 || id == 6528 || weapon.endsWith("godsword") || weapon.equals("Saradomin sword")) {
return 7039;
Add:
} else if (id == 4153) {
return 1664;
4153 is the Weapon Id
1664 is the Run Animation Id
Changing Defense Animation:
Search
public int getDefenceAnimation() {
Under:
try {
int weapon = this.get(Equipment.SLOT_WEAPON) != null ? this.get(Equipment.SLOT_WEAPON).getId() : -1;
int shield = this.get(Equipment.SLOT_SHIELD) != null ? this.get(Equipment.SLOT_SHIELD).getId() : -1;
if(weapon == -1 && shield == -1) {
return 404;
Add:
if(weapon == 11694) {
return 3939;
}
11694 = Item Id
3939 = Defense Emote
Now if you want to make a shield have a certain defense emote, then it would just be
if(shield == 1189) {
return 1156;
}
Now if you want the Item to be 2h Do this:
Find:
public static boolean isTwoHanded(ItemDefinition def) {
After:
String wepEquiped = def.getName();
int itemId = def.getId();
if (itemId == 4212)
return true;
Add:
else if (itemId == 8880)
return true;
8880 = Item Id
True means it will be 2h, if its a 2h weapon and you want it to be single handed, then make it false
Now Changing the Attack Animation:
Search
public int getAttackAnimation() {
Under:
public int getAttackAnimation() {
try {
int weapon = this.get(Equipment.SLOT_WEAPON) != null ? this.get(Equipment.SLOT_WEAPON).getId() : -1;
int fightStyle = this.player.getAttackStyle();
switch(weapon) {
Add:
case 4151://Abbysal Whip
return 55;
4151 or the case number, is the item Id
55 is the animation you want the weapon to attack with
Now if you want to add a gfx while it attacks make it look like this:
case 4151:
player.graphics(139);
return 55;
The 139 is the Gfx Id it will attack with.
Changing the attack speed:
Search
public int getAttackSpeed() {
Under:
try {
int weapon = this.get(Equipment.SLOT_WEAPON) != null ? this.get(Equipment.SLOT_WEAPON).getId() : -1;
switch(weapon) {
Add:
case 4151:
return 3;
4151 is the item id
3 is the speed it will attack with
Looks like:
Only the registered members can see the link.