Results 1 to 16 of 16

Thread: ZMI Altar Runpath and Altar Clicking

  1. #1
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ZMI Altar Runpath and Altar Clicking

    I need help with a ZMI altar script I'm making.

    Since there is no real road or colored path to follow once you go down the ladder, I'm just clicking on the minimap and waiting a bit, then clicking again.

    This works fine unless there is lag. Then it all falls apart.

    So, there is a nice white line on the minimap that indicates the wall of the path where I am running. How can I use that to determine my location, and correct for any lag issues? I've tried using bitmaps but I can't get them to work (as the angle is a tiny bit rotated each time I suppose.) I've tried to allign the compass each time I go down the ladder but that doesn't help either.

    As for clicking on the altar at the end of the run, I found what I think is a unique and constant color for the altar. I find the color, check the uptext, and click on it, and it works about 90% of the time, the other 10% it fails for unknown reasons and will click somewhere else entirely, that has nothing even close to the altar color. I have no idea what's going on there, I've played around with the tolerance but I can't tell that it's having any effect.
    And I don't understand why it still clicks somewhere wrong when the uptext check is supposed to prevent that from happening. It should just move the mouse there and look around for the correct uptext. Anyone have any insights to give me?

    Thanks in advance,

    JIM

  2. #2
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Is there any symbols? Anything on the minimap? You could have posted a picture of the path.
    There used to be something meaningful here.

  3. #3
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have plenty of screen caps showing the runpath. Unfortunately I have no idea how to upload an image from my computer to this message board, all the "Insert Image" buttons want a URL instead of a local file location.

  4. #4
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    I have plenty of screen caps showing the runpath. Unfortunately I have no idea how to upload an image from my computer to this message board, all the "Insert Image" buttons want a URL instead of a local file location.
    http://www.imageshack.us/

    Upload images to there, then paste the urls here
    There used to be something meaningful here.

  5. #5
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default



    Last edited by jimthesoundman; 01-14-2010 at 07:15 PM.

  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post


    Fixed images:


    The other 2 gives me 404 errors

  7. #7
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry about that, all fixed now. That was my first time using ImageShack. I promise I'll have a better grip in the future. LOL

  8. #8
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For the last click use an offset of the center of red MM line colors.. find them by using that color then splitatapa middletpa ect.. then about X - 20 Y - 20... for bank use an offset of FindLadderColor offset w/ banksymbol failsafe w/ blind click fail safe ect.. should be pretty easy.

  9. #9
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I understand about the end and using an offset of that red color where the "door" to the slow path is.
    And the beginning is not a problem, as you always decend the ladder in exactly the same spot. I'm not banking at ZMI, I'm banking at Castlewars, which is easy.

    Its the middle that is the problem.
    However the white line on the left of the path has many unique zig-zags to it so I was thinking that it would be easiest to use that somehow to locate myself and use an offset of that to click. But is bitmaps the best way to go, or a TPA? I briefly tried bitmaps and it didn't work. I don't know if that is because the map is slightly rotated each time and so the bitmap finder is getting confused. In addition, during the time I'm asking the script to find this bitmap, I'm also running. So it seems to me that it would be hard to locate a moving bitmap. Any suggestions?
    Last edited by jimthesoundman; 01-14-2010 at 08:11 PM.

  10. #10
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Walk up until it finds big black box bitmap (so its as far as it can go) then walk left until find big black box bitmap.
    There used to be something meaningful here.

  11. #11
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Bitmaps are a horrid idea, I'd use blind clicks because the start and end point aren't far from eachother... probably a good idea to find the center of the lava pools and offset using splitatpa though.

  12. #12
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is there a function that can translate a point on the main screen to the corresponding point on the minimap?

  13. #13
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    Is there a function that can translate a point on the main screen to the corresponding point on the minimap?
    Yea... MMToMS MSToMM in SRL.. it's not 100% but it's close... reflection had a 100% method that involved ground height... camera pitch, and actual compass/w/minimapoffset angles.

  14. #14
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm looking through the SRL Library Version 4 Manual and I can't find any reference to MMToMS or anything like that.
    I can't tell what parameters it uses. Can you please clue me in?

    Thanks!

  15. #15
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    Function MMToMS(MM: TPoint): TPoint;
    By: N1ke!
    Description: Turns a Minimap point into a close MS point.
    *******************************************************************************}

    Function MMToMS(MM: TPoint): TPoint;
    var
      X, Y: Integer;
      Dis: TPoint;
    begin
      X := ((MM.X - 647));
      Y := ((MM.Y - 84));

      Dis := Point( (MMCX - MM.X)*-1, (MMCY - MM.Y)*-1);
      Result := Point(Round((259.5 + X)+ Dis.X*10), Round((170.0 + Y)+ Dis.Y*6.5));

      If Not IntInBox(Result.X, Result.Y, IntToBox(MSX1, MSY1, MSX2, MSY2))then
        Result := Point(-1, -1);
    end;
    There's no MSToMM though. At least I can't find it if there is. And I don't remember to that.

  16. #16
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    I'm looking through the SRL Library Version 4 Manual and I can't find any reference to MMToMS or anything like that.
    I can't tell what parameters it uses. Can you please clue me in?

    Thanks!
    I believe the SRL Manual is outdated.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

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
  •