Jump to content

thatguycalledrob

Members
  • Posts

    33
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male
  • Location:
    UK

Recent Profile Visitors

1685 profile views

thatguycalledrob's Achievements

Bronze Poster

Bronze Poster (2/10)

8

Reputation

  1. I'm back from a 3-month break! December deadlines + January exams bit hard, but I now have a few more months to work on this again - watch this space! It's finally time to actually push to make some serious money.
  2. RIP the best free script on the SDN. Take my money. $$$
  3. Okay I see, I think this will actually make it easier to solve a bug in the R&J script I found yesterday. Thanks for the example! Out of interest, any idea how to order a stream with multiple values, based on a set of conditions? I was writing a fishing script and I noticed that all bots all move at the same time to the same next spot when one vanishes (probably due to using the . closest API command). I tried to better with a stream it but now it seems to go to the Object with the lowest x+y (coords). Both seem to be easily detectable with some basic pattern recognition on Jagex's side. I wanted to order the stream, and then remove the top n elements of the stream based on a distribution, such that it picks the closes spot with probability p(1), the second with p(2), etc My issue is that I couldn't find a way to do this trivially, either ordering or discarding. I could put the stream (after filtering) into an array, then order, remove, check, etc... but these seem like things that you should be able to do with the inbuilt functionality of Java. Yessir, I did a placement year last year (might be called a year in industry in the USA) where I basically ended up scripting in VBA 40 hours a week, and I have done a load of C, Maple, R and Matlab over the first half of my degree, although I'm nowhere near as good as I am with VBA.
  4. Ah the man himself! Okay okay, I admit that the real reason that I didn't use it was because it didn't work as expected the first time (wouldn't return true when a quest was completed). However, since this whole script is config-based it did make some logical sense to use a different implementation! I guess the API focuses on robustness over most else. Thanks for looking through the code though, it means a lot to have one of the main devs check it! I still want to log which one is causing an error when I have Verbose mode, but you're right in that each if statement calls the function, even if VERBOSE = False. I think I will wrap the whole thing in an if(Verbose){} statement, as to only call them the second time if I am actually wanting an output. Good catch on this, I wouldn't have seen this if I had been looking! Valid, I was worried about this yesterday. I'm fairly new to OSbot & java coding here, so could you, or someone else please help me with a best practice example? I am unsure how often ID's change, and the best implementation for options. are we talking about: https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html ? if so - would you replace my stream: RS2Object Coffin = getObjects().getAll().stream().filter(n -> n.getName().equals("Coffin") && (n.getId() == 15061 || n.getId() == 2145)) With something like: RS2Object Coffin = Optional.ofNullable(getObjects().getAll()).filter(n -> n.getName().equals("Coffin")).orElse("Some default")? Examples would be appreciated! Looks like tomorrows session is just going to be a lot of code cleaning
  5. Will implement this, thanks! I started coding ad-hoc at the start, and I have a lot of cleaning up to do!
  6. I know that now! I wish someone had told me earlier I thought I was being all anti-pattern, but I ended up getting this weird bug where I pass WebWalk a position, and it dosn't walk to it. Actually, it webwalks just outside and then stops. I then get a conflict: Webwalk thinks its there, but its not. This is why there is a LOCATION and LOCATION_SUPER in the questlocation enum. I'm going to have to do a walking investigation & rewrite for this script at some point soon...
  7. Looking seriously good! It seems you're ahead of me on the moneymaking side of things. goodluck!
  8. UPDATE: Now does 7QP - working on more though.
  9. This is the sort of feedback I need! I have had a look at task-based coding, namely: However, it seems to me that the only method that I can move to a task-based system is the talk to character "ConverseWithCharacter" method, which has clear "Can process" conditions and run conditions. I was actually wanting to move it to my Abstract Quest class for just that reason. What else in the script would you automate tasks?
  10. In intelliJ press mouse 3 or "f4" when clicked onto a function call - this will decompile the function. Unfortunately, the decompiler isn't perfect, so you get odd variable names. However, it is still readable! This is the isComplete function call: this.iiiiIiiIIIiI.contains(quest); is checking that the quest is in the array list holding all of the quests - so will always be true for valid input. return this.iIIIiiiIIIii() is what we are really interested in: So it's a little cumbersome to read, and I didn't make it so this may not be exactly how it works, but in order: >Gathers all widgets into an array list: > finds the widgets which relate to the quest you're looking for. I'm guessing the nested "while(true) {" loops are due to the decompiler - not how the actual source code is > Checks the text color of the label I hope this helps? Mods pls don't ban me for revealing secret information or something lol
  11. I found "quests.isComplete()" to be buggy, it uses the colour of the quest in the quest menu, meaning that it would open the quest tab and run a (relatively) complex function call to iterate through all quests in the menu checking if the colour was red, yellow or green. Using config ID's means that you can: a) check without opening the quest menu b) process faster, as it just tests a memory value Thanks for testing though!
  12. Just picking this up again now I am moved into my new place for the year. Classic Java noob mistake, I forgot to break; my case in my switch statement. Of all the things to go wrong! I submitted a fix just now, and am hoping to add the next quest tonight or tomorrow!
  13. Okay Just spent a week settling into uni before getting on onto this again. It's hard to know - follow along I guess! Its an evening thing for me now, so maybe a couple of months? Once you have things set up it will be easier and quicker. But until that point, who's to know? ~Rob
×
×
  • Create New...