Poll: Rating

Results 1 to 14 of 14

Thread: Multi-User, Multi-Log, Multi-Bow Pro Fletcher

  1. #1
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Multi-User, Multi-Log, Multi-Bow Pro Fletcher

    Only time I did SRL Stats on, so the proggy will get heaps bigger

    -=-=-Multi-User, Multi-Log, Multi-Bow Pro Fletcher!-=-=-

    [B][SIZE="10"]~WARNING~THIS VERSION IS SET FOR PEST CONTROL BANK AND DOES NOT SOLVE ANY RANDOMS!!!! THOUGH FUNCTION IS IN THERE IT DOESNT GET CALLED!!!

    FIXED SOME MAJOR BUGS AND NOW RUNNING PERFECTLY WELL..
    V1.5 Released!

    I AM STILL UPDATING ALL THE TIME!!



    I think I've done a pretty good job.

    I left overnight and woke with it still going..


    I added bitmaps instead of ChooseOption(); I did that because when the newer RuneScape came out, it didn't work fully.


    SCAR Code:
    program Fletcher;
    {.include SRL\SRL.scar}

    //SIMPLE FLETCHER
    //Start near bank slot (Varrock West Recommended)
    //Logs in first few bank slots
    //Knife first inv
    //Make sure you have knife idiot!

    Const

    {******************* Overall Maximum Values (Not per player) *******************
    ************** Script finishes when any max limit has been reached. ************
    ***************************** enter 0 for infinite ****************************}


    TCut  = 0; //Total number of bows to be cut
    TTime = 0; //Total time wanted on script


    {***************************** Change Player after *****************************
    ********** Player will bank and change when any value has been reached. ********
    **************************** default value are best ****************************
    ***************************** enter 0 for infinite ****************************}


    SCut  = 0; //Total number of bows to be cut
    STime = 0; //Total time wanted on script


    { ******************************************
     **************** SRL STATS ****************
     *******************************************}

    UseSRL =  False; //Do you want to record your stats?
    YourID   = '';
    YourPass = '';



     {******************************************
     **************** Colors *******************
     *******************************************}

      MBank = 1365734; //The bank icon in minimap if lost (probably wont happen)

      Bank1 = 5534076;
      Bank2 = 2635324;
      Bank3 = 8162716;

      //If all else fails...
      BlindX = 274;
      BlindY = 114;

    var BankX, BankY, Log, x, y, MyBanks, antis, TotalTime, lvls, Loads: Integer;
    var Banker, Booth, StoreAll, WithdrawAll, Examine, MakeX: Integer;

    Procedure DeclarePlayers;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Integers[0] := 0;  // 0 = AUTO, 1 = ShortBow, 2= LongBow
      Players[0].Active := True;
      end;

    procedure Ln(Text:String);
    begin
      WriteLn(Players[CurrentPlayer].Name + ': ' + Text);
    end;

    function TotalCut: Integer;
    var i, x: integer;
    begin
     for i := 0 to HowManyPlayers - 1 do
     begin
       x := x + Players[i].Integers[1];
     end;
     result := x;
    end;

    procedure SRLRep;
    begin
      SRLRandomsReport;
    end;

    procedure Report;
    begin
    ClearReport;
    if(UseSRL) then SRLRandomsReport;
    //Ln('Gathering Report');
    AddToReport('#########################');
    AddToReport('#      Pro Fletcher     #');
    AddToReport('#         v 1.5         #');
    AddToReport('#  Players: ' + intToStr(HowManyPlayers));
    AddToReport('#  Current: ' + Players[CurrentPlayer].Name);
    AddToReport('#  Running: ' + TimeRunning);
    AddToReport('#      Cut: ' + intToStr(Players[CurrentPlayer].Integers[1]));
    AddToReport('#    Total: ' + intToStr(TotalCut));
    AddToReport('#    Loads: ' + intToStr(Loads));
    AddToReport('#    Banks: ' + intToStr(MyBanks));
    AddToReport('# AntiBans: ' + intToStr(antis));
    AddToReport('#   Gained: ' + intToStr(lvls));
    AddToReport('#    Level: ' + intToStr(Players[CurrentPlayer].level[13]));
    AddToReport('#########################');

    if(TCut > 0) and (TotalCut >= TCut) then TerminateScript;
    if(SCut > 0) and (Players[CurrentPlayer].Integers[1] >= SCut) then Logout;

    end;

    function FindFastRandoms: Boolean; //By WT-Fakawi.
    var
      i: Integer;
    begin
      for i := 1 to 6 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindQuiz then
              Result := True;
          4: begin
              if InBlack then
              begin
                Result := True;
                ln('In Black');
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          5: RC;
        end;
      end;
    end;

    ///////////////////////////////////////////////////////////////////////////

    procedure FindRandoms;
    begin
      ln('Findind Fast Randoms...');
      FindFastRandoms;
      ln('Finding Normal Randoms...');
      FindNormalRandoms;
    end;

    procedure NoRandoms;
    begin
      {ln('Searching for randoms');
      FindNormalRandoms;
      FTWait(4);
      If FindFight Then
      Begin
        ln('Found fight, running');
        RunAway('N', True, 1, 5000 + Random(5000));
      End;
      If ClickToContinue Then ClickContinue(True, True);
      If FindMod Then
      Begin
        Ln('Found a Moderator... Do nothing, he wont realise!');
      End;
      FindNormalRandoms;}

     end;

    procedure ActHuman(MS: Integer);
    var Started, MoS, q: Integer;
    begin
      IncEx(antis, 1);
      IncEx(ReportVars[4], 1);
      Report;
      q := 0;
      ln('Acting human #' + intToStr(antis) + ' for ' + intToStr(MS) + ' ms');
      MoS := MouseSpeed;
      MouseSpeed := 10;
      MarkTime(Started);
      repeat
      q := q + 1; if(q = 2) then q := 0;
      if(q = 0) then NoRandoms;
      MouseSpeed := 10 + random(15);
         if(random(3) = 0) then MMouse(random(1000), random(900), 1, 1);
         Case random(14) of
           0: Mouse(random(772), random(490), 1, 1, false);
           1: SleepAndMoveMouse(500 + random(750));
           3: MouseItem(random(InvCount) + 1, false);
           4: begin
                ln('Examine random');
                MouseItem(random(InvCount) + 1, false);
                Wait(100);
                if(FindBitmap(Examine, x, y)) then Mouse(x, y, 1, 1, True);
                if(random(10) = 1) then
                begin
                  ln('Shake over examine text');
                  MouseSpeed := 28;
                  MMouse(13, 446, 2, 2);
                  MMouse(178, 450, random(2), random(2));
                  MMouse(13, 446, random(2), random(2));
                  MMouse(178, 450, random(2), random(2));
                  MMouse(13, 446, random(2), random(2));
                  MMouse(178, 450, random(2), random(2));
                  MMouse(13, 446, random(2), random(2));
                  MMouse(178, 450, random(2), random(2));
                  MouseSpeed := 10;
                end;
              end;
           5,11,12: begin
                ln('Random Gametab');
                GameTab(1 + random(11));
                Wait(500 + random(1200));
                GameTab(4);
              end;
            6, 7, 13: HoverSkill('fletching', false);
            8: RandomRClick;
            9,10: HoverSkill('random', false);
              end;

      until(TimeFromMark(Started) >= MS)
      ln('ActHuman expired');
      MouseSpeed := MoS;
    end;

    procedure GetLevels;
    var lvl: integer;
    begin
      ln('Finding stat');
      lvl := GetSkillInfo('fletching',False);
      if(lvl > Players[CurrentPlayer].level[13]) then
      begin
        if(Players[CurrentPlayer].level[13] > 0) then
        begin
          ln('Leveled from ' + intToStr(Players[CurrentPlayer].level[13]) + ' to ' + intToStr(lvl) + '!');
          IncEx(lvls, 1);
          IncEx(ReportVars[5], 1);
        end;
        Players[CurrentPlayer].level[13] := lvl;
      end;
      Ln('Player has fletching: ' + intToStr(Players[CurrentPlayer].level[13]));
    end;

    procedure ReLocate;
    var mX, mY: integer;
    begin
     ln('Relocating to bank..');
     ln('Finding bank sumbol');
     if(FindColor(mX, mY, MBank, MMX1, MMY1, MMX2, MMY2)) then Mouse(mX,mY, 5, 3,True);
     Flag;
    end;

    procedure GetBankPos;
    begin
    ln('Finding bank position');
    if(not FindObj(BankX, BankY, 'ank', Bank1, 2)) then
        begin
         Ln('Bank1 not found; Try Bank2');
          if(not FindObj(BankX, BankY, 'ank', Bank2, 5)) then
            begin
            Ln('Bank2 not found; Try Bank3');
              if not(FindObj(BankX, BankY, 'ank', Bank3, 15) = False) then
                begin
                  Ln('Bank3 not found; Blind Mouse!');
                  BankX:= BlindX;
                  BankY:= BlindY;
                end else ln('Bank found at ' + intToStr(BankX) + ',' + intToStr(BankY));
            end else ln('Bank found at ' + intToStr(BankX) + ',' + intToStr(BankY));
        end else ln('Bank found at ' + intToStr(BankX) + ',' + intToStr(BankY));
    end;

    procedure SetupPlayer;
    begin
      Ln('Setting up player consts');
      If(Players[CurrentPlayer].Integers[0] = 0) then getLevels;
      SetAngle(True);
      GetBankPos;
    end;

    function GetLog(UpText: String): LongInt;
    begin
      if(Pos('ak', UpText) > 0) then result := 1;
      if(Pos('illow', UpText) > 0) then result := 2;
      if(Pos('aple', UpText) > 0) then result := 3;
      if(Pos('ew', UpText) > 0) then result := 4;
      if(Pos('agic', UpText) > 0) then result := 5;
      if not(result > 0) then result := 0;
    end;

    procedure FletchWait;
    var i, q, item: integer;
    cancelIt: boolean;
    up: string;
    begin
    q := 0;
      for i:=2 to 28 do
        begin
          q := q + 1; if(q = 3) then
            begin
              q := 0;
            end;
         if not(cancelIt) then
          begin
          if(q = 0) then NoRandoms;
          if not(ExistsItem(i)) then Break;
          MarkTime(item);
          MMouseItem(i);
          wait(150);
          if(IsUpText('ogs')) then
          begin
          up := rs_getuptext;
          repeat
            wait(100);
            if(random(5) = 0) then ActHuman(5000);
            MMouseItem(i)
            if (IsUpText('ogs')) and(TimeFromMark(item) > 10000) then cancelIt := True;
            if(cancelIt) then Ln('Fletching canceled; 10 Seconds exceeded');
          until(isUpText('ogs')=false) or (cancelIt);
        if not(isUpText('ogs')) then
          begin
            IncEx(Players[CurrentPlayer].Integers[1], 1);
            IncEx(ReportVars[2], 1);
          end;
        end else
          begin
            IncEx(Players[CurrentPlayer].Integers[1], 1);
            IncEx(ReportVars[2], 1);
          end;
        end;
        end;
      IncEx(loads, 1);
      IncEx(ReportVars[1], 1);
    end;

    procedure AutoFType;
    var EndType: LongInt;
    begin
    EndType := 0;
    Ln('Determining best bow to cut..');
    Ln('Level: ' + IntToStr(Players[CurrentPlayer].level[13]));
     Case log of
       0: begin
            Ln('Log: Tree');
            if(Players[CurrentPlayer].level[13] > 9) then EndType := 2;
            if(Players[CurrentPlayer].level[13] < 10) then EndType := 1;
          end;
       1: begin
            Ln('Log: Oak');
            if(Players[CurrentPlayer].level[13] > 24) then EndType := 2;
            if(Players[CurrentPlayer].level[13] < 25) then EndType := 1;
          end;
       2: begin
            Ln('Log: Willow');
            if(Players[CurrentPlayer].level[13] > 39) then EndType := 2;
            if(Players[CurrentPlayer].level[13] < 40) then EndType := 1;
          end;
       3: begin
            Ln('Log: Maple');
            if(Players[CurrentPlayer].level[13] > 54) then EndType := 2;
            if(Players[CurrentPlayer].level[13] < 55) then EndType := 1;
          end;
       4: begin
            Ln('Log: Yew');
            if(Players[CurrentPlayer].level[13] > 69) then EndType := 2;
            if(Players[CurrentPlayer].level[13] < 70) then EndType := 1;
          end;
       5: begin
            Ln('Log: Magic');
            if(Players[CurrentPlayer].level[13] > 84) then EndType := 2;
            if(Players[CurrentPlayer].level[13] < 85) then EndType := 1;
          end;
     end;
     Case EndType of
            1: Mouse(110 + random(5), 417 + random(5), 5, 5, false);
            2: Mouse(253 + random(5), 421 + random(5), 5, 5, false);
            0: begin
               Ln('Level not high enough? NextPlayer;.');
               Logout;
               end;
          end;
    end;

    function OpenMyBank: Boolean;
    begin
      IncEx(MyBanks, 1);
      IncEx(ReportVars[3], 1);
      Mouse(BankX, BankY, 1, 1, False);
      if(FindBitmap(Banker, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Banker'); //sends a message if the bitmap is found
          Mouse(x, y + random(5), 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end;

      if(FindBitmap(Booth, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Booth'); //sends a message if the bitmap is found
          Mouse(x, y, 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end else
        begin
          Ln('Banker or Booth not found!');
          Ln('Blind Mouse'); //sends a message if the bitmap is found
          Mouse(BlindX, BlindY, 1, 1, False); //blind right click

          if(FindBitmap(Banker, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Banker'); //sends a message if the bitmap is found
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end;

      if(FindBitmap(Booth, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Booth'); //sends a message if the bitmap is found
          Mouse(x, y, 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end else result := false;
        end;
      end;

    function TakeLogs: Boolean;
    var Z: Integer;
    begin
      GameTab(4);
      ln('Opening Bank..');
      if not(OpenMyBank) then
      begin
        ln('Bank not found.. Relocating to nearest bank symbol');
        ReLocate;
        GetBankPos;
        wait(1000);
        OpenMyBank;
      end;
      MarkTime(Z);
      repeat
      wait(500);
      until(TimeFromMark(Z) > 10000) or (Bankscreen);
      ln('Bank took ' + IntToStr(TimeFromMark(Z)) + ' ms');
      FixBank;

      wait(800);
      if(ExistsItem(2)) then
        begin
          Mouse(620, 231, 3, 3, false);
          wait(400);
          if(FindBitmap(StoreAll, x, y))then //finds the bitmap
           begin
          ln('Storing from slot 2');
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
           end else Ln('"Store All" not found!');
          wait(500);
        end else Ln('Nothing to store');
      MMouse(91, 78, 1, 1);
      wait(500);
      if(IsUpText('ogs')) then
      begin
        ln('Detecting log');
        log := GetLog(rs_GetUpText);
        Mouse(91, 78, 1, 1, False);
        Wait(800);
        ln('Withdrawing logs');
        if(FindBitmap(WithdrawAll, x, y))then //finds the bitmap
           begin
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
           end else Ln('"Withdraw All" not found!');
        wait(600);
        ln('Closing bank');
        CloseBank;
        result := true;
      end else
      begin
        Ln(rs_getUptext + ' is not a log');
        ln('Closing Bank');
        CloseBank;
        result := false;
      end;
      CloseBank;
    end;

    procedure loop;
    var Timer, MyTime:Integer;
    begin
    MarkTime(MyTime);
      repeat
          if(STime > 0) and (TimeFromMark(MyTime) >= ((STime / 1000) / 60)) then Exit;
          if(TTime > 0) and (TimeFromMark(TotalTime) >= ((TTime / 1000) / 60)) then TerminateScript;
          ln('Writing report - Please Wait');
          Report;
          ln('Focusing window');
          Mouse(483, -75, 0, 0, True);
          if not LoggedIn then Exit;
          NoRandoms;
          ln('Finding bank');
          GetBankPos;
          wait(700);
          ln('Retreiving logs from bank');
          if not(TakeLogs) then exit;
          wait(500);
          ln('Select Knife');
          MouseItem(1, true);
          wait(500);
          ln('Select Log');
          MouseItem(random(InvCount - 1) + 2, true);
          MarkTime(Timer);
          repeat
            wait(100);
          until(GetColor(483, 372) = 7238703) or(TimeFromMark(Timer) > 5000);
          if(GetColor(483, 372) = 7238703) then
            begin
          Case Players[CurrentPlayer].Integers[0] of
            1: Mouse(110 + random(5), 417 + random(5), 1, 1, false);
            2: Mouse(253 + random(5), 421 + random(5), 1, 1, false);
            3: Mouse(407 + random(5), 423 + random(5), 1, 1, false);
            0: AutoFType;
          end;
          wait(500);
          if(FindBitmap(MakeX, x, y))then //finds the bitmap
           begin
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
           end else Ln('"Make X" not found!');
          Timer := 0;
          MarkTime(Timer);
          repeat
            wait(100);
            if(GetColor(2258, 430) = 8388608) then
            begin
            Break;
            Ln('Found color of *');
            end else if(TimeFromMark(Timer) > 1000) then Break;
          until(GetColor(258, 429) = 8388608);
          if(GetColor(258, 429) = 8388608) then
            begin
          Ln('* Found');
          ln('Typing X Ammount');
          case random(5) of
          0: TypeSend(intToStr(27 + random(500)));
          1: TypeSend(intToStr(111));
          2: TypeSend(intToStr(100));
          3: TypeSend(intToStr(99));
          4: TypeSend(intToStr(999));
          5: TypeSend(intToStr(50));
          end;
          ln('Has began fletching');
          FletchWait;
          Ln('Adding values');
          Report;
          if(UseSRL) then SRLRep;
            end else Ln('"X" Interface lost');
            end else Ln('Interface lost, misclick on bank?');
          If(Players[CurrentPlayer].Integers[0] = 0) then getLevels;
          ln('Repeat');
          until(not LoggedIn);
    end;

    procedure ScriptTerminate;
    begin
      Ln('Ending script');
      WriteLn('####################################');
      WriteLn('####################################');
      Writeln('# Thankyou for using Pro Fletcher! #');
      WriteLn('####################################');
      WriteLn('####################################');
      if(UseSRL) then SRLRep;
      Report;
    end;

    begin
      ClearDebug;
      ClearReport;
      SetupSRL;
      ScriptID := '913';
      if(UseSRL) then
       begin
          SRLID := YourID;
          SRLPassword := YourPass;
       end;
      Writeln('Setting up Bitmaps');
      Banker := BitmapFromString(25, 2, 'beNr7/x8ZMIBBbIg7ECGLQ' +
           '0TQBLGKQ0xAlsUvDpFCFwcAHVRkOg==');
      Booth := BitmapFromString(150, 2, 'beNqlUkEOwCAI6+/2gV33/2c' +
           '4NjJEGIiRcKgNQrEC7Q0A13lQNhXMCMk1ph4udA1FdLeCjQDpmav6' +
           '7fBIJfLjNe5HybGG17D8KCYflAuoYNNBS/L76pf3trZY+dTxfQcr/' +
           '2rVwYlTEVbWrA7ad7DjG3uFo54=');
      StoreAll := BitmapFromString(57, 1, 'beNpjYIgNcf8PBnAGAxggc' +
           '4FsCEIWwcVGUwkHcCmsphE2HAAUfVYX');
      WithdrawAll := BitmapFromString(78, 1, 'beNr7/x8CGBgYMBmxIe4QN' +
           'pABZzPAAFwEWRdEJbJiTNPghqCZidUurFxMW5BNQDMZygYADhqE7w' +
           '==');
      Examine := BitmapFromString(54, 1, 'beNoLcY8Ncf8PBgwMDEA2Go' +
           'JLIcv+RwUQKTgbk4FmBbKZBNXEAgDq5Vo2');
      MakeX := BitmapFromString(46, 5, 'beNp9UskNACAIYzsX8Ov+Y6iR' +
           'hFQKbXyQclPnWHPsBzNj43ojwOEMZyU+kfwiPbogeW13IYMpWB87R' +
           'sEuuByDA9IFmNk/sGnaq1xBTyL6dgXLWwlp+PisS6e4nqSzWTIDiB' +
           '/y2Qdr83wv');
      DeclarePlayers;
      WriteLn('####################################');
      WriteLn('####################################');
      Writeln('# Thankyou for using Pro Fletcher! #');
      WriteLn('####################################');
      WriteLn('####################################');
      if not (LoggedIn) then LoginPlayer;
        IncEx(ReportVars[0], 1);
        MarkTime(TotalTime);
        repeat
          if not (LoggedIn) then LoginPlayer;
          SetupPlayer;
          Ln('Running loop');
          Loop;
          Ln('Loop stopped, next please..');
          Logout;
          NextPlayer(True);
        until(false);
      TerminateScript;
    end.





    Please comment and give ideas!

  2. #2
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    any1 there?

  3. #3
    Join Date
    Mar 2007
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Runescape has been updated. How can this possibly work?
    Exam period.

  4. #4
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I did it this morning and it does work. Just turn settings on lowest.

    i also couldn't be stuffed waiting for SRL so I modded up my current one and it's fully working with the things I need.

  5. #5
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yes if you are smart enough you can make you own login functions like i did

    and wd looks good
    Blank!

  6. #6
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use SCAR tags instead of CODE tags.


  7. #7
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Failed when compiling
    Line 352: [Error] (12995:11): Invalid number of parameters in script
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  8. #8
    Join Date
    Jul 2008
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah i agree with the edit SRL thing.

    simple

    just change a few colors and bitmaps

  9. #9
    Join Date
    Jul 2008
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    good
    Professional TwentySoxs Fully working with new RuneScape HD and Low Deatail in SMART + All randoms and more: http://www.srl-forums.com/forum/twen...rt-t34910.html

  10. #10
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  11. #11
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i understand about the randoms not being called nut in future use

    Findnormalrandoms
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  12. #12
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice first script i fixed like half your standarz

    SCAR Code:
    program Fletcher;
    {.include SRL\SRL.scar}

    //SIMPLE FLETCHER
    //Start near bank slot (Varrock West Recommended)
    //Logs in first few bank slots
    //Knife first inv
    //Make sure you have knife idiot!

    Const

    {******************* Overall Maximum Values (Not per player) *******************
    ************** Script finishes when any max limit has been reached. ************
    ***************************** enter 0 for infinite ****************************}


    TCut  = 0; //Total number of bows to be cut
    TTime = 0; //Total time wanted on script


    {***************************** Change Player after *****************************
    ********** Player will bank and change when any value has been reached. ********
    **************************** default value are best ****************************
    ***************************** enter 0 for infinite ****************************}


    SCut  = 0; //Total number of bows to be cut
    STime = 0; //Total time wanted on script


    { ******************************************
     **************** SRL STATS ****************
     *******************************************}

    UseSRL =  False; //Do you want to record your stats?
    YourID   = '';
    YourPass = '';



     {******************************************
     **************** Colors *******************
     *******************************************}

      MBank = 1365734; //The bank icon in minimap if lost (probably wont happen)

      Bank1 = 5534076;
      Bank2 = 2635324;
      Bank3 = 8162716;

      //If all else fails...
      BlindX = 274;
      BlindY = 114;

    var BankX, BankY, Log, x, y, MyBanks, antis, TotalTime, lvls, Loads: Integer;
    var Banker, Booth, StoreAll, WithdrawAll, Examine, MakeX: Integer;

    Procedure DeclarePlayers;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Integers[0] := 0;  // 0 = AUTO, 1 = ShortBow, 2= LongBow
      Players[0].Active := True;
    end;

    procedure Ln(Text:String);
    begin
      WriteLn(Players[CurrentPlayer].Name + ': ' + Text);
    end;

    function TotalCut: Integer;
    var i, x: integer;
    begin
      for i := 0 to HowManyPlayers - 1 do
      begin
        x := x + Players[i].Integers[1];
      end;
      result := x;
    end;

    procedure SRLRep;
    begin
      SRLRandomsReport;
    end;

    procedure Report;
    begin
      ClearReport;
      if(UseSRL) then
        SRLRandomsReport;
      //Ln('Gathering Report');
      AddToReport('#########################');
      AddToReport('#      Pro Fletcher     #');
      AddToReport('#         v 1.5         #');
      AddToReport('#  Players: ' + intToStr(HowManyPlayers));
      AddToReport('#  Current: ' + Players[CurrentPlayer].Name);
      AddToReport('#  Running: ' + TimeRunning);
      AddToReport('#      Cut: ' + intToStr(Players[CurrentPlayer].Integers[1]));
      AddToReport('#    Total: ' + intToStr(TotalCut));
      AddToReport('#    Loads: ' + intToStr(Loads));
      AddToReport('#    Banks: ' + intToStr(MyBanks));
      AddToReport('# AntiBans: ' + intToStr(antis));
      AddToReport('#   Gained: ' + intToStr(lvls));
      AddToReport('#    Level: ' + intToStr(Players[CurrentPlayer].level[13]));
      AddToReport('#########################');
      if(TCut > 0) and (TotalCut >= TCut) then TerminateScript;
      if(SCut > 0) and (Players[CurrentPlayer].Integers[1] >= SCut) then Logout;
    end;

    function FindFastRandoms: Boolean; //By WT-Fakawi.
    var
      i: Integer;
    begin
      for i := 1 to 6 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindQuiz then
              Result := True;
          4: begin
              if InBlack then
              begin
                Result := True;
                ln('In Black');
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          5: RC;
        end;
      end;
    end;

    ///////////////////////////////////////////////////////////////////////////

    procedure FindRandoms;
    begin
      ln('Findind Fast Randoms...');
      FindFastRandoms;
      ln('Finding Normal Randoms...');
      FindNormalRandoms;
    end;

    procedure NoRandoms;
    begin
      {ln('Searching for randoms');
      FindNormalRandoms;
      FTWait(4);
      If FindFight Then
      Begin
        ln('Found fight, running');
        RunAway('N', True, 1, 5000 + Random(5000));
      End;
      If ClickToContinue Then ClickContinue(True, True);
      If FindMod Then
      Begin
        Ln('Found a Moderator... Do nothing, he wont realise!');
      End;
      FindNormalRandoms;}

     end;

    procedure ActHuman(MS: Integer);
    var Started, MoS, q: Integer;
    begin
      IncEx(antis, 1);
      IncEx(ReportVars[4], 1);
      Report;
      q := 0;
      ln('Acting human #' + intToStr(antis) + ' for ' + intToStr(MS) + ' ms');
      MoS := MouseSpeed;
      MouseSpeed := 10;
      MarkTime(Started);
      repeat
        q := q + 1; if(q = 2) then q := 0;
        if(q = 0) then NoRandoms;
        MouseSpeed := 10 + random(15);
        if(random(3) = 0) then MMouse(random(1000), random(900), 1, 1);
        Case random(14) of
          0: Mouse(random(772), random(490), 1, 1, false);
          1: SleepAndMoveMouse(500 + random(750));
          3: MouseItem(random(InvCount) + 1, false);
          4: begin
               ln('Examine random');
               MouseItem(random(InvCount) + 1, false);
               Wait(100);
               if(FindBitmap(Examine, x, y)) then Mouse(x, y, 1, 1, True);
               if(random(10) = 1) then
               begin
                 l('Shake over examine text');
                 MouseSpeed := 28;
                 MMouse(13, 446, 2, 2);
                 MMouse(178, 450, random(2), random(2));
                 MMouse(13, 446, random(2), random(2));
                 MMouse(178, 450, random(2), random(2));
                 MMouse(13, 446, random(2), random(2));
                 MMouse(178, 450, random(2), random(2));
                 MMouse(13, 446, random(2), random(2));
                 MMouse(178, 450, random(2), random(2));
                 MouseSpeed := 10;
               end;
             end;
             5,11,12:
             begin
               ln('Random Gametab');
               GameTab(1 + random(11));
               Wait(500 + random(1200));
               GameTab(4);
             end;
             6, 7, 13: HoverSkill('fletching', false);
             8: RandomRClick;
             9,10: HoverSkill('random', false);
          end;
      until(TimeFromMark(Started) >= MS)
      ln('ActHuman expired');
      MouseSpeed := MoS;
    end;

    procedure GetLevels;
    var lvl: integer;
    begin
      ln('Finding stat');
      lvl := GetSkillInfo('fletching',False);
      if(lvl > Players[CurrentPlayer].level[13]) then
      begin
        if(Players[CurrentPlayer].level[13] > 0) then
        begin
          ln('Leveled from ' + intToStr(Players[CurrentPlayer].level[13]) + ' to ' + intToStr(lvl) + '!');
          IncEx(lvls, 1);
          IncEx(ReportVars[5], 1);
        end;
        Players[CurrentPlayer].level[13] := lvl;
      end;
      Ln('Player has fletching: ' + intToStr(Players[CurrentPlayer].level[13]));
    end;

    procedure ReLocate;
    var mX, mY: integer;
    begin
      ln('Relocating to bank..');
      ln('Finding bank sumbol');
      if(FindColor(mX, mY, MBank, MMX1, MMY1, MMX2, MMY2)) then
       Mouse(mX,mY, 5, 3,True);
      Flag;
    end;

    procedure GetBankPos;
    begin
      ln('Finding bank position');
      if(not FindObj(BankX, BankY, 'ank', Bank1, 2)) then
      begin
        Ln('Bank1 not found; Try Bank2');
        if(not FindObj(BankX, BankY, 'ank', Bank2, 5)) then
        begin
          Ln('Bank2 not found; Try Bank3');
          if not(FindObj(BankX, BankY, 'ank', Bank3, 15) = False) then
          begin
            Ln('Bank3 not found; Blind Mouse!');
            BankX:= BlindX;
            BankY:= BlindY;
          end else ln('Bank found at ' + intToStr(BankX) + ',' + intToStr(BankY));
        end else ln('Bank found at ' + intToStr(BankX) + ',' + intToStr(BankY));
      end else ln('Bank found at ' + intToStr(BankX) + ',' + intToStr(BankY));
    end;

    procedure SetupPlayer;
    begin
      Ln('Setting up player consts');
      If(Players[CurrentPlayer].Integers[0] = 0) then getLevels;
      SetAngle(True);
      GetBankPos;
    end;

    function GetLog(UpText: String): LongInt;
    begin
      if(Pos('ak', UpText) > 0) then result := 1;
      if(Pos('illow', UpText) > 0) then result := 2;
      if(Pos('aple', UpText) > 0) then result := 3;
      if(Pos('ew', UpText) > 0) then result := 4;
      if(Pos('agic', UpText) > 0) then result := 5;
      if not(result > 0) then result := 0;
    end;

    procedure FletchWait;
    var i, q, item: integer;
    cancelIt: boolean;
    up: string;
    begin
      q := 0;
      for i:=2 to 28 do
        begin
          q := q + 1; if(q = 3) then
            begin
              q := 0;
            end;
          if not(cancelIt) then
          begin
            if(q = 0) then NoRandoms;
            if not(ExistsItem(i)) then Break;
            MarkTime(item);
            MMouseItem(i);
            wait(150);
            if(IsUpText('ogs')) then
            begin
              up := rs_getuptext;
               repeat
                 wait(100);
                 if(random(5) = 0) then ActHuman(5000);
                 MMouseItem(i)
                 if (IsUpText('ogs')) and(TimeFromMark(item) > 10000) then cancelIt := True;
                 if(cancelIt) then Ln('Fletching canceled; 10 Seconds exceeded');
              until(isUpText('ogs')=false) or (cancelIt);
              if not(isUpText('ogs')) then
              begin
                IncEx(Players[CurrentPlayer].Integers[1], 1);
                IncEx(ReportVars[2], 1);
             end;
           end else
           begin
             IncEx(Players[CurrentPlayer].Integers[1], 1);
             IncEx(ReportVars[2], 1);
          end;
        end;
      end;
      IncEx(loads, 1);
      IncEx(ReportVars[1], 1);
    end;

    procedure AutoFType;
    var EndType: LongInt;
    begin
      EndType := 0;
      Ln('Determining best bow to cut..');
      Ln('Level: ' + IntToStr(Players[CurrentPlayer].level[13]));
      Case log of
        0: begin
             Ln('Log: Tree');
             if(Players[CurrentPlayer].level[13] > 9) then EndType := 2;
             if(Players[CurrentPlayer].level[13] < 10) then EndType := 1;
           end;
        1: begin
             Ln('Log: Oak');
             if(Players[CurrentPlayer].level[13] > 24) then EndType := 2;
             if(Players[CurrentPlayer].level[13] < 25) then EndType := 1;
           end;
        2: begin
             Ln('Log: Willow');
             if(Players[CurrentPlayer].level[13] > 39) then EndType := 2;
             if(Players[CurrentPlayer].level[13] < 40) then EndType := 1;
           end;
        3: begin
             Ln('Log: Maple');
             if(Players[CurrentPlayer].level[13] > 54) then EndType := 2;
             if(Players[CurrentPlayer].level[13] < 55) then EndType := 1;
           end;
        4: begin
             Ln('Log: Yew');
             if(Players[CurrentPlayer].level[13] > 69) then EndType := 2;
             if(Players[CurrentPlayer].level[13] < 70) then EndType := 1;
           end;
        5: begin
             Ln('Log: Magic');
             if(Players[CurrentPlayer].level[13] > 84) then EndType := 2;
             if(Players[CurrentPlayer].level[13] < 85) then EndType := 1;
           end;
         end;
         Case EndType of
            1: Mouse(110 + random(5), 417 + random(5), 5, 5, false);
            2: Mouse(253 + random(5), 421 + random(5), 5, 5, false);
            0: begin
              Ln('Level not high enough? NextPlayer;.');
              Logout;
            end;
          end;
        end;

    function OpenMyBank: Boolean;
    begin
      IncEx(MyBanks, 1);
      IncEx(ReportVars[3], 1);
      Mouse(BankX, BankY, 1, 1, False);
      if(FindBitmap(Banker, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Banker'); //sends a message if the bitmap is found
          Mouse(x, y + random(5), 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end;

      if(FindBitmap(Booth, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Booth'); //sends a message if the bitmap is found
          Mouse(x, y, 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end else
        begin
          Ln('Banker or Booth not found!');
          Ln('Blind Mouse'); //sends a message if the bitmap is found
          Mouse(BlindX, BlindY, 1, 1, False); //blind right click

          if(FindBitmap(Banker, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Banker'); //sends a message if the bitmap is found
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end;

      if(FindBitmap(Booth, x, y))then //finds the bitmap
        begin
          Ln('String: Bank Booth'); //sends a message if the bitmap is found
          Mouse(x, y, 1, 1, True); //left clicks the bitmap
          result := True;
          exit;
        end else result := false;
        end;
      end;

    function TakeLogs: Boolean;
    var Z: Integer;
    begin
      GameTab(4);
      ln('Opening Bank..');
      if not(OpenMyBank) then
      begin
        ln('Bank not found.. Relocating to nearest bank symbol');
        ReLocate;
        GetBankPos;
        wait(1000);
        OpenMyBank;
      end;
      MarkTime(Z);
      repeat
      wait(500);
      until(TimeFromMark(Z) > 10000) or (Bankscreen);
      ln('Bank took ' + IntToStr(TimeFromMark(Z)) + ' ms');
      FixBank;

      wait(800);
      if(ExistsItem(2)) then
        begin
          Mouse(620, 231, 3, 3, false);
          wait(400);
          if(FindBitmap(StoreAll, x, y))then //finds the bitmap
           begin
          ln('Storing from slot 2');
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
           end else Ln('"Store All" not found!');
          wait(500);
        end else Ln('Nothing to store');
      MMouse(91, 78, 1, 1);
      wait(500);
      if(IsUpText('ogs')) then
      begin
        ln('Detecting log');
        log := GetLog(rs_GetUpText);
        Mouse(91, 78, 1, 1, False);
        Wait(800);
        ln('Withdrawing logs');
        if(FindBitmap(WithdrawAll, x, y))then //finds the bitmap
           begin
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
           end else Ln('"Withdraw All" not found!');
        wait(600);
        ln('Closing bank');
        CloseBank;
        result := true;
      end else
      begin
        Ln(rs_getUptext + ' is not a log');
        ln('Closing Bank');
        CloseBank;
        result := false;
      end;
      CloseBank;
    end;

    procedure loop;
    var Timer, MyTime:Integer;
    begin
    MarkTime(MyTime);
      repeat
          if(STime > 0) and (TimeFromMark(MyTime) >= ((STime / 1000) / 60)) then Exit;
          if(TTime > 0) and (TimeFromMark(TotalTime) >= ((TTime / 1000) / 60)) then TerminateScript;
          ln('Writing report - Please Wait');
          Report;
          ln('Focusing window');
          Mouse(483, -75, 0, 0, True);
          if not LoggedIn then Exit;
          NoRandoms;
          ln('Finding bank');
          GetBankPos;
          wait(700);
          ln('Retreiving logs from bank');
          if not(TakeLogs) then exit;
          wait(500);
          ln('Select Knife');
          MouseItem(1, true);
          wait(500);
          ln('Select Log');
          MouseItem(random(InvCount - 1) + 2, true);
          MarkTime(Timer);
          repeat
            wait(100);
          until(GetColor(483, 372) = 7238703) or(TimeFromMark(Timer) > 5000);
          if(GetColor(483, 372) = 7238703) then
            begin
          Case Players[CurrentPlayer].Integers[0] of
            1: Mouse(110 + random(5), 417 + random(5), 1, 1, false);
            2: Mouse(253 + random(5), 421 + random(5), 1, 1, false);
            3: Mouse(407 + random(5), 423 + random(5), 1, 1, false);
            0: AutoFType;
          end;
          wait(500);
          if(FindBitmap(MakeX, x, y))then //finds the bitmap
           begin
          Mouse(x + random(100), y, 1, 1, True); //left clicks the bitmap
           end else Ln('"Make X" not found!');
          Timer := 0;
          MarkTime(Timer);
          repeat
            wait(100);
            if(GetColor(2258, 430) = 8388608) then
            begin
            Break;
            Ln('Found color of *');
            end else if(TimeFromMark(Timer) > 1000) then Break;
          until(GetColor(258, 429) = 8388608);
          if(GetColor(258, 429) = 8388608) then
            begin
          Ln('* Found');
          ln('Typing X Ammount');
          case random(5) of
          0: TypeSend(intToStr(27 + random(500)));
          1: TypeSend(intToStr(111));
          2: TypeSend(intToStr(100));
          3: TypeSend(intToStr(99));
          4: TypeSend(intToStr(999));
          5: TypeSend(intToStr(50));
          end;
          ln('Has began fletching');
          FletchWait;
          Ln('Adding values');
          Report;
          if(UseSRL) then SRLRep;
            end else Ln('"X" Interface lost');
            end else Ln('Interface lost, misclick on bank?');
          If(Players[CurrentPlayer].Integers[0] = 0) then getLevels;
          ln('Repeat');
          until(not LoggedIn);
    end;

    procedure ScriptTerminate;
    begin
      Ln('Ending script');
      WriteLn('####################################');
      WriteLn('####################################');
      Writeln('# Thankyou for using Pro Fletcher! #');
      WriteLn('####################################');
      WriteLn('####################################');
      if(UseSRL) then SRLRep;
      Report;
    end;

    begin
      ClearDebug;
      ClearReport;
      SetupSRL;
      ScriptID := '913';
      if(UseSRL) then
       begin
          SRLID := YourID;
          SRLPassword := YourPass;
       end;
      Writeln('Setting up Bitmaps');
      Banker := BitmapFromString(25, 2, 'beNr7/x8ZMIBBbIg7ECGLQ' +
           '0TQBLGKQ0xAlsUvDpFCFwcAHVRkOg==');
      Booth := BitmapFromString(150, 2, 'beNqlUkEOwCAI6+/2gV33/2c' +
           '4NjJEGIiRcKgNQrEC7Q0A13lQNhXMCMk1ph4udA1FdLeCjQDpmav6' +
           '7fBIJfLjNe5HybGG17D8KCYflAuoYNNBS/L76pf3trZY+dTxfQcr/' +
           '2rVwYlTEVbWrA7ad7DjG3uFo54=');
      StoreAll := BitmapFromString(57, 1, 'beNpjYIgNcf8PBnAGAxggc' +
           '4FsCEIWwcVGUwkHcCmsphE2HAAUfVYX');
      WithdrawAll := BitmapFromString(78, 1, 'beNr7/x8CGBgYMBmxIe4QN' +
           'pABZzPAAFwEWRdEJbJiTNPghqCZidUurFxMW5BNQDMZygYADhqE7w' +
           '==');
      Examine := BitmapFromString(54, 1, 'beNoLcY8Ncf8PBgwMDEA2Go' +
           'JLIcv+RwUQKTgbk4FmBbKZBNXEAgDq5Vo2');
      MakeX := BitmapFromString(46, 5, 'beNp9UskNACAIYzsX8Ov+Y6iR' +
           'hFQKbXyQclPnWHPsBzNj43ojwOEMZyU+kfwiPbogeW13IYMpWB87R' +
           'sEuuByDA9IFmNk/sGnaq1xBTyL6dgXLWwlp+PisS6e4nqSzWTIDiB' +
           '/y2Qdr83wv');
      DeclarePlayers;
      WriteLn('####################################');
      WriteLn('####################################');
      Writeln('# Thankyou for using Pro Fletcher! #');
      WriteLn('####################################');
      WriteLn('####################################');
      if not (LoggedIn) then LoginPlayer;
        IncEx(ReportVars[0], 1);
        MarkTime(TotalTime);
        repeat
          if not (LoggedIn) then LoginPlayer;
          SetupPlayer;
          Ln('Running loop');
          Loop;
          Ln('Loop stopped, next please..');
          Logout;
          NextPlayer(True);
        until(false);
      TerminateScript;
    end.

  13. #13
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  14. #14
    Join Date
    Mar 2007
    Posts
    54
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks nice, I will edit this post when i try it out, and will say how it worked .


    Hmm, it found bank, opened it and tryed to search logs in old type bank slots possitions, did u updated it?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multi-Tasking?
    By dandude1695 in forum OSR Help
    Replies: 7
    Last Post: 12-06-2008, 06:56 PM
  2. Multi DTM Tester
    By guyver in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 11-06-2008, 05:54 AM
  3. Paint Pad - Multi-User Drawing
    By Yakman in forum Java Help and Tutorials
    Replies: 9
    Last Post: 06-08-2008, 10:00 PM
  4. Multi-Reporter
    By smithsps in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 05-15-2008, 08:59 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
  •