-
Posts
11169 -
Joined
-
Last visited
-
Days Won
91 -
Feedback
100%
Everything posted by Apaec
-
Hey, I'm not sure why - it should automatically be added to your scripts list when you buy it. However sometimes payments take a little while to process - If it's still not there, i've given you a 24h trial of the script which you can use while you wait! (: Cheers Apa
-
Cannot find symbol when creating instance of another class
Apaec replied to Mechagoober's topic in Scripting Help
This is not true! ----- As for the original issue, I'm not sure why you would need to extend your already script extending class. Please could you explain what exactly it is that you're trying to to? -
Hey, please could you debug this by opening the console (Settings->Toggle Logger) and letting me know what is printed? It may be that there was a configure conflict! Cheers -Apa
-
Hey It seems you're misunderstanding a couple of things about what the code does here. The ConditionalSleep#sleep() will sleep (the script will sit idle doing nothing) for as long as EITHER the condition provided evaluates to true, OR The timeout expires (set by the value provided in the constructor). It will then return a boolean value of whether or not the condition evaluated to true. (i.e sleep() returns condition()). Since we're putting this sleep() method as the evaluation of an if statement, the if statement will be entered if the timeout did NOT expire (i.e the condition in the conditional sleep evaluated to true). Thus, the else statement will be entered if the timeout expired (i.e 5000ms passed and the player is still not animating). Your question of what to add in the else block is a good one - this is up to you. Perhaps you don't need the else block (after all I put it there just to demonstrate)? The one thing I would like to re-iterate is that you don't want to break the looping nature of onLoop. This means long sleeps are a big no-no (while the script is sleeping, it is not looping, hence it is not running state checks!). Your plan to add one long sleep to wait until the tree is cut is probably not a good plan. As I suggested before, have a new state, perhaps named IDLE, which has a short sleep (or no sleep at all, relying on onLoop's return value) and is called while your player is cutting the tree (i.e animating). That way, you still sleep while the player is cutting the tree, and this sleeping is in essence conditional, however the script is still looping through the code and hence more aware of what is going on as custom checks can be run for other things (e.g bird nests, ...) Perhaps what might remove some of the mystery for you is to create a wrapper method for this which takes it down to one line in your code, something like this: private boolean sleepUntilAnimating(long timeout) { return new ConditionalSleep(timeout) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep()); } and then you can just do tree.interact("Chop"); if (sleepUntilAnimating(5000L)) { log ("We're animating!"); } else { log ("Hmm... 5 seconds elapsed but we're still not animating."); } Let me know if you're still unsure, it's not a simple topic by any means as there is quite alot going on due to the ConditionalSleep class being abstract (although this is probably necessary for custom implementations of ConditionalSleep).
-
Hey (: The reason it clicks again is the conditional sleep comes after the interaction method. A conditional sleep is exactly what it says - it will sleep until either the timeout elapses or the conditions are met, and it returns accordingly. If you don't want this to happen, then take full advantage of the state based structure of the script and add in some more states! ...and make sure you maintain the looping nature of the onLoop. When I said anonymous, I meant the conditional sleep was defined without a reference, i.e instead of defining something like 'ConditonalSleep cs = new ConditionalSleep ... ;' we just created the object anonymously and worked with that anonymous creation. If you're still confused, google should be able to help you on this one! Apa
-
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
-
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
-
This sounds frustrating, I will try and take a look tonight!
-
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
-
Ah, this might be it. Thanks for this!
-
Misfits is quality stuff haha, at least for the first season!
-
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
-
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.
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
Have already given you one, be sure to refresh your scripts list! Enjoy -Apa (:
-
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 (:
-
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