Jump to content

Newb question


Recommended Posts

Posted

http://pastebin.com/RjMwwdMF

 

Anybody got any ideas on whats up in this?

It would help if you also mentioned what you are expecting this piece of code to do for you. From me looking at it, it looks like it probably will activate the "Start" state, but it doesnt seem that you've defined what the start state does yet, only the conditions which initiate it. So because you haven't really made the start state anywhere the script technically won't do anything yet.

 

I recommend that you download some scripts in the downloadable section, decompile the .jar with JD GUI (http://jd.benow.ca/) and see how other people write their scripts. I personally write my scripts using nodes instead of states, I'm still new at java so I'm not so sure of the difference, other than it being a little bit more optimized because you're doing things in actual object oriented programming instead of having most of your lines of code in one .java.

 

If you want an example of a node based script you could compile and learn from, click my signature for ikkWarriors, that's decompilable :)

Posted (edited)

you could use conditionalsleep

 

Example; This will sleep for 500 if condition is true (which is if the specific widget is not visible.)

new ConditionalSleep(500) {
 @Override
      public boolean condition() throws InterruptedException {
       return !getWidgets().isVisible(parent,child);
      }
}.sleep();
Edited by Assnerd

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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