Butters Posted November 20, 2016 Share Posted November 20, 2016 (edited) Hey all, I'm thinking of making quest bots and started off with Restless Ghost, cause I think it's hard to find one. I'm doing this because i want to share this script with you and to get some advice/suggestions from more experienced scripters. DOWNLOAD LINK: https://www.mediafire.com/?lpbg7i9rnvw81en Wouldn't mind if someone could give any suggestions for the code. Any advice will be greatly appreciated. Credits to Aiban for telling me about the configs. Made everything less messy. Edited November 22, 2016 by krapstaunosi 4 Quote Link to comment Share on other sites More sharing options...
Uhtred Posted November 20, 2016 Share Posted November 20, 2016 cool ty for sharing Quote Link to comment Share on other sites More sharing options...
Jammer Posted November 20, 2016 Share Posted November 20, 2016 Sweet Quote Link to comment Share on other sites More sharing options...
Butters Posted November 20, 2016 Author Share Posted November 20, 2016 (edited) @@Uhtred @@Jammer Thanks. Let me know if you'll find any issues Edited November 20, 2016 by krapstaunosi Quote Link to comment Share on other sites More sharing options...
RONTAG Posted November 20, 2016 Share Posted November 20, 2016 4 Quote Link to comment Share on other sites More sharing options...
Aiban Posted November 20, 2016 Share Posted November 20, 2016 Look into configs, there is a config for every progression of a quest so you can just use configs to determine the stage of the quest getDialogues().completeDialogue(); is what you are looking for I believe, you can use a conditionalsleep after every action and you can simply return !getDialogues().inDialogue(); when u have finished speaking to an NPC 1 Quote Link to comment Share on other sites More sharing options...
Krys Posted November 20, 2016 Share Posted November 20, 2016 Nice Quote Link to comment Share on other sites More sharing options...
Butters Posted November 20, 2016 Author Share Posted November 20, 2016 @RONTAG Lol. @Aiban Thanks a lot. Gonna look into it. Quote Link to comment Share on other sites More sharing options...
Kim Posted November 20, 2016 Share Posted November 20, 2016 Nice goals well done Quote Link to comment Share on other sites More sharing options...
Butters Posted November 20, 2016 Author Share Posted November 20, 2016 Look into configs, there is a config for every progression of a quest so you can just use configs to determine the stage of the quest getDialogues().completeDialogue(); is what you are looking for I believe, you can use a conditionalsleep after every action and you can simply return !getDialogues().inDialogue(); when u have finished speaking to an NPC Thanks Aiban, the config stuff works great and made the code less messy. The only concern I have is about getDialogues().completeDialogue(); . It works great but it just flies through the whole conversation. What I've done is that I'm still using dialogues.clickContinue() and dialogues.isPendingOption() (added sleep between actions) and I check in getState() if the bot is still in dialog ant don't change anything till its' finished. Is this a decent solution or maybe I could rewrite the completeDialogue() method somehow to add sleep to it? By the way, is there a way to close the Quest completion window? I'm using getWidgets().closeOpenInterface(); but it doesn't seem to work. Another problem that I have is that after completing the quest I call stop(false); to stop the script. But OSBot then somehow gets confused and if I try to run a different script afterwards it starts the restless ghost script again. What should I include in the script to prevent this form happening? Quote Link to comment Share on other sites More sharing options...
Aiban Posted November 20, 2016 Share Posted November 20, 2016 Thanks Aiban, the config stuff works great and made the code less messy. The only concern I have is about getDialogues().completeDialogue(); . It works great but it just flies through the whole conversation. What I've done is that I'm still using dialogues.clickContinue() and dialogues.isPendingOption() (added sleep between actions) and I check in getState() if the bot is still in dialog ant don't change anything till its' finished. Is this a decent solution or maybe I could rewrite the completeDialogue() method somehow to add sleep to it? By the way, is there a way to close the Quest completion window? I'm using getWidgets().closeOpenInterface(); but it doesn't seem to work. Another problem that I have is that after completing the quest I call stop(false); to stop the script. But OSBot then somehow gets confused and if I try to run a different script afterwards it starts the restless ghost script again. What should I include in the script to prevent this form happening? I dont think adding sleeps inbetween dialogue matters much, im willing to bet that me and every other guys doing quests just spam their spacebar To close the quest completion window, i guess u could just check to see if the X button is visible or something Before starting up another script you should always refresh your script selector, that way there shouldnt be an issue Quote Link to comment Share on other sites More sharing options...
Butters Posted November 20, 2016 Author Share Posted November 20, 2016 To close the quest completion window, i guess u could just check to see if the X button is visible or something Any idea how to do that? By the way would love to hear if the script is working for you guys. Quote Link to comment Share on other sites More sharing options...
Aiban Posted November 20, 2016 Share Posted November 20, 2016 Any idea how to do that? By the way would love to hear if the script is working for you guys. You can explore the widget by going to Settings - Options - Widgets Or you could just read the text that pops up when you complete the quest :p Quote Link to comment Share on other sites More sharing options...
El Manny Posted November 30, 2016 Share Posted November 30, 2016 Gets stuck when trying to start the quest with father aereck, also gets stuck at father urhney (both times selected the wrong interface text), other than that it is flawless! Thanks! =) Quote Link to comment Share on other sites More sharing options...
Butters Posted November 30, 2016 Author Share Posted November 30, 2016 Gets stuck when trying to start the quest with father aereck, also gets stuck at father urhney (both times selected the wrong interface text), other than that it is flawless! Thanks! =) Thanks for the post. But I've just redone the quest with a fresh account and all looks good. Kinda thought maybe Jagex updated the dialogues. Aereck options are: "I'm looking for a quest!", "Ok, let me help then." Urhney: "Father Aereck sent me to talk to you.", "He's got a ghost haunting his graveyard." The interface had these options and still selected something else? Quote Link to comment Share on other sites More sharing options...