NovaGTX 106 Share Posted May 11, 2020 4 minutes ago, Dockid said: if (c.getLocalPlayer().getAnimation() == -1 && !c.getInventory().isFull()) { fishingSpot.interact("Cage"); walkSleep(); }else if (c.getDialogues().inDialogue()) { c.getDialogues().spaceToContinue(); } When i remove the else if for handling the dialogue box the script will run perfectly, is there something wrong with how I am dealing with the "Inventory is full" dialogue? What structure are you using? You're extending the AbstractScript class so it's not a Task System. If you have a ton of nested if statements I suggest you look into a basic state structure. Here's a writeup I have given in the past: Link to comment Share on other sites More sharing options...
Dockid 9 Author Share Posted May 11, 2020 3 minutes ago, NovaGTX said: What structure are you using? You're extending the AbstractScript class so it's not a Task System. If you have a ton of nested if statements I suggest you look into a basic state structure. Here's a writeup I have given in the past: Okay I will rewrite my code based on your advice,thanks Link to comment Share on other sites More sharing options...
Dockid 9 Author Share Posted May 12, 2020 4 hours ago, NovaGTX said: What structure are you using? You're extending the AbstractScript class so it's not a Task System. If you have a ton of nested if statements I suggest you look into a basic state structure. Here's a writeup I have given in the past: Hi, I rewrote my code following your advice and now it all works fine,appreciate the help Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.