Jump to content

Flamezzz

Members
  • Posts

    763
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Flamezzz

  1. inventory.getItem("your item").getId()
  2. For an arbitrary item name? What exactly are you trying to do here? :p
  3. new Position(3999 , 3239 , 0), you sure this is correct?
  4. http://services.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=3831 ^ This is the OSRS ge API, there's also one for rs3 https://medium.com/@paulgambill/how-to-import-json-data-into-google-spreadsheets-in-less-than-5-minutes-a3fede1a014a EDIT: doesn't seem to work quite well, so I wrote a custom function: EDIT2: fixed comma issue CELL FORMULA: =GetPriceRS3(<id>) or =GetPriceOSRS(<id>) function GetPriceOSRS(id) { return GetPrice('http://services.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=', id); } function getPriceRS3(id) { return GetPrice('http://services.runescape.com/m=itemdb_rs/api/catalogue/detail.json?item=', id); } function GetPrice(url, id) { var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var response = UrlFetchApp.fetch(url + id); var data = JSON.parse(response.getContentText()); price = (''+data['item']['current']['price']).replace(/,/g, ""); if(price[price.length-1] === 'b') price = price.substr(0,price.length-1)*1000000000; else if(price[price.length-1] === 'm') price = price.substr(0,price.length-1)*1000000; else if(price[price.length-1] === 'k') price = price.substr(0,price.length-1)*1000; return parseInt(price); }
  5. For me that would be enough HTML for a year, goddamn hate it.
  6. Yep kinda annoying. Tempfix: you could just add a check for client.isLoggedIn() before walking or handling an obstacle. I'm pretty sure that fixed this issue in my script. If you're using walkPath this might not work tho. In that case you could try to create a thread which terminates all (walking) events if isMirrror and !isPaused and !loggedIn or something similar.
  7. I'm not sure what this issue is, and I'm also not sure what those cases would be since indexing an array means you don't have to use a switch anymore for this. Perhaps I can help if you show some of your code.
  8. Ye, for example: WalkingEvent e = new WalkingEvent(new Position(0,0,0)); e.setEnergyThreshold(100); boolean ret = bot.getEventExecutor().execute(e).hasFinished(); I'm not sure why every setter is chainable except setEnergyThreshold
  9. Could also just use an array like this Position[][] paths = new Position[][] { { new Position(0,0,0), new Position(0,0,0) //path 0 }, { new Position(0,0,0), new Position(0,0,0) //path 1 } }; Position[] myPath = paths[random(0, paths.length-1)];
  10. Anything botted? If not I'll buy it for 3.5
  11. A common issue ;) http://osbot.org/forum/topic/80839-isanimating/
  12. There's like a 80 tile difference so you should create a path, localwalker can't walk outside of the loaded region.
  13. log to make sure it executes and log the return value of localWalker.walk
  14. I'm not sure what you mean by "condition it the right way", is it the logic or java / the API you're having difficulties with? The logic is quite simple: if we have enough ores and near furnace then SMELT if we have enough ores and not near furnace then WALK_TO_FURNACE if we don't have enough ores and near bank then BANK if we don't have enough ores and not near bank then WALK_TO_BANK
  15. http://osbot.org/forum/topic/80524-hotkeys/
  16. Yes it is an abstract class, subclassed by concrete classes Objects, NPCS and GroundItems. So you could do objects.get(x,y) or npcs.get(x,y) or groundItems.get(x,y)
  17. EntityAPI.get(x,y) returns a list of entities on pos x,y,z with z = myPlayer.getZ() !EntityAPI.get(x,y).isEmpty() --> there is something at position x,y EntityAPI is one of npcs, objects, grounditems
  18. Or you could just write a tiny script and not waste resources on VMs?
  19. Interact with widgets, ids are here (I think those are still correct): http://osbot.org/forum/topic/73580-ge-selection
×
×
  • Create New...