Thread: OSRS #70 item.cfg (Fixes item bonuses etc)

Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  1. #1 OSRS #70 item.cfg (Fixes item bonuses etc) 
    Community Veteran

    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,059
    Thanks given
    2,100
    Thanks received
    2,939
    Rep Power
    5000
    Download item.cfg; [Only registered and activated users can see links. ]

    Mirror: [Only registered and activated users can see links. ]



    Reply With Quote  
     


  2. #2  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,108
    Thanks given
    2,402
    Thanks received
    2,825
    Rep Power
    4604
    Good job, it's unfortunate that the cache doesn't contain equipment values and other useful item statistics. How did you go about generating this list? How accurate is it?
    Reply With Quote  
     

  3. #3  
    Community Veteran

    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,059
    Thanks given
    2,100
    Thanks received
    2,939
    Rep Power
    5000
    Quote Originally Posted by Jason View Post
    Good job, it's unfortunate that the cache doesn't contain equipment values and other useful item statistics. How did you go about generating this list? How accurate is it?

    dumped straight from oswiki, should be pretty accurate, iirc i forgot prayer bonuses.

    Feel free if you ever need to dump higher cache revision bonuses.

    Code:
    	public static void dumpBonuses(int totalItems) {
    		int[] bonuses = new int[12];
    		int bonus = 0;
    		for (int i = 6345; i < totalItems; i++) {
    			ItemDef item = ItemDef.forID(i);
    			URL url;
    			try {
    				try {
    					try {
    						url = new URL("http://2007.runescape.wikia.com/wiki/"
    								+ item.name.replaceAll(" ", "_"));
    						URLConnection con = url.openConnection();
    						BufferedReader in = new BufferedReader(
    								new InputStreamReader(con.getInputStream()));
    						String line;
    						BufferedWriter writer = new BufferedWriter(
    								new FileWriter("item.cfg", true));
    						while ((line = in.readLine()) != null) {
    							try {
    								if (line.contains("<td style=\"text-align: center; width: 35px;\">")) {
    									line = line
    											.replace("</td>", "")
    											.replace("%", "")
    											.replace("?", "").replace("\"\"", "")
    											.replace(
    													"<td style=\"text-align: center; width: 35px;\">",
    													"");
    									bonuses[bonus] = Integer.parseInt(line);
    									bonus++;
    								} else if (line
    										.contains("<td style=\"text-align: center; width: 30px;\">")) {
    									if (bonus == 10) {
    										line = line
    												.replace("</td>", "")
    												.replace("%", "")
    												.replace("?", "")
    												.replace("%", "")
    												.replace(
    														"<td style=\"text-align: center; width: 30px;\">",
    														"");
    										bonuses[bonus] = Integer.parseInt(line);
    										bonus++;
    									}
    								}
    							} catch (NumberFormatException e) {
    								
    							}
    							if (bonus >= 11)
    								bonus = 0;
    							// in.close();
    						}
    						in.close();
    						writer.write("item	=	" + i + "	"
    								+ item.name.replace(" ", "_") + "	"
    								+ item.description.replace(" ", "_") + "	"
    								+ item.value + "	" + item.value + "	"
    								+ item.value + "	" + bonuses[0] + "	"
    								+ bonuses[1] + "	" + bonuses[2] + "	"
    								+ bonuses[3] + "	" + bonuses[4] + "	"
    								+ bonuses[5] + "	" + bonuses[6] + "	"
    								+ bonuses[7] + "	" + bonuses[8] + "	"
    								+ bonuses[9] + "	" + bonuses[10] + "	"
    								+ bonuses[11]);
    						bonuses[0] = bonuses[1] = bonuses[2] = bonuses[3] = bonuses[4] = bonuses[5] = bonuses[6] = bonuses[7] = bonuses[8] = bonuses[9] = bonuses[10] = bonuses[11] = 0;
    						writer.newLine();
    						writer.close();
    					} catch (NullPointerException e) {
    
    					}
    				} catch (FileNotFoundException e) {
    
    				}
    			} catch (IOException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    		}
    	}


    Reply With Quote  
     

  4. Thankful users:


  5. #4  
    Registered Member

    Join Date
    Apr 2009
    Posts
    1,728
    Thanks given
    403
    Thanks received
    210
    Rep Power
    390
    What format is this in? If you don't feel like posting what each number is could you at least post the code that generated this file?
    Reply With Quote  
     

  6. #5  
    Community Veteran

    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,059
    Thanks given
    2,100
    Thanks received
    2,939
    Rep Power
    5000
    Quote Originally Posted by Phat 4 u View Post
    What format is this in? If you don't feel like posting what each number is could you at least post the code that generated this file?
    lolwat, read the file should be pretty straight forward. Look @post above you, dumper is posted.


    Reply With Quote  
     

  7. #6  
    Registered Member

    Join Date
    Apr 2009
    Posts
    1,728
    Thanks given
    403
    Thanks received
    210
    Rep Power
    390
    Quote Originally Posted by SponjebubuLol View Post
    lolwat, read the file should be pretty straight forward. Look @post above you, dumper is posted.
    Your post wasn't there when I posted. Thanks anyways.
    Reply With Quote  
     

  8. #7  
    Banned
    Join Date
    Jun 2015
    Posts
    204
    Thanks given
    19
    Thanks received
    35
    Rep Power
    0
    Inb4 mod mark releases the osrs source for the next osrs release
    Reply With Quote  
     

  9. #8  
    Community Veteran

    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,059
    Thanks given
    2,100
    Thanks received
    2,939
    Rep Power
    5000
    Quote Originally Posted by Phat 4 u View Post
    Your post wasn't there when I posted. Thanks anyways.
    no problem.


    Reply With Quote  
     

  10. #9  
    Banned Market Banned Market Banned


    Join Date
    Jan 2011
    Age
    23
    Posts
    3,115
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    thanks sponje, gonna re-dump this in JSON bc CFG makes me wanna cry
    Reply With Quote  
     

  11. #10  
    Banned
    Join Date
    May 2015
    Posts
    57
    Thanks given
    31
    Thanks received
    11
    Rep Power
    0
    thx for this
    Reply With Quote  
     

Page 1 of 3 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: 32
    Last Post: 03-06-2015, 01:16 PM
  2. Replies: 16
    Last Post: 12-04-2012, 09:23 AM
  3. Replies: 30
    Last Post: 07-30-2012, 05:18 PM
  4. Replies: 56
    Last Post: 07-22-2012, 02:57 PM
  5. 508 item.cfg All Correct Bonuses
    By Wicksyere in forum Requests
    Replies: 2
    Last Post: 05-31-2009, 06:20 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •