xdanishgamerz 1 Share Posted February 6, 2015 So i was about to make my first script for Dreambot. I'm making a cow killer script that should kill cows, pick up hide and then bank when inventory is full. The problem is that sometimes the cows is out of the screen, and because of that the bot won't attack them. I tried to do something like this NPC Cow = getNpcs().getClosest("Cow"); if (Cow.isOnScreen()){ blablabla }else{ Camera.rotateTo(Cow); } Sadly This don't work. Can someone tell me how to fix this ? Edit: I found out how to use the Camera Rotation. I had to use getCamera() instead of just Camera() for some reason >_> Link to comment Share on other sites More sharing options...
Explicit 213 Share Posted February 6, 2015 What do you mean "doesn't work"? Link to comment Share on other sites More sharing options...
xdanishgamerz 1 Author Share Posted February 6, 2015 What do you mean "doesn't work"? Well, i bet I do something wrong? I Think it Would work if I did it right :/? Link to comment Share on other sites More sharing options...
Notorious 342 Share Posted February 6, 2015 Edit: I found out how to use the Camera Rotation. I had to use getCamera() instead of just Camera() for some reason >_> Oh the reason for this is the type of API we provide, which is a non-static, the reason being for getCamera(), since your grabbing a instance of Camera which was instantiated inside of the class your calling from. Some API's use static references, which then Camera.rotateTo() would probably work. Though long story short, we really don't like static API's, along with a few other performance reasons we chose to use a non-static based API. Link to comment Share on other sites More sharing options...
xdanishgamerz 1 Author Share Posted February 7, 2015 Oh the reason for this is the type of API we provide, which is a non-static, the reason being for getCamera(), since your grabbing a instance of Camera which was instantiated inside of the class your calling from. Some API's use static references, which then Camera.rotateTo() would probably work. Though long story short, we really don't like static API's, along with a few other performance reasons we chose to use a non-static based API. Cool, cool. Just make a java noob like me confused.. I already got stuck again when it came to travel a path. ._. Link to comment Share on other sites More sharing options...
Notorious 342 Share Posted February 7, 2015 Cool, cool. Just make a java noob like me confused.. I already got stuck again when it came to travel a path. ._. We do provide web walking, and all you have to do to use it is to call: getWalking().walk(new Tile(3300, 3300, 0)); // Tile is the end location It will take one step each time you call that method, so you can control how it loops! Link to comment Share on other sites More sharing options...
xdanishgamerz 1 Author Share Posted February 9, 2015 We do provide web walking, and all you have to do to use it is to call: getWalking().walk(new Tile(3300, 3300, 0)); // Tile is the end location It will take one step each time you call that method, so you can control how it loops! Oh.. I've never used that before, why don't the client provide paths? Isnt it easier to use? Link to comment Share on other sites More sharing options...
Dogerina 330 Share Posted February 9, 2015 Oh.. I've never used that before, why don't the client provide paths? Isnt it easier to use? There is TilePath. you can create your own TilePath and call this or this Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.