Jump to content

Pandemic's Scripting Series: Part I - Setup and Basic Logic [UPDATED FOR OSBOT 2]


Pandemic

Recommended Posts

Pandemic, two things I dont understand. What does @override do and what does the break; do??

 

Sorry for the late reply I didn't see this post somehow lol.

 

Anyways:

 

The @Override above a function simply means that OSBot will use this function instead of the default function that's defined in the Script class (the one our script is extending from). You can also call the default function by doing the super() function inside of the function you're overriding (well it's useless in this case, because the Script class functions are empty). 

 

and break; just "breaks out of" any loop you happen to be in.

Link to comment
Share on other sites

  • 3 weeks later...

hmm i'm a newb when it comes to java so bear with me here. but esssentially i just started out by rewriting out the script, it doesnt seem to detect the rock is null? or do i have wrong understanding of that? because it goes by name, and the name doesnt change when the rock loses its ore(it just changes id) the script will keep clicking the rock you already mined ;d. 

Link to comment
Share on other sites

hmm i'm a newb when it comes to java so bear with me here. but esssentially i just started out by rewriting out the script, it doesnt seem to detect the rock is null? or do i have wrong understanding of that? because it goes by name, and the name doesnt change when the rock loses its ore(it just changes id) the script will keep clicking the rock you already mined ;d. 

 

I know, this isn't a script to actually use, and in part 2 we fix this problem :)

Link to comment
Share on other sites

I know, this isn't a script to actually use, and in part 2 we fix this problem smile.png

ah, i just went and made a gui for inputting id's instead.. i must say after doing this. i def prefer Visual Basic's ability to distinguish WHAT THE FUCK IM SAYING when i dont use the proper capitalization/ lack of. 

i.e in VB if i wrote dim blah as string it would auto correct to Dim blah As String

in java its like oh man idk what you mean, errors everywhere! 

lol

mellow.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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