Thread: [317] Deposit/Withdraw All Button on Trade Screen

Results 1 to 4 of 4
  1. #1 [317] Deposit/Withdraw All Button on Trade Screen 
    Registered Member
    Join Date
    Aug 2020
    Posts
    27
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Hey lads, I was just wondering if anyone could point me in the right direction with adding the code behind both "Add All" & "Withdraw All" buttons.

    I have the buttons set up on the interface and they work (got a case with sendMessage atm) but I'm just a little unsure of how to get it over the line.

    Attached image

    I tried looking at the deposit all button from the bank and converting/changing what I needed from bank > trade, but this hasn't seemed to work as of yet. xD

    If anyone could point me in the right direction, that would be great!

    Cheers
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2017
    Posts
    195
    Thanks given
    13
    Thanks received
    27
    Rep Power
    13
    deposit all:
    1) sift through each slot in your inventory
    2) invoke the 'additem' method for that slot as if you were to click it manually

    Code:
    	public void depositall() {
    		for (int slot = 0; slot < player.playerItems.length; slot++) {
    			if (player.playerItems[slot] > 0 && player.playerItemsN[slot] > 0) {
    				session.addItem(c, new GameItem(player.playerItems[slot] - 1, player.playerItemsN[slot]));
    			}
    		}
    	}
    opposite of that code to withdraw all
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2020
    Posts
    27
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Unfortunately I've tried everything to get the above working for me with no luck Cheers tho socklol.

    Does anyone else have any other ideas? :O
    Reply With Quote  
     

  4. #4  
    BoomScape #1
    BoomScape's Avatar
    Join Date
    May 2013
    Posts
    2,422
    Thanks given
    289
    Thanks received
    234
    Rep Power
    48
    Quote Originally Posted by Jinxstalock View Post
    Unfortunately I've tried everything to get the above working for me with no luck Cheers tho socklol.

    Does anyone else have any other ideas? :O
    Add me on discord and i'll do it for you
    Attached image
    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. button on login screen
    By Our Promise in forum Help
    Replies: 6
    Last Post: 10-16-2015, 04:51 AM
  2. adding bank all button on bank interface
    By logannn13 in forum Help
    Replies: 3
    Last Post: 07-09-2015, 12:58 PM
  3. Enable TAB Button on login screen
    By gamerx in forum Snippets
    Replies: 15
    Last Post: 11-14-2010, 12:02 AM
  4. One button on main screen client!
    By Blair' in forum Tutorials
    Replies: 7
    Last Post: 03-31-2009, 08:00 PM
  5. Replies: 3
    Last Post: 01-22-2009, 12:42 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
  •