Jump to content

Open Source Tutorial Island Script


Explv

Recommended Posts

  • 6 months later...
  • 3 weeks later...
On 4/9/2018 at 3:15 PM, Athylus said:

Thanks a lot! What does the exchangeContext method do?

The MethodProvider class has a bunch of variables in it such as inventory, bank, etc.

Your main class that extends Script (which extends MethodProvider) will have these variables set automatically when it is initialized, which is why you can access the OSBot API from onStart() or onLoop() without doing anything.

However, when you create a class that extends MethodProvider and initialize it, those variables will not be automatically set. So you need to exchange the context (by calling exchangeContext(Bot bot)) between your instance that does have those variables set, and your other instance that does not.

"

public MethodProvider exchangeContext(Bot bot)

Deprecated. For internal use only.

This class and method can be used to create extensions to the API with full direct access to the OSBot 2 API within your extensions. If you create your own extensions you extend the API class or MethodProvider and if you want to provide the existing API components to your own extensions you override this method with a call to this method first by calling super.exchangeContext(bot) followed by the initialization of your own components on which you call this method on.

Specified by:

exchangeContext in class AbstractMethodProvider<Bot>

Parameters:

bot - The Bot instance.

Returns:

The instance of this API extension."

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 7/27/2017 at 9:42 PM, Explv said:

This was the first script I created for OSBot, I have seen many people make / try to make this script, so I figured why not open source mine so that people could learn from it, or use it.

https://github.com/Explv/Tutorial-Island

Note: there are still some areas I would like to clean up, just haven't had the time yet. I have also excluded my GUI and Paint just to keep it simple.

If you can mention the things you want cleaned up il happily take a look this weekend and see what i can do

Link to comment
Share on other sites

  • 5 months later...
19 hours ago, IkiritokunI said:

oef we need a update on this ?

 

16 hours ago, Runnwith said:

You should update it. ? 

 

1 hour ago, IkiritokunI said:

I'm A noob Java scriptor, tried it today :P. But can't swap the position. (its keep doing the original script).


Fixes have been made, latest release can be found here https://github.com/Explv/Tutorial-Island/releases

Please note that as new accounts are automatically started in resizable mode, the client will have to be manually restarted after the script changes to fixed mode.

Hopefully the OSBot devs will produce a fix for this at some point.

Link to comment
Share on other sites

  • 1 month later...

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...