Page 1 of 3 123 LastLast
Results 1 to 25 of 67

Thread: Lumbridge

  1. #1
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default Lumbridge

    I will be very busy for the next month, and pretty busy until May, so most of my projects are on hold. So I'm starting this so that I can add a little bit at a time, and I need testers every step of the way.

    This may turn into:
    something you run your players on to get ready for another script
    something you run noobs on fresh off tutorial island
    something that trains multiple skills around lumby

    Current situation:
    This function is for finding doors on minimap in the checkered room on the first floor of lumby castle. Stick a player in the checkered room and run the script, press F12 after it gets to 1st door, F11 after next, F12 after next. Try it on a couple worlds and tell me how it works please.

    Don't worry about the lag. It's looking for up to about 350 bitmaps, doing upto 1600 setpixels. I already have a fix for this that will cut it down to 7 and 32 respectively, but will have a small chance of a false positive. So I will have it try the faster method first, and if it fails it will do the laggier but guaranteed to work version. But first I need to make sure this is guaranteed to work, which is why I need you to test this.


    SCAR Code:
    program TestForFindLumbyDoor1st;
    {start in middle of checkered room in first floor lumby castle (or outside
    if door is open)
    should click west, then you press f12
    then it click south, then you press f11
    then it click east then you press f12
    then it click north door
    }

    {.include SRL/SRL.scar}
     
     
    {*******************************************************************************
    function FindLumbyDoor1st(Direction:string):boolean;
    By: Boreas
    Description: Sets x,y to the location of one of the 4 doors in lumbridge
    castle 1st floor foyer (the chessboard room)
    Direction: 'north','east','south','west'
    *******************************************************************************}

    function FindLumbyDoor1st(Direction:string):boolean;
    var
    xAddToBmp,yAddToBmp:integer;
    bmpLD:array [1..7] of integer;
    i,dacolor:integer;
    daboolean:boolean;
    begin
       case Direction of
       'north':
         begin
           xAddToBmp:=9+random(4);
           yAddToBmp:=1;
         end;
       'east':
         begin
           xAddToBmp:=17;
           yAddToBmp:=25+random(8);
         end;
       'south':
         begin
           xAddToBmp:=10+random(4);
           yAddToBmp:=58;
         end;
       'west':
         begin
           xAddToBmp:=1;
           yAddToBmp:=13+random(8);
         end;
      end;
     
     
      bmpLD[1] := BitmapFromString(18, 59, 'z78DAEDD7310D00000803304B5' +
           '3817F49BC9CBC90D6C0921D902537D4100018DFE15F16807BAB73' +
           '0000B04136EBA0014E51AF1D');
      bmpLD[2] := BitmapFromString(13, 59, 'z78DAEDD8210100000803B04A4' +
           'F41FF48D86B14628BB1E48B2901000000E0A48F65014901611E');
      bmpLD[3] := BitmapFromString(18, 30, 'z78DA33301805A360148C82513' +
           '00A862A700383E167D7281805A360148C96B700863461AF');
      bmpLD[4] := BitmapFromString(12, 18, 'z78DA33301878E086040C46C12' +
           '81805230C502BEF536E0E00CC34F511');
      bmpLD[5] := BitmapFromString(18, 59, 'z78DAEDD7310900000800C14AA' +
           '6B07F24C100E2287257E0E78F0000009864FBD70200002E3FC8E6' +
           '0E0ADEDDAD0D');
      bmpLD[6] := BitmapFromString(18, 30, 'z78DA3330181AC00D09188C825' +
           '1300A46C1281805A360148C8251300AE8DE1AA7A75D000A2561AF' +
           '');
      bmpLD[7] := BitmapFromString(13, 59, 'z78DAEDD7410900000800B14AA' +
           '6B07F24413308225B80FB5F04C067D96ED6000000F63E6814A4B6' +
           '611E');
     
     
      dacolor:=200;
      repeat
        dacolor:=dacolor+1;
        if not(((dacolor=206)or(dacolor=217)or(dacolor=233)or(dacolor=241)))then
        begin
          i:=0;
          repeat
            i:=i+1;
            case i of
             1:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
             2:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
             3:
              begin
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
              end;
             4:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
              end;
             5:
              begin
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
             6:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);;
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
              end;
             7:
              begin
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
            end;
            daboolean:=FindBitmapIn(bmpLD[i],x,y,mmx1,mmy1,mmx2,mmy2);
          until ((i=7) or (daboolean));
        end;
      until ((dacolor=254) or (daboolean));
      i:=0;
      repeat
        i:=i+1;
        FreeBitmap(bmpLD[i]);
      until i=7;
      x:=x+xAddToBmp;
      y:=y+yAddToBmp;
      result:=daboolean;
    end;
     
    begin
      SetupSRL;
      activateclient;
      makecompass('n');
      FindLumbyDoor1st('west');
      mouse(x,y,0,0,true);
      repeat
        wait(30);
      until isfkeydown(12);
      FindLumbyDoor1st('south');
      mouse(x,y,0,0,true);
      repeat
        wait(30);
      until isfkeydown(11);
      FindLumbyDoor1st('east');
      mouse(x,y,0,0,true);
      repeat
        wait(30);
      until isfkeydown(12);
      FindLumbyDoor1st('north');
      mouse(x,y,0,0,true);
    end.

  2. #2
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright. I'm with ya, I'll test and try to post progress reports if time allows. I have another set of exams for the other half of my subjects soon.

  3. #3
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks. I didn't put any debug stuff in this particular function to report, it will either click the doors or not. Good luck with your exams, lol real life always getting in the way...

  4. #4
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, yeah, I got 95% average on the 4 other ones I did a few weeks ago, so the coming ones should be fine. Anyway, I'll try to add debug stuff to see what's going on. I see you're being innovative and using things not many people dared to use, such as FastSetPixel. That's great.

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    It was either that or 350 bitmaps lol. I didn't want to use tolerance because it can only be certain colors.

    I took a bitmap of the checkered room and blacked out everything except the doors. This is the bitmap that those 7 are based on.



    Since they are all based on that, if you were to lay them on top of each other, lining up the top left corner, they all match up. And the top left corner is what the findbitmap returns. So that case statement gives the door positions relative to the top left corner of the bitmap, so the mouse will click the door and not the corner. Basically the bitmaps just find the north west corner of the room, and the case uses that to find the door.

    To allow of a little bit of map rotation, each bitmap only has the middle 2 pixels of each door. The first of 7 has all 4, and the other 6 have different combinations of 2 doors, to allow for npcs and player dots blocking. It looks for the one with 4 first, because the others have a potential for false positives, this is part of testing.

    At the moment it goes through about 50 possible door colors, sticking them in the bitmaps. If this version works but is laggy, I will find the door color first, and then stick only that color in the 7 bitmaps, which will reduce a lot of lag.

    Setpixel works great when you know the shape of something, but not the color. The thing is tolerance usually covers this. However in this case I want to avoid the colors in drop dots.

    It's simpler than it looks, and there's only a few places it can mess up. Bitmap being too unique that it can't find it, or so vague that it gets a false positive (maybe by kitchen).

  6. #6
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'll happily Test, if you still need them
    Current Scripts:
    http://www.fenjer.com/adnan/SRL/16/100/AutoLogin.pnghttp://villu-reborn.com/showthread.php?t=5219

    Currently Working on:
    http://www.fenjer.com/adnan/SRL/9/5/air%20crafter.png

    Join the rebellion call kaitneiks, cakemix.(just thought i'd add this, soo many good memories)

  7. #7
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Thank you I always need testers, as this is an 'innocent until proven guilty' situation. Meaning I need people to find situations where it doesn't work, know whether it works or not.

  8. #8
    Join Date
    Nov 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    it works... i tested on all the door... like you said, it got a bit laggy when trying to work out where the door was... wow.. thats a great length of script for such a simple task... i honour you *bows* lol keep up the good work.

  9. #9
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Thank you. Eh the length is mostly due to bitmaps and setpixels, which allow it to work when dots cover up some doors, and the case allowing it to work for 4 doors. Although I agree this if fairly complicated for just simply clicking something on the minimap.

    I will start work on the less laggy version, and post tonight or tomorrow. More testing of this still appreciated though, as I said, innocent until proven guilty...

  10. #10
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    First off, I'd like to say that it worked good. But, as you said it would, it lagged alot. To fix this, I just added a wait(1); in the middle of the cases like this
    SCAR Code:
    5:
              begin
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
               wait(1);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;

    It almost fixes the whole lag problem. It takes about one more second at the most however. Ehh use that if you actually mind the lag (which I don't).

  11. #11
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    K I haven't finished this but I'm going out so I'm posting it. Pretty lag free. I will compare it to your method when I get back. This focuses more on reducing the number of bitmaps it searches for by only trying 1 color.

    SCAR Code:
    program TestForFindLumbyDoor1st;
    {start in middle of checkered room in first floor lumby castle (or outside
    if door is open)
    should click west, then you press f12
    then it click south, then you press f11
    then it click east then you press f12
    then it click north door
    }

    {.include SRL/SRL.scar}


    {*******************************************************************************
    function FindLumbyDoor1st(Direction:string):boolean;
    By: Boreas
    Description: Sets x,y to the location of one of the 4 doors in lumbridge
    castle 1st floor foyer (the chessboard room)
    Direction: 'north','east','south','west'
    *******************************************************************************}

    function FindLumbyDoor1st(Direction:string):boolean;
    var
    xAddToBmp,yAddToBmp:integer;
    bmpLD:array [1..7] of integer;
    i,dacolor,DoorColor:integer;
    daboolean,AutoDoor:boolean;
    //CompassBox:Tbox;
    begin
       //CompassBox:=cBox2(546,3,585,36);
       case Direction of
       'north':
         begin
           xAddToBmp:=9+random(4);
           yAddToBmp:=1;
         end;
       'east':
         begin
           xAddToBmp:=17;
           yAddToBmp:=25+random(8);
         end;
       'south':
         begin
           xAddToBmp:=10+random(4);
           yAddToBmp:=58;
         end;
       'west':
         begin
           xAddToBmp:=1;
           yAddToBmp:=13+random(8);
         end;
      end;


      bmpLD[1] := BitmapFromString(18, 59, 'z78DAEDD7310D00000803304B5' +
           '3817F49BC9CBC90D6C0921D902537D4100018DFE15F16807BAB73' +
           '0000B04136EBA0014E51AF1D');
      bmpLD[2] := BitmapFromString(13, 59, 'z78DAEDD8210100000803B04A4' +
           'F41FF48D86B14628BB1E48B2901000000E0A48F65014901611E');
      bmpLD[3] := BitmapFromString(18, 30, 'z78DA33301805A360148C82513' +
           '00A862A700383E167D7281805A360148C96B700863461AF');
      bmpLD[4] := BitmapFromString(12, 18, 'z78DA33301878E086040C46C12' +
           '81805230C502BEF536E0E00CC34F511');
      bmpLD[5] := BitmapFromString(18, 59, 'z78DAEDD7310900000800C14AA' +
           '6B07F24C100E2287257E0E78F0000009864FBD70200002E3FC8E6' +
           '0E0ADEDDAD0D');
      bmpLD[6] := BitmapFromString(18, 30, 'z78DA3330181AC00D09188C825' +
           '1300A46C1281805A360148C8251300AE8DE1AA7A75D000A2561AF' +
           '');
      bmpLD[7] := BitmapFromString(13, 59, 'z78DAEDD7410900000800B14AA' +
           '6B07F24413308225B80FB5F04C067D96ED6000000F63E6814A4B6' +
           '611E');
       ///////////////auto door color finder//////////////////
     dacolor:=200;
      repeat
        dacolor:=dacolor+1;
        if not(((dacolor=206)or(dacolor=217)or(dacolor=233)or(dacolor=241)))then
        begin
          AutoDoor:=findmmcolor(x,y,dacolor);
        end;
      until ((dacolor=254) or (AutoDoor));
      DoorColor:=dacolor;
      writeln(inttostr(dacolor));
      if AutoDoor=true then writeln('true');
      ///////////////////auto door color finder end////////////////////
      dacolor:=200;
      repeat
        dacolor:=dacolor+1;
        ///////////door color user ////////////////
        if AutoDoor then
        begin
          dacolor:=DoorColor;
          AutoDoor:=false;
        end;
        /////////////door color user end///////////////
        if not(((dacolor=206)or(dacolor=217)or(dacolor=233)or(dacolor=241)))then
        begin
          i:=0;
          repeat
            i:=i+1;
            case i of
             1:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
             2:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
             3:
              begin
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
              end;
             4:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
              end;
             5:
              begin
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
             6:
              begin
               FastSetPixel(bmpLD[i],10,1,dacolor);
               FastSetPixel(bmpLD[i],11,1,dacolor);;
               FastSetPixel(bmpLD[i],17,28,dacolor);
               FastSetPixel(bmpLD[i],17,29,dacolor);
              end;
             7:
              begin
               FastSetPixel(bmpLD[i],1,16,dacolor);
               FastSetPixel(bmpLD[i],1,17,dacolor);
               FastSetPixel(bmpLD[i],11,58,dacolor);
               FastSetPixel(bmpLD[i],12,58,dacolor);
              end;
            end;
            daboolean:=FindBitmapIn(bmpLD[i],x,y,591,40,mmx2,mmy2);
            if daboolean then writeln(inttostr(x)+' '+inttostr(y));
          until ((i=7) or (daboolean));
        end;
      until ((dacolor=254) or (daboolean));
      i:=0;
      repeat
        i:=i+1;
        FreeBitmap(bmpLD[i]);
      until i=7;
      x:=x+xAddToBmp;
      y:=y+yAddToBmp;
      result:=daboolean;
    end;
     
    begin
      SetupSRL;
      activateclient;
      gametab(2);
      gametab(4);
      makecompass('n');
      wait(random(500)+500);
      makecompass('n');
      FindLumbyDoor1st('west');
      mouse(x,y,0,0,true);
      repeat
        wait(30);
      until isfkeydown(12);
      FindLumbyDoor1st('south');
      mouse(x,y,0,0,true);
      repeat
        wait(30);
      until isfkeydown(11);
      FindLumbyDoor1st('east');
      mouse(x,y,0,0,true);
      repeat
        wait(30);
      until isfkeydown(12);
      FindLumbyDoor1st('north');
      mouse(x,y,0,0,true);
    end.


    ------------------------------------------------------------------------------
    EDIT: Ok I did some testing and found the reducing the number of bitmap searches with a sort of auto color makes a huge difference, it finds it instantly...when it works.

    It worked when I adjusted the compass the angles so that the lines where perfectly horizontal and vertical, which is how I took my bitmaps. If makecompass goes to the same angle everytime, I'll get new bitamps at that angle. If not, I'll make a compass function to get the lines horizontal and vertical.

    Now, after adjusting manually, sometimes it didn't work. This is due to minimap shifting, making rectangles look like this:
    ..._____
    ..|..........|
    ..|..........|
    ..|..........|.....................minimap shift here
    .|..........|
    .|..........|
    .|_____|

    Fortunately, there only a few spots where a shift would change the bitmap, so I could make a few more sets of them, like 21 or 28 bitmaps. Although this wouldn't be too bad, especially now that I reduced the number of colors to try, I would prefer a smarter solution. I will settle for making more bitmaps if I have to, but it's like having a whole bunch of 'if this situation, then do that' vs one 'figure it out on your feet' if you know what I mean.

    Eh, I'll think about it tomorrow. Any ideas for getting minimap horizontal and vertical, or a quicker way of solving the shift problem are appreciated.

  12. #12
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    OK I had a think about this last night, and have come up with 2 solutions, both of them seem like a huge pain in the ass for something so simple, so if you have better ideas, please do tell.

    1) I stick with set pixel and bitmaps. However it needs compass to have the lines straight as possible for a hope of working, this requires writing a special compass function, which will probably need a reliable auto wall color. This would be pretty simple to write, but it's just extra hassle. Then, even with the minimap straight, to allow for shifting, I would have to make extra bitmaps, this is a pain too. The good thing about this method is that I've already got a start, and it's a simple setup, new compass first, then 2 repeats.

    2) I drop the bitmaps and setpixels completely and go for FindColorSkipBoxArray, with an analyzing algorithm. I'm thinking this will run faster, but will be more complicated to write than 2 repeats. Also, this will allow for more minimap distortion, and won't need an extra compass function. It will need however, more complicated looping, plus the analyzing. Bear with me, I thought of this while laying in bed last night: it will work by first finding the door color as before, then looking for it with FindColorSkipBoxArray, once it finds the color, it expands a box around it, until it doesn't find the color in the pixels around it. This creates a box that contains the door with at least 1 pixel of non-door-color buffer around it. This box is added to the skip array, and this is repeated until it has a bunch of boxes with a door in each one, that part isn't so bad. Then it will look at the distances and angles between them, to figure out which is which. Figuring out how it decides this so that it works every time will be a pain in the ass like fine tuning a DTM.


    I'm leaning towards 2 because I know how to do more of it than 1, although a straight line compass with auto wall color would be useful for other stuff. What do you think?

  13. #13
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Ill test in a while and tell how it goes.

  14. #14
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I made a modified compass before that made the lines straight. Pretty much what I did was search for the DTM of a straight horizontal or vertical line.

    With the DTM you can set the color tolerance to like 50 so you don't need an exact wall color. (AutoWallColor should be very easy, though)

    I wrote it not be EXACTLY accurate by allowing the spots on the DTM to have a small amount of area tolerance.

    This is old, conflicts with SRL, and almost certainly doesn't work now, but I'll put it here so you can look at it.

    Code:
    procedure MakeCompass(Direction: string; Straight:boolean);
    var
      StraightMM:integer;
      myAngle, rsAngle: Extended;
    begin
      ActivateClient;
      case LowerCase(Direction) of
        'n': myAngle:= 360;
        'e': myAngle:= 270;
        's': myAngle:= 180;
        'w': myAngle:= 90;
      end;
      rsAngle:= DetectRS2MinimapCompassAngle;
      if(rsAngle = -1)then
      begin
        WriteLn('Could not find angle');
        Exit;
      end;
      If (Straight) then
      begin
        StraightMM := DTMFromString('78DA63AC616260A8604001CF5EBC669003D28' +
           'C40FC1F0818EBF0AB0101C606FC6AC0B809BF1A2610DD825F0D33' +
           '886EC3AF86058801A9841AFF');
        rsAngle:= Abs(-rsAngle div Pi * 180);
        if (FindDTM(StraightMM,x,y,515,1,760,160))then begin
          WriteIt('Found Straight Line');
          FreeDTM(StraightMM);
          Exit;
        end;
        if AngleDistance(myAngle, rsAngle) then
        begin
          repeat
            Wait(10+random(50));
            KeyDown(VK_RIGHT);
            Wait(3+Random(4));
            KeyUp(VK_RIGHT);
            rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
          until (FindDTM(StraightMM,x,y,515,1,760,160)) or(rsAngle <= myAngle - 15)or(rsAngle >= myAngle + 15);
          If Not(FindDTM(StraightMM,x,y,515,1,760,160)) then
          begin
            FreeDTM(StraightMM);
            MakeCompass(Direction,True);
          end else
          begin
            WriteIt('Found Straight Line');
            FreeDTM(StraightMM);
            Exit;
          end;
        end else
        begin
          repeat
            Wait(10+random(50));
            KeyDown(VK_LEFT);
            Wait(3+random(4));
            KeyUp(VK_LEFT);
            rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
          until (FindDTM(StraightMM,x,y,515,1,760,160)) or(rsAngle <= myAngle - 15)or(rsAngle >= myAngle + 15);
          If Not(FindDTM(StraightMM,x,y,515,1,760,160)) then
          begin
            FreeDTM(StraightMM);
            MakeCompass(Direction,True);
          end else
          begin
            WriteIt('Found Straight Line');
            FreeDTM(StraightMM);
            Exit;
          end;
        end;
      end else
      begin
        rsAngle:= Abs(-rsAngle div Pi * 180);
        if (rsAngle >= myAngle - 5)and(rsAngle <= myAngle + 5)then
            Exit;
        if AngleDistance(myAngle, rsAngle) then
        begin
          KeyDown(VK_RIGHT);
          repeat
            Wait(15);
            rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
          until (rsAngle >= myAngle - 5)and(rsAngle <= myAngle + 5);
          KeyUp(VK_RIGHT);
        end else
        begin
          KeyDown(VK_LEFT);
          repeat
            Wait(15);
            rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
          until (rsAngle >= myAngle - 5)and(rsAngle <= myAngle + 5);
          KeyUp(VK_LEFT);
        end;
      end;
    end;

  15. #15
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks. I think I will go for 2 though, as it handle more imperfection and I will set it up so that it can be used for anything, like the diagonal door to diango's shop. I'll have a function that returns the array of boxes/doors, and then the analyzing function will use it in paramaters.

  16. #16
    Join Date
    Nov 2006
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    turn it into a lumby spinner for flax...everyone will love you ;D

  17. #17
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmmm
    I get this error
    File access error
    File access error
    File access error
    File access error
    [Runtime Error] : Exception: Access violation at address 0064C975 in module 'scar.exe'. Read of address 00000004 in line 89 in script D:\Program Files\SCAR 2.03\includes\srl\srl\core\Setup.scar
    don't know if windows Vista has anything to do with it.
    Current Scripts:
    http://www.fenjer.com/adnan/SRL/16/100/AutoLogin.pnghttp://villu-reborn.com/showthread.php?t=5219

    Currently Working on:
    http://www.fenjer.com/adnan/SRL/9/5/air%20crafter.png

    Join the rebellion call kaitneiks, cakemix.(just thought i'd add this, soo many good memories)

  18. #18
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    simba I probably will add that, but doors first lol

    joey does that happen with other scripts or just mine?

  19. #19
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    um... Let me Check my autologin
    Current Scripts:
    http://www.fenjer.com/adnan/SRL/16/100/AutoLogin.pnghttp://villu-reborn.com/showthread.php?t=5219

    Currently Working on:
    http://www.fenjer.com/adnan/SRL/9/5/air%20crafter.png

    Join the rebellion call kaitneiks, cakemix.(just thought i'd add this, soo many good memories)

  20. #20
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    no an srl script, like wizzys powerminer or something

  21. #21
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    God why does Vista require to download Java, actually i think its IE7
    Current Scripts:
    http://www.fenjer.com/adnan/SRL/16/100/AutoLogin.pnghttp://villu-reborn.com/showthread.php?t=5219

    Currently Working on:
    http://www.fenjer.com/adnan/SRL/9/5/air%20crafter.png

    Join the rebellion call kaitneiks, cakemix.(just thought i'd add this, soo many good memories)

  22. #22
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    no an srl script, like wizzys powerminer or something
    Ok, ill use DaWu's Pro Autofighter.
    Current Scripts:
    http://www.fenjer.com/adnan/SRL/16/100/AutoLogin.pnghttp://villu-reborn.com/showthread.php?t=5219

    Currently Working on:
    http://www.fenjer.com/adnan/SRL/9/5/air%20crafter.png

    Join the rebellion call kaitneiks, cakemix.(just thought i'd add this, soo many good memories)

  23. #23
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK, I checked DaWu's autofighter pro 2.0, its legde and works so it's just your script that gets stuck oddly enough.
    Current Scripts:
    http://www.fenjer.com/adnan/SRL/16/100/AutoLogin.pnghttp://villu-reborn.com/showthread.php?t=5219

    Currently Working on:
    http://www.fenjer.com/adnan/SRL/9/5/air%20crafter.png

    Join the rebellion call kaitneiks, cakemix.(just thought i'd add this, soo many good memories)

  24. #24
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    K I'll try to look into it, although I have no idea why this would happen.

  25. #25
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Worked well, tried it on eleven worlds with 4 different characters so all up tested 14 times, every time it found the door.. so im guessing Worked well.. Hey mate anytime you want anything tested give us a yell

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Lumbridge...
    By Nadeem in forum OSR Help
    Replies: 12
    Last Post: 03-04-2009, 01:01 AM
  2. 10% done lumbridge miner
    By RudeBoiAlex in forum Research & Development Lounge
    Replies: 19
    Last Post: 09-03-2007, 01:06 PM
  3. Lumbridge to Draynor?
    By TravisV10 in forum Discussions & Debates
    Replies: 0
    Last Post: 08-27-2007, 11:23 AM

Posting Permissions

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