Thread: Ground Item's Help please.

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Ground Item's Help please. 
    Best Hybrid Alive
    Almagesrnubs's Avatar
    Join Date
    Nov 2009
    Posts
    880
    Thanks given
    443
    Thanks received
    261
    Rep Power
    114
    Ground items aren't disappearing as the desired time it should take, once you log out and go for a cup of tea and 10 minutes later the drop is still there.

    Please help, I'd be grateful to give you something back in return.


    Reply With Quote  
     

  2. #2  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Is it all NPCs or just Rock Crabs?
    Reply With Quote  
     

  3. #3  
    Best Hybrid Alive
    Almagesrnubs's Avatar
    Join Date
    Nov 2009
    Posts
    880
    Thanks given
    443
    Thanks received
    261
    Rep Power
    114
    Quote Originally Posted by Hacker View Post
    Is it all NPCs or just Rock Crabs?
    It's all npcs, and also happens when you die to a player and your loot doesn't disappear.
    Reply With Quote  
     

  4. #4  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Alright well I dont code so dont talk shit if this is wrong.....
    In NPCDrops.java search for
    Code:
    	public void loadDrops() {
    a few lines down you should find something similar to
    Code:
    			int[][][] npcDrops
    replace that int wiff
    Code:
    			int[][][] npcDrops = new int [12000][][];
    So I'll paste my loadDrops for you... In case my shitty "coding" doesnt work.. and this is a stab in the dark, I'd suggest making a backup file
    Code:
    	public void loadDrops() {
    		try {
    			int[][][] npcDrops = new int [12000][][];
    			int[][][] rareDrops2 = new int [12000][][];
    			int[] itemRarity = new int [12000];
    			File f = new File("./Data/cfg/NPCDrops.TSM");
    			Scanner s = new Scanner(f);
    			while (s.hasNextLine()) {
    				String line = s.nextLine();
    				if (line.startsWith("#"))
    					continue;
    				StringTokenizer normalTok = new StringTokenizer(line, "\t");
    				line = s.nextLine();
    				if (line.startsWith("#"))
    					continue;
    				StringTokenizer rareTok = new StringTokenizer(line, "\t");
    				String[] information = normalTok.nextToken().split(":");
    				int npcId = Integer.parseInt(information[0]);
    				itemRarity[npcId] = Integer.parseInt(information[1])-1;
    				npcDrops[npcId] = new int[normalTok.countTokens()][2];
    				rareDrops2[npcId] = new int[rareTok.countTokens()][2];
    				int count = 0;
    				while (normalTok.hasMoreTokens()) {
    					String[] temp = normalTok.nextToken().split(":");
    					npcDrops[npcId][count][0] = Integer.parseInt(temp[0]);
    					npcDrops[npcId][count][1] = Integer.parseInt(temp[1]);
    					count++;
    				}
    				count = 0;
    				while (rareTok.hasMoreTokens()) {
    					String[] temp = rareTok.nextToken().split(":");
    					rareDrops2[npcId][count][0] = Integer.parseInt(temp[0]);
    					//System.out.println("Raredrop: " + count + " " + rareDrops2[npcId][count][0]);
    					rareDrops2[npcId][count][1] = Integer.parseInt(temp[1]);
    					//System.out.println("Raredrop: " + count + " " + rareDrops2[npcId][count][1]);
    					count++;
    				}
    				normalDrops.put(npcId, npcDrops[npcId]);
    				rareDrops.put(npcId, rareDrops2[npcId]);
    				dropRarity.put(npcId, itemRarity[npcId]);
    			}
    			loadConstants();
    		} catch (Exception e) {
    			e.printStackTrace();
    		}	
    	}
    Reply With Quote  
     

  5. #5  
    Best Hybrid Alive
    Almagesrnubs's Avatar
    Join Date
    Nov 2009
    Posts
    880
    Thanks given
    443
    Thanks received
    261
    Rep Power
    114
    Quote Originally Posted by Hacker View Post
    Alright well I dont code so dont talk shit if this is wrong.....
    In NPCDrops.java search for
    Code:
    	public void loadDrops() {
    a few lines down you should find something similar to
    Code:
    			int[][][] npcDrops
    replace that int wiff
    Code:
    			int[][][] npcDrops = new int [12000][][];
    So I'll paste my loadDrops for you... In case my shitty "coding" doesnt work.. and this is a stab in the dark, I'd suggest making a backup file
    Code:
    	public void loadDrops() {
    		try {
    			int[][][] npcDrops = new int [12000][][];
    			int[][][] rareDrops2 = new int [12000][][];
    			int[] itemRarity = new int [12000];
    			File f = new File("./Data/cfg/NPCDrops.TSM");
    			Scanner s = new Scanner(f);
    			while (s.hasNextLine()) {
    				String line = s.nextLine();
    				if (line.startsWith("#"))
    					continue;
    				StringTokenizer normalTok = new StringTokenizer(line, "\t");
    				line = s.nextLine();
    				if (line.startsWith("#"))
    					continue;
    				StringTokenizer rareTok = new StringTokenizer(line, "\t");
    				String[] information = normalTok.nextToken().split(":");
    				int npcId = Integer.parseInt(information[0]);
    				itemRarity[npcId] = Integer.parseInt(information[1])-1;
    				npcDrops[npcId] = new int[normalTok.countTokens()][2];
    				rareDrops2[npcId] = new int[rareTok.countTokens()][2];
    				int count = 0;
    				while (normalTok.hasMoreTokens()) {
    					String[] temp = normalTok.nextToken().split(":");
    					npcDrops[npcId][count][0] = Integer.parseInt(temp[0]);
    					npcDrops[npcId][count][1] = Integer.parseInt(temp[1]);
    					count++;
    				}
    				count = 0;
    				while (rareTok.hasMoreTokens()) {
    					String[] temp = rareTok.nextToken().split(":");
    					rareDrops2[npcId][count][0] = Integer.parseInt(temp[0]);
    					//System.out.println("Raredrop: " + count + " " + rareDrops2[npcId][count][0]);
    					rareDrops2[npcId][count][1] = Integer.parseInt(temp[1]);
    					//System.out.println("Raredrop: " + count + " " + rareDrops2[npcId][count][1]);
    					count++;
    				}
    				normalDrops.put(npcId, npcDrops[npcId]);
    				rareDrops.put(npcId, rareDrops2[npcId]);
    				dropRarity.put(npcId, itemRarity[npcId]);
    			}
    			loadConstants();
    		} catch (Exception e) {
    			e.printStackTrace();
    		}	
    	}
    It isn't just npc drops, It's drops in general they don't disappear.
    Reply With Quote  
     

  6. #6  
    Best Hybrid Alive
    Almagesrnubs's Avatar
    Join Date
    Nov 2009
    Posts
    880
    Thanks given
    443
    Thanks received
    261
    Rep Power
    114
    Still need this fix..
    Reply With Quote  
     

  7. #7  
    Spread Love

    Dhruv's Avatar
    Join Date
    Feb 2012
    Age
    28
    Posts
    1,011
    Thanks given
    157
    Thanks received
    167
    Rep Power
    215
    Post your DropItem.java & NPCHandler.java
    Reply With Quote  
     

  8. #8  
    Best Hybrid Alive
    Almagesrnubs's Avatar
    Join Date
    Nov 2009
    Posts
    880
    Thanks given
    443
    Thanks received
    261
    Rep Power
    114
    Reply With Quote  
     

  9. #9  
    Best Hybrid Alive
    Almagesrnubs's Avatar
    Join Date
    Nov 2009
    Posts
    880
    Thanks given
    443
    Thanks received
    261
    Rep Power
    114
    bump
    Reply With Quote  
     

  10. #10  
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    29
    Posts
    3,517
    Thanks given
    2,439
    Thanks received
    1,108
    Rep Power
    5000
    need to see ItemHandler


    Reply With Quote  
     

Page 1 of 2 12 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. 742+ custom items/npcs HELP PLEASE
    By candy1000102 in forum Help
    Replies: 4
    Last Post: 03-29-2013, 10:00 PM
  2. [PI] Bank 1 Item Problem [HELP PLEASE]
    By NewKid in forum Help
    Replies: 10
    Last Post: 05-20-2012, 05:13 AM
  3. 525 help.. with ground item
    By brain090 in forum Help
    Replies: 0
    Last Post: 09-05-2009, 11:55 AM
  4. item fix need help please
    By wildjjbug in forum Help
    Replies: 0
    Last Post: 06-30-2009, 07:19 AM
  5. Making an item have Requirements - Please help.
    By .:Programing God:. in forum Help
    Replies: 24
    Last Post: 05-18-2009, 03:24 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
  •