Thread: Stop loading your equipment bonuses from raggedy old item_config.cfg

Results 1 to 6 of 6
  1. #1 Stop loading your equipment bonuses from raggedy old item_config.cfg 
    Registered Member
    Join Date
    Jan 2017
    Posts
    153
    Thanks given
    8
    Thanks received
    25
    Discord
    View profile
    Rep Power
    9
    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;
    		}
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member
    Teemuzz's Avatar
    Join Date
    Oct 2009
    Posts
    2,729
    Thanks given
    1,152
    Thanks received
    408
    Rep Power
    827
    Good idea but saving random zeroes in a config file is unnecessary and wasteful
    Reply With Quote  
     

  3. Thankful users:


  4. #3  
    Registered Member
    Mark_'s Avatar
    Join Date
    Jul 2020
    Posts
    73
    Thanks given
    65
    Thanks received
    51
    Discord
    View profile
    Rep Power
    126
    Could also use OSRSBox directly has like all the info u need + more



    Reply With Quote  
     

  5. Thankful user:


  6. #4  
    JavaScript Heathen 👹
    frostbit3's Avatar
    Join Date
    Mar 2012
    Age
    27
    Posts
    400
    Thanks given
    369
    Thanks received
    88
    Discord
    View profile
    Rep Power
    70
    would be better to have it in a binary format or a database. i cant see a reason why you would want to open a bazillion line json file to make a small edit.
    >> real life is pretty much the same as code. off-by-one, naming, and unterminated recursion
    Reply With Quote  
     

  7. Thankful users:


  8. #5  
    Registered Member

    Join Date
    Aug 2011
    Posts
    743
    Thanks given
    90
    Thanks received
    54
    Discord
    View profile
    Rep Power
    114
    Thought he'd hit that jackpot with this one didn't he...
    Spoiler for vouches:

    Quote Originally Posted by TheMrClassic View Post
    Vouch for Insidia X. Fast and friendly.
    Quote Originally Posted by Vernorexia View Post
    Vouch for insidia x added clipped following and a timer on my gates. I paid first was fast work. I highly recommend using him!
    Quote Originally Posted by Matts B ring View Post
    Bought 5b ikov, vouch
    Quote Originally Posted by InsinuateRS View Post
    Vouch for me lad, bought 3b

    Reply With Quote  
     

  9. Thankful users:


  10. #6  
    Donator

    Join Date
    Mar 2014
    Posts
    890
    Thanks given
    42
    Thanks received
    129
    Rep Power
    258
    why would you post something thats out dated has hell. this has been posted before.

    Discord: Sgsrocks#5004
    Reply With Quote  
     

  11. Thankful user:



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. 667 & 718 & RS3 [Loading Bonuses From Cache]
    By Adrian Aries in forum Tutorials
    Replies: 14
    Last Post: 03-31-2018, 05:47 AM
  2. SoulTale 667 - We're Back - Load your old save!
    By Soultale in forum Advertise
    Replies: 27
    Last Post: 03-30-2017, 09:15 PM
  3. [DELTA] Loading your starter from an array
    By Sir raxim in forum Snippets
    Replies: 2
    Last Post: 05-25-2011, 03:40 AM
  4. Replies: 37
    Last Post: 07-04-2008, 08:25 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
  •