Results 1 to 7 of 7

Thread: [Runtime Error] Form Help

  1. #1
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default [Runtime Error] Forms - Form Help

    I have this script , sorry that its so giant! - the lines are pointed out
    SCAR Code:
    program Tut_Runner;
    {.include SRL/SRL.scar}

    const

      //Program Constants\\
      RandomRangeInteger = 10; //Must be Integer and at least 1 more than RandomClickNum.
      RandomClickNum = 1; //Must be Integer and at least 1 less than RandomRangeInteger.
      DebugReporting = True; //True Or False.
      smooth = true;

    var
      LooperInteger, RandomInteger, Mox, Moy, ClickCont, xx, yy, XDump, YDump, WhichArrow, FemaleOrMale, RandomArray, FailSafeLoop, TimeCounter : Integer;
      Digit1, Digit2, Digit3, Digit4 : String;
      AccountNameArray : array[1..50] of string;
      EndFormOpen_ : Boolean;
      FormDesign_ : TForm;
      Image3, Image1 : TImage;
      Label1, Label2 : TLabel;
      Panel1, Panel2, Panel3 : TPanel;
      PlayerNumber : TComboBox;
      AccountPassword : TEdit;
      BitBtn1 : TBitBtn;


    // When the form is closed, this code will be executed.
    procedure FormOpen_OnClose(Sender : TObject; var Action : TCloseAction);
    begin
      if(not(FormDesign_.ModalResult = 1))then
        EndFormOpen_ := True;
    end;

    // This form was parsed using: DFM Form Parser v.23 by Ron.
    procedure FormOpen_;
    var
      TimeFormOpen_ : Integer;
    begin
      TimeFormOpen_ := GetSystemTime;
      FormDesign_ := CreateForm;
      with FormDesign_ do
      begin
        OnClose := @FormOpen_OnClose;
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [];
        FormStyle := fsStayOnTop;
        ClientWidth := 212;
        ClientHeight := 213;
        Caption := 'Setup';
        Color := clSkyBlue;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      Image3 := TImage.Create(FormDesign_);
      with Image3 do
      begin
        Parent := FormDesign_;
        Left := 541;
        Top := 336;
        Width := 105;
        Height := 105;
      end;
      Label1 := TLabel.Create(FormDesign_);
      with Label1 do
      begin
        Parent := FormDesign_;
        Left := 23;
        Top := 11;
        Width := 37;
        Height := 13;
        Caption := 'Players:';
      end;
      Label2 := TLabel.Create(FormDesign_);
      with Label2 do
      begin
        Parent := FormDesign_;
        Left := 24;
        Top := 76;
        Width := 115;
        Height := 13;
        Caption := 'Password For Accounts:';
      end;
      Panel1 := TPanel.Create(FormDesign_);
      with Panel1 do
      begin
        Parent := FormDesign_;
        Left := 23;
        Top := 26;
        Width := 169;
        Height := 41;
        TabOrder := 0;
      end;
      Image1 := TImage.Create(Panel1);
      with Image1 do
      begin
        Parent := Panel1;
        Left := 16;
        Top := -39;
        Width := 105;
        Height := 105;
      end;
      PlayerNumber := TComboBox.Create(Panel1);
      with PlayerNumber do
      begin
        Parent := Panel1;
        Left := 12;
        Top := 10;
        Width := 145;
        Height := 21;
        Hint := 'Select the amount of players you want advised no more than ten.';
        ItemHeight := 13;
        MaxLength := 2;
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 0;
        Text := 'Select';
        with PlayerNumber.Items do
        begin
          Add('1');
          Add('2');
          Add('3');
          Add('4');
          Add('5');
          Add('6');
          Add('7');
          Add('8');
          Add('9');
          Add('10');
        end;
      end;
      Panel2 := TPanel.Create(FormDesign_);
      with Panel2 do
      begin
        Parent := FormDesign_;
        Left := 24;
        Top := 91;
        Width := 169;
        Height := 41;
        Hint := 'Enter The Master Password For The Created Accounts.';
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 1;
      end;
      AccountPassword := TEdit.Create(Panel2);
      with AccountPassword do
      begin
        Parent := Panel2;
        Left := 10;
        Top := 10;
        Width := 150;
        Height := 21;
        PasswordChar := '*';
        TabOrder := 0;
        Text := 'Password';
      end;
      Panel3 := TPanel.Create(FormDesign_);
      with Panel3 do
      begin
        Parent := FormDesign_;
        Left := 58;
        Top := 145;
        Width := 96;
        Height := 41;
        Hint := 'Start...';
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 2;
      end;
      BitBtn1 := TBitBtn.Create(FormDesign_);
      with BitBtn1 do
      begin
        Parent := FormDesign_;
        Left := 69;
        Top := 153;
        Width := 75;
        Height := 25;
        TabOrder := 3;
        Kind := bkOK;
      end;
      WriteLn('FormOpen_ compiled in ' + IntToStr(GetSystemTime - TimeFormOpen_) + ' milliseconds!');
    end;

    procedure SafeFormOpen_;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('FormOpen_', V);
    end;

    procedure ShowFormOpen_Modal;
    begin
      FormDesign_.ShowModal;
    end;

    procedure SafeShowFormOpen_Modal;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowFormOpen_Modal', V);
    end;

    procedure MainFormOpen_;
    begin
      try
        SafeFormOpen_;
        SafeShowFormOpen_Modal;
      finally
        FreeForm(FormDesign_);
      except
        WriteLn('An error seems to have occurred in: FormOpen_');
      end;
    end;

    procedure ViewSetUpForm;
    begin
      ClearDebug;
      GetSelf.WindowState := wsMinimized;
      MainFormOpen_;
      GetSelf.WindowState := wsNormal;
      if(EndFormOpen_)then
        TerminateScript;
    end;

    //By bullzeye95 slightly edited... XD
    function IsEvenReturn(ValueId: Integer): Boolean;
    begin
      Result:= ((ValueId mod 2) = 0);
    end;

    procedure ClickerMouse(BoolLeft: Boolean);
    begin
      GetMousePos(Mox, Moy);
      Mouse(Mox, Moy, 0, 0, BoolLeft);
    end;

    procedure LoadBMPs;
    begin
      ClickCont := BitmapFromString2(False, 'aA909D78DAE594410EC3' +
           '200C04BF8401033E020DFF7F523195A248C8C429EAA9398CD0621' +
           '6D622186300C0F4AFB60E9773271E89590E6618CA8BE9B8C4600A' +
           '9DC1D5736C93E7310EA58D59CB953EBACE68590F8D983414283C5' +
           'B7997509015B2E73879D6A10C8BD66616CA9840A4258A2851F4FC' +
           'D44C0E62A55023291A4F29DD4D6A29EF75AD7086B522EA1767699' +
           '5C673CEB576D37027AF2ACBB2F36B4FCD5DD2DCE1FDBC9A3E3FAD' +
           'D9EFF02FF2EA77D4F4E7E93BB09FFABBBD6EDE37F5FFABF2FC1BB' +
           'E01231');
    end;

    procedure GameTabber(TabNum: Integer);
    begin
      if not LoggedIn then Exit;
      case  TabNum  of
        1 : Mouse(556, 187, 10, 10, true);
        2 : Mouse(583, 184, 10, 10, true);
        3 : Mouse(610, 181, 10, 10, true);
        4 : Mouse(638, 182, 10, 10, true);
        5 : Mouse(680, 184, 10, 10, true);
        6 : Mouse(709, 184, 10, 10, true);
        7 : Mouse(735, 185, 10, 10, true);
        8 : Mouse(559, 478, 10, 10, true);
        9 : Mouse(581, 481, 10, 10, true);
        10 : Mouse(613, 478, 10, 10, true);
        11 : Mouse(639, 477, 10, 10, true);
        12 : Mouse(681, 478, 10, 10, true);
        13 : Mouse(705, 478, 10, 10, true);
        14 : Mouse(734, 475, 10, 10, true);
      end;
    end;

    procedure DebugString(DisplayText: String);
    begin
      Writeln(TheTime+' : '+DisplayText);
    end;

    procedure CharButton(xc1, yc1, xd1, yd1, xc2, yc2, xd2, yd2, RandClickNum, RandRangeInteger: Integer);
    begin
      if not LoggedIn then Exit;
      WhichArrow := RandomRange(RandomRange(1, 10), RandomRange(11, 20));
      if(IsEvenReturn(WhichArrow)) then
      begin
        if(FindColorTolerance(xx, yy, 12172745, xc1, yc1, xd1, yd1, 5)) then
        begin
          wait(200+random(300));
          MMouse(xx, yy, 10, 8);
          RandomInteger := RandomRange(RandClickNum, RandRangeInteger);
          for LooperInteger := 0 to RandomInteger do
          begin
            wait(300+random(2101));
            ClickerMouse(true);
          end;
        end;
      end;

      if(not IsEvenReturn(WhichArrow)) then
       begin
         if(FindColorTolerance(xx, yy, 12172745, xc2, yc2, xd2, yd2, 5)) then
         begin
           wait(200+random(300));
           MMouse(xx, yy, 10, 8);
           RandomInteger := RandomRange(RandClickNum, RandRangeInteger);
           for LooperInteger := 0 to RandomInteger do
           begin
             wait(300+random(2000));
             Mouse(xx, yy, 3, 3, true);
           end;
         end;
       end;
    end;

    function AccountName: String;
    begin
      RandomArray := RandomRange(1, 50);
      AccountNameArray[1] := 'Varr2ca';
      AccountNameArray[2] := 'Fishtute';
      AccountNameArray[3] := 'mitte_o';
      AccountNameArray[4] := 'mageanta';
      AccountNameArray[5] := 'mingaman';
      AccountNameArray[6] := 'mumusk_a';
      AccountNameArray[7] := 'lamabell';
      AccountNameArray[8] := 'utta_min';
      AccountNameArray[9] := 'QuotaSha';
      AccountNameArray[10] := 'Altorie';
      AccountNameArray[11] := 'ayrebam_';
      AccountNameArray[12] := 'Collison';
      AccountNameArray[13] := 'Mingmong';
      AccountNameArray[14] := 'Hebittoo';
      AccountNameArray[15] := 'compabas';
      AccountNameArray[16] := 'loadingA';
      AccountNameArray[17] := 'oakerbal';
      AccountNameArray[18] := 'sparebog';
      AccountNameArray[19] := 'bogger_G';
      AccountNameArray[20] := 'icu_icu_';
      AccountNameArray[21] := 'ayebogo_';
      AccountNameArray[22] := 'amberdan';
      AccountNameArray[23] := 'ickle_bi';
      AccountNameArray[24] := 'joe_boo_';
      AccountNameArray[25] := 'hogobogo';
      AccountNameArray[26] := 'belkiner';
      AccountNameArray[27] := 'addyeven';
      AccountNameArray[28] := 'meljuine';
      AccountNameArray[29] := 'mopopomo';
      AccountNameArray[30] := 'dacbooer';
      AccountNameArray[31] := 'chumpchi';
      AccountNameArray[32] := 'kzsan_ko';
      AccountNameArray[33] := 'Er_Errr';
      AccountNameArray[34] := 'evilwinY';
      AccountNameArray[35] := 'gaspimle';
      AccountNameArray[36] := 'wevaltuu';
      AccountNameArray[37] := 'mush_Goy';
      AccountNameArray[38] := 'mopopomo';
      AccountNameArray[39] := 'sale_lag';
      AccountNameArray[40] := 'striknia';
      AccountNameArray[41] := 'jabadive';
      AccountNameArray[42] := 'cloncloe';
      AccountNameArray[43] := 'welldoie';
      AccountNameArray[44] := 'Parythin';
      AccountNameArray[45] := 'kupiekup';
      AccountNameArray[46] := 'funcicon';
      AccountNameArray[47] := 'hipoopoo';
      AccountNameArray[48] := 'monauyye';
      AccountNameArray[49] := '2_2lol2_';
      AccountNameArray[50] := 'normatio';
      Result := AccountNameArray[RandomArray];
    end;

    function AccountNumber: String;
    begin
      Digit1 :=  inttostr(RandomRange(0, 9));
      Digit2 :=  inttostr(RandomRange(0, 9));
      Digit3 := '';
      Digit4 := '';
      if(RBool) then
      begin
        Digit3 :=  inttostr(RandomRange(0, 9));
      end;
      if(RBool) then
      begin
        Digit4 :=  inttostr(RandomRange(0, 9));
      end;
      Result := Digit1+Digit2+Digit3+Digit4;
    end;

    function AccountUsername: String;
    begin
      Result := AccountName+AccountNumber;
    end;

    {TOOKEN FROM SRL INCLUDES EDITED BY ME TOO STOP IT FROM SEARCHING CLICK HERE TO PLAY}
    {*******************************************************************************
    procedure LoginPlayer;
    By: WT-Fakawi and modified by Ron
    Description: Logs Player[CurrentPlayer] in. Is usually preceeded by NextPlayer.
    *******************************************************************************}

    // * Still to implement, but have never encountered any of these:

    // * Login limit exceeded.
    // * Too many connections from your address."
    // * Bad session id.
    // * Could not complete login.
    // * Please try using a different world.
    // * Invalid login server requested
    // * Malformed login packet.
    // * Unexpected server response

    procedure LoginPlayerSRL;
    var
      tx, ty, CHx, CHy, c, tmpMask, LastPlayer: Integer;
    begin
      if (not (LoggedIn)) then
      begin
        // Beginning player not active...
        if (not (Players[CurrentPlayer].Active)) then
        begin
          WriteLn('Current player is not Active...');
          LastPlayer := CurrentPlayer;
          repeat
            CurrentPlayer := Random(HowManyPlayers);
            Wait(100);
          until (Players[CurrentPlayer].Active);
          LoginPlayerSRL;
          Exit;
        end;
        x := 150;
        y := 173;
        if (FindClient) then
          FindWindowBySize(766, 504);
        ActivateClient;
        Wait(1000);
        ClickOption('Cancel', 1);
        ClickOption('Exist', 1);
        tmpMask := CreateBitmapMaskFromText('Username', upchars);
        if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 0, 520, 340, 10, 50)) then
        begin
          Wait(25 + Random(50));
          Mouse(x + 24, y + 3, 3, 0, True);
          Wait(25 + Random(50));
          //SendKeysSilent(Players[CurrentPlayer].Name + chr(13) + Players[CurrentPlayer].Pass)
          WriteLn(Players[CurrentPlayer].Name);
          TypeSend(Players[CurrentPlayer].Name);
          Wait(100 + Random(100));
          Mouse(327, 272, 0, 0, True);
          TypeSend(Players[CurrentPlayer].Pass);
          Wait(100 + Random(100));
        end;
        ClickOption('Login', 1);
        // Waiting for Connecting to Server...
        MarkTime(Mark);
        while FindText(tx, ty, '...', upchars, 240, 180, 530, 240) do
        begin
          Wait(100);
          if TimeFromMark(Mark) > 20000 then Break;
        end;
        MarkTime(Mark);
        repeat
          Wait(1000);
          // Enter your username and password. If all failed...
          if FindText(tx, ty, 'nter you', upchars, 240, 180, 530, 240) then
          begin
            WriteLn('Enter your username and Password');
            LoginPlayerSRL;
            FreeBitmap(tmpMask);
            Exit;
          end else
          // Your account is already logged in.
          if FindText(tx, ty, 'lready', upchars, 240, 180, 530, 240) then
          begin
            WriteLn('Your account is already logged in');
            LastPlayer := CurrentPlayer;
            repeat
              CurrentPlayer := Random(HowManyPlayers);
              Wait(100);
            until (Players[CurrentPlayer].Active) and (CurrentPlayer <> LastPlayer);
            LoginPlayerSRL;
            FreeBitmap(tmpMask);
            Exit;
          end else
          // Invalid Username. 3 attempts. If fails, you haven't set your username/pass correct
            if FindText(tx, ty, 'nvalid', upchars, 240, 180, 530, 240) then
            begin
              WriteLn('Invalid Username.');
              SRL_Attempts := SRL_Attempts + 1;
              if SRL_Attempts > 3 then
              begin
                Players[CurrentPlayer].loc := 'L/P ERROR';
                NextPlayer(False);
              end;
              LoginPlayerSRL;
              FreeBitmap(tmpMask);
              Exit;
            end else
          // Login attempts exceeded. Please wait 1 minute and try again.
              if FindText(tx, ty, 'excee', upchars, 240, 180, 530, 240) then
              begin
                WriteLn('Login attempts exceeded. Please wait 1 minute and try again.');
                Wait(60000);
                LoginPlayerSRL;
                FreeBitmap(tmpMask);
                Exit;
              end else
          // World is full.
                if FindText(tx, ty, 'full', upchars, 240, 180, 530, 240) then
                begin
                  WriteLn('World is full.');
                  Wait(3000);
                  LoginPlayerSRL;
                  FreeBitmap(tmpMask);
                  Exit;
                end else
          // Unable to connect. Login Server offline.
                  if FindText(tx, ty, 'offl', upchars, 240, 180, 530, 240) then
                  begin
                    WriteLn('Unable to connect Login Server offline.');
                    Wait((6000) + Random(6000));
                    LoginPlayerSRL;
                    FreeBitmap(tmpMask);
                    Exit;
                  end else
          // Error Connecting.
                    if FindText(tx, ty, 'rror', upchars, 240, 180, 530, 240) then
                    begin
                      WriteLn('Error Connecting.');
                      Wait(10000);
                      LoginPlayerSRL;
                      FreeBitmap(tmpMask);
                      Exit;
                    end else
          // Error loading your profile. Will attempt to re-login 5 more times.)
                      if FindText(tx, ty, 'ontact', upchars, 240, 180, 530, 240) then
                      begin
                        WriteLn('Error loading your profile.');
                        Wait(2000);
                        LoginPlayerSRL;
                        FreeBitmap(tmpMask);
                        Exit;
                      end else
          // Login server rejected session.
                        if FindText(tx, ty, 'reject', upchars, 240, 180, 530, 240) then
                        begin
                          WriteLn('Login server rejected session.');
                          Wait(1000);
                          LoginPlayerSRL;
                          FreeBitmap(tmpMask);
                          Exit;
                        end else
          // Runescape has been updated.
                          if FindText(tx, ty, 'reload', upchars, 240, 180, 530, 240) then
                          begin
                            WriteLn('ERROR. RuneScape has been updated. Script Terminated.');
                            FreeBitmap(tmpMask);
                            TerminateScript;
                          end;
          // The Server is being updated. Please wait 1 minute.
          if FindText(tx, ty, 'updat', upchars, 240, 180, 530, 240) then
          begin
            WriteLn('The Server is being updated.');
            Wait(60000);
            LoginPlayerSRL;
            FreeBitmap(tmpMask);
            Exit;
          end else
          // Your account has been disabled.
            if FindText(tx, ty, 'disabled', upchars, 420, 180, 500, 220) then
            begin
              WriteLn('Your account has been disabled');
              Players[CurrentPlayer].loc := 'DISABLED';
              NextPlayer(False);
              FreeBitmap(tmpMask);
              Exit;
            end else
          // Waiting for Profile to be Transferred
              if FindText(tx, ty, 'trans', upchars, 240, 180, 530, 240) then
              begin
                WriteLn('Waiting for your Profile to be Transferred');
                Wait(2500);
              end else
          // You need a Members account...
                if FindText(tx, ty, 'member', upchars, 240, 180, 530, 240) then
                begin
                  WriteLn('You need a Members account...');
                  Players[CurrentPlayer].loc := 'Non-Member';
                  NextPlayer(False);
                  FreeBitmap(tmpMask);
                end else
          // Welcome to RuneScape. If all failed...
                  if FindText(tx, ty, 'elcom', upchars, 240, 180, 530, 240) then
                  begin
                    WriteLn('Welcome.');
                    LoginPlayerSRL;
                    FreeBitmap(tmpMask);
                    Exit;
                  end;

          if TimeFromMark(Mark) > 180000 then
          begin
            WriteLn('three minutes have passed');
            WriteFileString(TheFile, Chr(13) + 'THREE MINUTES HAVE PASSED!!!' +
              Chr(13));
            if (FindClient) then
              FindWindowBySize(766, 504);
            ActivateClient;
            ClickOption('Cancel', 1);
            ClickOption('Exist', 1);
          end;
        until (LoggedIn);
      end;
      FreeBitmap(tmpMask);
      if LoggedIn then
      begin
        PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
        if NickNameBMP <> 0 then
          FreeBitmap(NickNameBMP);
        NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick,
          upchars); // Screenname
        WriteFileString(TheFile, Chr(13) + UpperCase(Players[CurrentPlayer].Name) +
          Chr(13)); //* Save NAME to file
      end;
    end;


    procedure DeclarePlayers;
    var
    UserNum, MasterPassword_ : String;
    begin
      UserNum := PlayerNumber.Text;
      MasterPassword_ := AccountPassword.Text;

      HowManyPlayers:= StrToInt(UserNum);
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      for LooperInteger:=0 to HowManyPlayers-1 do
      begin
        Players[LooperInteger].Name     := AccountUsername;
        Players[LooperInteger].Pass     := MasterPassword_;
        Players[LooperInteger].Active   := True;
      end;
    end;


    procedure SetUpScript;
    begin
      ViewSetUpForm;
      LoadBMPs;
      MouseSpeed := 4;
      rs_DeleteUID;
      ActivateClient;
      wait(2000+random(1000));
      SetupSRL;
    end;

    procedure CreateAccount;
    begin
      OpenWebPage('https://create.runescape.com/lang/en/aff/runescape/createaccount.ws?password1='+Players[CurrentPlayer].Pass+'&password2='+Players[CurrentPlayer].Pass+'&termsandcond=1&username='+Players[CurrentPlayer].Name+'&country=7');
      wait(9260+random(4000));
    end;

    procedure CharLook;
    begin
      if not LoggedIn then Exit;
      FemaleOrMale := RandomRange(1 , 20);
      if(IsEvenReturn(FemaleOrMale)) then
      begin
        if(FindColorTolerance(xx, yy, 2070783, 421, 277, 490, 309, 3)) then
        begin
          Mouse(xx, yy, 3, 3, true);
          wait(100+random(154));
        end;
      end;

      CharButton(27, 72, 78, 104, 140, 74, 192, 107, RandomClickNum, RandomRangeInteger);
      CharButton(27, 108, 80, 142, 139, 108, 193, 143, RandomClickNum, RandomRangeInteger);
      CharButton(28, 146, 79, 176, 141, 146, 190, 177, RandomClickNum, RandomRangeInteger);
      CharButton(29, 178, 76, 212, 141, 177, 188, 213, RandomClickNum, RandomRangeInteger);
      CharButton(33, 213, 77, 247, 142, 215, 189, 247, 1, 2);
      CharButton(31, 248, 81, 281, 144, 247, 191, 280, RandomClickNum, RandomRangeInteger);
      CharButton(27, 284, 81, 313, 139, 283, 190, 314, RandomClickNum, RandomRangeInteger);
      CharButton(331, 79, 378, 113, 440, 78, 489, 114, RandomClickNum, RandomRangeInteger);
      CharButton(327, 133, 375, 149, 442, 114, 487, 148, RandomClickNum, RandomRangeInteger);
      CharButton(327, 151, 376, 185, 436, 148, 490, 183, RandomClickNum, RandomRangeInteger);
      CharButton(330, 183, 378, 217, 443, 185, 490, 219, RandomClickNum, RandomRangeInteger);
      CharButton(328, 219, 378, 259, 443, 220, 489, 256, RandomClickNum, RandomRangeInteger);

      if(FindColorTolerance(xx, yy, 49152, 210, 261, 303, 310, 0)) then
      begin
      wait(200+random(600));
      Mouse(xx, yy, 10, 8, true);
      end;
    end;

    procedure GuideRoom;
    begin
      if not LoggedIn then Exit;
      PerfectNorth;
      wait(300+random(700));
      HighestAngle;
      wait(300+random(200));
      FailSafeLoop := 0;

      while((FindBitmap(ClickCont, XDump, YDump) = False) or (not FailSafeLoop = 200)) do
      begin
         FailSafeLoop := FailSafeLoop + 1;
        if(FindColorTolerance(xx, yy, 397183, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 331107, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 331119, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198456, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198465, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198991, 6, 7, 513, 335, 10)) then
        begin
          wait(300+random(100));
          if(FindColorTolerance(xx, yy, 15460843, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 5524820, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 10128539, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 11445166, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 15263464, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 4011837, xx, yy, xx+20, yy+20, 15)) then
          begin
            wait(300+random(100));
            MMouse(xx, yy, 5, 5);
            wait(300+random(100));
            if(Option2('Rune')) then
            begin
              ClickerMouse(true);
              wait(1000+random(100));
            end;
          end;
        end;
      end;
      wait(200+random(300));
      if(FindBitmap(ClickCont, xx, yy)) then
      begin
        wait(200+random(300));
        Mouse(xx, yy, 30, 5, true);
        wait(2000+random(2133));
        ClickerMouse(true);
        wait(2000+random(2133));
        ClickerMouse(true);
        wait(2000+random(2133));
        ClickerMouse(true);
        wait(2000+random(2133));
        ClickerMouse(true);
        wait(2000+random(2133));
        GameTabber(12);
        wait(2000+random(2133));
        Mouse(xx, yy, 30, 5, true);
        while(FindBitmap(ClickCont, XDump, YDump) = False) do
        begin
          if(FindColorTolerance(xx, yy, 397183, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 331107, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 331119, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198456, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198465, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198991, 6, 7, 513, 335, 10)) then
          begin
            wait(300+random(100));
            if(FindColorTolerance(xx, yy, 15460843, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 5524820, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 10128539, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 11445166, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 15263464, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 4011837, xx, yy, xx+20, yy+20, 15)) then
            begin
              wait(300+random(100));
              MMouse(xx, yy, 5, 5);
              wait(300+random(100));
              if(Option2('Rune')) then
              begin
                ClickerMouse(true);
                wait(1000+random(100));
              end;
            end;
          end;
        end;
      end;
      wait(200+random(300));
      if(FindBitmap(ClickCont, xx, yy)) then
      begin
        wait(200+random(300));
        Mouse(xx, yy, 30, 5, true);
        wait(2000+random(2133));
        ClickerMouse(true);
        wait(2000+random(2133));
        ClickerMouse(true);
      end;
      if (FailSafeLoop = 200) then
      begin
        if(LoggedIn) then
        begin
          Logout;
          TerminateScript;
        end else
        begin
          TerminateScript;
        end;
      end;
    end;


    begin
    SetUpScript;
    DeclarePlayers;
    CreateAccount;
    LoginPlayerSRL;
    CharLook;
    GuideRoom;
    end.



    I get this error
    [Runtime Error] : Exception: '' is not a valid integer value in line 632 in script in line 629 - sorry for pesterriseing you and leaveing all the work for u peeps

  2. #2
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Fixed your declare players...

    SCAR Code:
    procedure DeclarePlayers;
    var
    UserNum, MasterPassword_ : String;
    begin
      UserNum := PlayerNumber.Text;
      MasterPassword_ := AccountPassword.Text;

      HowManyPlayers:= StrToInt(UserNum);
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      for LooperInteger:=0 to HowManyPlayers-1 do
      begin
        Players[LooperInteger].Name     := AccountUsername;
        Players[LooperInteger].Pass     := MasterPassword_;
        Players[LooperInteger].Active   := True;
      end;
    end;

    It compiles now

    I'll fix anything else once I come back from my cig (if its not already fixed).

  3. #3
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Its fixed now I get a this error [Runtime Error] : Access violation at address 4A188347. Read of address 4A188347 in line 629 - sorry for pesterriseing you and leaveing all the work for u peeps

  4. #4
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I seem to get

    SCAR Code:
    [Runtime Error] : Exception: '' is not a valid integer value in line 629 in script

    Which means UserNum isn't being assigned to PlayerNumber.Text (the combo box string), but you clearly are assigning it.

    I'm no good with scar forms to be honest. If you unformed it, it would work perfectly =P

    but I get what you're trying to do. I'll take a closer look, but im sure in the end it's going to be some kinda of strange form problem where you've forgotten to call something.

  5. #5
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    thanks, Rofl I could not be worse at forms XD but dose a combo box not a diffrent object path eg combobox1.items

  6. #6
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry dude, can't find the problem.

    Why not make this in delphi? Couldn't be easier

    I'm still sticking with my idea that you've forgotten something vital in calling forms (because of the error when the new form is trying to be created).

  7. #7
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    I dont think its the form its getting value from a form object it must be incorrect object

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 03-29-2008, 11:35 AM
  2. [Runtime Error] : Exception: buffer error
    By GasMan in forum OSR Help
    Replies: 11
    Last Post: 05-13-2007, 02:07 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
  •