Jump to content

Abyss Object Issues


fatpoop

Recommended Posts

I'm trying to write my own abyss runecrafter script, I've got everything else working except navigating the abyss.

 

The problem my script is having is it located a "rock" object but is instead the eyes or some other obstacle and it just hovers over the object because it it is unable to interact with the object to "mine" (or at least that's what i think the problem is). At the end I find my distance to the center of the abyss (hence center a position variable) to check if I have entered the so called "inner abyss radius".

 

Any idea what's going on here?

 

My code snippet:

                    case TEST_ABYSS:
    			log("Starting "+ CURRENT + " state");
    			Thread.sleep(5000);
    			Entity rockTest = objects.closest("Rock"); //find and declare the object
    			if(rockTest == null) //if there are no nearby objects
    			{
    				log("No entrances nearby");
    				if(myPlayer().getPosition().getY() >= 4832) //if on abyss top side, walk bottom
    				{
    					Position dest = new Position(3040+random(-2,2),4809+random(-2,2),0);
    					log("On top half, walking to bottom side");
	    				getWalking().webWalk(dest);
    				}
    				if(myPlayer().getPosition().getY() < 4832) //if on abyss bottom side, walk top
    				{
    					Position dest = new Position(3040+random(-2,2),4856+random(-2,2),0); 
    					log("On bottom half, walking to top side");
	    				getWalking().webWalk(dest);
    				}
    			}
    			if(rockTest != null) //if there is a nearby rock walk to it and interact
    			{
    				getWalking().webWalk(rockTest.getPosition());
    				rockTest.interact("Mine");
    				log("Mining rock at a distance " + myPlayer().getPosition().distance(center));
    			}
    			break;
Link to comment
Share on other sites

I usually get an output of something like this

[INFO][Bot #1][06/17 08:15:10 PM]: Loaded 2 built-in random solvers!
[INFO][Bot #1][06/17 08:15:10 PM]: Let's get started!
[INFO][Bot #1][06/17 08:15:10 PM]: Started script : NatCraft
[INFO][Bot #1][06/17 08:15:10 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:15 PM]: WebWalkingEvent; No route found! Destinations = [[x=3026, y=4813, z=0]];
[INFO][Bot #1][06/17 08:15:15 PM]: Mining rock at a distance 27
[INFO][Bot #1][06/17 08:15:16 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:21 PM]: WebWalkingEvent; No route found! Destinations = [[x=3026, y=4813, z=0]];
[INFO][Bot #1][06/17 08:15:21 PM]: Mining rock at a distance 27
[INFO][Bot #1][06/17 08:15:21 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:26 PM]: WebWalkingEvent; No route found! Destinations = [[x=3026, y=4813, z=0]];
[INFO][Bot #1][06/17 08:15:26 PM]: Mining rock at a distance 27
[INFO][Bot #1][06/17 08:15:27 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:32 PM]: WebWalkingEvent; No route found! Destinations = [[x=3038, y=4853, z=0]];
[INFO][Bot #1][06/17 08:15:32 PM]: Mining rock at a distance 27
[INFO][Bot #1][06/17 08:15:32 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:37 PM]: WebWalkingEvent; No route found! Destinations = [[x=3038, y=4853, z=0]];
[INFO][Bot #1][06/17 08:15:38 PM]: Mining rock at a distance 24
[INFO][Bot #1][06/17 08:15:38 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:43 PM]: WebWalkingEvent; No route found! Destinations = [[x=3038, y=4853, z=0]];
[INFO][Bot #1][06/17 08:15:44 PM]: Mining rock at a distance 24
[INFO][Bot #1][06/17 08:15:44 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:49 PM]: WebWalkingEvent; No route found! Destinations = [[x=3038, y=4853, z=0]];
[INFO][Bot #1][06/17 08:15:49 PM]: Mining rock at a distance 24
[INFO][Bot #1][06/17 08:15:50 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:15:55 PM]: WebWalkingEvent; No route found! Destinations = [[x=3038, y=4853, z=0]];
[INFO][Bot #1][06/17 08:15:56 PM]: Mining rock at a distance 24
[INFO][Bot #1][06/17 08:15:57 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:16:02 PM]: WebWalkingEvent; No route found! Destinations = [[x=3049, y=4813, z=0]];
[INFO][Bot #1][06/17 08:16:02 PM]: Mining rock at a distance 14
[INFO][Bot #1][06/17 08:16:02 PM]: Starting TEST_ABYSS state
[INFO][Bot #1][06/17 08:16:06 PM]: Terminating script NatCraft...
[INFO][Bot #1][06/17 08:16:06 PM]: Finished!
[INFO][Bot #1][06/17 08:16:06 PM]: Script NatCraft has exited!

But I do also have the movement to the next state taken out at the moment. so the script will never continue on once it makes it inside. It ran and logged that output while faced away from the nearby rock, and once I turned the camera it clicked on the rock. It looks similar even when not spawning near a rock except it just hovers over the object and logs like that.

Link to comment
Share on other sites

Can someone help me write something to move the camera? I keeping getting nullPointerException when using camera.moveYaw()

 

EDIT: or I think I remember seeing something in the API about if the object is on the game screen, maybe I should use that? If anyone knows that that function is

Edited by fatpoop
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...