Thread: Deposit Equipment [PI]

Results 1 to 7 of 7
  1. #1 Deposit Equipment [PI] 
    Banned
    Join Date
    May 2011
    Posts
    131
    Thanks given
    8
    Thanks received
    7
    Rep Power
    0
    Okay, So I made a new bank interface and I need the "Deposit Equipment" button to deposit the items I am wearing.

    In clickingbutton I am trying to make the command but I couldnt figure out how to do it. I got deposit inventory but cant seem to do this.

    Here is my code:

    case 82024: //Deposit Worn Items
    c.getItems().bankItem(What to put here?);
    break;


    I dont know ow I would make it so it pulls it from the slot into the bank?
    Help?
    Reply With Quote  
     

  2. #2  
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144
    You need to make it loop through your equipment slots, bank them, and then delete them. It would be a bad idea to bank each item one by one.


    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    Code:
    for (int i = 0; i < 13; i++){
    c.getItems().bankitem(c.playerItems[i]-1,i);
    err something like that..
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Feb 2008
    Age
    31
    Posts
    86
    Thanks given
    0
    Thanks received
    2
    Rep Power
    5
    Maybe if you get it working some time, you should make a little snippet to help out those who don't have this?

    Would personally find it useful myself.

    OT: Sorry I couldn't help here, just wanted to share my thoughts on this
    Reply With Quote  
     

  5. #5  
    Respected Member


    kLeptO's Avatar
    Join Date
    Dec 2006
    Age
    28
    Posts
    2,955
    Thanks given
    1,183
    Thanks received
    754
    Rep Power
    3084
    Wrote this in browser so not sure if it will work.
    Code:
    case 82024: //Deposit Worn Items
        for (int i = 0; i < c.playerEquipment.length; i++) {
            int itemId = c.playerEquipment[i];
            int itemAmount = c.playerEquipmentN[i];
            c.getItems().removeItem(itemId, i);
            c.getItems().bankItem(itemId, c.getItems().getItemSlot(itemId), itemAmount);
        }
    break;
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    Hyperion

    Code:
    int index2 = -1;
    			for (Item item : player.getEquipment().toArray()) {
    				index2++;
    				if (item != null)
    					Bank.deposit(player, index2, item.getId(), item.getCount(),player.getEquipment());
    			}
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Jun 2009
    Posts
    2,916
    Thanks given
    169
    Thanks received
    806
    Rep Power
    0
    Sec ill post
    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. Deposit inventory and deposit equipment
    By Kenaboy in forum Show-off
    Replies: 13
    Last Post: 12-13-2010, 08:56 PM
  2. Replies: 0
    Last Post: 12-13-2009, 06:41 AM
  3. Replies: 109
    Last Post: 05-22-2009, 04:42 PM
  4. Replies: 4
    Last Post: 10-19-2008, 04:29 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
  •