Thread: "Unarmed" Items

Results 1 to 2 of 2
  1. #1 "Unarmed" Items 
    Registered Member
    Join Date
    Mar 2014
    Posts
    22
    Thanks given
    9
    Thanks received
    5
    Rep Power
    12
    Recently, I have cache packed 634 items and all the newer items say "Unarmed".

    LoadItemList

    Code:
    	public boolean loadItemList(String FileName) {
    		String line = "";
    		String token = "";
    		String token2 = "";
    		String token2_2 = "";
    		String[] token3 = new String[10];
    		boolean EndOfFile = false;
    		BufferedReader characterfile = null;
    		try {
    			characterfile = new BufferedReader(new FileReader("./Data/cfg/"
    					+ FileName));
    		} catch (FileNotFoundException fileex) {
    			Misc.println(FileName + ": file not found.");
    			return false;
    		}
    		try {
    			line = characterfile.readLine();
    		} catch (IOException ioexception) {
    			Misc.println(FileName + ": error loading file.");
    		}
    		while (EndOfFile == false && line != null) {
    			line = line.trim();
    			int spot = line.indexOf("=");
    			if (spot > -1) {
    				token = line.substring(0, spot);
    				token = token.trim();
    				token2 = line.substring(spot + 1);
    				token2 = token2.trim();
    				token2_2 = token2.replaceAll("\t\t", "\t");
    				token2_2 = token2_2.replaceAll("\t\t", "\t");
    				token2_2 = token2_2.replaceAll("\t\t", "\t");
    				token2_2 = token2_2.replaceAll("\t\t", "\t");
    				token2_2 = token2_2.replaceAll("\t\t", "\t");
    				token3 = token2_2.split("\t");
    				if (token.equals("item")) {
    					int[] Bonuses = new int[12];
    					for (int i = 0; i < 12; i++) {
    						if (token3[(6 + i)] != null) {
    							Bonuses[i] = Integer.parseInt(token3[(6 + i)]);
    						} else {
    							break;
    						}
    					}
    					newItemList(Integer.parseInt(token3[0]),
    							token3[1].replaceAll("_", " "),
    							token3[2].replaceAll("_", " "),
    							Double.parseDouble(token3[4]),
    							Double.parseDouble(token3[4]),
    							Double.parseDouble(token3[6]), Bonuses);
    				}
    			} else {
    				if (line.equals("[ENDOFITEMLIST]")) {
    					try {
    						characterfile.close();
    					} catch (IOException ioexception) {
    					}
    				}
    			}
    			try {
    				line = characterfile.readLine();
    			} catch (IOException ioexception1) {
    				EndOfFile = true;
    			}
    		}
    		try {
    			characterfile.close();
    		} catch (IOException ioexception) {
    		}
    		return false;
    	}
    Item.cfg some as an example

    Code:
    item = 18353	Chaotic_maul	A_maul_used_to_claim_life_from_those_who_don't_deserve_it.	0	0	0	-4	-4	167	0	0	0	0	0	0	0	155	0
    item = 18354	Chaotic_maul_(broken)	A_maul_used_to_claim_life_from_those_who_don't_deserve_it.	0	0	0	-4	-4	167	0	0	0	0	0	0	0	155	0
    item = 18355	Chaotic_staff	This_staff_makes_destructive_spells_more_powerful.	0	0	0	0	-1	65	18	0	5	7	4	18	0	72	0
    item = 18356	Chaotic_staff_(broken)	This_staff_makes_destructive_spells_more_powerful.	0	0	0	0	-1	65	18	0	5	7	4	18	0	72	0
    item = 18357	Chaotic_c'bow	A_small_c'bow,_only_effective_at_short_distance.	0	0	0	0	0	0	0	120	0	0	0	0	0	0	0
    item = 18358	Chaotic_c'bow_(broken)	A_small_c'bow,_only_effective_at_short_distance.	0	0	0	0	0	0	0	120	0	0	0	0	0	0	0
    item = 18359	Chaotic_kiteshield	A_large_metal_shield.	0	0	0	2	0	4	-15	0	83	90	86	-5	89	0	0
    item = 18360	Chaotic_kiteshield_(broken)	A_large_metal_shield.	0	0	0	2	0	4	-15	0	83	90	86	-5	89	0	0
    item = 18361	Eagle-eye_kiteshield	Eagleeye	0	0	0	-5	-5	-5	0	4	50	50	70	25	50	0	0
    Reply With Quote  
     

  2. #2  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    You have to modify the following classes:

    Itemhandler.java
    Item.java
    Item.cfg

    Can easily get from a Server that already has 634 items


    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. Funny quotes :)
    By Origin in forum Chat
    Replies: 1
    Last Post: 04-26-2009, 04:29 AM
  2. Funny Quotes and jokes
    By Jamie in forum Humor
    Replies: 7
    Last Post: 11-27-2008, 11:17 PM
  3. [JAVA]Quote Forger
    By Mdog in forum Application Development
    Replies: 1
    Last Post: 07-04-2008, 11:39 PM
  4. Replies: 11
    Last Post: 02-15-2008, 10:13 PM
  5. Quotes
    By Whitey in forum Chat
    Replies: 0
    Last Post: 02-13-2008, 08:56 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
  •