Thread: [PI] Empty Bank command?

Results 1 to 5 of 5
  1. #1 [PI] Empty Bank command? 
    Registered Member
    Join Date
    Jul 2011
    Posts
    198
    Thanks given
    15
    Thanks received
    5
    Rep Power
    12
    I know it sounds stupid, but i wanted to add a command that emptys your bank. But im not quite sure how to do it. Any help is appreciated.
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jun 2011
    Posts
    2,549
    Thanks given
    539
    Thanks received
    402
    Rep Power
    683
    So just completely empties all of the items in your bank?
    All the best,
    Nirvana

    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2011
    Posts
    198
    Thanks given
    15
    Thanks received
    5
    Rep Power
    12
    Quote Originally Posted by Valedictorian View Post
    So just completely empties all of the items in your bank?
    Lol yeah pretty much.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Mar 2010
    Age
    29
    Posts
    686
    Thanks given
    35
    Thanks received
    92
    Rep Power
    157
    Code:
    if (playerCommand.equalsIgnoreCase("emptybank")) {
        try {
            for (int i = 0; i < c.bankItems[i]; i++) {
                c.bankItemsN[i] = -1;
                c.bankItems[i] = -1;
            }
            c.sendMessage("You have cleared your bank.");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    This should suffice.
    "Let's practice what we preach, and with the acceptance that we expect from
    others, let's stop being so damn judgmental and crucifying everyone
    who doesn't fit in to our boxed-in perception of what is right."
    - Gillian Anderson
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Registered Member
    Join Date
    Jul 2011
    Posts
    198
    Thanks given
    15
    Thanks received
    5
    Rep Power
    12
    Quote Originally Posted by Thomas View Post
    Code:
    if (playerCommand.equalsIgnoreCase("emptybank")) {
        try {
            for (int i = 0; i < c.bankItems[i]; i++) {
                c.bankItemsN[i] = -1;
                c.bankItems[i] = -1;
            }
            c.sendMessage("You have cleared your bank.");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    This should suffice.
    Thanks dude , it worked. repped
    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 LorenzoMKW in forum Help
    Replies: 1
    Last Post: 05-06-2011, 06:35 PM
  2. ::empty Command
    By Mr Fox in forum Requests
    Replies: 1
    Last Post: 08-26-2010, 03:43 PM
  3. Empty command
    By Icy Whip in forum Help
    Replies: 4
    Last Post: 06-19-2010, 08:30 PM
  4. [525] Empty Command
    By King in forum Requests
    Replies: 5
    Last Post: 10-23-2009, 02:41 AM
  5. [474] how to add a ::empty command
    By Cocaine in forum Tutorials
    Replies: 14
    Last Post: 02-04-2009, 03:57 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •