Results 1 to 7 of 7

Thread: Yeah, me again...

  1. #1
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default Yeah, me again...

    Issue:

    1. The Script doesn't compile, i get the SRL error: [Runtime Error] : Exception: in line 58 in script C:\Program Files\SCAR 3.14\includes\SRL/SRL/Core/Math.scar. SOLVED! Thanks Runescapian!

    2. When the script is run, it makes it to the river, then it stops there. It can't find the fishing mole. Can someone PLEASE show me how to make a working fishing spot finder... PLEASE!?

    and here is my script: DO NOT COPY!

    SCAR Code:
    {/|============================================================================================|\\
    //|============================================================================================|\\
    //                                                                                              \\
    //                                                                                              \\
    //                                                                                              \\
    //           ####      ###           ##        ###            ###       ##                      \\
    //           #####     ###         ######       ###          ###      ######                    \\
    //           ### ###   ###        ###  ###       ###        ###      ###  ###                   \\
    //           ###  ###  ###       ###    ###       ###      ###      ###    ###                  \\
    //           ###   ### ###      ############       ###    ###      ############                 \\
    //           ###    ######     ###        ###       ###  ###      ###        ###                \\
    //           ###     #####    ####        ####       ######      ####        ####               \\
    //           @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@               \\
    //                                                                                              \\
    //                                                                                              \\
    //                                                                                              \\
    //                                                                                              \\
    //|============================================================================================|\\
    //|============================================================================================|\\
    //                                                                                              \\
    //                                                                                              \\
    //                ######    ###   ###    #########    ###          ###########                  \\
    //               ####       ###   ###    #########    ###          ###     ###                  \\
    //              ####        ###   ###       ###       ###          ###     ###                  \\
    //               #######    #########       ###       ###          ###     ###                  \\
    //                  ####    #########       ###       ###          ###     ###                  \\
    //                 ####     ###   ###    #########    #########    ###     ###                  \\
    //              ######      ###   ###    #########    #########    ###########                  \\
    //                                                                                              \\
    //                                                                                              \\
    //              ________  ________    ______   ___   ___  ________  __________                 \\
    //              ########  ########    ######   ###   ###  #######   |   ____  \                   \\
    //              ###       ########   ####      ###   ###  ###       |  |   /  |                   \\
    //              ######      ###     ####       ###   ###  ###       |  |__/  /                    \\
    //              ###         ###      #######   #########  ######    |   ___  |                    \\
    //              ###         ###         ####   #########  ###       |  |   \  \                   \\
    //              ###       ########     ####    ###   ###  ###       |  |    \  \                  \\
    //              ###       ########  ######     ###   ###  ########  |__|     \__\                 \\
    //                                                                                              \\
    //                                                                                              \\
    //|============================================================================================|\\
    //|============================================================================================|\\
    //                                           -------------                                      \\
    //                                           |DESCRIPTION|                                      \\
    //                                           -------------                                      \\
    //                                                                                              \\
    //       This is a script created by a newbie from SRL-Forums. B                                                        \\
    //                                                                                              \\
    //         Thank You too:                                                                       \\
    //         XxXx Toxin XxXx <3 you man, one of my best friends!                                  \\
    //         Hermpie                                                                              \\
    //         Mixter                                                                               \\
    //         Any SRL Members who helped me!                                                       \\
    //                                                                                              \\
    //|============================================================================================|\\
    //|============================================================================================|\}


    program ShiloFisher;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\Skill\Fishing.scar}

    const

    RunDirect = 'N';         // Run Direction incase of Fighting Randoms
    FirHovSk  = 'Fishing';   // First Skill to Hover Over
    SecHovSk  = 'Cooking';   // Second Skill to Hover Over

    TMaxTime  = 200;         // The maximum amount of time to fish total (Minutes).
    TMaxLoads = 20;          // The maximum amount of Loads to Bank or Drop.

    SRL_ID   = '4782';      // Your SRL ID
    SRL_PASS = '307007';    // Your SRL Password

    MSpeed   = 15;          // Mouse Speed

    HideScar = 'Ventrillo'; // This is what you want scar to disguise itself as.

    FishColor = 15452332;  //Do not change these unless you
    BankerColor = 6908530; //are having errors with either.
    var
      LoadsCorB: Integer;
      TRunTime: Integer;
      Feather, Salmon, FlyFishingRod, Trout, Bridge: Integer;
      Fish1, Fish2, Fish3: integer;
      x, y: Integer;
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;              {Change if adding more Players, see below}
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name           := ''; {Your RuneScape Username}
      Players[0].Pass           := ''; {Your Password}
      Players[0].Nick           := '';     {3-4 letters of your RuneScape username NON-CAPITALIZED!}
      Players[0].Pin            := '0000';     {Enter Your Bank Pin here, '0000' used for no Bank Pin}
      Players[0].Active         := True;       {Use this Player? True for YES, False for NO}
      Players[0].booleans[0]    := false;      {Make True if Banking}

    {==================== Use MultiPlayer? ====================}
    {         Fill out the following form, delete all //       }
    {         at the beginning of each line. Also, for         }
    {         more than one extra player, make sure the        }
    {         numbers are in consecutive order. (1,2,3...)     }
    {==========================================================}

    //  Players[1].Name           := 'username'; {Your RuneScape Username}
    //  Players[1].Pass           := 'password'; {Your Password}
    //  Players[1].Nick           := 'nick';     {Four letters of your RuneScape username NON-CAPITALIZED!}
    //  Players[1].Pin            := '0000';     {Enter Your Bank Pin here, '0000' used for no Bank Pin}
    //  Players[1].Active         := True;       {Use this Player? True for YES, False for NO}
    //  Players[0].booleans[0]    := True;      {Make True if Banking}

    end;

    {*******************************************************************************
    procedure DeclareDTMs;
    By: Nava2
    Description: Declares DTMs useful for this script.
    *******************************************************************************}


    procedure DeclareDTMs;
    begin

      Feather:= DTMFromString('78DA6314616060106740010777EC00D38C503' +
           'E23480D3F031A604455230F240408A89106129204D480EC5121A0' +
           '06648F14117609106197287E3500317E03A6');

      Salmon:= DTMFromString('78DA6314616060106740013BCB32C1342394C' +
           'FC80D241418D00023AA1A3620214F400D27909020A046104808A3' +
           'AAC873B34355230A24040898230D247808A801B99783083584CC5' +
           '10212FC44982348408D0411E1038A2F39FC6A00041504D1');

      FlyFishingRod:= DTMFromString('78DA63146160600061241060C309A619A17C4' +
           '61920C1C980061851D5C801091E026A4481840C0135FC40428980' +
           '1A2E202147400DC82DE204D40802097E026A24089B0300C3CA022' +
           '3');

      Trout:= DTMFromString('78DA6314616060106240019B972F07D38C503' +
           'E231B90906240038CA86A0480043F013520BB3808A8910412DC04' +
           'D4C803091622D4701150A300247808A89100122204D4880209092' +
           '2C2471A5585818202AA1A4E202143C01C3E202140400DC8DFC2F8' +
           'D5000037FC049B')
           
      Bridge:= DTMFromString('78DA6314626060E06300034608C590EF6FC4F' +
           '01FCAFF0F048C0A40062BAA9AAF9FDF307021F119158184180135' +
           '2C40828D801A903DE204D4706277338A1A1920C14B400DC8EF420' +
           '4EC120412DCF8D50000C2FB1A51');
           
    end;

    {*******************************************************************************
    procedure FreeDTMs;
    By: Nava2
    Description: Frees all DTMs used for this script.
    *******************************************************************************}


    procedure FreeDTMs;
    begin
      FreeDTM(FlyFishingRod);
      FreeDTM(Trout);
      FreeDTM(Feather);
      FreeDTM(Salmon);
      FreeDTM(Bridge);
    end;

    {*******************************************************************************
    procedure DeclareBmps;
    By: Nava2
    Description: Declares Bitmaps for fishing. (Unused Currently.)
    *******************************************************************************}


    procedure DeclareBmps;
    begin

      Fish1 := BitmapFromString(57, 48, 'beNpjYBgFo2AUjIJRMApGwZA' +
           'A2e1rh5BrS5dfH7Rui2leiSbSPnvdaAKjBLSsu4fM7d14G1PNlE23' +
           'h6jvFu65NxicUbPs0cpzbwfKdk5uXn5BMWYWVqyyc/e+GDzxxcjIC' +
           'CRZ2TgGf9IChurUNSexSu24/G7VkafQDLX5CdYM1YaUp+CptHUlXc' +
           've4tmXiVdMn0IAmEq5eQXYObggKQGlqMcWknDQsHIQVVtT9oMi9NH' +
           'rT0By3cnXxNe5pXOvUt0xi7aeIU/j2uMPhnrtBomIgQLwQoAgwFrt' +
           'jgJcpetoIIyCUTAKRsEoGAWjYBSMglEwCkYcAAAc7UlL');

      Fish2 := BitmapFromString(45, 52, 'beNpjYBgFo2AUjIJRMApGwSg' +
           'YBUMaZFV10c2uqllHRgN8FOAHLctvjPAQWHH4MR7ZjjX3RlRo7Lj8' +
           'jgxddVPXDbjLe+asH0HZdtl1NJEpm26jicQ0r6SijXNPvcYqPmU/K' +
           'IM0rLw+WpZCQOlyLEGBGTs0BQMbHWsO3B9NBqNgFIyCUTAKRsEoGA' +
           'IAAFQGJEc=');

      Fish3 := BitmapFromString(36, 30, 'beNpjYBiEYN3J18jcHZffAcm' +
           'ZR58yDAuw6sjTSdsfwbl9e19gVTZ3/WmGYQqyJxwZis5uWXcPl1Tl' +
           'fKIia+3xB3i4ZIPy6YeJUbb5HHpK23TsGeW2ly6/TueImLLpNsMoo' +
           'B5Ysu8etYzKIi4pLtyDbmPL5GUQRm7nSmRx94RmChMhsu+o6FOsvo' +
           'CA1pUEckR2RfswywJuKY2YgknlnYM85U9euomgmujcNhrZXtC7nkY' +
           'mx7SsGqggjatbPVqiUhFEl3aMBgIDAPXbSco=');
           
    end;


    {*******************************************************************************
    procedure FindRandoms;
    By: Nava2
    Description: (Unsure if Working) Find Normal Randoms and Fights, runs away,
                 and back.
    *******************************************************************************}


    procedure FindRandoms;
    begin
      FindNormalRandoms;
      if FindFight then
        begin
          RunTo(RunDirect, true);
          Wait(15000 + random(5000));
        end;
      if FindWhirlPoolMS then
        begin
          HandleWhirlPool;
        end;
    end;

    {*******************************************************************************
    procedure AntiBan;
    By: Nava2
    Description: Basic AntiBan Functions
    *******************************************************************************}

    procedure AntiBan;
    begin
      case random(50) of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill(FirHovSk, False);
        3: AlmostLogout;
        4: PickUpMouse;
        5: HoverSkill(SecHovSk, False);
      end;
    end;

    {*******************************************************************************
    function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray;
      Tolerance: Integer): Boolean;
    By: Stupid3ooo, Starblaster100 and edit by Hy71194
    Description: Finds Object with custom amount of colors and custom amount of Uptext
    Use: FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5)
    *******************************************************************************}


    function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
    var
      a, b, c, i, x1, y1, x2, y2: Integer;
      Start: Boolean;
    begin
      for b := 0 to (GetArrayLength(Color)-1) do
      begin
        if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
        begin
          Start := True;
          Break;
        end;
      end;
      if(Start)then
      begin
        x1 := 245;
        y1 := 165;
        x2 := 277;
        y2 := 185;
        repeat
          if not(LoggedIn)then break;
          a := a + 1;
          if (a = 1) then
            c := c + 1
          else if (a = 3) then
            c := c + 1;
          for i := 1 to c do
          begin
            if (a = 1) then
            begin
              x1 := x1 + 30;
              x2 := x2 + 30;
            end else
            if (a = 2) then
            begin
              y1 := y1 - 20;
              y2 := y2 - 20;
            end else
            if (a = 3) then
            begin
              x1 := x1 - 30;
              x2 := x2 - 30;
            end else
            if (a = 4) then
            begin
              y1 := y1 + 20;
              y2 := y2 + 20;
            end;
            if (x1 = 485) and (x2 = 517) then
              x2 := x2 - 2;
            if (y1 = 325) and (y2 = 345) then
              y2 := y2 - 7;
            if (x2 > 515) then
              Break;
            for b := 0 to (GetArrayLength(Color)-1) do
            begin
              if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
              begin
                MMouse(cx, cy, 10, 10);
                Wait(5+Random(10));
                if (IsUpTextMultiCustom(Text)) then
                begin
                  Result := True;
                  Exit;
                end;
              end;
            end;
          end;
          if (a = 4) then
            a := 0;
        until (x2 > 515) or (Result = True);
      end;
    end;

    {*******************************************************************************
    Function MMRotated(DTM: Integer):Boolean;
    By: Nava2
    Description: Shortcut for finding rotated DTM in MiniMap.
    *******************************************************************************}


    function MMRotated (DTM: Integer):Boolean;
    begin
      If DTMRotated(DTM,X,Y,MMX1,MMY1,MMX2,MMY2) Then
      Begin
        MouseFlag(X, Y, 0, 0);
        Flag;
        Flag;
        Result:=True;
      End;
    end;

    {*******************************************************************************
    Function FindFishMole(:boolean);
    By: Hermpie
    Description: Looks for FishMole in River when called.
    *******************************************************************************}


    function FindFishMole :boolean;
    var FishSpot: Array of TPointArray;
        FishPoints:TPointArray;
        CTS, I, HX, HY: Integer;
    begin
      CTS := GetColorToleranceSpeed;
      if not (cts = 2) then ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(Hx, Hy, FishPoints, FishColor, MSX1, MSY1, MSX2, MSY2, 15)
      FishSpot:= SplitTPA(FishPoints,10);
      for i := 0 to High(FishSpot) do
      begin
        MiddleTPAEx(FishSpot[i], Hx, Hy);
        MMouse(Hx, Hy, 3, 3);
        Wait(25+random(10));
        Result:=IsUpText('ure');
        if Result then
          begin
            Writeln('Found fish mole.');
            GetMousePos(x,y);
            Mouse(X, Y, 0, 0,False);
            Wait(25+random(10));
            ChooseOption('ure');
          end;
      end;
    end;



    {*******************************************************************************
    Function CheckEquipt(:boolean);
    By: Nava2
    Description: Checks inventory for FlyFishingRod and Feathers. Returns True if
                 Equiptment is found.
    *******************************************************************************}


    function CheckEquipt: Boolean;
    var i: integer;
    begin
      if (not (LoggedIn)) then
        begin
          writeln('ended at CheckFishing');
          exit;
        end;
      i:= 0;
      GameTab(4);
      if FindDTM(FlyFishingRod, x, y, MIX1, MIY1, MIX2, MIY2) then
        i:= i + 1;
      if FindDTM(Feather, x, y, MIX1, MIY1, MIX2, MIY2) then
        i:= i + 2;
      if i=1 then
        begin
          Writeln('Found Fly Rod, Run out of Feathers. Result = False');
          Result:=False;
        end else
      if i=2 then
        begin
          Writeln('Found Feathers, Missing Fly Rod. Result = False');
          Result:=False;
        end else
      if i=3 then
        begin
          Writeln('Found All Necessary Equiptment. Result = True');
          Result:=True;
        end;
    end;

    {*******************************************************************************
    Function CheckFishing:Boolean;
    By: Nava2
    Description: Basic Function which checks that the Fly Rod is out and fishing.
    *******************************************************************************}


    function CheckFishing:Boolean;
    begin
      Wait(2000+random(2000));
      if FindColorSpiralTolerance(x, y, 201757, 227, 131, 290, 168, 10) and FindBlackChatMessage('attempt to catch a fish') then
        begin
          result:= true;
        end else
        begin
          result:= false;
        end;
    end;

    {*******************************************************************************
    Function FindFishingSpots;
    By: Nava2
    Description: If FishRiver=False, then procedure starts, and walks laps up
                 the banks of the river, looking for fish.
    *******************************************************************************}


    procedure FindFishingSpots;
    var  Count: Integer;
    begin
      MakeCompass('E');
      SymbolAccuracy:= 0.5;
      AntiBan;
      FindNormalRandoms;
      if (not (LoggedIn)) then
        begin
          writeln('ended at FindFishingSpots');
          exit;
        end;
      if (FindSymbol(x, y, 'Store')) or (FindSymbol(x, y, 'Furnace')) then
        begin
          Count:= 0;
          AntiBan;
          Writeln('Walking to other side of river, searching for fish.');
          repeat
            RadialWalk(5089685, 190, 170, 30, 10, 10);
            Count:= Count + 1;
            FFlag(5);
            Wait(50+random(50));
          until (MMRotated(Bridge)) or FindFishMole or (Count > 10)
          Count:= 0;
          Wait(50+random(75));
          Mouse(x, y, 6, 6, true);
          AntiBan;
          MakeCompass('W');
          repeat
            RadialWalk(5089449, 340, 10, 20, 10, 10);
            Count:= Count + 1;
            FFlag(5);
            Wait(50+random(60));
          until FindSymbol(x, y, 'Fish') or FindFishMole or (Count > 10)
          Mouse(x, y, 6, 6, true);
          MakeCompass('E');
        end;
      if FindSymbol(x, y, 'Slayer Master') or FindSymbol(x, y, 'Quest') then
        begin
          Count:= 0;
          AntiBan;
          MakeCompass('W');
          Writeln('Walking to other side of river, searching for fish.');
          repeat
            RadialWalk(5089685, 190, 170, 30, 10, 10);
            FFlag(5);
            Count:= Count + 1;
            Wait(50+random(75));
          until (MMRotated(Bridge)) or FindFishMole or (Count > 10)
          Count:= 0;
          Wait(50+random(75));
          Mouse(x, y, 6, 6, true);
          FFlag(0);
          AntiBan;
          MakeCompass('E');
          repeat
            RadialWalk(5089449, 0, 40, 30, 10, 10);
            FFlag(5);
            Count:= Count + 1;
            Wait(50+random(75));
          until FindSymbol(x, y, 'Furnace') or FindFishMole or (Count > 10)
        end;
      SymbolAccuracy:= 0.8;
    end;


    {*******************************************************************************
    Function FishRiver: boolean;
    By: Nava2
    Description: (Not Working) Clicks on Fishing Spot, results true if finds it,
                 False if it cannot.
    *******************************************************************************}


    function FishRiver: Boolean;
    var SearchFSpotTime: integer;
    begin
      if (not (LoggedIn)) then
        begin
         writeln('ended at FishRiver');
         exit;
        end;
      MarkTime(SearchFSpotTime);
      AntiBan;
      FindRandoms;
      if not CheckEquipt then Exit;
      SetAngle(false);
      if not FindFishMole then
      begin
        Writeln('Cannot find Fishing Spot, Searching');
        Wait(500+random(300));
        FindFishingSpots;
      end else
      begin
        FindFishMole;
        Writeln('Found Fishing Spot, Fishing...');
        MakeCompass('W');
        SetAngle(true);
        Result:= True;
      end;
      if (TimeFromMark(SearchFSpotTime)>15000) then
      begin
        Result:= False;
        Writeln('Could not find Fishing Spot, Walking to Different Part of River.');
        FindFishingSpots;
      end;
    end;

    {*******************************************************************************
    procedure WalkToRiver;
    By: Nava2
    Description: Procedure to walk from Bank to River.
    *******************************************************************************}


    procedure WalkToRiver;
    var c: integer;
    begin
      if not(CheckEquipt or LoggedIn) then
       begin
          writeln('ended at WalktoRiver');
          exit;
       end;
      FindRandoms;
      SetAngle(True);
      c:=0;
      repeat
        if (c= 0) then
          begin
            AntiBan;
            FindRandoms;
            FindSymbol(x, y, 'Furnace');
            Wait(100+random(50));
            MMouse(x, y, 5, 5);
            Wait(50+random(25));
            Mouse(x, y, 10, 10, true);
            FFlag(5);
            c:= c + 1;
            Wait(1000+random(500));
            FindSymbol(x, y, 'Fish')
            MMouse(x, y, 6, 6);
            Wait(100 + random(50));
            Mouse(x, y, 4, 4, true);
            writeln('ended at WalktoRiver3');
            FFlag(5);
            FindWaterColor;
          end;
        if (c > 0) then
          begin
            if not (LoggedIn) then NextPlayer(true);
            FindWaterColor;
            FindRandoms;
            AntiBan;
            writeln('ended at WalktoRiver2');
            RadialWalk(WaterColor, 340, 20, 65, 10, 10);
            FFlag(5);
            c:= c + 1
          end;
      until (c > 5) or FishRiver
    end;

    {*******************************************************************************
    procedure DropInv(f,l: integer);
    By: Nava2-Modelled after DropeItem by Hy71194.
    Description: Drops items in slots f-l.
    *******************************************************************************}


    procedure DropInv(f,l: integer);
    var i: integer;
        TMSpeed: integer;
    begin
      if (not (LoggedIn)) then
      begin
      writeln('ended at dropInv');
      exit;
      end;
      TMSpeed:= MouseSpeed;
      MouseSpeed:= 20+random(7);
      GameTab(4);
      if ExistsItem(i) then
        for i:= f to l do
        DropItem(i);
        Writeln('Emptied Out Fish!')
        MouseSpeed:=TMSpeed;
    end;
       
    {*******************************************************************************
    procedure DropInv(f,l: integer);
    By: Nava2-Modelled after DropeItem by Hy71194.
    Description: Banks Trout, Salmon, and random event items.
    *******************************************************************************}


    procedure Bank;
    begin
      if (not LoggedIn) then Exit;
      //if not FindSymbol(x, y, 'Bank') then WalkBank;
      if InvFull then
        AntiBan;
        FindRandoms;
        FindSymbol(x, y, 'Bank');
        MMouse(x, y, 4, 4);
        Wait(40+random(25));
        Mouse(x, y, 4, 4, true);
        FFlag(0);
        AntiBan
        FindColorSpiralTolerance(x, y, BankerColor, MSX1, MSY1, MSX2, MSY2, 10);
        MMouse(x, y, 4, 4);
        Wait(40+random(25));
        Mouse(x, y, 4, 4, false);
        Wait(30+random(40));
        ChooseOption('ank');
        Wait(500+random(300));
        if BankScreen then
        begin
          InPin(Players[CurrentPlayer].Pin);
          Wait(1000+random(1000));
          Deposit(3, 28, True);
          Wait(800+random(800));
          Deposit(3, 28, True);  //Apparently it buggers up sometimes..
          CloseBank;
          LoadsCorB:= LoadsCorB + 1;
        end;
    end;
     
     

         
    {*******************************************************************************
    procedure PowerFish;
    By: Nava2
    Description: Runs PowerFish function, fishs and drops.
    *******************************************************************************}


    procedure PowerFish;
    begin
      if (not (LoggedIn)) then
      begin
       writeln('ended at PowerFish');
       exit;
      end;
      //if not CheckEquipt then exit;
      begin
        WalkToRiver;
        SetRun(true);
        MakeCompass('W');
        writeln('ended at PowerFish2');
          repeat
          if not (LoggedIn) then exit;
            begin
              AntiBan;
              FindRandoms;
              FishRiver;
              Wait(4000+ random(2000));
              CheckFishing;
              writeln('ended at PowerFish3');
              if (not CheckFishing) then
                begin
                FishRiver;
                writeln('ended at PowerFish4');
                end;
              if (InvFull) then
              begin
                DropInv(3, 28);
                writeln('ended at PowerFish5');
                LoadsCorB:= LoadsCorB + 1;
              end;
            end;
          until ((TimeFromMark(TRunTime)>TMaxTime*60000) or (LoadsCorB > TMaxLoads))
         Exit;
      end;
    end;

    {*******************************************************************************
    procedure BankFish;
    By: Nava2
    Description: Runs BankFish function, catchs and banks.
    *******************************************************************************}


    procedure BankFish;
    begin
      if (not (LoggedIn)) then
      begin
       writeln('ended at BankFish');
       exit;
      end;
      if not CheckEquipt then exit;
      begin
        repeat
        WalkToRiver;
        MakeCompass('W');
          repeat
          if not (LoggedIn) then exit;
            begin
              AntiBan;
              FindRandoms;
              FishRiver;
              writeln('ended at BankFish2');
              Wait(4000+ random(2000));
              if (not CheckFishing) then FishRiver;
            end;
            writeln('ended at BankFish3');
          until (InvFull or (TimeFromMark(TRunTime)>TMaxTime*60000))
        Bank;
        until ((LoadsCorB > TMaxLoads) or (TimeFromMark(TRunTime)>TMaxTime*60000))
        Exit;
      end;
    end;

    {*******************************************************************************
    procedure Welcome;
    By: Nava2
    Description:
    *******************************************************************************}


    procedure Welcome;
    begin
       ClearDebug;
       Writeln('                          ==================================================')
       Writeln('                          ||                                              ||')
       Writeln('                          ||          Welcome To My Shilo Fisher          ||')
       Writeln('                          ||                 Created By                   ||')
       Writeln('                          ||                   Nava2!                     ||')
       Writeln('                          ||                                              ||')
       Writeln('                          ==================================================')
    end;

    {*******************************************************************************
    procedure SetupBasics;
    By: Nava2
    Description: Sets up Basics needed functions for script, SRL Stats, HideScar,
                 etc.
    *******************************************************************************}


    procedure SetupBasics;
    begin
      SetupSRL;
      Disguise(HideScar);
      SRLID         :=  SRL_ID;
      SRLPASSWORD   :=  SRL_PASS;
      MouseSpeed    :=  MSpeed + Random(5);
      DeclarePlayers;
      DeclareDTMs;
    end;

    {*******************************************************************************
    procedure MainLoop;
    By: Nava2
    Description: General Scipt
    *******************************************************************************}


    procedure MainLoop;
    begin
      MarkTime(TRunTime);
      Welcome;
      AntiBan;
      writeln('ended at MainLoop1');
      Wait(2000 + random(1000));
      if (Players[CurrentPlayer].Booleans[0] = False) then
        begin
          PowerFish;
          writeln('ended at MainLoop2');
        end;
      if (Players[CurrentPlayer].Booleans[0] = True) then
        begin
          BankFish;
          writeln('ended at MainLoop3');
        end;
      FreeDTMs;
      writeln('ended at MainLoop4');
      //FreeBmps; //Unused atm... no need for Bmps with DTMs ;)
    end;

    {*******************************************************************************
    procedure Main Function;
    By: Nava2
    Description: Runs Script
    *******************************************************************************}


    begin
      SetupBasics;
      ActivateClient;
      Wait(1000+random(500));
      LoginPlayer;
      Wait(500+random(500));
      writeln('ended at MainFunc1');
      if(not (LoggedIn)) then NextPlayer(false);
      Mainloop;
    end.

    Any help?

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  2. #2
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I sometimes get that when I don't set a nick. Did you set one before running it? Probably not, but, I tried

    One very minor thing - in your DeclarePlayers, where you have the second player (Players[1]), the boolean is set for player[0].

    The script looks like complete ownage otherwise, nice

    EDIT: @below, no, it was my 998th

  3. #3
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Runescapian View Post
    I sometimes get that when I don't set a nick. Did you set one before running it? Probably not, but, I tried

    One very minor thing - in your DeclarePlayers, where you have the second player (Players[1]), the boolean is set for player[0].

    The script looks like complete ownage otherwise, nice
    I'm hoping to get members with this script

    Which error was that for? I just changed the Player form, thanks.
    Any idea where one of my failsafes is killing the script?

    Put in User and Pass, compiled .

    Also made a poor bank procedure

    *edit* that was your 1000th post I think...

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  4. #4
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Does the script just say "Successfully executed" in the debug box, or does your player log out? Either way, try debugging the script during runtime by making writelns that say how far the script is along. I have a feeling the problem occurs when selecting whether to powerfish or bankfish, but I'm not positive.
    :-)

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Method View Post
    Does the script just say "Successfully executed" in the debug box, or does your player log out? Either way, try debugging the script during runtime by making writelns that say how far the script is along. I have a feeling the problem occurs when selecting whether to powerfish or bankfish, but I'm not positive.
    Yeah, thats what the dumb looking writelns are. It 'Successfully Executed' after it logs in. No writeln's except for the welcome.

    I think I will try the debug, but I haven't even tried the banking, fishing, or walking procedure....

    Thanks for the advice, I will give it a try.

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    Function FindFishMole(:boolean);
    By: Nava2
    Description: Looks for FishMole in River when called.
    *******************************************************************************}

     
    function FindFishMole :boolean;
    var FishSpot: Array of TPointArray;
        FishPoints:TPointArray;
        CTS, I, HX, HY: Integer;
    begin
      CTS := GetColorToleranceSpeed;
      if not (cts = 2) then ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(Hx, Hy, FishPoints, FishColor, MSX1, MSY1, MSX2, MSY2, 15)
      FishSpot:= SplitTPA(FishPoints,10);
      for i := 0 to High(FishSpot) do
      begin
        MiddleTPAEx(FishSpot[i], Hx, Hy);
        MMouse(Hx, Hy, 3, 3);
        Wait(25+random(10));
        Result:=IsUpText('ure');
        if Result then
          begin
            Writeln('Found fish mole.');
            GetMousePos(x,y);
            Mouse(X, Y, 0, 0,False);
            Wait(25+random(10));
            ChooseOption('ure');
          end;
      end;
    end;
    Cough
    ~Hermen

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Hermpie View Post
    SCAR Code:
    {*******************************************************************************
    Function FindFishMole(:boolean);
    By: Nava2
    Description: Looks for FishMole in River when called.
    *******************************************************************************}

     
    function FindFishMole :boolean;
    var FishSpot: Array of TPointArray;
        FishPoints:TPointArray;
        CTS, I, HX, HY: Integer;
    begin
      CTS := GetColorToleranceSpeed;
      if not (cts = 2) then ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(Hx, Hy, FishPoints, FishColor, MSX1, MSY1, MSX2, MSY2, 15)
      FishSpot:= SplitTPA(FishPoints,10);
      for i := 0 to High(FishSpot) do
      begin
        MiddleTPAEx(FishSpot[i], Hx, Hy);
        MMouse(Hx, Hy, 3, 3);
        Wait(25+random(10));
        Result:=IsUpText('ure');
        if Result then
          begin
            Writeln('Found fish mole.');
            GetMousePos(x,y);
            Mouse(X, Y, 0, 0,False);
            Wait(25+random(10));
            ChooseOption('ure');
          end;
      end;
    end;
    Cough
    I edited... I will repost.

    If anyone will test this out, I would appreciate it. There is an error and it can't get past WalkToRiver it seems...

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Umm, yeah.
    By Pwnd in forum Blogs and Writing
    Replies: 130
    Last Post: 07-25-2008, 11:43 AM
  2. yeah i know, im stupid
    By squnky in forum Graphics and Multimedia
    Replies: 5
    Last Post: 02-02-2008, 05:23 PM
  3. Hey! Hey you! Yeah You! Read this!
    By DaBomber2 in forum Who Are You ? Who ? Who ?
    Replies: 0
    Last Post: 12-31-2007, 08:45 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
  •