boozer Posted January 3, 2018 Posted January 3, 2018 (edited) Is there a way to create a script that buys/sells in ge? yes. however, my actual question is, if i use a live database to flip/merch in ge, is there a way to utilize the site i use for a bot to refresh the database go by margins and create buy/sell orders on ge? if that didn't make much sense then to break it down, can a bot use database sites such as ge-tracker to update items to purchase/sell and create a bot for flipping new items throughout the day due to items changing value everyday Edited January 3, 2018 by boozer
Apaec Posted January 3, 2018 Posted January 3, 2018 What you've described is certainly possible, but wouldn't be allowed on the SDN (https://osbot.org/forum/announcement/62-script-rules-read-before-applying/) That being said, there's nothing stopping you making it yourself / purchasing it as a private script. If you do go for a private script, expect it to cost a lot! OSBuddy provide a nice and pretty accurate item value db which many of us scripters use for profit tracking and the likes. This reddit thread might help: https://www.reddit.com/r/2007scape/comments/543n8b/rsbuddy_exachange_api_documentation/ GL! Apa 1
jca Posted January 3, 2018 Posted January 3, 2018 (edited) It's certainly possible... I can't seem to find an API that ge-trackers gives access to but there are many out there. If you know basic Java you can easily form GET requests to the APIs end-point and parse that data to get item prices + add your margins. For a headstart - here's a class I wrote that uses a basic reader to return the live item price and can store other variables about the item Spoiler import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; class ItemResource { private String name; private String url; private int id; private int price; private int amount; public ItemResource(String name, int id) { this.url = "http://services.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=" + id; this.name = name; this.id = id; this.price = fetchPrice(); } // Getters public int getPrice() { return price; } public int getAmount() { return amount; } public String getName() { return name; } // Setters public void setAmount(int i) { amount = amount + i; } // Reset Amount public void resetAmount() { amount = 0; } private int fetchPrice() { try (final BufferedReader reader = new BufferedReader(new InputStreamReader(new URL(url).openStream()))) { final String raw = reader.readLine().replace(",", "").replace("\"", "").split("price:")[1].split("}")[0]; reader.close(); return raw.endsWith("m") || raw.endsWith("k") ? (int) (Double.parseDouble(raw.substring(0, raw.length() - 1)) * (raw.endsWith("m") ? 1_000_000 : 1_000)) : Integer.parseInt(raw); } catch (final Exception e) { e.printStackTrace(); } return -1; } } Edited January 3, 2018 by jca
boozer Posted January 3, 2018 Author Posted January 3, 2018 1 hour ago, Apaec said: What you've described is certainly possible, but wouldn't be allowed on the SDN (https://osbot.org/forum/announcement/62-script-rules-read-before-applying/) That being said, there's nothing stopping you making it yourself / purchasing it as a private script. If you do go for a private script, expect it to cost a lot! OSBuddy provide a nice and pretty accurate item value db which many of us scripters use for profit tracking and the likes. This reddit thread might help: https://www.reddit.com/r/2007scape/comments/543n8b/rsbuddy_exachange_api_documentation/ GL! Apa 1 hour ago, jca said: It's certainly possible... I can't seem to find an API that ge-trackers gives access to but there are many out there. If you know basic Java you can easily form GET requests to the APIs end-point and parse that data to get item prices + add your margins. For a headstart - here's a class I wrote that uses a basic reader to return the live item price and can store other variables about the item Reveal hidden contents import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; class ItemResource { private String name; private String url; private int id; private int price; private int amount; public ItemResource(String name, int id) { this.url = "http://services.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=" + id; this.name = name; this.id = id; this.price = fetchPrice(); } // Getters public int getPrice() { return price; } public int getAmount() { return amount; } public String getName() { return name; } // Setters public void setAmount(int i) { amount = amount + i; } // Reset Amount public void resetAmount() { amount = 0; } private int fetchPrice() { try (final BufferedReader reader = new BufferedReader(new InputStreamReader(new URL(url).openStream()))) { final String raw = reader.readLine().replace(",", "").replace("\"", "").split("price:")[1].split("}")[0]; reader.close(); return raw.endsWith("m") || raw.endsWith("k") ? (int) (Double.parseDouble(raw.substring(0, raw.length() - 1)) * (raw.endsWith("m") ? 1_000_000 : 1_000)) : Integer.parseInt(raw); } catch (final Exception e) { e.printStackTrace(); } return -1; } } thank yall for the advice ima be looking into scripting over next few weeks since i'll be babysitting bots and bored af lol
LOL_152 Posted January 3, 2018 Posted January 3, 2018 isn't it faster just to script other money making methods?
jca Posted January 3, 2018 Posted January 3, 2018 5 minutes ago, LOL_152 said: isn't it faster just to script other money making methods? Longer to write script = higher barrier to entry = less people doing it = more profitable (theoretically).