Jump to content

Cory

Members
  • Posts

    311
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    100%

Cory last won the day on August 11 2013

Cory had the most liked content!

Profile Information

  • Gender
    Male
  • Location:
    Josh's house

Recent Profile Visitors

1897 profile views

Cory's Achievements

Black Poster

Black Poster (5/10)

197

Reputation

  1. Note: Old thread was in wrong section, and It has been fixed and made more stable/efficient, so figured I would make a new thread so people are aware. Ever get bored of sitting around refreshing zybez, waiting for offers to come available, so you can buy/sell items? Me too, which was why I wrote: http://zybeztracker.zz.vc/. You simply create a Virtual offer, the item you're interested in will then be "tracked" and any offers which become available, that match the requirements that you set, You will be notified via sound, and the offer will be added to the Recent Offers tab. Note: Don't use on a connection that you don't have unlimited bandwidth on Updates: [08/12/2014] - Renamed the wording used to make it sound more understandable Added Zybez page, so you can look up Item prices/History [09/12/2014] - It will now show offers less than an hour old when you start tracking, but will only sound an alarm if they're less than a minute old. ensured all offers added are inserted in time order, newest first. Added the graph and average buy/sell prices to the zybez page Images: help spread the word by putting in your signature and linking it to http://zybeztracker.zz.vc/
  2. For all the people posting how easy it is, not a single one of you has posted a solution.
  3. This is a pretty bad path walking implementation... 1. - only supports 1 way walking 2. - only works if you start from the first position in the path 3. - you end up storing the exact same path twice... pointless? Something along the lines of; /** * * Walks through an array of tiles to reach the destination * * @param reverse whether we're going through the tiles in reverse. * @param distance the distance threshold of the destination. * @param path the tiles that we wish to traverse through * @return whether the tiles has been traversed (1), whether the tiles are currently being traversed (0), whether there was an error traversing a tile (-1) or whether the tiles cannot be traversed (-2). * @throws InterruptedException */ public int walk(boolean reverse, int distance, Position... path) throws InterruptedException { if(distance(path[path.length-1]) <= distance && !reverse) return 1; if(distance(path[0]) <= distance && reverse) return 1; for(int i = reverse ? 0 : path.length-1; reverse ? i < path.length : i >= 0; i += reverse ? 1 : -1) { if(path[i] == null || distance(path[i]) <= distance) return -1; if((distance(path[i]) <= 18) || i == (reverse ? path.length-1 : 0)) { if(!canReach(path[i])) { if(doorHandler.handleNextObstacle(path[i]) == -1) return -2; } else walk(path[i]); return 0; } } return -2; } Would be much better.
  4. But ArrayList#add is O(n) worst case (when it has to resize) and LinkedList is constant time for adding. However if you're going to critique his List implementation of choice I think a far better suggestion would be for him to program to the interface not the implementation. @Cory, MethodContext should extend MethodProvider not Script ( I would suggest documenting all your classes - I'm not sure what the ObstacleListener's purpose is. Those are my suggestions from a brief look. Hope it helps. Thanks, a lot of this I already knew and was aware off. A lot of the code released was simply quick fixes or methods i wrote and never really adapted. My intentions were to get them working, regardless of whether i was using best practices as i do most of my programming on scripts late at night, when im tired at like 6am before i go to sleep. I do plan to go over everything and fix all the issues that im aware off with the way i have done certain things, but atm im getting ready for 2nd year of university etc so working on a scripting api isn't high on my priority list
  5. I usually use x10premium or hosting24 relatively cheap and decent customer service for what ive used them for.
  6. Wrote a small API and any methods i used or needed i added to it, built up a collection, I start university on monday so figured i would release it it for you lot to use/learn from etc. Javadocs: http://novumscripts.com/api/ Src: https://github.com/NovumScripts/CoryAPI Jar: https://www.dropbox.com/s/6z7nbjjnd19yu5i/API.jar Src Download: https://www.dropbox.com/s/4c6wyxa6vcg72fp/osbot.zip Thanks are appreciated, any suggestions or changes, or additions you feel should be added, let me know. P.S: I'm not saying its immaculately programmed, or that I've used the best techniques etc, just a collection of handy methods for you to use.
  7. int a = 10, b = 6; if(a > b) { for(int i = b; i <= a; i++) { } } else { for(int i = a; i <= b; i++) { } } = int a = 10, b = 6; for(int i = Math.min(a, b); i <= Math.max(a, b); i++) { }
  8. Why not just use DoorHandler doorHandler = new DoorHandler(); if(doorHandler.handleNextObstacle(...)) { //can reach ... } when walking to each point and why haven't you used the Math class etc, could make this a lot simpler and shorter.
  9. An assignment from our university that they will be giving us this year, figured I would post it here for you lot to have a go at if you're bored. I've quit Uni now lol, this shit was too hard for me.
  10. Just a heads up to potentially save you time, not a thread hi-jack or anything, I'm in the process of uploading an AIO mining script to the sdn for free, it has 19 locations with banking support and all ores etc, feel free to carry on your project, but if you're doing it for the money, I wouldn't bother as i doubt people will pay for a mining script if there is a free AIO. just a heads up.
  11. Oh, and what is the point of your, getFullPath method?
  12. Please utilise the methods already provided by the java api, they're there for a reason. Specifically the Math class. @DoorHandling, Please check the api. import org.osbot.script.rs2.map.DoorHandler; DoorHandler doorHandler = new DoorHandler(); if(doorHandler.handleNextObstacle(...)) { //can reach ... }
×
×
  • Create New...