Thread: hye i need a itembonus.bat for my runelocas server :/

Results 1 to 2 of 2
  1. #1 hye i need a itembonus.bat for my runelocas server :/ 
    Registered Member Hood up's Avatar
    Join Date
    May 2014
    Posts
    121
    Thanks given
    2
    Thanks received
    6
    Rep Power
    1
    need help cant make one :/
    Reply With Quote  
     

  2. #2  
    Trinity II coming soon!
    sunerino's Avatar
    Join Date
    Apr 2014
    Age
    27
    Posts
    146
    Thanks given
    9
    Thanks received
    5
    Rep Power
    11
    here's my packer,

    Code:
    package com.rs.tools;
    
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.IOException;
    
    import com.rs.cache.Cache;
    import com.rs.utils.Utils;
    import com.rs.utils.Logger;
    
    public class ItemBonusesPacker {
    
    	public static final void main(String[] args) throws IOException {
    		Cache.init();
    		DataOutputStream out = new DataOutputStream(new FileOutputStream(
    				"data/items/bonuses.ib"));
    		for (int itemId = 0; itemId < Utils.getItemDefinitionsSize(); itemId++) {
    			File file = new File("data/items/bonuses/" + itemId + ".txt");
    			try {
    				if (file.exists()) {
    					BufferedReader reader = new BufferedReader(new FileReader(file));
    					out.writeShort(itemId);
    					reader.readLine();
    					// att bonuses
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					reader.readLine();
    					// def bonuses
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					reader.readLine();
    					// Damage absorption
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					reader.readLine();
    					// Other bonuses
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					out.writeShort(Integer.valueOf(reader.readLine()));
    					if (reader.readLine() != null)
    						throw new RuntimeException("Should be null line" + itemId);
    				}
    			} catch (Throwable e) {
    				Logger.handle(e);
    			}
    		}
    		Logger.log("ItemBonusesPacker", "Packed item bonuses.");
    		out.flush();
    		out.close();
    	}
    }
    Reply With Quote  
     


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. need a hoster coder for my 517 server
    By Brody in forum Hosting
    Replies: 0
    Last Post: 08-03-2010, 08:10 PM
  2. Replies: 13
    Last Post: 01-30-2009, 01:58 PM
  3. Replies: 2
    Last Post: 10-29-2008, 09:11 AM
  4. Replies: 5
    Last Post: 09-27-2008, 03:47 AM
  5. need a cleint for my friends server (free)
    By waleed12345 in forum RS2 Client
    Replies: 17
    Last Post: 09-06-2007, 07:36 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
  •