-
Posts
251 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by Nbacon
-
I saw the ornginal post and I dont think that came off as bashing. Criticism and questions if not malicious should alway be welcome to help everyone understand the goals or misunderstanding. To anwser the orginal question something along the lines "why not just write in java and use the api?" . Because once this not fun, a job, or uninteresting Ill just give up. This project has 100 of goals big and small. I can write java code well (if I understand it case in point this post.) but when puting limitations on myself makes things intresting (think ironman). I believe that programing is problem solving and the expression of ideas. The fun part of programing for me is problem solving and the Laungauge is an extension problem solving. In the case of osbot it is limited to java and If i can write a more expressive Laungauge within the limitions of java (I should). I oringaly wrote this program to take assembly like code but oh god is that shit unreadable. The new Laungauge implements 99% of the osbot api and can do anyhting java can do plus more and the expensive of compution.
-
found the problem br.readLine() removes \n The line on top has ;; this commented out after it and the removal of the \n makes it 1 line.
-
So I'm working a import system for my project and I ran in to the weirdest bug ever? Explation of the bug: When importing "tool-item" it needs a funtion "item" to run so my pogram reads the file and runs the code in the file. It happens when that code runs it goes and import more code. (no other import does this bug and there are like 50+ files with imports inside imports and they work fine) . Seen in the video below I run it with import tool on top of define tool-item it does not work. But when I swap them they work perfectly fine. Does java have a max number of files open? there are no IOExceptions and all imports that need imports them self work fine. when ran in the termal it works fine. Im at a loss for words and give up unless any of you have any ideas. I have the code that is backing this funtion below. The java code backing this. private void fileShit(File readfile) { try { scemeBot.log("Added " + readfile.getName()); BufferedReader br = null; br = new BufferedReader(new FileReader(readfile)); StringBuilder stringBuilder =new StringBuilder(); String st; while ((st = br.readLine()) != null) { stringBuilder.append(st); } scemeBot.getScheme().eval(stringBuilder.toString()); } catch (IOException e) { scemeBot.log(e); e.printStackTrace(); } }
-
Functional programming with osbot [run time scripts]
Nbacon replied to Nbacon's topic in Spam/Off Topic
Week 2 Updates: This week was spent making a super banker and refactor ftp quest to fit a new task system and fixing bugs with sleep-untill . New account update: New account for members quest. New account has 41 Qp [all ftp quest] Bot updates: Added fming Adding Abyss and member runes to Rc [kinda full rewrite] tasks abilty [need to change scrpits work with it] Quests: Druidic Ritual Code updetes: Refactoring Made it easy to add Task system.[ 06202020] interaction with items (spam clicks).[fixed 06202020] combat with npc (spam clicks).[fixed 06192020] (define (loop )(attack-npc (target-npc "Chicken"))) <- one liner chicken bot that list better than 99% of Ive seen. Polling get Configs (1 time per loop is fine )[fixed 06192020] Went from (cond ((=(& 15 (get (getConfigs) bkf-config)) 0)(start)) ((=(& 15 (get (getConfigs) bkf-config)) 1)(get-to-grate)) ((=(& 15 (get (getConfigs) bkf-config)) 2)(cabage-time)) ((=(& 15 (get (getConfigs) bkf-config)) 3)(quest-done)))) to (define (quest config) (cond ((= config 0)(start)) ((= config 1)(get-to-grate)) ((= config 2)(cabage-time)) ((= config 3)(quest-done)))) Pull out code that can be curried.[06192020] (item-use-object-area item object area) (item-use-item item1 item2 ) (dig area) Goals: Expand/remove api. super banker[done] withdraws gear and inv (bank excess if exist) abilty to withdraw dynamic sets; like herbs and vails 14 of each, 9 flour 9 buckets of water ext . (1 herb, 1 vail ) will withdraw 14 of each (1 flour , 1 bucket of water , 1 free space) will withdraw 9,9 and leave the rest emepty (3 cosmic runes , 1 unpower orb) will withdraw 81 cosmic runes and 27 orbs. abilty to withdraw gear Air orb banking would look like (wear "glory (?)" ) (wear staff of air )(stack-item 3 "Cosmic rune") (fill-space unpower orb ) Task system [done] Time [done] xp[done] resources[done] Roleover Goals Ge, Ironmen ftp all quest, documentation. -
Learn to lie to yourself. 1/10 of second is a life time in computer time but I personaly think anything under 600ms or 1 tic to think of an action is acceptable.
-
Buy gold at who ever you think is trust worthy and the cheapest in the end its all runescape gold. Yes, Close to zero but possible. Everone is diffent but for me it takes the fun out the game. I have adult money but I don't buy things that I can get for free and have fun along the way.
-
Hello Ace and others, I agree with Impensus. That code should be abill to stop and start. I personaly program like a state machine or a binary tree were nodes are decision and leafs are actions. Maybe if you used a Queue stack? Thre would be no no need to write so many if else trees. On the talks of efficiency I realy don't think as programers we should care about efficiency on our side because most 95% of my codes computation is done by the api and hiden to us users. We just accept that it is writen to the best of the osbot devs abilty. I have a quest bot that is over 6000 if else statments and it seems to be abil to do all 6000 for a base case in under 1/10 of a second. Im a dumb ass, Queue stack idea:
-
Im writing a quest bot and making the new accounts is a pain in the ass Looking for account with low quest points (close to 0 as possible) Must have a large portion of the following 30 fm 20-30 thieving 30 magic 30 ragned 20 con but higher is way better some herblore around 25. 50 cooking some smithing, rc, slayer, hunter, farming, Agility Combat lowish Discord I need price, stats, qp tab and email type inept#0327 [254157948585115650]
-
Config 2365 0x40000 Getting started with Mining 0x2 getting started with attack 0x4 getting a grip on it 0x8 master attack 0x2000 getting started with magic, 0x4000 striking a pose 0x8000 Bringer of chaos
-
Functional programming with osbot [run time scripts]
Nbacon replied to Nbacon's topic in Spam/Off Topic
Week 1 Updates: Conditional sleeps (and (chop tree) (Conditional-sleep tree-choped? )) [06122020] Starting documentation [06152020] Very slow Starting Threading and sub lang. Threading not done. Thought to be done but is not. parallelism? Speed is not an issue at the moment but might be when harder scripts are made. Skills done: WC [06032020] RC [06132020] Basic area combat [06122020] Quest done: Cook's Assistant [06132020] Doric's Quest [06132020] Imp Catcher [06132020] Sheep Shearer [06132020] Witch's potion [06132020] X marks the spot [06132020] Rune mysteries [06142020] Goblin Diplomacy [06142020] The Restless Ghost [06142020] Prince Ali Rescue [06142020] Ernest the chicken [06152020] Romeo & Juliet [06152020] Vampyre Slayer [06152020] Pirate's treasure [06162020] The Knight's Sword [06162020] Black knights' fortess [06162020] Dragon slayer [06172020] The Corsair Curse [06182020] Quest that might never get done: Misthalin Mystery [the end is to hard for me to think of bfs/dfs type logic] Shield of Arrav partner quest ( might get both done but they are low priority) -
*Zooms in* HMMMMM... Still a whip but bigger. for prices no.
-
I can count the amount of polygones of an rs item on 1 hand why do you need 80kb images? There is around 10k items and 4k tradeable items all of those with high qualty images is between 300mb - 800. That is alot. Get the prices like https://services.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=*ID*
-
There are more resons. If you work in the industry you find out people are id10ts and you should write code that holds peoples hands. Getter and setter play an important role by giving people access to data in a class. All java best Practices say to keep data private and to make getters and setters when Appropriate. When you make it so people can do what ever they want with data it could break your Internal code. You could do npcs=null and that would break thing Internally.
-
This is my code for One of my ge merchers I cant find my Id-> price code https://prnt.sc/sdtqu3 https://prnt.sc/sdtr35 Query -> sub-set of data-base textField1.getDocument().addDocumentListener(new DocumentListener(){ @Override public void insertUpdate(DocumentEvent e) { String text = textField1.getText(); if (text.trim().length() == 0) { rowSorter.setRowFilter(null); } else { rowSorter.setRowFilter(RowFilter.regexFilter("(?i)" + text)); } } @Override public void removeUpdate(DocumentEvent e) { String text = textField1.getText(); if (text.trim().length() == 0) { rowSorter.setRowFilter(null); } else { rowSorter.setRowFilter(RowFilter.regexFilter("(?i)" + text)); } } @Override public void changedUpdate(DocumentEvent e) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }); Clicking on item -> name/id table1.addMouseListener(new java.awt.event.MouseAdapter() { @Override public void mouseClicked(java.awt.event.MouseEvent evt) { int row = table1.rowAtPoint(evt.getPoint()); int col = table1.columnAtPoint(evt.getPoint()); if (row >= 0 && col >= 0) { table1.getValueAt( row, col); ItemName.setText((String) table1.getValueAt( row, 0)); } } }); Id-> Item (might want to add 1 more hash map that is <string,Items> to do name-> item->id ) public class ItemGuide { private static final Map<Long, Item> allGEItems = new HashMap<>(); private static final List<Object[]> GeItems= new ArrayList<>(); public static Object[][] getAllGEItems() { if (allGEItems.isEmpty()) { File summaryFile = Paths.get(System.getProperty("user.home"), "OSBot", "Data", "items-cache-data.json").toFile(); try { if (!summaryFile.exists()) { URL website = new URL("https://raw.githubusercontent.com/osrsbox/osrsbox-db/master/data/items/items-cache-data.json"); ReadableByteChannel rbc = Channels.newChannel(website.openStream()); FileOutputStream fos = new FileOutputStream(summaryFile); fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); } try (FileReader fileReader = new FileReader(summaryFile)) { JSONObject jsonObject = (JSONObject) (new JSONParser().parse(fileReader)); for (Object value : jsonObject.values()) { JSONObject item = (JSONObject) value; if ((Boolean) item.get("tradeable_on_ge")){ allGEItems.put((Long) item.get("id"),new Item().setId((Long) item.get("id")) .setMembers((Boolean) item.get("members")) .setName((String) item.get("name")) ); } } } } catch (IOException | ParseException e) { e.printStackTrace(); } summaryFile = Paths.get(System.getProperty("user.home"), "OSBot", "Data", "ge-limits-ids.json").toFile(); try { if (!summaryFile.exists()) { URL website = new URL("https://raw.githubusercontent.com/osrsbox/osrsbox-db/master/data/items/ge-limits-ids.json"); ReadableByteChannel rbc = Channels.newChannel(website.openStream()); FileOutputStream fos = new FileOutputStream(summaryFile); fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); } try (FileReader fileReader = new FileReader(summaryFile)) { JSONObject jsonObject = (JSONObject) (new JSONParser().parse(fileReader)); for (Object value : jsonObject.keySet()) { if (allGEItems.containsKey(Long.valueOf((String) value) )){ System.out.println(jsonObject.get(value)); if (jsonObject.get(value)!=null){ allGEItems.get(Long.valueOf((String) value)).setBuyLimit((Long) jsonObject.get(value)); }else { allGEItems.get(Long.valueOf((String) value)).setBuyLimit(-1); } } } } } catch (IOException | ParseException e) { e.printStackTrace(); } } allGEItems.values().forEach(s->GeItems.add(s.getItem())); Object[][] array2d = GeItems.toArray(new Object[GeItems.size()][]); return array2d; } public static Map<Long, Item> getGeItems() { if (allGEItems.isEmpty()){ getAllGEItems(); } return allGEItems; } } Id -> Image Image image =null; private void drawitem(){ if (image ==null){ URL url = null; try { url = new URL("https://rsbuddy.com/items/" + itemid+".png"); } catch (MalformedURLException e) { e.printStackTrace(); } try { image = ImageIO.read(url); } catch (IOException e) { e.printStackTrace(); } } Graphics g = c.getGraphics(); Graphics2D g2 = (Graphics2D) g; if (image!=null){ g.drawImage(image, 55, 50,60,60,null ); g.setColor(lowlites); g2.setStroke(new BasicStroke(3)); }else { drawText("ERROR", 50 ,50,Color.white,font1); } g2.setStroke(new BasicStroke(1)); g.setColor(Color.black); g2.draw(new RoundRectangle2D.Double(50, 50, 60, 60, 10, 10)); }
-
4 days? as in 100 hours of botting or 4 days as in you made this account 4 days ago?
-
Wowie 1 ranged. Is this all 60 quest on Stealth quester?
-
This is the hack i came up with is there something better? this.setBlocking(); scemeBot.getScheme().eval(finalThreadTask); this.setAsync(); Also tryed (does not work) synchronized (webwalk) { webwalk.wait(); } scemeBot.getScheme().eval(finalThreadTask); webwalk.notify();
-
Thanks man for your time. Last problem, priority? In this video you can see him run and eat but he goes for the food no eating then goes back to running.
-
So I looked on git hub for async events and there are not alot of them. But I can up with these I have no idea how it works. if (walkEvent != null) { walkEvent.setPathPreferenceProfile(profile); walkEvent.setEnergyThreshold(run); walkEvent.setMoveCameraDuringWalking(cameraMove); Event event =null; if (threadTask != null) { final Procedure finalThreadTask = threadTask; event = new Event() { @Override public int execute() throws InterruptedException { scemeBot.getScheme().eval(finalThreadTask); return 1000; } }; event.setAsync(); scemeBot.execute(event); } boolean done = scemeBot.execute(walkEvent).hasFinished(); if (event !=null){ event.setFinished(); } return done; } or if (walkEvent != null) { walkEvent.setPathPreferenceProfile(profile); walkEvent.setEnergyThreshold(run); walkEvent.setMoveCameraDuringWalking(cameraMove); Event event =null; if (threadTask != null) { final Procedure finalThreadTask = threadTask; event = new Event() { @Override public int execute() throws InterruptedException { scemeBot.getScheme().eval(finalThreadTask); return 1000; } }; event.setAsync(); walkEvent.addChild(event); } boolean done = scemeBot.execute(walkEvent).hasFinished(); return done; }
-
So I wrote this code to make a webwalk that could be used for Webwalk and drink stamina potion, turn on prayers , alch, eating. Im wondering if there is a better way to doing threading becuase I hate having a while loop with a thread sleep . My code. (x, y, z) -> { PathPreferenceProfile profile = PathPreferenceProfile.DEFAULT; int run = 20; boolean cameraMove = true; Procedure threadTask = null; WebWalkEvent walkEvent = null; boolean done = false; //This can take args in any order while (first(x) != null || !(first(x) instanceof Area) || !(first(x) instanceof Area)) { if (first(x) instanceof Procedure) { threadTask = (Procedure) first(x); x = rest(x); } if (first(x) instanceof PathPreferenceProfile) { profile = (PathPreferenceProfile) first(x); x = rest(x); } if (first(x) instanceof Long || first(x) instanceof Integer) { run = Math.toIntExact(num(first(x))); x = rest(x); } if (first(x) instanceof Boolean) { cameraMove = truth(first(x)); x = rest(x); } } if (first(x) instanceof Area) { walkEvent = new WebWalkEvent(listToAreaArry(x)); } if (first(x) instanceof Position) { walkEvent = new WebWalkEvent(listToPositionArry(x)); } if (walkEvent != null) { ExecutorService executor = Executors.newSingleThreadExecutor(); //this is the code //That I would like input on. if (threadTask != null) { final Procedure finalthreadTask = threadTask; Runnable task = () -> { while (true) { try { scemeBot.getScheme().eval(finalthreadTask); Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } }; executor.submit(task); } walkEvent.setPathPreferenceProfile(profile); walkEvent.setEnergyThreshold(run); walkEvent.setMoveCameraDuringWalking(cameraMove); done = scemeBot.walking.execute(walkEvent).hasFinished(); if (threadTask != null) { executor.shutdownNow(); } return done; } return null; }
-
I don't mind his content when he is muted.
-
[HELP] Creating Multiple Bots with Different IP's
Nbacon replied to kleptomanic's topic in Botting & Bans
Osbot with vip supports unlimited clients and proxies. You can use proxies as free user but your 2 free clients are under the same ip. -
Functional programming with osbot [run time scripts]
Nbacon replied to Nbacon's topic in Spam/Off Topic
Thanks You can contact me with a personal message or on discord inept#0327 [254157948585115650] -
need help trying to install jdk 8/jre8 for ubuntu 20.04
Nbacon replied to 10jbp1042's topic in General Help
I use Ubuntu 18.04.4 LTS with openjdk Just had to make it my make it my main for when i use osbot with sudo update-alternatives --config java -
Functional programming with osbot [run time scripts]
Nbacon replied to Nbacon's topic in Spam/Off Topic
Week 7: I think Ill spend this week re writeing alot osbot built in methods.