Thread: Read This And You Will Feel Stupid.

Results 1 to 10 of 10
  1. #1 Read This And You Will Feel Stupid. 
    Registered Member

    Join Date
    Jun 2008
    Posts
    1,957
    Thanks given
    7
    Thanks received
    255
    Rep Power
    445
    Title Is catchy ehh?
    well i noticed that the item.cfg is loaded wrong in almost all servers from delta to devo to czar. well here is the fix! now you can use the alch values instead of the shop value...

    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("./bin/config/"
    					+ 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.");
    			return false;
    		}
    		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[3]), Double
    							.parseDouble(token3[4]), Double
    							.parseDouble(token3[5]), Bonuses);
    				}
    			} else {
    				if (line.equals("[ENDOFITEMLIST]")) {
    					try {
    						characterfile.close();
    					} catch (IOException ioexception) {
    					}
    					return true;
    				}
    			}
    			try {
    				line = characterfile.readLine();
    			} catch (IOException ioexception1) {
    				EndOfFile = true;
    			}
    		}
    		try {
    			characterfile.close();
    		} catch (IOException ioexception) {
    		}
    		return false;
    	}
    all that was really changed was this...
    Code:
    newItemList(Integer.parseInt(token3[0]), token3[1]
    							.replaceAll("_", " "), token3[2].replaceAll("_",
    							" "), Double.parseDouble(token3[3]), Double
    							.parseDouble(token3[4]), Double
    							.parseDouble(token3[5]), Bonuses);
    i mean seriously do people know how to count?

    it goes
    Code:
    0, 1, 2, 3, 4, 5
    not
    Code:
    0, 1, 2, 4, 4, 6
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Feb 2009
    Age
    27
    Posts
    2,128
    Thanks given
    261
    Thanks received
    280
    Rep Power
    563
    LOL nice
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jun 2008
    Posts
    1,957
    Thanks given
    7
    Thanks received
    255
    Rep Power
    445
    Quote Originally Posted by b a l l a View Post
    LOL nice
    kinda funny ehh? i was trying to do alching and noticed it... didn't want to use the shop value..
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jul 2008
    Age
    26
    Posts
    5,826
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    I doubt it was put that way by accident.
    Reply With Quote  
     

  5. #5  
    Registered Member
    wouha's Avatar
    Join Date
    Feb 2008
    Age
    27
    Posts
    1,034
    Thanks given
    8
    Thanks received
    16
    Rep Power
    297
    Quote Originally Posted by Java` View Post
    I doubt it was put that way by accident.
    yeah, there must be some reason if delta AND devo have it
    .
    Reply With Quote  
     

  6. #6  
    Registered Member Crash's Avatar
    Join Date
    Feb 2009
    Posts
    383
    Thanks given
    6
    Thanks received
    1
    Rep Power
    49
    Idk about you but I get an error loading my Item.cfg after doing that.


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Oct 2007
    Age
    29
    Posts
    484
    Thanks given
    13
    Thanks received
    10
    Rep Power
    331
    You're right, I do feel stupid.

    Thanks for this. Rep+
    Reply With Quote  
     

  8. #8  
    Since '06

    Ayton's Avatar
    Join Date
    Dec 2006
    Age
    25
    Posts
    1,417
    Thanks given
    63
    Thanks received
    36
    Discord
    View profile
    Rep Power
    327
    Funny find.
    Gj
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #9  
    DeclarationOfIndependence
    Guest
    Reason they didnt load high and low alch value? COZ THEY ARE WRONG. On vastcios thread somebody said that they are fractions of the shops price.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Deadly Uzi's Avatar
    Join Date
    Jul 2008
    Posts
    994
    Thanks given
    177
    Thanks received
    87
    Rep Power
    362
    Quote Originally Posted by wouha View Post
    yeah, there must be some reason if delta AND devo have it
    Maybe because DELTA IS DEVO?
    Attempting to develop a multi-revision library. [Only registered and activated users can see links. ] on GitHub.
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •