Jump to content

Walking?


Guest Apogee

Recommended Posts

Guest Apogee

I'm not sure of how to walk.

I know that if i declare an area, and it is in range, i can make him walk there by:

walk(MY_AREA);
sleep(random(780, 1320));

However, i'm not sure how to make him walk to specific coords. Also, instead of making him walk on the same 50 tiles OVER and OVER, how can i make it random by like.. +/- 5 tiles?

Link to comment
Share on other sites

Guest Apogee

Walk(new Position(x,y,);

 

Look at the API.

 

 

Thanks. If i put that into an array, how do i call it?

 

for:

private Position[] TO_LOL = new Position[]{
			new Position(3045, 3235, 0), new Position(3035, 3236, 0), new Position(3026, 3241, 0),
			new Position(3016, 3241, 0), new Position(3006, 3244, 0), new Position(2996, 3247, 0),
			new Position(2987, 3254, 0), new Position(2977, 3258, 0), new Position(2967, 3257, 0),
			new Position(2957, 3261, 0), new Position(2947, 3263, 0), new Position(2937, 3264, 0),
			new Position(2927, 3264, 0), new Position(2917, 3270, 0), new Position(2912, 3280, 0),
			new Position(2909, 3290, 0), new Position(2907, 3296, 0) };
	
	

This won't work:

walk(TO_LOL);

Is there a way i can set and array and have the script go to those positions in order? Or should i just manually input each position? I'm not looking for an easy way out, i'm looking to learn all i can to make my code look better.

 

 

EDIT: Semi-solved that..

You use this i think:

walk(List<Position>, boolean, int, boolean)

Still having issues.

Edited by Bitter
Link to comment
Share on other sites

Thanks. If i put that into an array, how do i call it?

for:

private Position[] TO_LOL = new Position[]{			new Position(3045, 3235, 0), new Position(3035, 3236, 0), new Position(3026, 3241, 0),			new Position(3016, 3241, 0), new Position(3006, 3244, 0), new 
Position(2996, 3247, 0),			new Position(2987, 3254, 0), new Position(2977, 3258, 0), new Position(2967, 3257, 0),			new Position(2957, 3261, 0), new Position(2947, 3263, 0), new Position(2937, 3264, 0),			new Position(2927, 3264, 0), new Position(2917, 3270, 0), new Position(2912, 3280, 0),			new Position(2909, 3290, 0), new Position(2907, 3296, 0) };
This won't work:
walk(TO_LOL);
Is there a way i can set and array and have the script go to those positions in order? Or should i just manually input each position? I'm not looking for an easy way out, i'm looking to learn all i can to make my code look better.

EDIT: Semi-solved that..

You use this i think:

walk(List<Position>, boolean, int, boolean)
Still having issues.
You can make your own walking methode or look at the snippets also I can give you mind on skype.
Link to comment
Share on other sites

Guest Apogee

You can make your own walking methode or look at the snippets also I can give you mind on skype.

 

Ooo please <3

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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