Jump to content

Apaec

Scripter III
  • Posts

    11139
  • Joined

  • Last visited

  • Days Won

    90
  • Feedback

    100%

Everything posted by Apaec

  1. I wouldn't check any of this moving business, that sounds like over-complicating things, plus you cannot always guarantee that the player will move. As it seems you've already tried, after the interaction method you should call a conditional sleep. It doesn't have to be anonymous, but for no good reason this one is: tree.interact("Chop"); if (new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep()) { // successfully chopping tree } else { // Timeout expired before player started animating. } While you don't need to put it in an if statement, it's just illustrating the idea. For the record, myPlayer().isAnimating() is presumably equivalent to comparing the animation id to -1, just more readable! Edit: You should also take that break out of the interaction if statement! otherwise if you call chop and entity#interact returns false for whatever reason, you will slide straight into your walking state! Edit 2: The code that i've given you will sleep after the interaction until the player starts chopping. This is fine, but i've noticed in your code you've smacked a massive 50,000ms (50sec) sleep in there after interacting with the tree. Long sleeps like this should be avoided as you're hindering the continuously looping nature of onLoop (also, what if the tree takes longer than 50s to cut? You'll click it again- doh!). Instead, I would recommend adding a new state. e.g IDLE, which is called while you are chopping the tree. (i.e when you don't need any of the other states). Hope that helps, let me know if you need any more help! The script is looking pretty nice and tidy! -Apa
  2. Hey, if it's saying teles then perhaps it is looking for teles rather than tabs - Have you got air runes and laws in the bank, and is your magic level sufficient? Or if this doesn't help, try switching the gui option to teletabs! Hey, ofcourse - refresh your scripts list! -Apa
  3. This sounds frustrating, I will try and take a look tonight!
  4. Apaec

    APA Rune Sudoku

    I'm looking at about 440K gp/h on a test run that i'm currently doing. It seems cosmics took a 10 gp drop overnight, not sure why, most likely a market dump. Either way, i'm sure they will slide themselves back up there soon! The profit margin on them is still insane. Cheers
  5. Ah, this might be it. Thanks for this!
  6. Misfits is quality stuff haha, at least for the first season!
  7. That's odd, thanks for posting this. It's strange that it eventually hopped after waiting - I will run some tests now. By any chance could you confirm - were you using a 4-spawn spot? -Apa
  8. As everyone has said, Prison Break is amazing! I'm still in the first season but it's amazing. Suits is also good fun, still early in that series too.
  9. Are you sure you selected the "Hop if crashed" option in the GUI? This sounds like the anti-crashing sequence has kicked in! It is checking every ~200 ms or so when you get crashed so either it should hop or it should anti-crash and it seems it chose to anti-crash so you must have configured it to do so in the startup interface!! Cheers -Apa
  10. I'm sorry to hear this! From my experience, if you're using a public script, I would say they're all equally risky since the user counts are quite high. I would recommend against botting again on this account in the future, however if you can't resist, be careful! Be sure to give this thread a read: osbot.org/forum/topic/45618-preventing-rs-botting-bans/ and if possible use premium/private scripts! Hope this helped (: -Apa
  11. Hey I'm sorry that you're experiencing these problems. I'm not sure how it could end up dead! o.o As for the Al-kharid issues, I thought I fixed these a little while ago but apparently not! I will add it to the list of things to modify, but may wait until the much needed ground-up rewrite of the entire script. In the mean time I would recommend smelting at a different furnace if possible, preferably one without a door! (I believe that may be what is causing your issues!) Cheers -Apa
  12. I could, however it's a question of for which skill, and I don't want to just dump a timer for each skill on there. Since the paint is expandable, I can track for which skills you've gained exp and then use that to determine which timers to put on the paint. I will see if I can get this added for you this week! Cheers -Apa
  13. I'm not really sure what you're trying to do with the code you have, I think you've misunderstood the idea behind some of the API methods and you might need to brush up a little on your general java understanding, however I think this should help: case BANK: if (getBank().isOpen()) { getBank().withdraw("Lobster", 28); } else { NPC banker = getNpcs().closest("Banker"); if (banker != null && banker.exists()) { banker.interact("Bank"); sleep(2000); // Put a conditional sleep here! } else { stop(); // Stop if banker could not be found. You will probably need to add walking here } } break; The code that i've given you above is very generalised and needs modifications, but it should hopefully be a good starting point for getting your code to do something! -Apa
  14. Apaec

    APA Rune Sudoku

    Heya (: When solving sudokus, there is actually no need to hop worlds as the discount rune stock is personal to you. There are other bots interacting with Ali Morrisane, however I believe these bots are trading with his standard rune store which is completely unrelated (hence they hop)! As for your question about breaks, you can still access the logout tab while the sudoku is open, so the OSBot break manager will still be able to log out as usual. Cheers -Apa
  15. Apaec

    APA Rune Sudoku

    SDN release application sent in! I have also updated the main thread to contain all the development progress reports that I posted as replies, as well as adding screenshots, a list of features and all the requirements you would need to run this script on an account. -Apa
  16. Have already given you one, be sure to refresh your scripts list! Enjoy -Apa (:
  17. Hey Apologies for this. Since I add each trial manually, it rejects the trial request if the user has already had a trial. It seems like you had one at some point last year, but since that was so long ago i've wiped that trial record and have enabled it on your account for a fresh 24h. Enjoy & sorry about that! -Apa (:
  18. Apaec

    APA Rune Sudoku

    Progress update 2 (13-05-2017) Just thought I would drop in a second part to the progress update for today. I've finished implementing all of the above, so the solver is much more efficient at reading the board. Additionally, I've modified the UI a little to cater for some debug options: I feel at the stage where the script is complete, and ready for release! I've completed many many many sudokus with the script and I have to say it was great fun writing it. Here's the final solving logic with the same settings as the ui above: -Apa
  19. Hey there Unfortunately the recent client revisions have caused some issues with gui loading/saving. Here's the message i've been sending people as to how to fix it: ---------------------------------------------- The full story is on the previous page, but in short to fix your issue you need to delete your previous gui save file: Navigate to C:\Users\YOUR_NAME\OSBot\Data\APA_Sand_Crabs Delete the "gui_settings.txt" file found at that location Re-start the script ------------------------------------------ Let me know if you're still having problems! -Apa
  20. Apaec

    APA Rune Sudoku

    Progress update 13-05-2017 Since I haven't posted anything here for a couple of days now, I thought i'd post an update on what i've been doing on the script. While I originally planned to send in an SDN upload request earlier this week, I decided against it as there were a couple of things that I was not too happy about. Firstly, the half second pause between opening the sudoku and generating a solution was not ideal for me. While it wasn't too bad, it was something that, given some tweaks, could be minimised. To go about adjusting this, I had to determine the cause of the delay, which I believed to be having custom pixel rgb data for each rune. While this is a working and reliable solution, it means each cell has to be - in the worst case - scanned up to 10 times. Not ideal! Instead, to solve this, I decided to once again check for grey, but this time set the threshold wide enough to encompass the entire rune background. This allowed me to determine runes based on the space their logo takes up on the base of the rune. There are, however, a few issues with this approach which is why I did not initially explore it at the start. Firstly, the whole tile has to be analysed before a decision can be made as to what rune it is. Secondly, the '1' showing that the rune is editable overlaps slightly with the rune, meaning editable runes have slightly different thresholds to default ones. Finally, the death and air thresholds are only 1 pixel apart! (Editable runes are the top row, provided runes bottom row) That being said, it had some obvious advantages: Firstly, tiles only had to be scanned twice (once to determine if editable (this was being done anyway), second time to determine the rune). Secondly, the colour reader could potentially work on multiple/all brightness settings. Finally, the runes did not have to be in a hierarchy as they all share the same base colour. The second thing that I wanted to do was cut out the middle step of converting runes to numbers and numbers back to runes (this happened while generating a solution for the permutation of runes). While this was a valid approach which wasn't very time consuming, it was simply untidy, unnecessary and very avoidable. To solve this issue, I made the sudoku board data structure generic (which I should have done from the start) provided the type it is given is comparable. Since the rune data is stored in an enum, this worked out nicely as I did not need to write my own compareTo method. This also means the sudoku viewer can now display the rune values instead of arbitrary numbers: I have currently implemented most of these improvements and am working on further changes + stress testing. Hopefully should be ready to submit a working version within the next few days! -Apa
  21. Hey, Yeah - however unfortunately not directly. You will need to grab a store voucher ( https://osbot.org/forum/forum/227-vouchers/ ) worth $5 which you can then redeem. Cheers! -Apa
  22. Replied on main thread, cheers Apa
  23. Not sure. Try entering that particular widget into the widget debugger in the options menu to see what RS2Widget methods might help you
×
×
  • Create New...