Thread: add item to bank

Results 1 to 4 of 4
  1. #1 add item to bank 
    Extreme Donator

    sexyrussian's Avatar
    Join Date
    Nov 2009
    Posts
    887
    Thanks given
    47
    Thanks received
    23
    Rep Power
    0
    Code:
    /**
    	* Adds item(s) to your bank with no requirements.
    	* @author Aintaro
    	*/
    	public void bankItemWithouthReq(int itemId, int amount) {
    		int toBankSlot = 0;
    		boolean alreadyInBank = false;
    		for (int i=0; i<Config.BANK_SIZE; i++) {
    			if (c.bankItems[i] == itemId + 1) {
    				alreadyInBank = true;
    				toBankSlot = i;
    				i=Config.BANK_SIZE+1;
    			}
    		}
    		while (amount > 0) {
    			if (alreadyInBank) {
    				c.bankItemsN[toBankSlot] += 1;
    				amount--;
    			} else {
    				c.bankItems[toBankSlot] = itemId + 1;
    				c.bankItemsN[toBankSlot] += 1;
    				amount--;
    			}	
    		}
    		resetTempItems();
    		resetBank();
    	}
    k so this dude released a snippet

    but the snippet is half assed and only works for a single item

    if u use it back to back,

    bankItemWithouthReq(955,20);
    bankItemWithouthReq(560,10);

    then instead of giving you 20 coins and 10 death runes

    it will give u 30 death runes

    the last item listed will be the item added to bank

    and the sum of all item amounts will be quantity

    how do you fix this?
    Reply With Quote  
     

  2. #2  
    Extreme Donator

    sexyrussian's Avatar
    Join Date
    Nov 2009
    Posts
    887
    Thanks given
    47
    Thanks received
    23
    Rep Power
    0
    bump
    Reply With Quote  
     

  3. #3  
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144


    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Extreme Donator

    sexyrussian's Avatar
    Join Date
    Nov 2009
    Posts
    887
    Thanks given
    47
    Thanks received
    23
    Rep Power
    0
    i will fucking rep you to death and then ass rape you
    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. [help] Bank item counter [help]
    By Kenaboy in forum Help
    Replies: 0
    Last Post: 06-26-2011, 08:42 AM
  2. ::item and ::bank help
    By adrianrostas in forum Help
    Replies: 1
    Last Post: 04-09-2010, 03:10 AM
  3. [525] Can only bank 1 item??
    By Clank in forum Help
    Replies: 0
    Last Post: 04-21-2009, 01:19 AM
  4. Has item in bank
    By Stanyer in forum Tutorials
    Replies: 14
    Last Post: 04-13-2008, 11:15 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
  •