Thread: [Delta] Auto bank arranging (no free slots)

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1 [Delta] Auto bank arranging (no free slots) 
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    This will make it so when you remove an item from your bank, any items that are later in the bank will move to fill that slot. Took me a while to get this

    ARRANGE BUG FIXED

    In client.java replace your "resetBank" method with this:

    Code:
    public void resetBank() {
    		outStream.createFrameVarSizeWord(53);
    		outStream.writeWord(5382); // bank
    		outStream.writeWord(playerBankSize); // number of items
    		for (int i = 0; i < playerBankSize; i++) {
    			if (bankItems[i] == 0) {
    				bankItemsN[i] = bankItemsN[i+1];
    				bankItems[i] = bankItems[i + 1];
    				bankItems[i+1] = 0;
    				bankItemsN[i+1] = 0;
    			}
    			if (bankItemsN[i] > 254) {
    				outStream.writeByte(255);
    				outStream.writeDWord_v2(bankItemsN[i]);
    			} else {
    				outStream.writeByte(bankItemsN[i]); // amount
    			}
    			if (bankItemsN[i] < 1) {
    				bankItems[i] = 0;
    			}
    			if ((bankItems[i] > 20000) || (bankItems[i] < 0)) {
    				bankItems[i] = 20000;
    			}
    			outStream.writeWordBigEndianA(bankItems[i]); // itemID
    		}
    		outStream.endFrameVarSizeWord();
    	}
    Replace "fromBank" with this:

    Code:
    public void fromBank(int itemID, int fromSlot, int amount) {
    		if (!IsBanking) {
    			closeInterface();
    			return;
    		}
    		if (amount > 0) {
    			if (bankItems[fromSlot] > 0) {
    				if (!takeAsNote) {
    					if (Item.itemStackable[bankItems[fromSlot] - 1]) {
    						if (bankItemsN[fromSlot] > amount) {
    							if (addItem((bankItems[fromSlot] - 1), amount)) {
    								bankItemsN[fromSlot] -= amount;
    								resetBank();
    								resetItems(5064);
    							}
    						} else {
    							if (addItem((bankItems[fromSlot] - 1),
    									bankItemsN[fromSlot])) {
    								bankItems[fromSlot] = 0;
    								bankItemsN[fromSlot] = 0;
    								resetBank();
    								resetItems(5064);
    							}
    						}
    					} else {
    						while (amount > 0) {
    							if (bankItemsN[fromSlot] > 0) {
    								if (addItem((bankItems[fromSlot] - 1), 1)) {
    									bankItemsN[fromSlot] += -1;
    									amount--;
    								} else {
    									amount = 0;
    								}
    							} else {
    								amount = 0;
    							}
    						}
    						resetBank();
    						resetItems(5064);
    					}
    				} else if (takeAsNote && Item.itemIsNote[bankItems[fromSlot]]) {
    					// if (Item.itemStackable[bankItems[fromSlot]+1])
    					// {
    					if (bankItemsN[fromSlot] <= amount) {
    						if (addItem(bankItems[fromSlot], bankItemsN[fromSlot])) {
    							bankItems[fromSlot] = 0;
    							bankItemsN[fromSlot] = 0;
    							resetBank();
    							resetItems(5064);
    						}
    					} else {
    						if (addItem(bankItems[fromSlot], amount)) {
    							bankItemsN[fromSlot] -= amount;
    							resetBank();
    							resetItems(5064);
    						}
    					}
    				} else {
    					sM("Item can't be drawn as note.");
    					if (Item.itemStackable[bankItems[fromSlot] - 1]) {
    						if (bankItemsN[fromSlot] > amount) {
    							if (addItem((bankItems[fromSlot] - 1), amount)) {
    								bankItemsN[fromSlot] -= amount;
    								resetBank();
    								resetItems(5064);
    								resetBank();
    								resetItems(5064);
    							}
    						} else {
    							if (addItem((bankItems[fromSlot] - 1),
    									bankItemsN[fromSlot])) {
    								bankItems[fromSlot] = 0;
    								bankItemsN[fromSlot] = 0;
    								resetBank();
    								resetItems(5064);
    							}
    						}
    					} else {
    						while (amount > 0) {
    							if (bankItemsN[fromSlot] > 0) {
    								if (addItem((bankItems[fromSlot] - 1), 1)) {
    									bankItemsN[fromSlot] += -1;
    									amount--;
    								} else {
    									amount = 0;
    								}
    							} else {
    								amount = 0;
    							}
    						}
    						resetBank();
    						resetItems(5064);
    					}
    				}
    			}
    			resetBank();
    			resetItems(5064);
    			resetBank();
    		}
    	}



    And yes, this is what the owner of the servers bank looks like


    Spoiler for different picture now:
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    Join Date
    Jun 2008
    Posts
    12
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    That's pretty cool. I'll add that to my server.
    Reply With Quote  
     

  4. #3  
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    Do the pictures help show it?


    Spoiler for different picture now:
    Reply With Quote  
     

  5. #4  
    Banned

    Join Date
    Jan 2009
    Age
    34
    Posts
    3,143
    Thanks given
    27
    Thanks received
    92
    Rep Power
    0
    Does this do it automatically, or after you close the bank? Nice either way.
    Reply With Quote  
     

  6. #5  
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    Quote Originally Posted by Shemhamforash View Post
    Does this do it automatically, or after you close the bank? Nice either way.
    Automatically


    Spoiler for different picture now:
    Reply With Quote  
     

  7. #6  
    Banned

    Join Date
    May 2008
    Posts
    2,327
    Thanks given
    55
    Thanks received
    67
    Rep Power
    0
    i prefer having it done when they open the bank, that way, incase they accidently take something out, they dont have to use rearrage/swap/insert thing
    Reply With Quote  
     

  8. #7  
    Registered Member
    Join Date
    May 2010
    Posts
    37
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Good work. Also, nice client.
    Reply With Quote  
     

  9. #8  
    #1 footwear

    Shoes's Avatar
    Join Date
    Aug 2009
    Age
    27
    Posts
    2,612
    Thanks given
    185
    Thanks received
    255
    Rep Power
    579
    Quote Originally Posted by Vault View Post
    Good work. Also, nice client.
    Thanks, I worked hard on it

    EDIT: Forgot all you could see was the gameframe Look in client download for Galkon's client, it's all his work


    Spoiler for different picture now:
    Reply With Quote  
     

  10. #9  
    Officially Retired

    Huey's Avatar
    Join Date
    Jan 2008
    Age
    22
    Posts
    16,478
    Thanks given
    3,385
    Thanks received
    7,727
    Rep Power
    5000
    Goodjob wounder if this happens on insanity hmm
    Attached image
    Listen children don't become this guy.
    Quote Originally Posted by Owner Spikey View Post
    Why can I attack lower level npc's in a matter of a mouse hover but for a higher level npc the only choice to attack is by right clicking option attack?

    Reply With Quote  
     

  11. #10  
    Banned

    Join Date
    Jun 2009
    Posts
    2,916
    Thanks given
    169
    Thanks received
    806
    Rep Power
    0
    This makes if it arranges all items 0.
    Reply With Quote  
     

Page 1 of 4 123 ... LastLast

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
  •