Results 1 to 4 of 4

Thread: My FindWaterAltar procedure.. help please!

  1. #1
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My FindWaterAltar procedure.. help please!

    Ok, so here it is, i figured i could do the same thing i did in my essminer, and store the altar's location in an array of TPoints, but it doesnt work at all. It moves the mouse to the top left part of the screen, the little black outline part, not even any part of the RS screen.. Well, here it is:
    Code:
    Function FindWaterAlter:Boolean;
    var
    I, iX, iY:integer;
    AltarPoints:Array [0..3] Of TPoint;
    Begin
      Mouse(MMCX-30, MMCY-8, 1, 1, True);
      Flag;
       I:=0;
       AltarPoints[0].X := 149;
       AltarPoints[0].Y := 179;
       AltarPoints[1].X := 115;
       AltarPoints[1].Y := 191;
       AltarPoints[2].X := 116;
       AltarPoints[2].Y := 156;
       Repeat
         MMouse(iX, iY, 0, 0);
         If IsUpTextMulti('Craft','une','ltar')then
         Begin
           Result:=true;
           GetMousePos(x,y);
           Mouse(iX, iY, 2, 2, True);
           ChrisFlag;
           NumWaterRunesMade;
         End
         Else
           i:=i+1;
       Until(i=2)OR Result;
    End;

  2. #2
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    whewre do you search for your tpoint array? It looks like you declare it, but never use it.

    you never initialize yi and xi, so when you
    MMouse(iX, iY, 0, 0);
    it just clicks 0,0 at the top left

    also, NEVER have 0 randomness
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  3. #3
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You meant like this?
    SCAR Code:
    Function FindWaterAlter:Boolean;
    var
    I, iX, iY:integer;
    AltarPoints:Array [0..3] Of TPoint;
    Begin
      Mouse(MMCX-30, MMCY-8, 1, 1, True);
      Flag;
       I:=0;
       AltarPoints[0].X := 149;
       AltarPoints[0].Y := 179;
       AltarPoints[1].X := 115;
       AltarPoints[1].Y := 191;
       AltarPoints[2].X := 116;
       AltarPoints[2].Y := 156;
       for i:=0 to 2 do
       begin
         MMouse(AltarPoints[i].X, AltarPoints[i].Y, 0, 0);
         If IsUpTextMulti('Craft','une','ltar')then
         Begin
           Result:=true;
           GetMousePos(x,y);
           Mouse(x, y.Y, 5, 5, True);
           ChrisFlag;
           NumWaterRunesMade;
           Exit;
         End
       End
    End;
    Btw, why not use FindObj-function for finding the rune altar?

  4. #4
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah I understand what i did wrong now.. Thanks a lot guys!
    @Pentti: I formerly used the FindObj function to find the alter, but it was way too jerky, hopefully this will work.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with run procedure
    By MetalancA in forum OSR Help
    Replies: 2
    Last Post: 08-30-2008, 08:19 PM
  2. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  3. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  4. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 PM

Posting Permissions

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