Thread: non pickupable items

Results 1 to 4 of 4
  1. #1 non pickupable items 
    blastoise
    Guest
    Purpose: to tease players on server by putting items on ground that cant be picked up

    Difficulty: 1/10

    Assumed Knowledge: Brain power

    Server base: should work on all

    ok lets start shall we? the point of this is to place items on ground that players cant pickup so it makes them mad

    In client.java search for: case 236

    scroll down till you see

    Code:
    int itemX = inStream.readSignedWordBigEndian();
    Under that add:

    Code:
    				String temp = ""+itemID;				for(int a = 0; a < noPickups.size(); a++)				{					if(temp.equalsIgnoreCase((String)noPickups.get(a)))					{						sendMessage("You can't pick that item up!");						return;					}				}
    Add the following code after the first { in the file

    Code:
    	public ArrayList noPickups = new ArrayList(10);	public void addNoPickup(String id)	{		noPickups.add(id);		try		{			PrintWriter pw = new PrintWriter(new FileWriter("NoPickups.txt",true));			pw.println(id);			pw.flush();			pw.close();		} catch(Exception e) {System.err.println(e);}	}	public void loadNoPickups()	{		try		{			BufferedReader br = new BufferedReader(new FileReader("NoPickups.txt"));			String line = "";			while((line = br.readLine()) != null)			{				noPickups.add(line);			}			br.close();		} catch(Exception e) {System.err.println(e);}	}
    Next search for Search for "public void initialize()" in client.java, and somewhere inside that method, add

    Code:
    		loadNoPickups();
    And finally just add this in with the rest of your comands for mods or admins w/e

    Code:
    Add this with your commands

    and there you have it you can make nonpickupable items on ground

    All credits go to code fasga except 1% to me for posting here
    dont have to rep but its always appreciated thanks hope you like it



     

  2. #2  
    ernisx
    Guest
    nvm didnt see creds
     

  3. #3  
    Administrator

    Mastav's Avatar
    Join Date
    Oct 2006
    Posts
    1,322
    Thanks given
    36
    Thanks received
    57
    Rep Power
    602
    He gave credits to Fasga, so he's not leeching. Thanks for posting it here.
     

  4. #4  
    Registered Member
    Join Date
    Feb 2007
    Age
    30
    Posts
    670
    Thanks given
    0
    Thanks received
    0
    Rep Power
    62
    isn't this tut already posted in the forums on here tho? im pretty sure that this is a repost of an older tut, by the same person...

    im not saying that its leeching, but its already on here by alot of other people... but congratz on giving fasga credits anyway, any others i've seen did not give him credits
     


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: 7
    Last Post: 02-09-2011, 10:14 AM
  2. Replies: 2
    Last Post: 11-28-2009, 06:30 PM
  3. Replies: 9
    Last Post: 07-16-2009, 11:52 PM
  4. Replies: 39
    Last Post: 11-29-2008, 10:31 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
  •