Results 1 to 2 of 2

Thread: first script official release, guildfisher (shark with barb tail support)

  1. #1
    Join Date
    Jan 2011
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default first script official release, guildfisher (shark with barb tail support)

    Only fishes sharks, using harpoon or barb tail harpoon at fishing guild.


    Code:
             program LemonGuildFisher;
    
    {$DEFINE SMART}
    //{$i SRL\SRL.scar}
    //{$i SRL\SRL\Misc\Stats.simba}
    
    
    {.include SRL\SRL.simba}
    {.Include SRL\SRL\Misc\Debug.simba}
    {$i sps/sps.simba}
    var
     sharkCount2, harpoon, shark, xshark, yshark, sharkCount, iSharkCount, bankedSharkCount, totalShark: Integer;
     doneFirstLoop:boolean;
    
    Const
     SERVER  = 61;     // Enter "0" to pick a random server.
     MEMBERS = True; // Set to True if using a RS-Members account. False if F2P.
     SRLStats_Username = ''; // Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     NumbOfPlayers= 1;     //How many players are you using
     Version=       '1.0'; //NO TOUCHY!
      DegToPx = 2.838;
     X_Axis = 511;
    
    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := 0;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
    
      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := ''; //Player nickname - 3-4 letters of Player username.
        Active      := True;
        harpoon := 2;       //1=Barb tail harpoon 2=Normal harpoon.
    
      end;
    
    end;
    
    
    
    
    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;
    
    
    Function CheckAndClick(X,Y:Integer):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      {Wait(100 + Random(50));
      If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
      If WaitUpTextMulti(['Mine','ine'], 150) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        Mouse(x, y, 0, 0,True);
        Wait(100+Random(50));
        FFlag(0);
      End;
    End;
    
    Procedure Antiban;
    Begin
      Case Random(5) Of
        0: HoverSkill('Fishing', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
        2: ExamineInv;
        3: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
        4: HoverSkill('random', False);
      End;
    End;
    
    function BankerColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);
    
      if not (FindColorsTolerance(arP, 6185059, MSX1, MSY1, MSX2, MSY2, 7)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        Exit;
      end;
    
      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);
    
      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;
    
      ColorToleranceSpeed(tmpCTS);
    
      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    Function getsharkCount:integer;
    begin
      //setupSrl;
       sharkCount2 := DTMFromString('mggAAAHicY2NgYOACYgkoFmFAAHYglgRiISBmgYqB1NRVVABJJgzMxYAdMOLAEAAAtyICKw==');
       Result := CountItems('dtm', sharkcount2, [0]);
       //WriteLn('getsharkcount: found a total of '+inttostr(CountItems('dtm', sharkcount2, [0])));
       FreeDTM(sharkcount2);
     end;
    
    
    Function WalkBank:Boolean;
    Var
      XMouse, YMouse:Integer;
      Var
      myPath:TPointArray;
    Begin
    
    if(invCount < 28) Then       begin
    SPS_Setup(RUNESCAPE_SURFACE,['5_7']);//SPS Areas
      myPath := [Point(2185, 2963), Point(2195, 2963), Point(2226, 2970), Point(2234, 2956)];//Path
      SPS_WalkPath(myPath);
    
    WriteLn('going back to fishing');
    Wait(2000+Random(500));
     end else
    if BankScreen() Then
     begin
     bankedsharkcount := bankedsharkcount +   getSharkCount;
    Deposit(harpoon, 28, True);
      end
    
     else
    
     if FindObjCustom(XMouse, YMouse, ['Bank', 'Bank'], [BankerColor], 2) Then
           begin
               WriteLn('hooray we found banker');
      GetMousePos(XMouse, YMouse);
      Mouse(XMouse, YMouse, 6, 6, False);
            Wait(300+Random(100));
            ChooseOption('Bank ');
    
           end else begin
    
      SPS_Setup(RUNESCAPE_SURFACE,['5_7']);//SPS Areas
      myPath := [Point(2234, 2956), Point(2226, 2970), Point(2195, 2963), Point(2185, 2963)];//Path
      SPS_WalkPath(myPath);
      End;
    End;
    
    
    
    Function isFishing: Boolean;   // scan for inventory changes and wait until theres no changes for 30s...
    var
      Inv1: integer;
      Inv2: integer;
      Inv3: integer;
    
    begin
      writeLn('scanning inventory changes..');
      WriteLn('Memory Tracker, Initial1: '+inttostr(Inv1)+'  Initial2:'+inttostr(Inv2)+'  Initial3:'+inttostr(Inv3));
    
      repeat
       writeln('executing isFishing... cause player is fishing');
              Inv1 := InvCount;
              wait(10000 + random(2000));
              Writeln('1.5');
              WriteLn('1.Memory Tracker, Initial1: '+inttostr(Inv1)+'  Initial2:'+inttostr(Inv2)+'  Initial3:'+inttostr(Inv3));
    
              If ((InvFull) or (FindNPCChatText('carry',Nothing)) or (InvCount=Inv3)) then
              Break;
              Inv3 := InvCount;
              wait(8000 + random(2000));
              writeln('Check inv2, performing antiban');
              antiBan;
              Inv2 := InvCount;
              WriteLn('2. Memory Tracker, Initial1: '+inttostr(Inv1)+'  Initial2:'+inttostr(Inv2)+'  Initial3:'+inttostr(Inv3));
    
              Until ((Inv2 = Inv1) or (InvFull) or (FindNPCChatText('carry',Nothing)));
    end;
    
    
    function fishbubble: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);
    
      if not (FindColorsTolerance(arP, 10392460, MSX1, MSY1, MSX2, MSY2, 8)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        Exit;
      end;
    
      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);
    
      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;
    
      ColorToleranceSpeed(tmpCTS);
    
      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    
    
    function firstloop:Boolean;
    begin
    SetScreenMouse('w',10);
    wait(1000);
    doneFirstloop:= false;
    WriteLn('execute first loop successfully');
    end;
    
    Function FindFish:Boolean;
    Var
      X, Y: Integer;
    Begin
      //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
    //  if FindObjCustom(X, Y, ['N', 'Net'], [12104624, 11710122, 10721682, 11578536], 10) Then
    if FindObjCustom(X, Y, ['N', 'Net'], [fishbubble], 10) Then
     Begin
      WriteLn('hooray we found some fish');
      GetMousePos(X, Y);
      Case Random(2) Of
        0: Begin
            Mouse(X, Y, 6, 6, False);
            Wait(2000+Random(100));
            ChooseOption('Harpoon');
            Wait(1000+Random(100));
            isFishing ;
        End;
        1: Begin
            Mouse(X, Y, 3, 3, False);
            Wait(2000+Random(100));
            ChooseOption('Harpoon');
            Wait(1000+Random(100));
            isFishing;
        End;
      End;
    
     End;
    End;
    var
      Direc: String;
      Angl: Integer;
    
            //main loop
    Begin
    ClearDebug;
     SetupSRL;
     ActivateClient;
     donefirstLoop:=(false);
     DeclarePlayers;
     LoginPlayer;
    //SetAngle(0);
    
     bankedSharkCount := 0;
     iSharkCount := 0;
    
    // SRLRandomsReport;
     WriteLn('Using Harpoon: '+inttostr(harpoon));
    // shark := DTMFromString('mggAAAHicY2NgYOACYgkoFmFAAHYglgRiISBmgYqB1NRVVABJJgzMxYAdMOLAEAAAtyICKw==');
    
    
     MMouse(Xshark, Yshark, 5, 5);
     //iSharkCount := CountItems('dtm', shark, [0]);
      isharkcount := getSharkCount;
      WriteLn('we found a total of' +inttostr(isharkCount));
    
      // freeDtm(shark);
    
     Repeat
    
     //FindNormalRandoms;
     //FindNonInventoryRandoms;
    
     if not(Loggedin()) then loginplayer;
     if not(doneFirstLoop) then begin firstloop end;
    
     if Not isMoving() and not BankScreen() and (InvCount < 28) Then
      begin
    
      SharkCount :=  bankedSharkCount - iSharkCount + getSharkCount;
    
    
      WriteLn('lets find fish, currently we have:' +inttostr(sharkcount)+ ' banksharkedcount:'+inttostr(bankedsharkcount)+ ' iSharkCount'+inttostr(iSharkCount)+ ' getSharkCount'+inttostr(getSharkCount));
      FindFish
       //Wait(20000+random(10000));
    
      end Else if (InvCount > 27) or BankScreen() Then begin
      walkBank;
      WriteLn('bank process activated');
      end;
      Wait(2000+random(100));
    
     Until(false);
     WriteLn('end of script');
    
    End.


    Setup Guide,
    1. Make sure your character is in fishing guild, with the harpoon you want in your inventory or barb tail harpoon equiped if you are using barb tail harpoon, make sure your character is at the fishing spawn of the sharks too.
    2. set name, pass, and harpoon, put 1 if you are using barb tail harpoon,
    3. run script

    Should have no problem fishing 60 sharks per hour for several hours, im having 80+ per hr with 91 fishing.

    Setbacks expected,
    1. Random event will very likely break down your script
    2. Character goes gazing mode once in awhile for a few seconds since im using quite a cheap method to see if my character isfishing or not...
    3. sometimes the warning just come flooding cause the cursor went out of the main screen to find fishing spawn, i do not know why this is happening, still figuring it out...
    4. Script is quite messy, this is the first time i write in pascal. sorry


    credits to yohojo youtube tutorials, his mining script as my script's very basic skeleton, Siel's Karamja Fisher 'isFishing' method.


    dont expect me to keep updating for your convenience cause i make this script just to start off with simba.. cause im learning to make certain script i want.

    Last edited by lolbus; 03-06-2012 at 02:44 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Germania
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    very buggy indeed and does not seem to work...

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •