Jump to content

Some simple questions i'd like ansered (Scripting)


TheMcPker

Recommended Posts

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 by TheMcPker
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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 by Arnah
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...