adc Posted July 1, 2014 Share Posted July 1, 2014 Is it possible to force runescape/the client to load objects in an area that's a bit outside render distance, and if so, how? For context, this snippet is the focus of my concern: for (Point[] doorPoint : Constants.Rooms.CHEST_ROOM.getAllDoorsOut()) { RS2Object door = sA.objects.closest((new BestMatch(sA, "Door", new Area(doorPoint[0].x, doorPoint[0].y, doorPoint[1].x, doorPoint[1].y)))); if (door.exists() && Arrays.asList(door.getDefinition().getActions()).contains("Open")) { if (Constants.Rooms.CHEST_ROOM.getNextRoom(Constants.Rooms.CHEST_ROOM, door) != null) { sA.log("Found openable door at " + door.getX() + ", " + door.getY()); nextPathPiece = Constants.Rooms.CHEST_ROOM.getNextRoom(Constants.Rooms.CHEST_ROOM, door); break; } } else { sA.log("Found door at " + door.getX() + ", " + door.getY() + " but door is not openable"); } } In theory, it should check the actions of all 8 of the door objects leading out of the Barrows Chest room in the center of the Barrows tunnels. When the player is close enough, it works just fine. However, when past a certain distance away from each door, it is unable to get the actions and for some reason Arrays.asList(door.getDefinition().getActions()).contains("Open") returns a default value of true, meaning that it simply returns the first door that it cannot "see" if that comes before the "openable" door. Link to comment Share on other sites More sharing options...
emu Posted July 1, 2014 Share Posted July 1, 2014 (edited) I'm not sure this would really be viable. Even if you could the engine itself was only designed to have the immediate area/objects loaded. You run the risk of running out of memory on the heap ect Edited July 1, 2014 by emu 1 Link to comment Share on other sites More sharing options...
adc Posted July 2, 2014 Author Share Posted July 2, 2014 I'm not sure this would really be viable. Even if you could the engine itself was only designed to have the immediate area/objects loaded. You run the risk of running out of memory on the heap ect I suppose that's true, I'll just have to make the script move towards the center to expand vision as a work-around. Link to comment Share on other sites More sharing options...
Botre Posted July 2, 2014 Share Posted July 2, 2014 (edited) Reading the doors/maze via varpbits will make your life much much easier. OT: impossible Edited July 2, 2014 by Botrepreneur 1 Link to comment Share on other sites More sharing options...
adc Posted July 2, 2014 Author Share Posted July 2, 2014 Reading the doors/maze via varpbits will make your life much much easier. OT: impossible Any chance you could link to the proper page in the API where I could learn about varpbits for this context? Link to comment Share on other sites More sharing options...
NotoriousPP Posted July 2, 2014 Share Posted July 2, 2014 Is it possible to force runescape/the client to load objects in an area that's a bit outside render distance, and if so, how? For context, this snippet is the focus of my concern: for (Point[] doorPoint : Constants.Rooms.CHEST_ROOM.getAllDoorsOut()) { RS2Object door = sA.objects.closest((new BestMatch(sA, "Door", new Area(doorPoint[0].x, doorPoint[0].y, doorPoint[1].x, doorPoint[1].y)))); if (door.exists() && Arrays.asList(door.getDefinition().getActions()).contains("Open")) { if (Constants.Rooms.CHEST_ROOM.getNextRoom(Constants.Rooms.CHEST_ROOM, door) != null) { sA.log("Found openable door at " + door.getX() + ", " + door.getY()); nextPathPiece = Constants.Rooms.CHEST_ROOM.getNextRoom(Constants.Rooms.CHEST_ROOM, door); break; } } else { sA.log("Found door at " + door.getX() + ", " + door.getY() + " but door is not openable"); } } In theory, it should check the actions of all 8 of the door objects leading out of the Barrows Chest room in the center of the Barrows tunnels. When the player is close enough, it works just fine. However, when past a certain distance away from each door, it is unable to get the actions and for some reason Arrays.asList(door.getDefinition().getActions()).contains("Open") returns a default value of true, meaning that it simply returns the first door that it cannot "see" if that comes before the "openable" door. Reading the doors/maze via varpbits will make your life much much easier. OT: impossible Bot I wouldn't say impossible. It he recorded the map data he needs, and then grabs the data from his own cache, I could see it working. Almost like a web walker, but instead of recording the entire map, just get regions you need. Link to comment Share on other sites More sharing options...
Botre Posted July 2, 2014 Share Posted July 2, 2014 Bot I wouldn't say impossible. It he recorded the map data he needs, and then grabs the data from his own cache, I could see it working. Almost like a web walker, but instead of recording the entire map, just get regions you need. I know, I am actually experimenting with something like that. But the OP was talking about barrows door data, which is not static and therefore can't really be mapped (unless you link it to a config, which is what I recommended :p) 2 Link to comment Share on other sites More sharing options...