Results 1 to 3 of 3

Thread: Script help/suggestions

  1. #1
    Join Date
    Dec 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Script help/suggestions

    I'm making an auto-fisher and it's slowly but surely coming together. I am having a few errors and I hope that you could help me with making the script more efficient, or help me with some errors I am having. The script used to find the fishing spot then start fishing, but now it doesn't. Also, it is not finding the range and stop in the middle of walking to go to the range. Any help would be appreciated.

    SCAR Code:
    {.Script Info:
    # ScriptName  = UberJesus's MegaFisher
    # Author      = UberJesus
    # Description = Fisher that fishes/cooks & banks
    # Version     = 0.1
    /Script Info}

    program CatherburyFisher;
    {.include srl/srl.scar}
    {.include srl/srl/skill/fishing.scar}

    const
    Startplayer = 0;   //player that starts
    HMT = 100; // How many trips
    UseAntiBan = 'Yes'; // yes or no
    Cook = 'Yes'; // Cook them on the way to the bank, yes or no
    FishType = 'Lobster'; // What do you want to fish
    Style = 'Cage'; // What it says where to fish, ex. "Cage" fishing spot
    fishcol = 15714472; // The white bubbles in the water
    fishtol = 3; // Tolerance to fond the fishing spot
    rangecol = 1386424; // Colour of glowing part of range
    roadcol = 6053220; // Do not touch
    fishsym1 = 12914689; // Darker color of the fishing symbol
    fishsym2 = 16279297; // A lighter color of the fishing symbol

    Procedure DeclarePlayers;
    begin

    HowManyPlayers := 1;
    NumberOfPlayers(howmanyplayers);
    CurrentPlayer := StartPlayer;

    Players[0].Name :='user'; // username
    Players[0].Pass :='pass'; // password
    Players[0].Nick := 'nik'; // about 3 letters of ur name
    Players[0].Active := True;

    writeln('Using '+ inttostr(howmanyplayers) +' player[s]');
    end;

    procedure Bank;
    begin
    OpenBank3;
    writeln('Opened bank booth...');
    FixBank;
    Deposit(2,28,2);
    writeln('Depositing Fish...');
    CloseBank;
    end;

    procedure WalkToSpot;
    begin
    writeln('Walking to the fishing spot...');
    LinearRoadWalk(roadcol, 90, 50, 1, 1);
    LinearRoadWalk(roadcol, 90, 50, 1, 1);
    LinearRoadWalk(roadcol, 90, 50, 1, 1);
    GetSymbolColor(x, y, 'fishing spot');
    FindSymbol(x, y, 'fishing spot');
    Mouse(x,y+10,1,1,true);
    end;

    procedure WalkBack;
    begin
    writeln('Inventory full, walking back now...');
    LinearRoadWalk(roadcol, 270, 50, 1, 1);
    end;

    procedure WalkBack2;
    begin
    LinearRoadWalk(roadcol, 270, 50, 1, 1);
    LinearRoadWalk(roadcol, 270, 50, 1, 1);
    GetSymbolColor(x, y, 'bank');
    FindSymbol(x, y, 'bank');
    Mouse(x,y,1,1,true);
    end;

    procedure StartFishing;
    var a,c:integer;
    begin
    a := 0;
    repeat
    if FindMSColorTol(x, y, fishcol, fishtol) then
    begin
      MMouse(x,y,0,0);
      wait(1000+random(500));
      c := c + 1;
      if c mod 10 = 0 then
      begin
        FindColorToleranceDOB(x, y, fishsym1, fishsym2, 650, 8, 700, 125, 3);
        Mouse(x,y+10,1,1,true);
      end
      if ReadUpText('Cage') = true then
      begin
      Mouse(x,y,0,0,true);
      //PopUp('Cage');
      writeln('Found fishing spot and now fishing...');
      if UseAntiBan = 'Yes' then
      begin
      repeat
        AntiBan;
        if FindMSColorTol(x, y, fishcol, fishtol) = false then
          begin
            repeat
            FindMSColorTol(x, y, fishcol, fishtol)
            a := a + 1;
            until a >= 15
            a := -1;
          end
      until a = -1
      end
      if UseAntiBan = 'No' then
      begin
      repeat
      TypeSend(' ');
      wait(15000+random(2000));
         if FindMSColorTol(x, y, fishcol, fishtol) = false then
          begin
            repeat
            FindMSColorTol(x, y, fishcol, fishtol)
            a := a + 1;
            until a >= 15
            a := -2;
          end
      until a = -2
      end
    end
    end
    until InvFull = true
    end;

    procedure CookThoseFish;
    var c:integer;
    begin
    UseItem(2);
    repeat
    if FindMSColorTol(x, y, rangecol, fishtol) then
    begin
      MMouse(x,y,0,0);
      wait(500+random(200));
      if ReadUpText('Use') = true then
      begin
      Mouse(x,y,0,0,false);
      ChooseOption(x, y, 'Range');
      c := 1
      end
    end
    until c = 1
      wait(1500+random(500));
      Mouse(254,402,5,5,false);
      wait(500+random(200));
      GetMousePos(x,y);
      Mouse(x,y+33,5,1,true);
      writeln('Found range and now cooking...');
    end;

    procedure StartScript;
    begin
    writeln('Script will start soon...');
    wait(2000+random(1000));
    writeln('...Now!');
    end;

    procedure Report;
    begin
    writeln('This is a report... I'#39'll update later');
    end;

    begin
    ClearDebug;
    SetupSRL;
    LoadChars2(AppPath + 'includes\SRL\CharsNPC\');
    LoadChars2(AppPath + 'includes\SRL\CharsTrade\');
    LoadChars2(AppPath + 'includes\SRL\SmallChars\');
    LoadChars2(AppPath + 'includes\SRL\StatChars\');
    LoadChars2(AppPath + 'includes\SRL\UpChars\');
    Declareplayers;
    StartScript;
    loginplayer;
    HighestAngle;
    FindRoadColor;
    Bank;
    WalkToSpot;
    wait(10000+random(2000));
    StartFishing;
    WalkBack;
    if Cook = 'Yes' then
    begin
    GetSymbolColor(x, y, 'range');
    FindSymbol(x, y, 'range');
    Mouse(x,y,1,1,true);
    CookThoseFish;
    end
    WalkBack2;
    Bank;
    Report;
    end.

  2. #2
    Join Date
    Dec 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    bump

  3. #3
    Join Date
    May 2006
    Location
    West Coast
    Posts
    820
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    NOTE: Dont ever bump again or you might get banned
    In the procedure report it has an error in the string(It has #39 in it for some reason out side of the string markers)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Any Suggestions for script?
    By mysticalman in forum OSR Help
    Replies: 2
    Last Post: 02-27-2008, 06:15 AM
  2. Help With Script and in need of Suggestions
    By !bezo! in forum OSR Help
    Replies: 2
    Last Post: 08-23-2007, 12:43 PM
  3. Need Help And Suggestions For First Script
    By Buzzy in forum OSR Help
    Replies: 8
    Last Post: 07-26-2007, 07:16 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
  •