Results 1 to 8 of 8

Thread: FindDTMRotated

  1. #1
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default FindDTMRotated

    Hey so I'm trying to use DTMs to walk from the Falador west bank to the low wall agility shortcut. I know I'm doing something wrong since my script doesn't do anything, could someone please help me? The code below is just the part of my script that I need help with. Iv'e cut out everything else.

    Simba Code:
    program NebulaFireOrbs;
    {$I SRL/SRL.scar}
    var
      x, y: integer;
      aFound: extended;

    Procedure WalkToDungeon;
    var
      Wall: integer;

    begin
      Wall := DTMFromString('mWAAAAHicY2FgYPBmYmAIAGJ/Jgi7DSjWAsSdQNwMxCoKMgyf33yCY3TAiIZBAABidgwv');
      if (FindDTMRotated(Wall, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/360, aFound)) then
      begin
      Mouse(x, y, 0, 0, true);
      FreeDTM(Wall);
      end;
    end;
    begin
    SetupSRL;
    ActivateClient;
    WalkToDungeon;
    end.

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    FindDTMRotated(Wall, X, Y, MMX1, MMY1, MMX2, MMY2, 0, 359, 1, aFound)


    This will search every angle between 0 to 360.. incrementing the angle by 1 every time until it finds the DTM.. the way you have it, it searches only twice.. 0 to 180.. then 180 to 360. Which is incredibly inaccurate.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    Make angle step Pi/30, you don't need such a high number.

    ggzz for FindDTMRotated, measurements need to be in radians, no degress work =s

    PS. Whenever you walk or do anything with DTMs you need to have your camera facing the same direction. Say always North or always East.

    Then you can call

    SetAngle(True);
    MakeCompass('n');

    and you would only need to look from -Pi/4 to Pi/4 speeding up your procedure.
    Last edited by DemiseScythe; 12-28-2011 at 05:55 PM.
    GLH Tutorial ~ OpenGL Scripting
    http://villavu.com/forum/showthread.php?p=1292150

    GLH Scripts ~ Abyssal Scripts
    http://villavu.com/forum/showthread.php?p=1293187
    Current Projects:
    A) DemiseSlayer Pro (Released/100%).
    B) Demise Power Miner(Released/100%).
    C) Demise Pyramid Plunder(Planning Stage/0%).

  4. #4
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by DemiseScythe View Post
    Make angle step Pi/30, you don't need such a high number.

    ggzz for FindDTMRotated, measurements need to be in radians, no degress work =s

    PS. Whenever you walk or do anything with DTMs you need to have your camera facing the same direction. Say always North or always East.

    Then you can call

    SetAngle(True);
    MakeCompass('n');

    and you would only need to look from -Pi/4 to Pi/4 speeding up your procedure.

    You might be right on that radians thing but I've seen it in degrees before :S And it worked in degrees for my summoning walking.. Iunno but I guess ur right.. all the definition of the function says is Angle :Extended;
    I am Ggzz..
    Hackintosher

  5. #5
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    I think DTMRotatedSE and those kinds are in degrees, if you look for Rotated in simba, FindDTMRotated without the SE is in a different section.



    Top uses radians, bottom ones use degrees, possibly radians too
    GLH Tutorial ~ OpenGL Scripting
    http://villavu.com/forum/showthread.php?p=1292150

    GLH Scripts ~ Abyssal Scripts
    http://villavu.com/forum/showthread.php?p=1293187
    Current Projects:
    A) DemiseSlayer Pro (Released/100%).
    B) Demise Power Miner(Released/100%).
    C) Demise Pyramid Plunder(Planning Stage/0%).

  6. #6
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Thanks guys, now I understand walking with DTMs. +repped

    Most of the scripting guides here are really good but the walking ones aren't too great.

  7. #7
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    can i do that facing north, east, south, west in private servers and can i use FindDTMRotated

  8. #8
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by remember me View Post
    can i do that facing north, east, south, west in private servers and can i use FindDTMRotated
    Yeah of course, that's the point of Find DTM rotated.

    Creds to DannyRS for this wonderful sig!

Thread Information

Users Browsing this Thread

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

Posting Permissions

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