Results 1 to 5 of 5

Thread: What else in my script?

  1. #1
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default What else in my script?

    SCAR Code:
    ////////////////////\\\\\\\\\\\\\\\\\\\\\
                  ///////////Zeta's Maple Masher\\\\\\\\\\\\\
                 //Big thanks to : Kevin Wolf, Town, and SantaClause\\
                 /////////////////////\\\\\\\\\\\\\\\\\\\\\\\\


    program ZetasMapleMasher;

    {.include SRL\SRL.scar}
    {.include SRL\SRL\Skill\Woodcutting.SCAR}

    const
      Maple = 19058; //the color of the maple
      Maple2 = 16760;
      Maple3 = 9548;
      Tol = 14;
      LogsToChop = 100; //how many logs to chop)

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //Number of players to use
      NumberOfPlayers(HowManyPlayers); //Don't Touch
      CurrentPlayer := 0;  //Player to start with
      Players[0].Name := 'n3mes1s pk'; //Players username
      Players[0].Pass := ''; //Players password
      Players[0].Nick := 'mes'; //3-4 characters from players username(Lowercase and no spaces)
      Players[0].Active := True;     //Are you using this player?
    end;

    function RadialToleranceWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
      Radius: Integer; Xmod, Ymod, Tol: Integer): Boolean; // By Wizzup? and WT-Fakawi.
    var
      i, X1, Y1, x, y: Integer;
    begin
      if (RoadColorChecker) then
        if (DebugRadialRoad) then
          WriteLn(' THROUGH RADIALROADWALK=  ---> ' + IntToStr(RoadColor));
      if (StartRadial = EndRadial) then
      begin
        WriteLn('Using LinearRoadWalk, equal values.')
          if LinearRoadWalk(TheColor, StartRadial, Radius, Xmod, Ymod) then
          Result := True;
      end
      else if (StartRadial < EndRadial) then
      begin
        repeat
          for i := StartRadial to EndRadial do
          begin
            x1 := Round(Radius * Sine(i)) + 646;
            y1 := Round(-Radius * Cose(i)) + 84;
            if Not LoggedIn then Exit;
            if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
            begin
              MouseFindNoFlag(X,Y,Xmod,Ymod);
              Result := True;
              CountFlag(10);
              Exit;
            end;
          end;
          Radius := Radius - 4;
        until (Radius <= 1);
      end else
        if (StartRadial > EndRadial) then
        begin
          repeat
            for i := StartRadial downto EndRadial do
            begin
              x1 := Round(Radius * Sine(i)) + 646;
              y1 := Round(-Radius * Cose(i)) + 84;
              if Not LoggedIn then Exit;
              if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
              begin
                MouseFindNoFlag(X,Y,Xmod,Ymod);
                Result := True;
                CountFlag(10);
                Exit;
              end;
            end;
            Radius := Radius - 4;
          until (Radius <= 1);
        end
    end;


    procedure Chat;
    begin
      if (not(LoggedIn)) then Exit;
      SetChat('on', 1);
      SetChat('off', 2);
      SetChat('on', 3);
      SetChat('on', 4);
    end;

    Function FindFastRandoms: Boolean;    // By WT-Fakawi.
    Var
      i: Integer;
    Begin
    if not LoggedIn then Exit;
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;
           2:  If FindMod Then
                 Result := True;
           3:  If FindMime Then
                 Result := True;
           4:  If FindMaze Then
                 Result := True;
           5:  If FindQuiz Then
                 Result := True;
           6:  If FindDemon Then
                 Result := True;
           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Players[CurrentPlayer].Active := False;
                   Logout;
                   Exit;
                 End;
               End;
           8 : If RC Then
                  Result:=True;
           9 : If FindFight Then
                    Result := True;
           10: If FindTalk Then
                 Result := True;
           11: If FindCerter Then
                 Result := True;
        End;
        Wait(1);
      End;
    End;

    procedure AntiRandoms;
    var
    x,y: integer;
    begin
        FindTalk;
        FindNormalRandoms;
        FindFastRandoms;
        FindLamp('Woodcutting');
        SolvePinball;
      if (FindFight) then
      begin
        MakeCompass('N');
        RunTo('W', True);
        Wait(8000 +Random(6423));
        RunBack;
      end;
    end;



    procedure AntiBan;
    begin
      if (not(LoggedIn)) then
      Exit;
      case Random(6) of

        0: RandomRClick;
        1: HoverSkill('Woodcutting', False);
        2: BoredHuman;
        3: PickUpMouse;
        4: DoEmote(1 +Random(20));
        5: begin
             GameTab(1 +Random(12));
             wait(2000 +Random(1000));
             GameTab(4);
           end;
        end;
    end;



    procedure WalkToMaples;

    begin
    MakeCompass('N');
      HighestAngle;
      Setrun(true);
      RadialToleranceWalk(2196356, 323, 355, 50, 2, 2, 20)
    Flag;
    end;

    procedure ChopMaples;
    var
      x, y, ChopMark: Integer;
    begin
      if (not (LoggedIn)) then Exit;
      repeat
        if FindObjCustom(x, y, ['aple tree'], [Maple, Maple2, Maple3], Tol) then
        begin
          GetMousePos(X, Y);
          Wait(500 + Random(102));
          Mouse(X, Y, 1, 1, True);
          AntiRandoms;
          MarkTime(ChopMark);
          repeat
            Wait(500 + Random(250));
          until(TimeFromMark(ChopMark) >= (10000 + Random(5000))) or (InvFull) or (not (LoggedIn));
        end;
      until (InvFull) or (not (LoggedIn));
    end;

    procedure WalkToBank;
    var
    x,y: integer;
    begin
      if (not(LoggedIn)) then
        Exit;
        SymbolAccuracy:= 0.4;
        Makecompass('N');
        HighestAngle;
      begin
        if (FindSymbol(x, y, 'bank')) then
        begin
          Mouse(x, y, 2, 2, true);
          AntiRandoms;
          Flag;
        end;
      end;
    end;

    procedure Bank;

    begin
    OpenBank3;
      if (BankScreen) then
      FixBank;
        Deposit(2,28,2);
        Closebank;
    end;



    procedure MainLoop;
    begin
      ActivateClient;
      SetUpSRL;
      DeclarePlayers;
      LoginPlayer;
      Chat;
      repeat
        if not LoggedIn then Exit;
         WalkToMaples;
         ChopMaples;
         WalkToBank;
         Bank;
         if (not (LoggedIn)) then Exit;
    until(false)
    end;

    begin
    MainLoop;
    end.

    What can I do to make it better?

    Current problem: After a little bit it will log out, I thought it was cause of a mod or random, but I was watching it and nothing and then I log out.. any ideas?





  2. #2
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Just make some changes to the coordinates. If it clicks too much left, make it click some more to the right (x+15+random(5))

    For logout problems, I always check where I have used the LogOut-procedure, and then I check if I have made a mistake making the statement true, which makes my char log out.

    -Knives

  3. #3
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im still having the logout problem





  4. #4
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i gues noone can help us with our logout problem :P
    ....

  5. #5
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Dushii, I've already offered you an alternative for OpenBankBooth. Go check it out.

    Zeta: Put in Disguise(WhatIsHappeningNow) around the script so you can follow the script while working. Do that 3 times and remember WHEN and WHERE it logs out. Find out what conditions on those 3 places are the same and then fix it. Is it while banking, while walking, while waiting?
    That's my best idea.

    -Knives

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
  •