Results 1 to 2 of 2

Thread: toad script help again

  1. #1
    Join Date
    Dec 2011
    Location
    Texas
    Posts
    348
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default toad script help again

    Code:
    program FrogPicker;
    
      {$i SRL/SRL.scar}
      {$i SRL/SRL/Misc/stats.simba}
    
    
    
      Const
    
    
      SRLStats_Username = '';
      SRLStats_Password = '';
    
      BreakIn      = 135;
      BreakFor     = 15;
      Version      = 1.0;
      NumbOfPlayers = 1;
      StartPlayer = 0;
    
      Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(NumbOfPlayers);
        CurrentPlayer := StartPlayer;
        with Players[0] do
        begin
          Name        := '';
          Pass        := '';
          Pin         := '';
          BoxRewards  := ['XP','xp','lamp'];
          LampSkill   := 'Runecrafting';
          Active      := True;
        end;
      end;
    
      Procedure StatsGuise(wat:String);
      begin
        Status(wat);
        Disguise(wat);
      end;
    
    
    
      Procedure Antiban;
    Begin
      case Random(250) Of
        0: HoverSkill('Woodcut', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', False);
      End;
    End;
    
      Function FindFrog:Boolean;
      Var
        x, y, PlusOne, FrogCounter: Integer;
    Begin
    PlusOne:= InvCount + 1;
    x:=MSCX;
    y:=MSCY;
    If FindObjCustom(x, y, ['oad'], [1991226, 2256186, 2322250], 2) Then
    Begin
    StatsGuise('We found a toad');
    GetMousePos(x, y);
    
    Case Random(2) of
    0: Mouse(x, y, 0, 0, True);
    1: Begin
       Mouse(x, y, 0, 0, False);
       WaitOption('oad', 500);
       End;
    End;
    
    
    
    Repeat
      MarkTime(FrogCounter);
      AntiBan;
      Wait(1000);
      If InvCount=PlusOne Then
      WriteLn('We got one');
    Until (InvCount=PlusOne) Or (TimeFromMark(FrogCounter) > 3000)
    End;
    End;
    
    
    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
      FindFrog;
      Until(false);
    end.

    It takes about 2mins to get a full load which is the fastest I could make it and I have one problem. Sometimes the script will click the frog a little too high and then my mouse goes to the top left of the screen and sits there.

    And I also keep getting this
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Successfully executed.

  2. #2
    Join Date
    Feb 2009
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Hey, glad to see someone else working on a swamp toad script as well.

    Check out mine, its not flawless but works.

    Simba Code:
    program SwampToad;

    {$DEFINE SMART}
    {$i SRL\SRL.scar}
    {$i sps/sps.simba}

    Const
     NumbOfPlayers     = 1;       //How many players are you using
     StartPlayer       = 0;       //Player to start botting with

     procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      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.
        Active      := True;
      end;

    end;

    Procedure Start;
    Begin
    SetUpSRL;
    MouseSpeed := 12;
    ActivateClient;
    DeclarePlayers;
    If (Not LoggedIn) then
      LoginPlayer;
    SPS_Setup(RUNESCAPE_SURFACE, ['4_7', '3_7', '3_6']);
    SetAngle(True);
    MakeCompass('n');
    End;


    procedure Antiban;
    begin
    If Not FindNormalRandoms Then
    Begin
      if not (LoggedIn) then
        Exit;
      begin
        case Random(50) of
          10: RandomRClick;
          20: PickUpMouse;
          30: RandomMovement;
          40: BoredHuman;
          49: ExamineInv;
        end;
      end;
    End;
    end;


    Function ToSwamp : Boolean;
    var
    Path:TPointArray;
    Begin
    If Not FindNormalRandoms Then
    Begin
    Path := [Point(1621, 2898), Point(1600, 2852), Point(1569, 2809), Point(1554, 2763), Point(1548, 2712), Point(1539, 2658), Point(1522, 2614)];
    WriteLn('Walking to the swamp.');
      If SPS_WalkPath(Path) Then
        writeln('We have made it to the swamp.');
        result := True;
    End;
    End;

    Procedure MoveToCenter;
    Var
    Path:TPointArray;
    Begin
    Writeln('Moving to center');
    Path := [Point(1510, 2589)];
    SPS_WalkPath(Path);
    End;

    Function ClickToad : Boolean;
    Var
    X, Y:Integer;
    begin;
    If Not FindNormalRandoms Then
    Begin
    If (Not InvFull) Then

        Repeat

        Begin
        If FindObjCustom(X, Y, ['wam'], [2058558, 1991489, 1261353, 2257226, 2257211, 1261867, 1128998, 1925426, 1991495, 2390351, 2323781, 996383], 2)  Then
          Begin
          AntiBan;
          MMouse(X, Y, 1, 1);
          Wait(400+random(100));
          Mouse(X, Y, 0, 0, True);
          Wait(600+RandomRange(200,300));
          FFlag(0);
          Result := True;
          End;
        End;
        Until (InvFull);
    End;
    End;
    Function ToBank : Boolean;
    Var
    Path:TPointArray;
    Begin
    If Not FindNormalRandoms Then
    Begin
    Path := [Point(1526, 2613), Point(1538, 2666), Point(1550, 2725), Point(1570, 2779), Point(1592, 2833), Point(1610, 2868), Point(1622, 2894)];
    If SPS_WalkPath(Path) Then
      begin
      WriteLn('We have arrived at the bank.')
      Result := True;
      End;
    end;
    End;

    Function AtBank : Boolean;
    Var
    AtBankDTM, X, Y:Integer;
    Begin
    If Not FindNormalRandoms Then
    begin
    AtBankDTM := DTMFromString('mggAAAHicY2NgYJBjgAAQbQLEzEBsA8TyQCwNlZMBYkcojnNVYGBjYsXAXAzYASMODAEA6p8Cog==');
    If FindDTM(AtBankDTM, X, Y, MMX1, MMY1, MMX2, MMY2) Then
      Result := True;
    end;

    End;

    Function Bank : Boolean;
    Var
    X, Y, A, B, C, D:Integer;

    Begin
    If Not FindNormalRandoms Then
    Begin
    A := 626+Random(3);
    B := 53+Random(3);
    MakeCompass('s');
    SetAngle(False);
    If FindObjCustom(X, Y, ['airca'], [528920, 396817, 462612, 330510, 529176, 727586], 3) Then
      Begin
      MMouse(X, Y, 5, 5);
      Wait(500+RandomRange(200,300));
      Mouse(X, Y, 0, 0, True);
      Wait(3500+RandomRange(500,800));
      If AtBank Then
      begin
      MMouse(A, B, 0, 0);
      Wait(200+Randomrange(20,50));
      Mouse(A, B, 0, 0, True);
      Wait(2500+Randomrange(200,300));
      writeln('Looking for the bank');
      SetAngle(True);
        If FindObjCustom(C, D, ['anker'], [8435943, 8762864, 8367589, 9092602], 5) Then
        begin;
        MMouse(C, D, 3, 3);
        Wait(200+RandomRange(50,100));
        Mouse(C, D, 0, 0, False);
        Wait(200+Randomrange(100,150));
        ChooseOption('ank Gno');
        Wait(800+RandomRange(500,700));
        DepositAll;
        Wait(500+randomrange(200,300));
        CloseBank;
        writeln('Successfully Banked all toads!')
        Result := True;
        End;
      End;
    End;
    End;



    Function ExitBank : Boolean;
    Var
    X, Y, A, B:Integer;
    Begin
    If Not FindNormalRandoms Then
    Begin
    X := 630+Randomrange(2, 5);
    Y := 20+RandomRange(2, 5);
    SetAngle(True);
    MakeCompass('n');
    MMouse(X, Y, 0, 0);
    Wait(100+randomrange(20,30));
    Mouse(X, Y, 0, 0, True);
    Wait(3500+randomrange(300,500));
     If FindObjCustom(A, B, ['airca'], [667723, 401458, 400943], 3) Then
       Begin
       repeat
       MMouse(A, B, 2, 2)
       Wait(100+randomrange(10,20));
       Mouse(A, B, 0, 0, False);
       Wait(100+Randomrange(200,400));
       ChooseOption('airca');
       writeln('We have gone down the stairs of the bank!');
       until(Not AtBank);
       End;
       If AtBank Then
       Result := True;
     End;
     End;




    begin
    Start;
    repeat
    If InvFull Then
     Begin
     ToBank;
     Bank;
     ExitBank;
     end;
    ToSwamp;
    ClickToad;
    until(false)

    end.

    I gave up on it because the colours were just too similar, there is no way of telling the difference between grass around and the frog itself.

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
  •