Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from another users
  • Try asking for help in the chatbox

DreamBot is the only Deadman Mode supported bot on the market!

Download the DreamBot client today!


  • Content Count

  • Joined

  • Last visited

About scape2code

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Just started learning about reflection and was trying to use it to get an array of players that are logged in a 718 rsps. In the client.class I found a field which I thougth would contain this called aClass365_Sub1_Sub1_Sub2_Sub2Array8805 when I try to access this variable I get 2048 null values no mater how many people are logged into the client. After I get this to work would like to find the field for the players usernames and then print those out instead of the reference to the player but I need to get this part working first. My current code is import java.net.MalformedURLException; import java.util.ArrayList; public class test { public static void main(String[] args) throws ClassNotFoundException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, MalformedURLException { for(Player2 player : getLoaded()) { System.out.println(player); } } public static Player2[] getLoaded() throws ClassNotFoundException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, MalformedURLException { ArrayList<Player2> players = new ArrayList<Player2>(); Object[] oPlayers = Reflection1.getPlayerArray(); //Assuming the player array method is stored in the class client // System.out.println(oPlayers.length); int i = 0; for(Object o : oPlayers) { if(o != null) { System.out.println("o != null"); Player2 cur = new Player2(o); System.out.println(cur); players.add(cur); } System.out.println( i + " " + "o = null"); i++; } return players.toArray(new Player2[players.size()]); } } import java.io.File; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; public class Reflection1 { public static Object[] getPlayerArray() throws ClassNotFoundException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, MalformedURLException { File file = new File("C:\\Users\\accen\\Desktop\\718\\Matrix Package\\Matrix Client\\bin"); URL url = file.toURI().toURL(); URL[] urls = {url}; ClassLoader loader = new URLClassLoader(urls); Class myClass = loader.loadClass("client"); System.out.println(myClass.getName()); Field field1 = myClass.getDeclaredField("aClass365_Sub1_Sub1_Sub2_Sub2Array8805");//Believe this holds the players that are logged into server field1.setAccessible(true); Object[] players = (Object[]) field1.get(null); System.out.println(players.length); // it is set to 2048 in the client class // should return a player Object return (Object[]) field1.get(null);// returns 2048 null value*/ } } import java.io.File; import java.lang.reflect.Field; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; public class Player2 { private Object player; public Player2(Object player){ this.player = player; } /* * Not sure what field is username yet just guessing aString10197 * currently not implemented will try and use later when everything else works */ public String getUserName() throws IllegalArgumentException, IllegalAccessException, MalformedURLException, ClassNotFoundException, NoSuchFieldException, SecurityException { File file = new File("C:\\Users\\accen\\Desktop\\718\\Matrix Package\\Matrix Client\\bin"); URL url = file.toURI().toURL(); URL[] urls = {url}; ClassLoader loader = new URLClassLoader(urls); Class myClass = loader.loadClass("Player"); Field f = myClass.getDeclaredField("aString10195"); f.setAccessible(true); System.out.println(f.get(player)); return (String) f.get(player); } }
  2. Need help downloading a project from GitHub was watching tutorials following along but got tired of writing down code after video 20 something and would like the source code. Tried to clone it but apparently ive messed up some where because I cant run it. Just need to download episode 34 should contain source for the entire project. If anyone could make a video/pictures/tell me what to do would be appreciated. https://github.com/CodeNMore/New-Beginner-Java-Game-Programming-Src
  3. why does deleting the cache help this fixed my error
  4. https://www.powerbot.org/community/topic/1346276-how-to-launch-client-with-proxy/ was just reading about proxies and was wondering whats the point of using them if jagex can see your true ip anyway.
  5. also last 3 accounts ive tried creating one on vpn other 2 on different proxy providers which are suppose to be private dedicated ips have been locked. I guess the ips are flagged
  6. I get this a lot to when searching answers for google
  7. I want to it to sleep until the widget is visibile but I get a null pointer exception until that actually happens but its only going to be null or only supposed to be null until I interact with the 2 objects what do I do to fix this or does it not matter. It seems like my program may skip a sleep statement which throws everything off. Code below is basically just me debugging problem if(getWidgets().getWidgetChild(270,14,38) == null) { log("widget child isnot visible yet"); sleepUntil(()->getWidgets().getWidgetChild(270,14,38).isVisible(),10000); log("widget child is visible son"); }
  8. lol going to run a lot more than 2-3 I think I just need to find out how proxies work cause I don't think people use a vps to run 10+ bots on the same ip
  9. If you could also explain how proxies work would be great to. I guess each bot client can use one proxy?
  10. scape2code

    Vps questions

    So at first I was thinking of getting a vpn and trying to use virtual box and creating lots of virtual machines with a vpn on each one and getting different ips out of it but was having a hard time making that work so I gave up and started reading some more. Thinking about getting a vps but a lot of the stuff I read is about people using like lots and lots of accounts on it. Wouldn't it be dumb more than 2 accounts on the same ip. So I would have to get multiple vps? Where can I find cheap reliable vps to run 2-3 bots at a time. If you have any suggestions or ways for me to go about it would like to hear. I am also unfamiliar with Linux shits a fking pain but could probably figure it out after a while idk if that will be an issue.
  11. thx for the help is there a list of all the gameobjects anywhere?
  12. New to this so if you have suggestions just going to practice a bit each day and have people critique my code so hopefully I learn something. I did some programming in college 4/5 years ago, all introductory classes, so I need to read up on it some. My eat method which I hoped would allow me to eat a trout if my hp percent was lower then 95 just as a test closest() returns null even tho I have trout in my inventory. I also never heard of a lambda today so if you could explain that better and also why keep the methods private instead of public I remember had something to do with data hiding. Also how does the paint method run when its not called and it also has a problem that sometimes it will attack a goblin that's not in area that I need to be in, I guess id have tochange that in the filter, and it runs off to attack it sometimes it does and then while being attacked by it I go and try to attack something else even tho im being attacked. import org.dreambot.api.methods.filter.Filter; import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.skills.Skill; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.wrappers.interactive.NPC; import java.awt.*; @ScriptManifest(category = Category.MISC,name="goblin killer",description ="",author="scape2code",version=1.0) public class Main extends AbstractScript { private static final Area GOBLINAREA = new Area(3245,3232,3255,3239); private static final String GOBLIN ="Goblin"; private static final Filter<NPC>GOBLINFILTER = npc -> npc != null && npc.getName().equals(GOBLIN) && !npc.isHealthBarVisible(); public void onStart() { int state = 0; // was thinking about using int attackLevel = getSkills().getRealLevel(Skill.ATTACK); log("Attack Level: "+attackLevel); } @Override public int onLoop() { locationCheck(); if(!getLocalPlayer().isInCombat()) { killGoblin(); if(getCombat().getHealthPercent() < 95){ eat(); } } return 1000; } private void locationCheck(){ if (!GOBLINAREA.contains(getLocalPlayer())) { getWalking().walk(GOBLINAREA.getRandomTile()); } } private void killGoblin(){ NPC goblin = getNpcs().closest(GOBLINFILTER); goblin.interact("Attack"); } private void eat(){ if(getInventory().contains("Trout")){ log("Should be eating"); GameObject food = getGameObjects().closest("Trout"); log(""+food); food.interact("Eat"); } } @Override public void onPaint(Graphics graphics) { super.onPaint(graphics); int defenceLevel = getSkills().getRealLevel(Skill.DEFENCE); int healthPercent = getCombat().getHealthPercent(); graphics.drawString("Current defence level"+defenceLevel,20,40); graphics.drawString("Current Health Percentage" + healthPercent,20,55); } }
  13. Ty for the response, I did that and got jarfix and it is working now ty.
  14. When I click on dblauncher.jar the file opens in task manager but nothing pops up on screen. Current version of java java version "10.0.2" 2018-07-17 Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
  • Create New...