Jump to content

A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec


Apaec

Recommended Posts

Is there a way to test your coding as you write it? In this tutorial you write the whole script, export it and add it to the client. I've always coded (never rs related) testing everything I write in small increments, as I code it.


Is there a way to test your coding as you write it? In this tutorial you write the whole script, export it and add it to the client. I've always coded (never rs related) testing everything I write in small increments, as I code it.

Link to comment
Share on other sites

Is there a way to test your coding as you write it? In this tutorial you write the whole script, export it and add it to the client. I've always coded (never rs related) testing everything I write in small increments, as I code it.

Is there a way to test your coding as you write it? In this tutorial you write the whole script, export it and add it to the client. I've always coded (never rs related) testing everything I write in small increments, as I code it.

 

For sure. For more complex scripts, you would write it a bit at a time, and test each bit by exporting the unfinished project. Ofcourse the script must compile (i.e no errors), but yes you can. In this case I wrote everything without even testing it because it's simple enough. In an Ideal world I would have tested the script but I was away from home while writing this tutorial. But for most scripts, you get the backbone done in stages, then add the bells and whistles eg special attack stuff, potions, food etc for combat scripts, or marks of grace for rooftop scripts etc.

 

~apa

Link to comment
Share on other sites

  • 2 weeks later...

I have done everything here but it does not show up in scripts of OSBOT

 

Are you sure you've exported it as the correct file type? Also perhaps clear your local scripts folder and have JUST this script in there and see if that happens. It can sometimes be a little fiddly. You can then move your other scripts back in once it pops up

 

apa

Link to comment
Share on other sites

  • 2 weeks later...

I have done everything here but it does not show up in scripts of OSBOT

 

I've been struggling with this for hours too. I followed all the instructions, and apart from running eclipse on a USB drive(still exported to my scripts) and renaming the "OSBot 2.4.68" to just "OSBot" and my script won't show up. I then tried to use your code and do everything as you did and it still didn't show up, so I downloaded other scripts, placed them in and I could see them. Any idea what the issue is?

Link to comment
Share on other sites

to make the script show up make sure you export is as a jar.

 

after you have the jar file. 

 

Go into Drive->Username->OsBot->Scripts

 

That is where you put the .jar file for the client to pick it up and use it. After putting it in there I would restart client and then refresh your script page inside the client and it should show up. That is how i got mine to show up.

Link to comment
Share on other sites

I've been struggling with this for hours too. I followed all the instructions, and apart from running eclipse on a USB drive(still exported to my scripts) and renaming the "OSBot 2.4.68" to just "OSBot" and my script won't show up. I then tried to use your code and do everything as you did and it still didn't show up, so I downloaded other scripts, placed them in and I could see them. Any idea what the issue is?

 

 

Try as ch4d suggested below.

 

to make the script show up make sure you export is as a jar.

 

after you have the jar file. 

 

Go into Drive->Username->OsBot->Scripts

 

That is where you put the .jar file for the client to pick it up and use it. After putting it in there I would restart client and then refresh your script page inside the client and it should show up. That is how i got mine to show up.

 

 

Additionally, perhaps try clearing everything in your local scripts folder and exporting again. Sometimes this folder can be quite buggy

 

~apa

Link to comment
Share on other sites

I've been struggling with this for hours too. I followed all the instructions, and apart from running eclipse on a USB drive(still exported to my scripts) and renaming the "OSBot 2.4.68" to just "OSBot" and my script won't show up. I then tried to use your code and do everything as you did and it still didn't show up, so I downloaded other scripts, placed them in and I could see them. Any idea what the issue is?

 

  1. Make sure you have the @ScriptManifest annotation above your class that extends Script. It won't show up otherwise.
  2. Make sure you have no compiler errors when you export the script.
  3. Make sure the script is actually exported to the .jar file (open up the .jar file and check it is inside)
  4. Make sure the script.jar is inside the C:\Users\Username\OSBot\Scripts directory
  5. If you have done all of the above, backup your scripts to another directory, delete the OSBot folder, restart the client, add your script to the newly created Scripts directory, refresh the script list and see if it shows up.
  6. If you have tried all of these, pm a scripter and maybe they can assist you over teamviewer.
  • Like 1
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...