1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bug Bank.depositAllExcept() occasionally gets stuck with item right-clicked

Discussion in 'Developer Support' started by Snufalufugus, Jul 2, 2017.

  1. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    The only information in the intelliJ output is

    00:09:52 TRACE [Bank] Depositing with action: Deposit-All

    It will right click the item, never select the option, and just sit there with the menu open until the account logs out from inactivity.

    This is on OSRS with 7 items in the argument.
    --- Double Post Merged, Jul 2, 2017, Original Post Date: Jun 25, 2017 ---
    still unresolved 7/2/17
     
  2. kermitt

    Joined:
    Jan 25, 2017
    Messages:
    29
    Likes Received:
    13
    Deposit all except returns a boolean that lets you know if it was successful. You can do something like the following to keep trying until everything is gone. So even if it isn't perfect it wont break;

    Code (Text):
    1. private boolean depositAll()
    2.     {
    3.         if (!Bank.depositAllExcept(ITEM_IDS_TO_KEEP))
    4.             depositAll();
    5.        
    6.         return true;
    7.     }
     
  3. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    Still unresolved 9/8/17

    More details since I encountered it again:
    Code (Text):
    1. 00:46:18 INFO    Opening bank to deposit bars
    2. 00:46:19 DEBUG    It has been 00:00:09 since we started processing
    3. 00:46:18 DEBUG    It has been 00:00:00 since we paid the foreman
    4. 00:46:19 INFO    We have decided to turn the camera
    5. 00:46:19 TRACE    [Camera] Camera turn direction: RIGHT / UP
    6. 00:46:19 TRACE    [Camera] Pressing keys
    7. 00:46:19 DEBUG    Found items in bank
    8. 00:46:19 INFO    Depositing unnecessary items
    9. 00:46:19 TRACE    [Bank] Depositing with action: Deposit
    10. 00:46:19 WARN    [Bank] Action not found in [Cancel, Walk here]
    11. 00:46:19 TRACE    [Bank] Depositing with action: Deposit-All
    12. 00:46:19 TRACE    [Camera] It should now release the key RIGHT which is currently pressed.
    13. 00:46:19 TRACE    [Camera] Releasing key RIGHT
    14. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    15. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    16. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    17. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    18. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    19. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    20. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    21. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    22. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    23. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    24. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    25. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    26. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    27. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    28. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    29. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    30. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    31. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    32. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    33. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    34. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    35. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    36. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    37. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    38. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    39. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    40. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    41. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    42. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    43. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    44. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    45. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    46. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    47. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    48. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    49. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    50. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    51. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    52. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    53. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    54. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    55. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    56. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    57. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    58. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    59. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    60. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    61. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    62. 00:46:20 INFO    We have been processing too long.
    63. 00:46:20 INFO    Depositing unnecessary items
    64. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    65. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    66. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    67. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    68. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    69. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    70. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    71. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    72. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    73. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    74. 00:46:20 WARN    [Bank] Action not found in [Cancel]
    75. 00:46:20 TRACE    [Bank] Depositing with action: Deposit
    76. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    77. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    78. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    79. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    80. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    81. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    82. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    83. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    84. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    85. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    86. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    87. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    88. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    89. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    90. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    91. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    92. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    93. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    94. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    95. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    96. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    97. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    98. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    99. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    100. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    101. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    102. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    103. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    104. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    105. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    106. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    107. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    108. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    109. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    110. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    111. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    112. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    113. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    114. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    115. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    116. 00:46:21 INFO    Depositing unnecessary items
    117. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    118. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    119. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    120. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    121. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    122. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    123. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    124. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    125. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    126. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    127. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    128. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    129. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    130. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    131. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    132. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    133. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    134. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    135. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    136. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    137. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    138. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    139. 00:46:21 WARN    [Bank] Action not found in [Cancel]
    140. 00:46:21 TRACE    [Bank] Depositing with action: Deposit
    141. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    142. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    143. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    144. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    145. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    146. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    147. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    148. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    149. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    150. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    151. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    152. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    153. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    154. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    155. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    156. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    157. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    158. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    159. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    160. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    161. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    162. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    163. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    164. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    165. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    166. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    167. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    168. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    169. 00:46:22 INFO    Depositing unnecessary items
    170. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    171. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    172. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    173. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    174. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    175. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    176. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    177. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    178. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    179. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    180. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    181. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    182. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    183. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    184. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    185. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    186. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    187. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    188. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    189. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    190. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    191. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    192. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    193. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    194. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    195. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    196. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    197. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    198. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    199. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    200. 00:46:22 WARN    [Bank] Action not found in [Cancel]
    201. 00:46:22 TRACE    [Bank] Depositing with action: Deposit
    202. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    203. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    204. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    205. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    206. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    207. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    208. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    209. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    210. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    211. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    212. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    213. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    214. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    215. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    216. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    217. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    218. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    219. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    220. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    221. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    222. 00:46:23 INFO    Depositing unnecessary items
    223. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    224. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    225. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    226. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    227. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    228. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    229. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    230. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    231. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    232. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    233. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    234. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    235. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    236. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    237. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    238. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    239. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    240. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    241. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    242. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    243. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    244. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    245. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    246. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    247. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    248. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    249. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    250. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    251. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    252. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    253. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    254. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    255. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    256. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    257. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    258. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    259. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    260. 00:46:23 WARN    [Bank] Action not found in [Cancel]
    261. 00:46:23 TRACE    [Bank] Depositing with action: Deposit
    262.  
    Task where it occured:
    Code (Text):
    1. public class DepositUnneededItems extends Task {
    2.  
    3.     private RegalBlastFurnace bot = (RegalBlastFurnace) Environment.getBot();
    4.  
    5.     private BF_Bars currentBar;
    6.  
    7.     @Override
    8.     public boolean validate() {
    9.         return (currentBar = bot.getBf_bar()) != null && Inventory.containsAnyExcept(currentBar.getMaterialOne(), currentBar.getMaterialTwo(), "Coal bag", "Bucket", "Bucket of water", "Stamina potion(1)", "Stamina potion(2)", "Stamina potion(3)", "Stamina potion(4)");
    10.     }
    11.  
    12.     @Override
    13.     public void execute() {
    14.         bot.getUi().setIgnoreAdditions(true);
    15.         getLogger().info("Depositing unnecessary items");
    16.         Bank.depositAllExcept(currentBar.getMaterialOne(), currentBar.getMaterialTwo(), "Coal bag", "Bucket", "Bucket of water", "Stamina potion(1)", "Stamina potion(2)", "Stamina potion(3)", "Stamina potion(4)");
    17.     }
    18.  
    19. }
    Image sent to @Cloud in Slack.

    The bot idled until it logged out, as far as I can tell it did this without re-looping through the structure, since it never re-printed "Depositing unnecessary items".
     
  4. SilenceP44

    Joined:
    Jun 8, 2017
    Messages:
    184
    Likes Received:
    87
    I have the same problem but I just solve it like this:

    Code (Text):
    1. GameObject rndObject = GameObjects.newQuery().results().random();
    2. if (rndObject != null) {
    3.       if (rndObject.isVisible()) {
    4.           Mouse.move(rndObject);
    5.           Execution.delay(50, 2000, 150);
    6.      }
    7. }
    The same happens allot when rightclicking on a large group of people. I just do the same with rnd objects.
     
  5. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    Yes, I have similar failsafes, but that doesn't mean that the API shouldn't be updated. Authors shouldn't need to implement custom failsafes like these on an individual basis to be able to use the API without their bots breaking.
     
  6. SilenceP44

    Joined:
    Jun 8, 2017
    Messages:
    184
    Likes Received:
    87
    True but it all comes down to that the bot thinks something is visible when not. I really don't know how hard it is to check or how much resources it would take to fix this. But indeed we shouldn't have to deal with this.
     
  7. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    @Cloud sent you the printout of menu. Get items as requested in slack
     

Share This Page

Loading...