Jump to content

Glaciation96

Members
  • Posts

    76
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Glaciation96

  1. For the bones pickup phase, just to give my 2 cents, this is how I would do it, personally. It's not been tested yet, but hope it helps. else { GroundItem cowBones = getGroundItems().closest("Bones"); if (cowBones != null && !this.inventory.isFull()) { int lastCount = getInventory().getEmptySlots(); if (getMap().canReach(cowBones) && cowBones.interact("Take")) { new ConditionalSleep(1500, (int) (Math.random() * 500 + 250)) { @Override public boolean condition() throws InterruptedException { return getInventory().getEmptySlots() < lastCount; } }.sleep(); } } }
  2. Ahhh.. That actually cleared up a lot of my confusion. Truth be told, seems like going for a switch/case approach for scripts isn't a great idea then, as it seems as though the onLoop never gets called that way. It's pretty much just my getState doing everything. I'll try not to rely too much on that! And thanks! Any signs of improvement are my motivators lol
  3. Ah crap, I was under the impression that the while loop will just keep null checking with each loop lol, then break me out when there is no fish so it returns false. Also, freeFish is just set to focus on picking up raw lobsters and swordfish. Wouldn't re-defining that just result in me wanting to pick up other items? You're right about the restructure, I'm just struggling to see how it would work when it comes to something like picking up fish as soon as some appear on the ground. Looping through the whole script just to check if there are some fish to pick up, then going back to fishing and banking as normal seems like a more difficult approach which is why I probably went off on a weird one with sub-loops. I'll play around with it. Thanks again.
  4. Hello apa, Got a problem again, this is a tricky one. It's not so much to do with my script breaking, but more like a feature that I'm having trouble adding. In my fishing script, I want the player to pick up any dropped fish whilst fishing, then to go back to fishing when there are no fish left to pick up. I'm using a while loop to check this, but after all the fish has been picked up, my script just can't break out the loop, so it gets stuck. Shouldn't the null checking returning false break me out of the while loop? Because there is no fish on the ground! I also thought about using isVisible but I Don't think that would work either... I've tried using a normal if statement but then that only picks up one fish, then pauses forever. I'm using a switch statement approach to this bot. I'm going to share a snippet so you can see what's going on. If it doesn't require a complete design change, could you give me some help here if it's just some tweaking that's needed? Thanks! Also, I would have thought a way to solve this is to be able to check if something doesn't exist. Seeing as there isn't a method for that, there's a completely different approach to get this working? EDIT: While looping freeFish.exists() && freeFish.isVisible() doesn't work either, after null checking
  5. Awesome, after reading the line "passing single strings", I finally realised that even though I've defined those strings as Essential, I called it as a string! What a stupid mistake... Removing the quotation marks turned out to be another possible fix for the issue. Thanks for the response!
  6. Yes of course, seems so obvious now, I fixed that simply by just reducing sleep times lol. I've also noticed a couple things when testing my script and attempting some debugging. Whilst it is still listed in the API, completeDialogue no longer seems to work, or maybe it's unreliable? For example, when running the below snippet, the bot will only advance 'continue' dialogues, but do nothing when the options are presented. Any idea what's going on there? Could I be using it wrong? What's more, the depositAllExcept function only works with ids now? But I've seen people use strings to accomplish this task! So why does my bot bank the coins and lobster pot along with the lobsters when depositing? Everything seems to be in place... Unless the examples/tutorials that I've seen have called upon outside classes that weren't shown to get it working. I really appreciate the help. Hopefully other scrubs reading will benefit aswell.
  7. Thanks for the response! But yes the last part is a little difficult to grasp lol, I'll break down where the confusion is for me.. I always thought that it didn't matter how long a conditional sleep is set at since the bot stops sleeping once a condition is met, but that's wrong then? For example, for the below snippet.. if (!KaramFishingSpot.contains(this.myPosition()) && !this.myPlayer().isMoving() && getWalking().webWalk(KaramFishingSpot)) { new ConditionalSleep(900000, (int) (Math.random() * 498 + 303)) { @Override public boolean condition() throws InterruptedException { return KaramFishingSpot.contains(myPosition()); //<-- Isn't this the condition to stop sleeping? } }.sleep(); } Despite the massive sleep time, doesn't the bot stop sleeping as soon as the player reaches KaramFishingSpot? Also, by using game states, do you mean returning !myPlayer().isAnimating(); or myPlayer().isMoving(); instead? As they're character states I'm guessing you mean that. Secondly, with an idle case, not sure how I can set conditional sleeps to return every possible outcome in a single case, that's something I'll have to look into lol. But tbh It's probably a completely different thing to what I'm thinking of for starters!
  8. First off, I wanna thank you for the solution to the previous issue. From this, I was able to move on, just to hit another brick wall though lol. As you have suggested previously, I went for a pathwalking approach to my first script instead of doing the webwalk. This way I think I am able to learn more too. The issue this time is that the script won't start. I open the client in mirror mode, login to my bot, press the green play button, select my script and it just stops dead there. Doesn't even attempt to run and nothing shows up in the log. Again, most people with this problem seems to have missed out the manifest stuff or had an issue with defining something. Mine is probably from the latter, but how would I even begin to, or find out what it is I'm looking for? If you(or someone!) could help me diagnose my problem that would be amazing, I'll share the code here! I have made two scripts., both aims to do the same thing. With the pathwalking version not working, I've decided to create another which is solely based on webwalking and it works! I'll share both, hopefully that'll make it easier to see what's breaking? This is the original (Pathwalking, doesn't work) This is the same script but all pathwalking has been changed to webwalking (runs in client successfully) Neither script has errors in the IDE, also, whilst the script that runs, actually runs... It starts to fish, but then when the character stops (due to an interruption etc), the script doesn't continue the fishing and instead doesn't do anything! Is that a problem for another day? Thanks again.
  9. Thanks for the response. I tried to implement this but not sure if it's well off the mark or not. Regardless, any chance of someone giving feedback on how well this would work? I'd really appreciate it! Thanks!
  10. Any plans on making an in-depth dialogue tutorial? ? Or have you already got one... Also, from what you have shown, would that method also work for getting through dialogue which includes going through multiple dialogue choices? For example, I am trying to get from karamja to port sarim and vice versa, so would the following work? I'm asking as it seems like a list like this is very prone to breaking if something was to happen to just one of the options? ...else if (dialogues.isPendingOption()) { dialogues.selectOption("I have nothing to hide."); sleep(random(700, 1000)); } else if (dialogues.isPendingContinuation()) { dialogues.clickContinue(); sleep(random(700, 1000)); } else if (dialogues.isPendingOption()) { dialogues.selectOption("Second selection in order to board boat."); sleep(random(700, 1000)); } else if (dialogues.isPendingContinuation()) { dialogues.clickContinue(); sleep(random(700, 1000)); } else if (dialogues.isPendingOption()) { dialogues.selectOption("n selection to board boat."); sleep(random(700, 1000)); } else if (dialogues.isPendingContinuation()) { dialogues.clickContinue(); sleep(random(700, 1000)); } break; For context, I'm trying to avoid webwalk just to learn java a little better. Also, is there a way to conditional sleep in between the dialogue options? If so, what would you return? For the next pending continuation as the condition? Thanks!
  11. With the dialogue, won't the bot just spam the options if there is no sleeping put in place?
  12. Thank you very much:) Looking forward to seeing it
  13. It's sunday now, could you remove the graphics then?
  14. Any chance of you adding an option to remove graphics some time in the future?
  15. Your solution was perfect, thanks. Changed versions as suggested and saw my script straight away:) That said, I've run into another issue which has left me confused. I looked around and couldn't find a solution. Below is a snippet of my code. Position myPos = myPosition(); public final Area[] KaramFishingSpot = { new Area(2922, 3180, 2927, 3174) }; public final Area[] KaramHarbour = { new Area(2950, 3147, 2957, 3146) }; public final Area[] PortSarim = { new Area(3026, 3222, 3029, 3213) }; public final Area[] DepositBox = { new Area(3044, 3237, 3052, 3234) }; public void gottaBank() { if(!DepositBox.contains(myPos) && !this.myPlayer().isMoving()) { getWalking().walkPath(Arrays.asList(lobSpotToPos1)); } } The "(DepositBox.contains(myPos)" is underlined in red and the error states: "Cannot invoke contains(Position) on the array type Area[]". I'm not sure why this is, as I've seen other people do this with areas? Such as a predefined area from the API like so: private void getFromBank(){ if(!closestBank.contains(this.myPosition()) && !this.myPlayer().isMoving()){ if(getWalking().webWalk(closestBank)){ //etc, etc Do I have to use positions instead of areas unless it's from the API? Is making my own area the issue here? Thanks!
  16. Thanks for the info!! But I have tried botting less, I had 12 bots at one point, and ran four at a time for around 3 hours a day then switched to the next 4. Still got banned, but they were just fishing lobs non stop so that's probably why. Also, could you explain how writing in unique places is compared to mouse macro? Isnt that just auto clicking? And with your herb and bird runs, that's pretty neat, but do you use a line of code which acts as a timer or a set condition for that? For example, every 500 fish you catch if you're botting fishing, your char will then just preform these errands?
  17. Forgot to remind you on Saturday to remove the graphics lol... Guess I'll try again this week.
  18. When I don't use mirror mode, it's basically an instant ban... Just to share some info, I suicide bot from 3PM to 7AM (UK time, 4 accounts simultaneously, using mirror, no proxy). That's around 16 hours. I've done this with 15-20 accounts. 100% chance they go the whole way without ban, but trade all the goods over by the end, as there is a 95% chance they'll be banned the following day. Also, I'm nocturnal. Just to give some context. Anyone else got some neat botting info to make the most out of accounts before they get the ban? Edit: Should I delete this post? Could Jagex use this against me or is there not enough info?
  19. Just to give insight into the steps that I'm taking, I've created a series of screenshots to show how I'm exporting my script. Though it's really no different to how it was shown in the tutorial! https://prnt.sc/kzzqge https://prnt.sc/kzzqt3 https://prnt.sc/kzzr5z https://prnt.sc/kzzrdt Here is a screenshot of my script(top half) inside the IDE, easier to spot if anything looks 'off'. http://prntscr.com/kzzupm I only see SDN scripts in the client, in both mirror and stealth injection mode. Thanks again.
  20. But the strange thing is that my scripts folder was empty before I exported my jar file (rsLobsters). It's the only script in there. There's no other one so I can't try that method My previous post has a link to a screenshot of the directory. Thanks!
  21. Oh I see, thanks. Isn't that redundant now though? Seeing as the whirl pools no longer exist... Right?
  22. Thanks! What a rookie error, importing java.utils.Arrays is what fixed it! Sorry if I'm a broken record, but hopefully other scripting scrubs like myself could benefit from my rookie questions if they read through the comments. Seeing as most questions are being asked by people who already know what they're doing to a degree so even the answer can be too difficult to understand lol. That said, I have another problem... I want to test my script but can't seem to get it to show up in the client. I've been looking around and the most common solution that fixes it for people who have the same problem as me is that they didn't include the @ScriptManifest info. I have it in my script but it still doesn't work. I saved it as you shown: Users>"Name">OSBot>Scripts, as a Jar file, not a runnable. I go back to the client, refresh, but all I can see are my SDN scripts. What am I doing wrong? http://prntscr.com/kzklon Below is my script. Am I missing anything that could cause my script to not appear? Thanks again.
  23. List<Position> myPositionName = new ArrayList<>(); Position[] lobSpotToPos1 = { new Position(2922,3166,0), new Position(2915,3153,0) }; Position[] lobSpotToPos2 = { new Position(0,0,0), new Position(1,1,1) }; Position[] lobSpotToPos3 = { new Position(0,0,0), new Position(1,1,1) }; Position[] lobSpotToPos4 = { new Position(0,0,0), new Position(1,1,1) }; getWalking().walkPath(Arrays.asList(lobSpotToPos1)); I've been doing some research into arrays and the fundamentals of how to write out code correctly, or try to... If I wanted to have multiple paths, then to call them whenever I see fit, I would have something similar to the above right? But when I type this into Eclipse, it's saying 'Arrays cannot be resolved' on the 'getWalking...' line of code when I try to call it. What am I doing wrong? Could it be a syntax fail? Also, I have another question, assuming that the code was able to run and I chose the journey 'lobSpotToPos1' would the bot be selecting those exact tiles via the map, traversing in chronological order until it reaches the ferrymen? Or do the tiles need to be visible within the game window... Thanks!
  24. Hey there, could you please consider removing the graphics? Or adding an option to do so? Would love to see the chat box. It's the only thing left to make this script perfect. Thanks.
×
×
  • Create New...