Results 1 to 4 of 4

Thread: Script hangs when doing antirandom procedure

  1. #1
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Script hangs when doing antirandom procedure

    Im working on a spinner but when my script types 28 it 'Hangs' (it does nothing) and my script is still running:s

    can somebody help me pls?


    SCAR Code:
    program Spinner;
    {.include srl/srl.scar}
    {.include srl/srl/skill/Fighting.scar}
    const
    AmountOfFlax = 200;//How many flax you want to spin.//

    var
    Road: integer;
    rx: integer;
    ry: integer;
    cx: integer;
    cy: integer;
    i: Integer;

    procedure declarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'Name';      //username
      Players[0].Pass := 'Password';      //password
      Players[0].Nick := 'ame';      //3-4 letters from your username(helps anti-randoms)
      Players[0].Active := True;


      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    end;

    procedure setup;
    begin
    SetupSRL;
    declarePlayers;
    PerfectNorth;
    ClearDebug;
    i:= 0;
    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 DoAntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindTalk;
      FindFastRandoms;
      FindNormalRandoms;
      FindLamp('Crafting');
      SolvePinball;
    end;


    procedure walktospin;
    begin
    PerfectNorth;
    Road := FindFallyRoadColor;
    Wait(50+(random(50)))

    RadialWalk( Road , 200, 250, 50, 2, 2);
    Wait(4000+(random(150)));
    Flag;
    Wait(100+(random(50)));


    Mouse(632, 149 ,2 ,2 ,True);
    Wait(1000+(random(50)));
    Flag;
    Wait(100+(random(50)));


    RadialWalk( Road , 200, 270, 78, 2, 2);
    Wait(400+(random(50)));
    Flag;
    Wait(400+(random(50)));

    GetSymbolColor( rx , ry , 'water');
    MMouse(rx-3,ry,2,2);
    Wait(50+(random(50)));
    Mouse(rx-3, ry, 2, 2 , True);
    Flag;
    Wait(800+(random(50)));


    GetSymbolColor( rx , ry , 'spin');
    MMouse(rx-2,ry,2,2);
    Wait(50+(random(50)));
    Mouse(rx-2, ry, 2, 2 , True);
    Flag;
    Wait(800+(random(50)));
    end;

    procedure Spin;
    begin

    FindObjCustom(cx, cy, ['inn', 'hee'], [940418, 1206166], 5)
    MMouse(cx,cy,2,2);
    Wait(60+(random(70)));
    Mouse(cx, cy, 2, 2 , False);
    Wait(250+(random(70)));
    ChooseOption('Spin');
    Flag;
    Wait(600+(random(120)));
    DoAntiRandoms;

    MMouse(260, 137 ,2 ,2)
    Wait(60+(random(70)));
    Mouse(260, 137, 2, 2 , False);
    Wait(200+(random(100)));
    ChooseOption('X')
    Wait(1500+(random(100)));
    TypeSend('28');
    Wait(100+(random(100)));
    DoAntiRandoms;<-------------- The problem
    Wait(50+(random(10)));
    HoverSkill('crafting' , False);

    Wait(4000+(random(100)));
    end;

    Procedure ToBank;
    begin
    Road := FindFallyRoadColor;
    Wait(50+(random(50)))

    RadialWalk( Road , 0, 90, 75, 2, 2);
    Wait(5000+(random(50)));
    Flag;
    Wait(400+(random(50)));

    RadialWalk( Road , 0, 90, 65, 2, 2);
    Wait(1500+(random(50)));
    Flag;
    Wait(200+(random(50)));

    MMouse(640, 20 ,2 ,2)
    Wait(60+(random(70)));
    Mouse(640, 20, 2, 2 , True);
    Wait(1000+(random(100)));
    Flag;
    Wait(1000+(random(100)));
    end;

    function FindBankk(TheBank: string): Boolean;
    var
      bx, by, TheDTM: Integer;
      WhichAngle: Extended;
    begin
      case TheBank of
        'feb': TheDTM := DTMFromString('78DA63AC67626088634001FFFFFD63F80FA41' +
            '9416C2060AC01AA4987C83141D5FCF9C3C4C0055503028CAD44A8' +
            'E924AC0600131E11B5');
      end;

      if FindDtmRotated(TheDTM, bx, by, MMX1, MMY1, MMX2, MMY2, Radians(-30), Radians(30), 0.05,
            WhichAngle) then
          begin
            Mouse(bx, by, 0, 0, True);
            Flag;
            Wait(1200)
    //        FTWait(8);
            FFlag(0);
            if OpenBankQuiet(TheBank) then
            begin
              FixBank;
              Result := True;
              FreeDTM(TheDTM);
              Exit;
            end
            else Result := False;
          end
          else Result := False;
      FreeDTM(TheDTM);
    end;


    Procedure Bank;
    begin
    FindBankk('feb')
    DoAntiRandoms;
    Flag;
    Wait(1000+(random(100)));
    FixBank;
    Wait(300+(random(100)));
    DepositAll;
    Wait(1000+(random(100)));

    MMouse(94, 79 ,2 ,2)
    Wait(60+(random(70)));
    Mouse(94, 79, 2, 2 , False);
    Wait(350+(random(70)));
    ChooseOption('All');
    Wait(1200+(random(70)));
    CloseWindow;
    end;

    begin
    setup;
    repeat
    walktospin;
    Spin;
    ToBank;
    Bank;
    i:= i + 28;
    until(i >= AmountOfFlax)
    LogOut;
    end.

  2. #2
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    procedure DoAntiRandoms;
    begin
    if not LoggedIn then Exit;
    FindTalk;
    FindFastRandoms;
    FindNormalRandoms;
    FindLamp('Crafting');
    SolvePinball;
    end;

  3. #3
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Please post whole(or more of) script

    and suggest using
    SCAR Code:
    //Scar Tags

    EDIT:
    SCAR Code:
    {*******************************************************************************
    function FindTalk: Boolean;
    by: Lorax - (Old FindTalk = Renax)
    Description: Searches screen for NickName and handles ALL Talking Randoms
     to use the new FT use LoraxFTW := True; in your script
    *******************************************************************************}

    Be sure to "use LoraxFTW := True; in your script" =]

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Post more of your script, the entire script would be more helpfull.

    What u posted works ok for me

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AntiBan and AntiRandom Help?
    By 1337N3SS in forum OSR Help
    Replies: 13
    Last Post: 10-19-2008, 09:39 PM
  2. AntiRandom Question
    By spamthis in forum OSR Help
    Replies: 7
    Last Post: 09-12-2008, 07:06 AM

Posting Permissions

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