mitsuki Posted August 27, 2020 Share Posted August 27, 2020 2 hours ago, Apaec said: Ah great! So you have some experience with Java through university. That'll definitely help in shallowing the learning curve. Regarding webwalking, as I said, this system is---by nature---much less reliable than a hard-coded sequence of positions which constitute a path. So, if the route you're walking is regular and known, i'd strongly recommend recording a path (there are tools for this on the SDN, or local section I believe. Or, make your own!). Then, you can use the walkPath method which will be more reliable and resource-efficient. GL! Apa Okay dude, cheers! What about adding some sort of task feature, so that I can see if a user wants to use banking, then if they do, make the script bank instead of powerfishing? Quote Link to comment Share on other sites More sharing options...
Apaec Posted August 28, 2020 Author Share Posted August 28, 2020 23 hours ago, mitsuki said: Okay dude, cheers! What about adding some sort of task feature, so that I can see if a user wants to use banking, then if they do, make the script bank instead of powerfishing? You mean a user interface? That's a little more complicated. For very simple interfaces, you can use JOptionPanes (these are create for basic input!). For more complicated UIs, you'll have to start extending JFrame yourself. Alternatively, you can create your own rudimentary interface using the paint and mouse listeners -Apa Quote Link to comment Share on other sites More sharing options...
mitsuki Posted August 28, 2020 Share Posted August 28, 2020 How do I add a sleep? Do i just use return random(minsleeptime, maxsleeptime);? Quote Link to comment Share on other sites More sharing options...
Apaec Posted August 29, 2020 Author Share Posted August 29, 2020 11 hours ago, mitsuki said: How do I add a sleep? Do i just use return random(minsleeptime, maxsleeptime);? You could do that, that is referred to as a static sleep. They're not great. It's better to, where possible, use a conditional sleep. These are slightly different - rather than the duration of the sleep being fixed, the script instead sleeps until a condition is met (or a timeout is exceeded). Here's a link to the relevant (abstract) class: https://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html You'll have to extend your own versions of this class, which people typically do anonymously for convenience. -Apa Quote Link to comment Share on other sites More sharing options...
mitsuki Posted August 29, 2020 Share Posted August 29, 2020 do you mind if i pm you my code for a script? I've spent hours on it, and it was working fine, but now it only seems to get me to the location where i want to fish? maybe you'll see something in the code where i'm going wrong. Cheers dude 1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted August 31, 2020 Author Share Posted August 31, 2020 On 8/29/2020 at 2:59 PM, mitsuki said: do you mind if i pm you my code for a script? I've spent hours on it, and it was working fine, but now it only seems to get me to the location where i want to fish? maybe you'll see something in the code where i'm going wrong. Cheers dude Sure thing. Just sent you a reply. Apa Quote Link to comment Share on other sites More sharing options...
Weep Posted October 7, 2020 Share Posted October 7, 2020 Hey, I'm having an issue where my TeaTheiver script won't show up in the OSBot Script Selector. I have the script saved to C:\\Users\User\OSBot\Scripts, but when I open the Script Selector and hit refresh the TeaTheiver script does not appear. I have succesfully added other scripts from the SDN and those show up just fine in the Script Selector, but my custom script does not. I deleted my project and tried creating a new one. I also deleted OSBot and redownloaded it. Neither of these attempts fixed the problem. Could this be because I'm using JavaSE-14 in my Build Path? Do I need to use a different Java version? Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 7, 2020 Author Share Posted October 7, 2020 10 hours ago, Weep said: Hey, I'm having an issue where my TeaTheiver script won't show up in the OSBot Script Selector. I have the script saved to C:\\Users\User\OSBot\Scripts, but when I open the Script Selector and hit refresh the TeaTheiver script does not appear. I have succesfully added other scripts from the SDN and those show up just fine in the Script Selector, but my custom script does not. I deleted my project and tried creating a new one. I also deleted OSBot and redownloaded it. Neither of these attempts fixed the problem. Could this be because I'm using JavaSE-14 in my Build Path? Do I need to use a different Java version? While I am not entirely sure what could be causing this, I think your assumption may be correct. I'm not entirely sure which Java version is currently supported by OSBot, but 14+ may not be supported. I'd recommend building against an older, more established Java version (I know that Java 8 is supported, so perhaps start with that?) Also, ensure that your ScriptManifest annotation is correctly placed and populated - this is required for the script to show up in your selector. Best of luck, let me know how you get on! -Apa Quote Link to comment Share on other sites More sharing options...
LadderGoat Posted October 27, 2020 Share Posted October 27, 2020 (edited) I'm having a problem with loading the script. I did everything exactly as explained, but the script doesn't appear when i try to load it within osbot, any idea on how to fix this? I tried using java 8 but i'm still experiencing the same problem.. Edited October 27, 2020 by Jonas Schoenmakers Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 27, 2020 Author Share Posted October 27, 2020 41 minutes ago, Jonas Schoenmakers said: I'm having a problem with loading the script. I did everything exactly as explained, but the script doesn't appear when i try to load it within osbot, any idea on how to fix this? Hey, Please could you send a screenshot of your script? Sometimes issues with the script manifest mean the script may not show. -Apa Quote Link to comment Share on other sites More sharing options...
LadderGoat Posted October 27, 2020 Share Posted October 27, 2020 (edited) 1 hour ago, Apaec said: Hey, Please could you send a screenshot of your script? Sometimes issues with the script manifest mean the script may not show. -Apa https://gyazo.com/8d1e02b1f996acc58368d98b3cb4d45c Edited October 27, 2020 by Jonas Schoenmakers Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 27, 2020 Author Share Posted October 27, 2020 8 minutes ago, Jonas Schoenmakers said: https://gyazo.com/8d1e02b1f996acc58368d98b3cb4d45c Hmm, that looks like it is OK. I don't think the issue is with the manifest then. I'm sure you have, but have you tried restarting OSBot? -Apa Quote Link to comment Share on other sites More sharing options...
LadderGoat Posted October 27, 2020 Share Posted October 27, 2020 (edited) 13 minutes ago, Apaec said: Hmm, that looks like it is OK. I don't think the issue is with the manifest then. I'm sure you have, but have you tried restarting OSBot? -Apa Yes i have, i also have a jar file from a while ago that gets read, but i don't have the source code anymore, otherwise i could've compared them.. I'm receiving this error message multiple times in my logger though [ERROR][10/27 04:28:46 PM]: Failed to load local script : core/Main.class EDIT: https://gyazo.com/5cbee5e372d14b2267605e739ef5f938 Edited October 27, 2020 by Jonas Schoenmakers Quote Link to comment Share on other sites More sharing options...
LadderGoat Posted October 27, 2020 Share Posted October 27, 2020 Sorry for the double post, but i managed to fix my problem. I changed the java version, but i forgot to check this option: "Use compliance from execution enviroment "JAVA-SE8" 1 Quote Link to comment Share on other sites More sharing options...
yaniij Posted March 20, 2021 Share Posted March 20, 2021 (edited) Just wanted to say thanks so much. I'm doing a CS bachelor and had some introductory Java courses and this was very readable to me, but it was the first time seeing how an imported API would function and thanks to your guide I'm going to try to learn some OSRS scripting just to play with my basic skills a little. Combining a hobby like OSRS and courses for CS is pretty cool; thanks a lot for the effort to make this! Edited March 20, 2021 by yaniij Quote Link to comment Share on other sites More sharing options...