Thread: Pickup command(::Pickup magic shortbow)

Results 1 to 7 of 7
  1. #1 Pickup command(::Pickup magic shortbow) 
    Registered Member
    hoodlom's Avatar
    Join Date
    Dec 2007
    Age
    26
    Posts
    750
    Thanks given
    0
    Thanks received
    6
    Rep Power
    170
    It is bullshit checking item.cfg so much, so I quickly through this code together.

    Code:
    if (command.startsWith("pickup")) {
    	String ItemName = command.substring(7);
    	ItemName = ItemName.replaceAll("_", " ");
    	for(int i = 0; i < 8000; i++) {
    		if(getItemName(i).toLowerCase().equalsIgnoreCase(ItemName.toLowerCase())) {
    			addItem(i, 1);
    			sendMessage("Item Added");
    			return;
    		}
    	}
    	sendMessage("No item called "+ItemName+" is found.");
    }
    enjoy it.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Tariq
    Guest
    i h8 pickup.....i changed mine to item or ::5 i put my commands in a list and i memorize them makes it shorter for me.

    and anyways i put a way to mass pickup....i dont mean :ickup 1050 11111111

    when i type in the 1111111 it actually fills my inventory...lolz.


    ontopic: i like it so simple and useful...now i just got to make sure i spell the item right.
    Reply With Quote  
     

  3. #3  
    Registered Member
    The Myth's Avatar
    Join Date
    Oct 2008
    Posts
    751
    Thanks given
    5
    Thanks received
    9
    Rep Power
    105
    you need to add an expeption to ignore notes, otherwise it will add both item and item note.

    Tip: look at grabbing the items description
    Funny how when one person talks to an invisible man and commits acts in their name it's called schizophrenia, but when 1.166 billion people do it simultaneously it's called religion.

    Reply With Quote  
     

  4. #4  
    Registered Member
    hoodlom's Avatar
    Join Date
    Dec 2007
    Age
    26
    Posts
    750
    Thanks given
    0
    Thanks received
    6
    Rep Power
    170
    Quote Originally Posted by The Myth View Post
    you need to add an expeption to ignore notes, otherwise it will add both item and item note.

    Tip: look at grabbing the items description
    The non-noted item is always first, after it adds the item it stops the command.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Registered Member
    The Myth's Avatar
    Join Date
    Oct 2008
    Posts
    751
    Thanks given
    5
    Thanks received
    9
    Rep Power
    105
    Quote Originally Posted by hoodlom View Post
    The non-noted item is always first, after it adds the item it stops the command.
    No the noted is always last, and I just saw your return, sorry.
    Funny how when one person talks to an invisible man and commits acts in their name it's called schizophrenia, but when 1.166 billion people do it simultaneously it's called religion.

    Reply With Quote  
     

  6. #6  
    Registered Member
    'Hunter's Avatar
    Join Date
    Sep 2008
    Posts
    738
    Thanks given
    12
    Thanks received
    6
    Rep Power
    160
    Oooh this is so thoughtful, thanks
    ~ Hunter


    Reply With Quote  
     

  7. #7  
    Registered Member
    The Myth's Avatar
    Join Date
    Oct 2008
    Posts
    751
    Thanks given
    5
    Thanks received
    9
    Rep Power
    105
    Bump
    Funny how when one person talks to an invisible man and commits acts in their name it's called schizophrenia, but when 1.166 billion people do it simultaneously it's called religion.

    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
  •