# Thread: [ogl] How to find tiles/create paths?

1. ## [ogl] How to find tiles/create paths?

So I've seen a few different methods for walking, some are based on walking to a location offset from a player's current position, others take specific tiles and click on them on the MM.
I feel like this is a stupid question but I can't see anything for finding the tile location? What is the easiest way to do this?

Thanks

2. Simba Code:
repeat  writeln(minimap.getLocalPosition());until false;

You can use the above code to get your player's current position. This is, for all intents and purposes, the player's local tile. You would then walk by doing something like:

Simba Code:
minimap.clickLocalPosition(point(78, 82));

Although, to add some randomness to the clicks, and more control over the navigation, I like to customize the process:

Simba Code:
procedure walkToPoint(x, y: integer);var  randomizedPoint, givenPoint: tPoint;begin  givenPoint := point(x, y);  ClarityDebug('Walking to point: ' + toStr(givenPoint));  randomizedPoint := minimap.getScreenPosition(givenPoint);  mouse.click(point(randomizedPoint.X + random(-5, 5), randomizedPoint.Y + random(-5, 5)));  waitFlag();  wait(random(1200));end;

For God Wars, there is a long path from the Trollheim teleport to the main dungeon entrance. I achieve this by simply navigating from one point to the next.

Simba Code:
const  WP_PRE_TC1 = [77, 56];  WP_PRE_TC2 = [84, 47];  WP_PRE_TC3 = [102, 64];  WP_PRE_TB = [55, 48];  WP_PRE_GWDR = [55, 20];  WP_PRE_GWDR2 = [72, 56];

As long as you are basing your walk paths off predetermined, guaranteed origin points (like lodestone teleport destinations) this should never fail. Spell teleports often land people in a range of random tiles, so I account for this in the array of walk points.
Last edited by Clarity; 11-24-2015 at 05:49 AM.

3. Originally Posted by Clarity
Simba Code:
repeat  writeln(minimap.getLocalPosition());until false;

You can use the above code to get your player's current position. This is, for all intents and purposes, the player's local tile. You would then walk by doing something like:

Simba Code:
minimap.clickLocalPosition(point(78, 82));

Although, to add some randomness to the clicks, and more control over the navigation, I like to customize the process:

Simba Code:
procedure walkToPoint(x, y: integer);var  randomizedPoint, givenPoint: tPoint;begin  givenPoint := point(x, y);  ClarityDebug('Walking to point: ' + toStr(givenPoint));  randomizedPoint := minimap.getScreenPosition(givenPoint);  mouse.click(point(randomizedPoint.X + random(-5, 5), randomizedPoint.Y + random(-5, 5)));  waitFlag();  wait(random(1200));end;

For God Wars, there is a long path from the Trollheim teleport to the main dungeon entrance. I achieve this by simply navigating from one point to the next.

Simba Code:
const  WP_PRE_TC1 = [77, 56];  WP_PRE_TC2 = [84, 47];  WP_PRE_TC3 = [102, 64];  WP_PRE_TB = [55, 48];  WP_PRE_GWDR = [55, 20];  WP_PRE_GWDR2 = [72, 56];

As long as you are basing your walk paths off predetermined, guaranteed origin points (like lodestone teleport destinations) this should never fail. Spell teleports often land people in a range of random tiles, so I account for this in the array of walk points.
Beautiful, exactly what I was after thanks. Any idea if death locations vary by a few tiles?