Jump to content

Newb question


Snorunt

Recommended Posts

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

Link to comment
Share on other sites

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