Results 1 to 3 of 3

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

  1. #1
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,602
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default [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
    Sleeping...

  2. #2
    Join Date
    Dec 2011
    Posts
    2,134
    Mentioned
    221 Post(s)
    Quoted
    1064 Post(s)

    Default

    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. #3
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,602
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Clarity View Post
    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?
    Sleeping...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •