Results 1 to 5 of 5

Thread: Help with Net Fishing Script

  1. #1
    Join Date
    Jan 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with Net Fishing Script

    Well I just started like this week and have read I'm guessing 10-15 tutorials. So I wanted to start making a net fisher script. I just want your opinions on what I'm doing right or wrong. This script isn't even close to done but I want to see how I'm doing. Ty

    P.S. I'm guessing I'm not doing at all well. Even though I know most of the basics I'm having a lot of trouble putting it together into a working script.
    SCAR Code:
    program AutoFisher;
    {.include SRL/SRL.scar}
    const
      FishingSpotColor = 13937293; //Set the color of the specs on a fishing spot.
      LoadsPerPlayer = 15;
    procedure DeclarePlayers;
    begin

      HowManyPlayers  :=1; // Must match number of players in the array
      NumberOfPlayers(HowManyPlayers);

      Players[0].Name := 'wsxdrfv50';
      Players[0].Pass := 'werdxcv';
      Players[0].Nick := 'xdr';
      Players[0].Active := True;

    end;

    procedure Drop;
    var Logs,x,y:integer;
    begin
    Logs := DTMFromString('78DA637462626078C28002AAE3AC18FE03694' +
           '620FE0F048C1E40353719D000231209A4AD806AEE1050630C54F3' +
           '9A809A004CF760A87101AA7947408D0D50CD47FC6A00AFAD0E3F');

        if(FindDTM(Logs,x,y,MIX1,MIY1,MIX2,MIY2))then
        begin
          Mouse(x,y,5,5,False);
            if(ClickOption('rop',2))then
            begin
              wait(1000+random(500));
              Writeln('Dropped');
            end
        end
    end;

    procedure Fish;
    var x,y,ChatChars:integer;
    begin
    repeat
    if not LoggedIn then exit;
    if FindObjCustom(x,y,['Net,t is,ish'],[FishingSpotColor],10) then
    begin
    Mouse(x,y,5,5,true);
    end;
    until GetTextAtEx(96, 387, 0, ChatChars, False, False, 0, 0, -1, 20, True, tr_NormalChars)
    = 'You cast out your net...';
    end;

    begin
      SetupSRL;
      DeclarePlayers
      ActivateClient;
      if Loggedin then Logout;
      LoginPlayer;
      repeat
        if InvFull then
        begin
          Drop;
          Inc(Players[CurrentPlayer].Banked);
          if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
          begin
            NextPlayer(True);
          end;
        end;
        if not Loggedin then NextPlayer(False);
      until false
    end.

    Well no errors but won't fish. Any suggestions?
    Oh also attached it.

  2. #2
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    That is pretty good for a first script but i can point out a few errors.

    The second last line should be false and not fals.
    Try searching tutorial island for standards, as they will get you good remarks and it makes scripts easier to read.
    Other than that, it is a good script for a beginner.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  3. #3
    Join Date
    Jan 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    TY I will fix that. I'm also having this error .
    Line 20: [Error] (12647:60): Type mismatch in script C:\Program Files\SCAR 3.11\Scripts\NetFisherl.scar TY again and I will be gone a few days.

  4. #4
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    The line 20 error is because you need to put FishingSpotColor into square brackets ( '[ ]' ) so it recognises it as a TStringInteger and not just an integer. (This if for the FindObjCustom' at line 20)

  5. #5
    Join Date
    Jan 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    TY very much. Well now all i need is some advice to what to do next. Oh and I have another error.

    Line 24: [Error] (12651:31): Unknown identifier 'ChatChars' in script C:\Program Files\SCAR 3.13\Scripts\NetFisherl.scar

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 04-16-2009, 06:40 AM
  2. Help with Fishing Script
    By joelster134 in forum OSR Help
    Replies: 4
    Last Post: 10-04-2008, 11:24 PM
  3. Fishing Script
    By jamesreece in forum OSR Help
    Replies: 12
    Last Post: 03-14-2008, 08:58 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
  •