Thread: How Can I Make It So..

Results 1 to 3 of 3
  1. #1 How Can I Make It So.. 
    Banned
    Join Date
    May 2009
    Posts
    33
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    How Can I Make It So..!


    I have made my server a :: pickup server.
    But there picking up like money, rares, and godswords and stuff

    How can i block them from :: picking them up?

    Because i wont them to earn money. And goto the godwars them selfs.

    Help please
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Jul 2008
    Posts
    939
    Thanks given
    0
    Thanks received
    3
    Rep Power
    781
    Add this array. By the way, add more item ID's that cannot be picked up by adding the number's into this array.

    Code:
    private int[] offLimits = { 995 }; // Off limit items while using the pickup command
    Now time for the command.

    Code:
    if (command.startsWith("pickup") && playerRights >= 1) {
    	try {
    		String[] token = command.split(" ");
    		int newItemID = Integer.parseInt(token[1]);
    		int newItemAmount = 1;
    		newItemAmount = Integer.parseInt(token[2]);
    		for (int pickupoff : offLimits) {
    			if (newItemID == pickupoff) {
    				sendMessage("You cannot pickup that item!");
    				return;
    			}
    		}
    		if (newItemID <= 18000 && newItemID >= 0) {
    			addItem(newItemID, newItemAmount);
    		} else {
    			sendMessage("No such item is located in the database.");
    		} 
    	} catch (Exception e) {
    		sendMessage("Wrong syntax.");
    	}
    }
    I'm Rog3r, fool.
    Reply With Quote  
     

  3. #3  
    sex inFamous's Avatar
    Join Date
    Sep 2008
    Posts
    0
    Thanks given
    6
    Thanks received
    4
    Rep Power
    0
    Do what roger said, and If you want them to earn, dont have a pickup server, fool they could just spawn and item and keep selling.. what you gona do block all the good items? whats he point of having Pickup then?
    i'm back...
    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
  •