Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Charging trident?

Joined
Jun 21, 2021
Messages
4
Hi all,

I'm trying to get my bot to charge the trident but not sure what I should be using. EnterAmountDialog doesn't seem to work, and I'm not sure what alternatives I have.

Thanks in advance
 
Joined
Apr 21, 2019
Messages
40
Can you post a snippet of your code? Specifically the code that activates this function, the code that brings up the interaction menu, and the code thats supposed to enter the amount?
 
Joined
Jun 21, 2021
Messages
4
Yeah of course.

Here's what I'm using to activate the function, but this is returning false no matter what I do:

Code:
...validate() { return EnterAmountDialog.IsOpen(); }

This is to bring up the interaction, which works fine:

Code:
if (coins.click()) {
            if (Execution.delayUntil(()->Inventory.getSelectedItem() != null, 800, 1200)) {
                staff.click();

Then to charge I was using this, but this piece of code hasn't been triggered yet so I couldn't tell you if I'm on the right lines. (int amount is determined elsewhere)

EnterAmountDialog.enterAmount(amount)
 
Joined
Apr 21, 2019
Messages
40
So it seems you're telling the code to activate whenever the EnterAmountDialog box is open. When charging a trident, I dont think that Dialog box ever happens. You just click your runes and charge the Trident and its done. You need to change the condition for when you want to charge a trident, because currently it will only attempt to charge if you have an EnterAmountDialog open.

Just for fun run your bot and go into the bank and try and withdraw X amount of items, does it start to validate for true once that dialog is open?
 
Joined
Jun 21, 2021
Messages
4
I tried adjusting the code to run even if the EnterAmountDIalog isn't open, but EnterAmountDialog.enterAmount("2500") (or (2500)) does nothing :(

Is there any way I can just force it to type 2500 and press enter once I've ran the code to bring up the dialog? This is only a private script so I'm not concerned with it being the 'right' way as long as it works!
 
Top