Results 1 to 7 of 7

Thread: ProjectRS06 Lobster fish

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default ProjectRS06 Lobster fish

    Hi guys, I've made the script for an RSPS which is why I don't use uptext and such since I found this too be easier (got uptext to work, but sometimes the text changes size which is glitchy so it wasn't reliable)
    Anyway I'm having multiple errors. I went through the script and cleaned it up. The script is stuck on the function.
    Simba Code:
    program PRS06_Lobster;
    {$define srl5}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    var
    full:boolean;
    Lobster, DropLobster, Cage:Integer;

    Procedure DeclareBits; //For Bitmaps Dependancies
    begin
    Lobster := BitmapFromString(15, 12, 'meJxlkc8HwnAYxrc/oMMYY2SNSY' +
            'ekRGIaFStNP9RUdOjQJTpEhw6jQ4eIiA6d+md7vnvmNcVjvt7v5/u' +
            '+z/tM1zRd03rjpT+KIZyL3ZNhmMUwcaObN3uiUirVITBWewfp6ROo' +
            '4LQBk3dGV3f6IAwSUlf9M2VUhhAripzcpTNhVYxuqKOV2dzIW7b9h' +
            '73Fy4vfdudg+/tfOH7nYcuy6daoThRMS2FS8AIa1nMJ8CG+VmtLPy' +
            'AhuMoLAGDGgrMzuKiNFq/y+sNBZmOFDhhnB8d8gBk8fZAEhmURKRZ' +
            'hkuJc/YgwEXtmbZ41JJluIW5Jih8ZLcsK8EOCURmSTDHYQ4xkvnfP' +
            'ajk=');


    DropLobster := BitmapFromString(104, 5, 'meJy9VEkOgDAI7NO8+QGv/skfY5' +
            'VIJqw1jRIOdNoMdKAluqy1tm47PdZuE4SXHHcwwdGXg8SFUHBGOFa' +
            '4u1S0jJdUCKrzYhYvmbuT0Q3v6O4mcaJbtGVF4CJf6VbGbmqXczBL' +
            'rsC8bnnTbUmupPO6IU856m5n/9dNNT2/IEr9kW45T/SiFe7+ZshPY' +
            'OqkxQcLi4ZKdbaktb+BO7oljlvRyKnsJzkul7o=');

    Cage := BitmapFromString(116, 8, 'meJy9lFESgzAIRLldL9Df3v8Yqd' +
            'ox3S4Lkqhl/MisG0ieYGtrmNnj+br7saWQq/URJzYW9/7zoXO2mG2' +
            'DOKNzaQfEtvCebpMi7c08gR550DaUk8SIbdeXQFyjuvysHqY0CG5b' +
            'dvLzvZTH9pNJvAd13d6SvnM47NvuGV0nIyPFrB/gLnT3UU9xpip5k' +
            'vz1vq3wxA8xx7aPueyHC9cC76V1ESMuJvoTkUqwdbb38czZXlvXjz' +
            '9ikf+Euj7BFgfT4DAn7+jT6oNFdZ3Or5QuJoIu/huk+/9J5CdDIuY' +
            'V59bftHHfyrqILocj9TcfiHdB');
    end;
    Procedure RiverTroll;   //Not sure if works let me know in the thread please :)
     var
     x, y:Integer;
     begin
     If FindcolorTolerance(x, y, 7966560, 0, 0, 511, 334, 5) then
     writeln('Found Trollarch :D');
     Mouse(584, 61, 5, 5, true);
     writeln('clicked Away from Trollarch');
     wait(15000 + random (1000));
     Mouse(636, 474, 10, 10, true);
     Wait(100);
     Mouse(639, 346, 3, 40, true);
     wait(10);
     WriteLn('River Troll Detected! -logging out');
    end;
     Function IsFishing: Boolean;  //To find if fishing
      var
        PBox: TBox;
      begin
        PBox := IntToBox(245, 130, 285, 195);
        Result := (AveragePixelShift(PBox, 250, 500) > 400);
        Writeln('Checking if we are Fishing');
      end;

    Procedure FindFishingSpot;
      var
        tmpCTS, i, l, r, x, y:integer;
        FishTPA:TPointArray;
      Begin
        While IsFishing Do Wait (200+random(50));
      tmpCTS := GetToleranceSpeed;
        SetColorToleranceSpeed(2);
          SetToleranceSpeed2Modifiers(0.38, 0.87);
            FindColorSpiralTolerance(x, y, 15647904, 3, 2, 514, 336, 4);
              SetColorToleranceSpeed(tmpCTS);
                SetToleranceSpeed2Modifiers(0.02, 0.02);

                L:=High(FishTPA);
              for i:= 0 to L do
              begin
              r := random(L);
              Wait(randomrange(63,202));
              mmouse(FishTPA[r].x, FishTPA[r].y,2,2);
                end;
                end;
    Procedure StartFishing;
      Var
        x, y: Integer;
      Begin
      If IsFishing then
      Begin
      Writeln('we are currently fishing Lobsters');
      repeat
      wait(randomrange(250,263));
      until(not(IsFishing));
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, false);
            If not FindBitmap(Cage, x, y) then
            begin
            FindFishingSpot;
            end else
            begin
            Mouse(x, y, 0, 0, true);

      end;
      end;
      end;


     Procedure DropInventory;
    var
    x, y, x2, y2:Integer;
    Begin;
    Full := True
    repeat
    If (FindBitmapToleranceIn(Lobster, x, y, 546, 184, 753, 453, 15)) then
    begin
    wait(10);
    Mouse(x, y, 3, 3, False);
    wait(10);
    if FindBitmapToleranceIn(DropLobster, x2, y2, 546, 184, 753, 453, 15)then
    wait(20);
    MMouse(x, y, 0, 0);
    Mouse(x2, y2, 50, 3, True);
    wait(1000 + Random(100));
    end else
    begin
    Full := False
    DeclareBits;
    FindFishingSpot;
    end;
    until(Full = False)
    end;

    Procedure CheckFull;
    var
    x, y:Integer;
    Begin
    repeat
    DeclareBits;
    If (FindBitmapToleranceIn(Lobster, x, y, 690, 405, 737, 444, 15)) then
    begin
    Full := True
    DropInventory;
    end else;
    begin
    Full := True
    DropInventory;
    end;
    wait(10000 + Random(1000));
    until(Full = True)
    end;
    Procedure Randoms;
    begin
    If(Full = False) then
    repeat
    Rivertroll;
    Wait (10 + random(7000));
    until(Full = True)
    end;
    begin
     ClearDebug;
     SetupSRL;
     While IsFishing Do Wait(200+Random(50));
     StartFishing;
     CheckFull;
     Randoms;
     FreeBitmap(Lobster);
     FreeBitmap(DropLobster);
     FreeBitmap(Cage);
    end.

    Script keeps on repeating my Writeln " Writeln('Checking if we are Fishing');" Anyone advise me on how to rewrite? Thank you so much

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    So it does not do any of the procedures? And if im not mistaken I think if you add that Writeln in the function it will always show it

  3. #3
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    So it does not do any of the procedures? And if im not mistaken I think if you add that Writeln in the function it will always show it
    Yeah it pretty much just keeps doing the Writeln, I removed it and made one at the beginning of what should be the next procedure it does from the mainloop and it just stalls doesn't print that in the debug box. I dunno my original script works but it's not clean and its not too accurate sometimes.

  4. #4
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Bumping the thread been multiple hours.

  5. #5
    Join Date
    Dec 2012
    Posts
    87
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    If that's my river troll detection then you should know that it will log out if anyone gets one not just you. I can't run simba right now so if you could elaborate on your errors I can try to help.

    You are also better off trying to just bank the lobs as the bank is so close. Perhaps use find symbol method, I think someone posted an explanation in the shrimp cooker thread.
    Last edited by Pew; 01-12-2013 at 09:49 AM.

  6. #6
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by Pew View Post
    If that's my river troll detection then you should know that it will log out if anyone gets one not just you. I can't run simba right now so if you could elaborate on your errors I can try to help.

    You are also better off trying to just bank the lobs as the bank is so close. Perhaps use find symbol method, I think someone posted an explanation in the shrimp cooker thread.
    Yep it is your detection, I was going to put credit when i made the official thread for the script. I'll check that thread out after work.

  7. #7
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Just going to bump here hopefully for a reply
    Thanks

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
  •