RECENT NEWS
📢 𝟑𝟎% Discount for all ads only this month ❄️

Stop loading your equipment bonuses from raggedy old item_config.cfg ✅⭐

B0nes
power_settings_new
Seen 2 years ago
Mithril Warrior (27/30)
Mithril Warrior
0
0
0
27 Posts
Posts
0
Warning level
0
Likes
0
Dislikes
Joined: 2022-04-24
Dragonnboones#7624

your dumb old PI/317 is still loading equipment bonuses from item_config.cfg for some reason where you have all the equipment bonuses in a nice ItemDefinition.json in beautiful format like:

Code:
 {
    "id": 13112,
    "name": "Morytania legs 1",
    "desc": "Very sturdy leather greeves.",
    "value": 0,
    "dropValue": 0,
    "bonus": [
      0,
      0,
      0,
      -21,
      -7,
      11,
      10,
      10,
      -4,
      10,
      0,
      0
    ],
    "slot": 7,
    "fullmask": false,
    "stackable": false,
    "noteable": false,
    "tradable": false,
    "wearable": true,
    "showBeard": true,
    "members": true,
    "twoHanded": false,
    "requirements": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  }

instead of a stupid old item_config.cfg:

Code:
item = 13112	Morytania_legs_1		It's_a_Morytania_legs_1.		0		0	0		0	0		0	-21		-7	11		10	10		-4	10		0	0

ok this is super easy all you do is go to

ItemAssistant.java and find:

Code:
 public void getBonus(){

replace it all with:

Code:
 
	public void getBonus() {
		for (int i = 0; i < c.playerEquipment.length; i++) {
			if (c.playerEquipment[i] > -1) {
				int equipmentItem = c.playerEquipment[i];

				ItemDefinition itemdef = ItemDefinition.getDefinitions().get(equipmentItem);
				if (itemdef == null) {
					continue;
				}
				for (int k = 0; k < c.playerBonus.length; k++) {
					c.playerBonus[k] += itemdef.getBonus()[k];
				}
			}
		}
		if (c.getItems().isWearingItem(12926) && c.getToxicBlowpipeAmmoAmount() > 0 && c.getToxicBlowpipeCharge() > 0) {
			int dartStrength = RangeData.getRangeStr(c.getToxicBlowpipeAmmo());
			if (dartStrength > 18) {
				dartStrength = 18;
			}
			c.playerBonus[4] += dartStrength;
		}
		if (EquipmentSet.VERAC.isWearingBarrows(c) && isWearingItem(12853)) {
			c.playerBonus[11] += 4;
		}
	}
00
  • Like
Reactions: