-
Posts
252 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by Nbacon
-
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. -
Hello HotPoket, I Think its good start. I like the script. As you make more bots your code will get better and you'll learn the Api. Things I see I thinks a bad pratic to do everthing is start. Things like gui , walk to a bank , step up classes and values should go here. A non looping structure. Duplicate code. Things that the api can do but you will learn as you make more bots. Example checkSupplies method. Error in the amount of runes needed I think you need 4 laws not 3. conditionsleep Like what Protoprize said. 1. will be fixed by 2. 2. The best bots in my opinion are ones that have if else tree that clearly defines were you are in script for something like framing it would be a little harder. But when you get that logic down the bots are bullet proof. They can be start and stoped any were in the script and finsh the task. I think the loop would start like if bot-has-items if !bot-near-patch || patch-has-herb move-to-next // you can find out were you are at in the scrpit by amount of runes buckets of compost left else farmpatch else get-items Example my post in with a flax spiner 3. See the code fixes I post.[tpAndMoveToArea] 4.See the code fixes I post. [ checkSupplies, noteHerbs] 5. Just something I saw Fixes I would make : package com.bacon.AIO.paint; import com.bacon.AIO.util.Sleep; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.MagicSpell; import org.osbot.rs07.api.ui.Spells; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "HotPoket", info = "My first script", name = "Herb Running", version = 0, logo = "") public class Main extends Script { private static final Area camelotPatch = new Area(2810, 3460, 2820, 3470); private static final Area mortPatch = new Area(3600, 3528, 3605, 3533); private static final Area ardyPatch = new Area(2668, 3376, 2672, 3372); private static final Area falPatch = new Area(3055, 3313, 3060, 3308); private static final Area camBank = new Area(2808, 3440, 2810, 3438); @Override public void onStart() throws InterruptedException { gui maybe? } @Override public int onLoop() throws InterruptedException { /* if (checkSupplies()) { moveToCamelot(); farmPatch(); moveToMort(); farmPatch(); tpAndMoveToArea(Spells.NormalSpells.FALADOR_TELEPORT, falPatch); farmPatch(); tpAndMoveToArea(Spells.NormalSpells.ARDOUGNE_TELEPORT, ardyPatch); farmPatch(); } else { log("Not enough supplies to perform a herb run"); stop(); } */ This neeeds some looping structure if bot-has-items if !bot-near-patch || patch-has-herb move-to-next else farmpatch else get-items return random(500, 1200); } private boolean checkSupplies() throws InterruptedException { String[] items = new String[]{"Rake", "Seed dibber", "Spade", "Ectophial"}; String[] runes = new String[]{"Law rune", "Water rune", "Air rune"}; for (String item : items) { if (!getInventory().contains(item)) { log(item + " not found"); return false; } } for (String rune : runes) { if (getInventory().getAmount(rune) < 10) { log(rune + " not found"); return false; } } long seedAmount = getInventory().getAmount((x) -> x.getName().contains("seed")); long compostAmount = getInventory().getAmount((x) -> x.getName().contains("post")); if (seedAmount < 4/* && compostAmount < 4*/) { log("Seed or Compost fail" + seedAmount); return false; } return true; } private void noteHerbs() throws InterruptedException { Item myItem = getInventory().getItem((x) -> x.nameContains("Grimy") && !x.isNote()); myItem.interact("Use"); if (getInventory().isItemSelected()) { NPC tl = npcs.closest("Tool Leprechaun"); tl.interact("Use"); Sleep.sleepUntil(() -> !myPlayer().isMoving(), 5000); } } private void banking() throws InterruptedException { if (getBank().open()) { getBank().depositAll("Bucket"); getBank().depositAll(21483); getBank().withdraw(21483, 5); } } private void moveToMort() throws InterruptedException { Position myspot = myPlayer().getPosition(); getInventory().getItem("Ectophial").interact("Empty"); Sleep.sleepUntil(() -> !myPlayer().getPosition().equals(myspot), 5000); walking.webWalk(mortPatch); } private void moveToCamelot() throws InterruptedException { log("Let's get started!"); tpAndMoveToArea(Spells.NormalSpells.CAMELOT_TELEPORT,camBank); banking(); walking.webWalk(camelotPatch); } private void tpAndMoveToArea(MagicSpell spell, Area area) throws InterruptedException { Position myspot = myPlayer().getPosition(); magic.castSpell(spell); Sleep.sleepUntil(() -> !myPlayer().getPosition().equals(myspot), 5000); walking.webWalk(area); } private void farmPatch() throws InterruptedException { if (getInventory().contains((x) -> x.nameContains("Grimy") && !x.isNote())){ noteHerbs(); }else { RS2Object patch = getObjects().closest(8150,8151,8152,8153); if (patch needs to be raked){ rake }else if(inventory has weeds){ drop weeds }else if(patch can be picked){ pick patch }else if(patch is empty and has no weeds and no compost){ use compost }else { use use seed } } } }
-
thanks ill check it out
-
I want to move the mouse with out using the api move mouse. Its sometimes way to slow for my oh shit problem that i have and i need some thing that will move to the other side of the screen instantly. Anyone got anything?
-
I've made one before pm me or Add me on discord inept#0327 Video