Everything posted by Flamezzz
-
Checking for item in equipment slot
objects.closest is the same thing as getObjects().closest so basically what you're doing now is getObjects().closest(objects.closest("Door")) Also, the return value of objects.closest can be null so you should check for that before calling interact
-
Allocating more Memory for OSBot JAR
I think cuz the Boot class launches a new process and jvm args are not passed to this process, use java -jar OSBot.jar 1024 instead
- get itemid by item name.
-
get itemid by item name.
inventory.getItem("your item").getId()
-
get itemid by item name.
For an arbitrary item name? What exactly are you trying to do here? :p
-
HELP! Bug in code
You forgot the pepper
-
Walking path not working ...
new Position(3999 , 3239 , 0), you sure this is correct?
-
Life of master programmer
"Master programmer"...
-
getting G.E. prices with Google Spreadsheets
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); }
-
I guess this is enough HTML for today..
For me that would be enough HTML for a year, goddamn hate it.
-
Mirror client bug report - positions
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.
-
Multiple path walking
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.
-
setRunning Problems
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
-
Multiple path walking
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)];
-
60/60/40 | 1x92 | 4M
Anything botted? If not I'll buy it for 3.5
-
taking requests for free scripts!
Fishing Trawler? :p I think people will actually play that minigame now cuz of the new rewards.
-
Need help animating stopping while smelting
A common issue ;) http://osbot.org/forum/topic/80839-isanimating/
-
Local walker doesn't want to walk...
There's like a 80 tile difference so you should create a path, localwalker can't walk outside of the loaded region.
-
Local walker doesn't want to walk...
log to make sure it executes and log the return value of localWalker.walk
-
first script help :P
localWalker.walk *
-
Smelting with banking
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
-
DefaultModelList > Looting method()
toArray?
-
Pressing function keys
http://osbot.org/forum/topic/80524-hotkeys/
-
Entity help
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)
-
Entity help
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