TheMcPker Posted December 20, 2017 Share Posted December 20, 2017 (edited) Hey guys so im new to osbot and the scripting on here so i have a few small questions (i have about 6 months of rs scripting exspierence already so don't be afraid to use some "complex" examples) Quickstart: -how to quickstart the client with certain params example of information scriptname="test" varible1="meh" varible2=3 world=5 -what are limitations on this -How to have this function in the actual script is it something like onStart(String[] s) ? a small snippet example would be great Overall scripting: -Any fun tips/tricks that make life easier using the api? - is it possible to override some of the method's in the api - any functions/things in the api you think are bad/horrible? so i know to write my own custom functions for those things How easy is it to setup a botfarm using this api since that and making scripts for sdn is my goal for now Thanks for you help Edited December 20, 2017 by TheMcPker Quote Link to comment Share on other sites More sharing options...
Isolate Posted December 20, 2017 Share Posted December 20, 2017 1 hour ago, TheMcPker said: -how to quickstart the client with certain params example of information scriptname="test" varible1="meh" varible2=3 world=5 -what are limitations on this -How to have this function in the actual script is it something like onStart(String[] s) ? a small snippet example would be great -Any fun tips/tricks that make life easier using the api? - is it possible to override some of the method's in the api - any functions/things in the api you think are bad/horrible? so i know to write my own custom functions for those things How easy is it to setup a botfarm using this api since that and making scripts for sdn is my goal for now CLI and using the getParamaters() function on a script returns your launch args. limiatations are only certain characters can be used to separate args. tips and tricks is just if you expect a generic method should exist it prolly does in plain english like "get the players inventory" is getPlayer().getInventory() use predictive text as a crutch to speed up coding ye, you can do that, just make your own implementation of script and the class you wanna override methods in then override the get#() method in script to the custom implementation class you made trade and ge api are nasty, other than that nothing stands out too badly Quote Link to comment Share on other sites More sharing options...
Alek Posted December 20, 2017 Share Posted December 20, 2017 You can only override abstract methods or methods derived from interfaces. That's a java question though, not specific to any API. Many scripters choose to use the new functional parts of the Java 8 API which helps clean up code. Don't wrap your code needlessly just for the sake of "making your own" API, all you're doing is giving your processor more instructions to process. Quote Link to comment Share on other sites More sharing options...
Arnah Posted December 20, 2017 Share Posted December 20, 2017 (edited) 1 hour ago, Isolate said: use predictive text as a crutch to speed up coding If only, with everything extending MethodProvider you can barely tell what you actually need from the specific part of the api since it shows you everything in method provider + the part of the API you are looking at. And adding onto this MethodProvider has every field public AND a getter method so it's all duplicated. Idk maybe this is only a true issue on Eclipse but it's pretty hard to navigate and way faster to just keep the javadoc open. Edited December 20, 2017 by Arnah Quote Link to comment Share on other sites More sharing options...
Isolate Posted December 20, 2017 Share Posted December 20, 2017 1 hour ago, Arnah said: If only, with everything extending MethodProvider you can barely tell what you actually need from the specific part of the api since it shows you everything in method provider + the part of the API you are looking at. And adding onto this MethodProvider has every field public AND a getter method so it's all duplicated. Idk maybe this is only a true issue on Eclipse but it's pretty hard to navigate and way faster to just keep the javadoc open. naw thats a global pain, I wouldn't recommend using it on such a general scale, it becomes more of a habbit as you go as to what you know'll prompt, it's more of something you'll pick up overtime but it does become a bless tool to have. just typing a few letters out and hitting enter knowing the method'll autofill Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted December 20, 2017 Author Share Posted December 20, 2017 8 hours ago, Isolate said: CLI and using the getParamaters() function on a script returns your launch args. limiatations are only certain characters can be used to separate args. tips and tricks is just if you expect a generic method should exist it prolly does in plain english like "get the players inventory" is getPlayer().getInventory() use predictive text as a crutch to speed up coding ye, you can do that, just make your own implementation of script and the class you wanna override methods in then override the get#() method in script to the custom implementation class you made trade and ge api are nasty, other than that nothing stands out too badly Thanks Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted December 20, 2017 Author Share Posted December 20, 2017 6 hours ago, Arnah said: If only, with everything extending MethodProvider you can barely tell what you actually need from the specific part of the api since it shows you everything in method provider + the part of the API you are looking at. And adding onto this MethodProvider has every field public AND a getter method so it's all duplicated. Idk maybe this is only a true issue on Eclipse but it's pretty hard to navigate and way faster to just keep the javadoc open. Thanks for the advice but like i said im not new to scripting ;) aslong as everything is in a logical place il be able to find it within seconds Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted December 20, 2017 Author Share Posted December 20, 2017 4 hours ago, Isolate said: naw thats a global pain, I wouldn't recommend using it on such a general scale, it becomes more of a habbit as you go as to what you know'll prompt, it's more of something you'll pick up overtime but it does become a bless tool to have. just typing a few letters out and hitting enter knowing the method'll autofill yup xD its just a matter of scripting alot and you'l know 99% without having to think about it anymore Quote Link to comment Share on other sites More sharing options...