Thread: ::empty command code

Results 1 to 4 of 4
  1. #1 ::empty command code 
    Banned

    Join Date
    Sep 2010
    Age
    26
    Posts
    568
    Thanks given
    147
    Thanks received
    201
    Rep Power
    0
    fixed
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Jul 2010
    Age
    26
    Posts
    1,144
    Thanks given
    7
    Thanks received
    48
    Rep Power
    0
    If this is for project insanity then I will gladly give it to you.

    In Commands.java add:

    Code:
    			if (playerCommand.equalsIgnoreCase("empty")) {
                                    		c.getPA().removeAllItems();
                    			c.sendMessage("You empty your inventory");
                           		 }
    Then in ItemAssistant.java add this:

    Code:
    	public void removeAllItems() {
    		for (int i = 0; i < c.playerItems.length; i++) {
    			c.playerItems[i] = 0;
    		}
    		for (int i = 0; i < c.playerItemsN.length; i++) {
    			c.playerItemsN[i] = 0;
    		}
    		resetItems(3214);
    	}
    Reply With Quote  
     

  3. #3  
    Registered Member unforgivable's Avatar
    Join Date
    Sep 2009
    Age
    31
    Posts
    146
    Thanks given
    9
    Thanks received
    4
    Rep Power
    7
    Quote Originally Posted by Marijuana View Post
    If this is for project insanity then I will gladly give it to you.

    In Commands.java add:

    Code:
    			if (playerCommand.equalsIgnoreCase("empty")) {
                                    		c.getPA().removeAllItems();
                    			c.sendMessage("You empty your inventory");
                           		 }
    Then in ItemAssistant.java add this:

    Code:
    	public void removeAllItems() {
    		for (int i = 0; i < c.playerItems.length; i++) {
    			c.playerItems[i] = 0;
    		}
    		for (int i = 0; i < c.playerItemsN.length; i++) {
    			c.playerItemsN[i] = 0;
    		}
    		resetItems(3214);
    	}


    Its on PlayerAssistant.java not ItemAssistant.java.
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Sep 2010
    Age
    26
    Posts
    568
    Thanks given
    147
    Thanks received
    201
    Rep Power
    0
    Got it, I only added a command which I took from isdead.
    Nothing to add in playerAssistant.
    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

Similar Threads

  1. PI empty command
    By Ninja assassin in forum Help
    Replies: 3
    Last Post: 09-17-2010, 09:15 PM
  2. Empty command
    By Icy Whip in forum Help
    Replies: 4
    Last Post: 06-19-2010, 08:30 PM
  3. [525] Empty Command
    By King in forum Requests
    Replies: 5
    Last Post: 10-23-2009, 02:41 AM
  4. [508]Empty command!
    By GaMePaPa in forum Tutorials
    Replies: 13
    Last Post: 01-31-2009, 09:57 PM
  5. Need and empty client to code myself
    By b 0 0 m in forum Requests
    Replies: 0
    Last Post: 07-15-2007, 08:58 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
  •