Probably, but i have no idea what i am doing..
@Dark57 Screenshot - d5af8fe18dc0371b41f4e98d055b597e - Gyazo
i got this far, but sometimes, it interacts, but doesnt click further..
like this
Screenshot - 0d05677078502dc61b8384a79f60dc9c - Gyazo
edit: i edited the nodes a little bit, seems a bit better now, but still stops sometimes new:
Screenshot - 2006de930aa1d49ca0ede105ec94ed54 - Gyazo
Looking at your last screen shot, you need a lot more conditionals. Currently you are making the bot run the same actions in a row no matter what. The fact that you have states doesn't help you because they don't break down the instructions, they just "break up" the actions visually.
Before you interact with an object, you should check and make sure it exists.
If Object Exists: Prawnbroker hotspot
True: Interact with Object: Prawnbroker hotspot
False: (What should we do if this is wrong? Should we try to walk to the correct location or is it a matter of taking a short pause before the object reappears?)
If there is an interface open when you're interacting with the Prawnbroker, you should check to see if the interface is visible before you try to interact with it.
Is Interface Visible: "Some text in the interface"
True: Press Key or Interact with Interface
False: Attempt to interact with object in the manner that opens the required interface, whatever that is.
Also, does your player have to wait a period of time while you're working with the Prawnbroker? If there is an animation delay, such as the one when you are smithing or fishing, etc then you should check and see if the player is animating. This is usually the first instruction in a state, because you don't want it to try and do anything else if the player is animating.
Is Player Animating
True: Delay
False: Do everything else
And when you want to interact with your monkey butler, that's an NPC so you should make sure it exists before you try to interact with that NPC.
Does NPC Exist: Monkey butler or whatever
True: Do everything else
False: Delay, we have to wait for him to return from the bank I think. Otherwise however you handle interacting with your butler if he isn't in your loaded NPCs.
If you put these conditionals in, then your bot shouldn't get stuck. These might not be all the conditionals you need, but basically if you're about to do an action then you need to make sure that action is valid. Also, naming your states helps tremendously. All of my states are named for the function they handle. So if one of your states is specifically for handling the interaction with the butler, then name it Butler.
I suggest that you open up some of the Pre-Made bots that are in Klik's Google Drive folder. Download the JSON file to a location you can remember and then load it just like any other bot you've written. Look at the structure of how those function, they are well named so you should have no problem understanding the intention of the code. When you finish your bot, you want it to look similar to those. A minimal actions in a row as possible, sometimes it's impossible to avoid but more times than not you can use a conditional to check if the next action is possible.
Another tip is that you want to build your conditionals backwards in a sense. For example, you might want to check and see if you need to switch states before you want to check if the Prawnbroker exists. This way your code will attempt the finishing action first(Building), and if that action is not available then it will progress to check if you can remove from the Prawnbroker. If that's not available, then it will go check and see if you need to insert something into the Prawnbroker. etc. etc. etc.
This logic structure allows your bot to correct itself in the least amount of steps. So if you finish making items from the prawnbroker, then when the code loops back to the top of the state the first conditional is checking whether or not you need to switch states, say because you have no required items left.