Jump to content

barnold

Members
  • Posts

    11
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

1064 profile views

barnold's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. Sorry buddy - someone PM'd me first.
  2. Given away - sorry to everyone who asked.
  3. Hey I'm looking to sell 100m OSRS - I've added you on skype but theres a LOT of imposters so not sure if I've got the right one.
  4. Thanks for the helpful replies. So I was trying to create a class that I was going to use to track stats and other things, should I not bother with that and just have it in my main script class? Thanks
  5. Hi, I'm learning Java and trying to apply what I'm learning to scripting on OSBot. I'm struggling a little bit on the best way to do things. For example when should I create a class for something? I tried to create a class for my stats but I couldn't get it working for some reason. But I'm not sure if I need to be doing that in the first place I've read a lot of the basic tutorials on the site which I understand but couldn't find much else. I'm currently reading through the Oracle Java Docs. I feel like I have all these ideas for scripts but I don't know how to properly write them. I hear about "task systems" and "node systems" but I'm not really too sure what the differnce is between them. If anything can help out or point me in the right direction for some good resources I'd appreciate it! Thanks
  6. Right ok I think I understand it a bit better now. I will do some reading online and have a little mess about with some code to see if I properly understand it. Once again thank you for taking the time to respond with such a detailed explanation, really appreciated.
  7. That clears things up. Just so you know, I implemented your suggestion and the script works perfectly now - no spam clicking or anything. Ah ok that makes sense about the conditionalsleep being anonymous. Just a final quick one so I can fully understand what is happening with your orignial code (please correct me if I am wrong) tree.interact("Chop"); //Clicks Chop to attempt to chop the tree if (new ConditionalSleep(5000) { //Sleeps until my player begins chopping animation @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep()) { // successfully chopping tree // I then added another ConditionalSleep here - so that if my player has succesfully begun chopping it will wait until the tree has been cut. } else { // Timeout expired before player started animating. // I wasn't too sure what to add here - I didn't know what conditions would cause this code to execute. Would this get executed if my player fails to interact with the tree within the 5000 ms of the ConditionalSleep? } Again thank you for your help - it has really cleared things up for me.
  8. Hey man, thank you for taking the time to type your reply. I am unsure what you mean where you have said my conditional sleep doesn't have to be anonymous. What makes it anonymous? Sorry if these are newbie questions - still learning Java. The 50,000 ms sleep was put there as I was having a problem chopping Oak trees. It was originally set to 10 seconds, but for some reason after the 10 seconds if the tree still existed it just clicked it again, rather than waiting until the tree was chopped down. I will give your suggestions a go and see how I get on - again thank you for taking the time to give such a detailed response (and thank you for writing the original tutorial!) Much appriciated.
  9. Ah, thank you. I will try that. I think it's myPlayer().isMoving() so maybe I need something like if(!myPlayer().isMoving()){ //action }
  10. Hi, I am very new to the scripting scene, I have programming experience with other languages so I am quite familiar with programming logic. I have gone through 2 tutorials to get a basic understanding of the structure of scripts and how to write a simple script but I am struggling a little bit with something. The 2 tutorials for anyone thats interested: Explv's tutorial: Apaec's tutorial: I found these both very useful. I have written a very simple woodcutting script: I am just a bit unsure how to handle something that happens in the script. When my script finds a tree, it seems to spam click the tree whilst walking up to it until it actually begins chopping. I would like to prevent this from happening, but I am not sure how I achieve this. If anyone could give me a clue on how I could achieve this, it would be massively appreciated. Also - if anyone can see areas where I can improve me code please don't hesitate to tell me. Thank you in advance.
×
×
  • Create New...