Weird error

Discussion in 'Scar/Simba Help' started by † Hero †, Jul 29, 2007.

Weird error
  1. Unread #1 - Jul 29, 2007 at 12:06 AM
  2. † Hero †
    Joined:
    Jan 23, 2007
    Posts:
    232
    Referrals:
    0
    Sythe Gold:
    0

    † Hero † Active Member

    Weird error

    When i try to run a monk killing script this comes up.
     
  3. Unread #2 - Jul 29, 2007 at 11:12 AM
  4. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Weird error

    Post the script.
     
  5. Unread #3 - Jul 29, 2007 at 11:29 PM
  6. † Hero †
    Joined:
    Jan 23, 2007
    Posts:
    232
    Referrals:
    0
    Sythe Gold:
    0

    † Hero † Active Member

    Weird error

    Here it is.
    Code:
    //        A            SSSSSSSSSSS  H          H  U           U  RRRRR        //
    //       A A          S             H          H  U           U  R    R       //
    //      A   A        S              H          H  U           U  R     R      //
    //     A     A      S               H          H  U           U  R      R     //
    //    AAAAAAAAA     SSSSSSSSSSSSSS  HHHHHHHHHHHH  U           U  RRRRRRRRR    //
    //   A         A                 S  H          H  U           U  R R          //
    //  A           A                S  H          H  U           U  R  R         //
    // A             A               S  H          H  U           U  R   R        //
    //A               A  SSSSSSSSSSSSS  H          H   UUUUUUUUUUU   R    R       //
    //                                                                            //
    //                                                                            //
    //                             A    NN   N DDD                                //
    //                            A A   N N  N D  D                               //
    //                           A   A  N  N N D  D                               //
    //                          A     A N   NN DDD                                //
    //                                                                            //
    //   H          H         A        X        X OOOOOOOOOO  RRRRRR              //
    //   H          H        A A        X      X  O        O  R     R             //
    //   H          H       A   A        X    X   O        O  R      R            //
    //   H          H      A     A        X  X    O        O  R       R           //
    //   HHHHHHHHHHHH     AAAAAAAAA        XX     O        O  R        R          //
    //   H          H    A         A       XX     O        O  RRRRRRRRRRR         //
    //   H          H   A           A     X  X    O        O  R R                 //
    //   H          H  A             A   X    X   O        O  R  R                //
    //   H          H A               A X      X  OOOOOOOOOO  R   R               //
                                                                                  //
    ////////////////////////////////////////////////////////////////////////////////
    //                          (~~!Notes!~~)                                     //
    //* This Script (MonkBSER) was made by Ashur2good and Haxor                   //
    //* Thanks for using The MonkBSER :)                                          //
    //* If you have any troubles with this script, don't hesitate to Ask, just    //
    //PM or post in the fourm which you got this from or Send an E-Mail,          //
    //* If i do not respond, Ask Haxor he will help you (Hopefully :D) with       //
    //any problems :D                                                             //
    //* If you find any bugs/Comments/Reports on the script, please post a reply  //
    //in the fourms which you got this from                                       //
    //* I am not responsible for any loss or damage this script has caused but    //
    //I seriously doubt that will happen...:)                                     //
    //                        (~~!Instructions!~~)                                //
    //* Start logged out.                                                         //
    //* Hit play now!                                                             //
    //                          (~~!Features!~~)                                  //
    //* Range and Mage!!! :0                                                      //
    //* Form!                                                                     //
    //* Has Great Anti Ban                                                        //
    //* Up to date Anti-Randoms with SRL                                          //
    //* Very nice Monk Finding procedures                                         //
    //* Has a very, very, VERY nice healing procedure :D                          //
    //* Multiplayer :)                                                            //
    //                          (~~!History!~~)                                   //
    //Version 1.0:First release of script ( Released on the 21st of may )         //
    //Version 1.2: Fixed some bugs and fixed up the attacking procedure a little. //
    //Version 1.5: BIG update! Fixed nearly everything!                           //
    //Version 2.0: HUGE update! Everything is fixed, also added Range/Mage, Magic //
    //Book, better healing procedure( Again :P ):D -Credit to WT-Fawaki :)        //
    //Version 2.5: Added forms, not as stable as version 2.0                      //
    //Version 2.6: Took out world switching, Made it to work for SRL 3.8          //
    //Version 3.0: Fixed up everything yet again, after that engine update, fixed //
    //the forms and attacking procedures, no set up!                              //
    //                          (~~!Credits!~~)                                   //
    //Thanks to ron for his DRM parser, :)                                        //
    //Thanks to WT-Fawaki for his blue hit, red hit procedure :)                  //
    //Thanks to the SRL devs/community for their SRL :)                           //
    //Thanks to widget for his awesome player form!!! :D                          //
    //And thanks to haxor for lending me 500K Lol :)                              //
    ////////////////////////////////////////////////////////////////////////////////
    //         (~~!The Magic Book!~~)                                             //
    //      1: TheSpell := 'Home Teleport';                                       //
    //      2: 'Wind Strike';                                                     //
    //      3: 'Confuse';                                                         //
    //      4:'Bolt Enchantment';                                                 //
    //      5: 'Water Strike';                                                    //
    //      6: 'Enchant Level 1 Jewelry';                                         //
    //      7: 'Earth Strike';                                                    //
    //      8: 'Weaken';                                                          //
    //      9: 'Fire Strike';                                                     //
    //      10: 'Bones to Bananas';                                               //
    //      11: 'Wind Bolt';                                                      //
    //      12: 'Curse';                                                          //
    //      13: 'Bind';                                                           //
    //      14: 'Low Level Alchemy';                                              //
    //      15: 'Water Bolt';                                                     //
    //      16: 'Varrock Teleport';                                               //
    //      17: 'Enchant Level 2 Jewelry';                                        //
    //      18: 'Earth Bolt';                                                     //
    //      19: 'Lumbridge Teleport';                                             //
    //      20: 'Telekinetic grab';                                               //
    //      21: 'Fire Bolt';                                                      //
    //      22: 'Falador Teleport';                                               //
    //      23: 'Crumble Undead';                                                 //
    //      24: 'House teleport';                                                 //
    //      25: 'Wind Blast';                                                     //
    //      26: 'Superheat Item';                                                 //
    //      27: 'Camelot Teleport';                                               //
    //      28: 'Water Blast';                                                    //
    //      29: 'Enchant Level 3 Jewelry';                                        //
    //      30: 'Iban Blast';                                                     //
    //      31: 'Snare';                                                          //
    //      32: 'Magic Dart';                                                     //
    //      33: 'Ardougne teleport';                                              //
    //      34: 'Earth Blast';                                                    //
    //      35: 'High Level Alchemy';                                             //
    //      36: 'Charge Water Orb';                                               //
    //      37: 'Enchant Level 4 Jewelry';                                        //
    //      38: 'Watchtower Teleport';                                            //
    //      39: 'Fire Blast';                                                     //
    //      40: 'Charge Earth Orb';                                               //
    //      41: 'Bones to Peaches';                                               //
    //      42: 'Saradomin Strike';                                               //
    //      43: 'Claws of Guthix';                                                //
    //      44: 'Flames of Zamorak';                                              //
    //      45: 'Trollheim Teleport';                                             //
    //      46: 'Wind Wave';                                                      //
    //      47: 'Charge Fire Orb';                                                //
    //      48: 'Ape Atoll teleport';                                             //
    //      49: 'Water Wave';                                                     //
    //      50: 'Charge Air Orb';                                                 //
    //      51: 'Vulnerability';                                                  //
    //      52: 'Enchant Level 5 Jewelry';                                        //
    //      53: 'Earth Wave';                                                     //
    //      54: 'Enfeeble';                                                       //
    //      55: 'Teleother Lumbridge';                                            //
    //      56: 'Fire Wave';                                                      //
    //      57: 'Entangle';                                                       //
    //      58: 'Stun';                                                           //
    //      59: 'Charge';                                                         //
    //      60: 'Teleother Falador';                                              //
    //      61: 'Tele Block';                                                     //
    //      62: 'Enchant Level 6 Jewelry ';                                       //
    //      63: 'Teleother Camelot';                                              //
    ////////////////////////////////////////////////////////////////////////////////
    //Best proggie!                                                               //
    //~~~~~~~~~~~~~~Report~~~~~~~~~~~~~~                                          //
    //Worked For : 7 Hours, 32 Minutes, and 12 Seconds                            //
    //Bsed 827 Monkz                                                              //
    //Healed 23 Times                                                             //
    //Have got 12 Randoms Since start                                             //
    //~~~~~~~~~~~~~~Report~~~~~~~~~~~~~~                                          //
    ////////////////////////////////////////////////////////////////////////////////
    program MonkBser;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Fighting.scar}
    {.include SRL/SRL/Skill/Magic.scar}
    {.include SRL/SRL/Misc/Amount.scar}
    
    
    
    {~~~~~~~End of set up, Don't touch below unless you know what your doing~~~~~~~}
    {~~~~~~~~~~~~~~~~~~~~~~1 mistake everything goes wrong :o~~~~~~~~~~~~~~~~~~~~~~}
    
    
    
    //////////////////////////////Variables/////////////////////////////////////////
    var
      i: Integer;
      Boom: Boolean;
      Swarm, Randomz, HealTime, Hits: Integer;
      MonkColors: array[1..4] of integer;
      Monks, Time, HpAmount, Nuber: Integer;
      Magices: Boolean;
      AttackStyle: string;
      Ha: Integer;
    //////////////////////////////Variables/////////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////FormVariables///////////////////////////////////////
    var
      frmDesign: TForm;
      EndInitForm: Boolean;
      Label5: TLabel;
      UseMagic: TLabel;
      Spell: TLabel;
      Label1: TLabel;
      Healing: TLabel;
      ATTStyle: TLabel;
      Killa: TLabel;
      Start: TButton;
      Magic: TComboBox;
      MagicNumber: TEdit;
      Kills: TEdit;
      AStyle: TEdit;
      HP: TEdit;
      PlayerForm: TButton;
    ////////////////////////////FormVariables///////////////////////////////////////
    
    
    
    
    
    
    //////////////////////////////Constants/////////////////////////////////////////
    const
      Version = '3.0'; //Don't touch
      MissedColor = 16728128; //Credit to WT-Fawaki :) Don't touch ;)
      HitColor = 192; //Credit to WT-Fawaki :) Don't touch ;)
    //////////////////////////////Constants/////////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////////Form////////////////////////////////////////////
    procedure ButtonClick(sender: TObject);
    begin
      Writeln('Starting Form');
      frmDesign.Caption := frmDesign.Caption + '.';
      frmDesign.ModalResult := mrOk;
    end;
    
    procedure Playa(sender: TObject);
    begin
      StartPlayers(True, '')
    end;
    
    procedure InitFormOnClose(Sender: TObject; var Action: TCloseAction);
    begin
      if (not (frmDesign.ModalResult = 1)) then
        EndInitForm := True;
    end;
    
    
    
    
    var WidgetForm:TForm;
        Background,Close,Minimize:TImage;
        DragTimer:TTimer;
        wx1,wy1,wx2,wy2:integer;
        Usernames,Passwords,Loads:array of TEdit;
        Active:array of TCheckBox;
        Add, delet:TButton;
    
    procedure VOut(text:array of variant);
       var i:integer;
           s:string;
       begin
       for i := 1 to getarraylength(text) do
          s := s + Text[i-1]
       Writeln(s);
       end;
    
    procedure SetActive(Sender:TObject);
       var i,i2:integer;
       begin
       for i2 := 0 to (GetArrayLength(Active)-1) do
          if (Sender=Active[i2]) then
             i := i2;
       if Active[i].Checked then
          begin
          Loads[i].Enabled := True;
          Loads[i].Color := $333333;
          Usernames[i].Enabled := True;
          Usernames[i].Color := $333333;
          Passwords[i].Enabled := True;
          Passwords[i].Color := $333333;
          end else begin
          Loads[i].Enabled := False;
          Loads[i].Color := $111111;
          Usernames[i].Enabled := False;
          Usernames[i].Color := $111111;
          Passwords[i].Enabled := False;
          Passwords[i].Color := $111111;
          Passwords[i].DestroyComponents
          end;
       end;
    
    procedure AddUser(Sender:TObject);
       var i:integer;
       begin
       i := GetArrayLength(Usernames);
       Background.Canvas.Pen.Color := $000000;
       Background.Canvas.MoveTo(1,Background.Height-1)
       Background.Canvas.LineTo(Background.Width-2,Background.Height-1)
       try
          Usernames[i].Visible := True;
          Passwords[i].Visible := True;
          Loads[i].Visible := True;
          Active[i].Visible := True;
       except
          VOut(['Blah!']);
          SetArrayLength(Usernames,i+1);
          SetArrayLength(Passwords,i+1);
          SetArrayLength(Loads,i+1);
          SetArrayLength(Active,i+1);
          Usernames[i] := TEdit.Create(WidgetForm);
          with Usernames[i] do
             begin
             Parent := WidgetForm;
             Color := $333333;
             Font.Color := clWhite;
             SetBounds(30,i*20+40,100,20);
             end;
          Passwords[i] := TEdit.Create(WidgetForm);
          with Passwords[i] do
             begin
             Parent := WidgetForm;
             Color := $333333;
             Font.Color := clWhite;
             SetBounds(130,i*20+40,100,20);
             end;
          Loads[i] := TEdit.Create(WidgetForm);
          with Loads[i] do
             begin
             Parent := WidgetForm;
             Color := $333333;
             Font.Color := clWhite;
             SetBounds(230,i*20+40,40,20);
             end;
          Active[i] := TCheckBox.Create(WidgetForm);
          with Active[i] do
             begin
             Parent := WidgetForm;
             SetBounds(10,i*20+40,20,20);
             OnClick := @SetActive;
             Checked := True;
             end;
          end;
       WidgetForm.Height := WidgetForm.Height + 20;
       Add.Top := Add.Top + 20;
       Delet.Top := Delet.Top + 20;
       Background.Height := WidgetForm.Height;
       Background.Canvas.Pen.Color := $FFFFFF;
       Background.Canvas.Pen.Style := psSolid;
       Background.Canvas.MoveTo(0,1)
       Background.Canvas.LineTo(0,WidgetForm.Height-1)
       Background.Canvas.LineTo(WidgetForm.Width-1,WidgetForm.Height-1)
       Background.Canvas.LineTo(WidgetForm.Width-1,1)
       end;
    
    procedure DeleteUser(Sender:TObject);
       var i:integer;
       begin
     { i := GetArrayLength(Usernames)-1;
       Usernames[i].Visible := False;
       Passwords[i].Visible := False;
       Loads[i].Visible := False;
       Active[i].Visible := False;
       WidgetForm.Height := WidgetForm.Height - 20;
       Add.Top := Add.Top - 20;
       Delet.Top := Delet.Top - 20;
       Background.Height := WidgetForm.Height;
       Background.Canvas.Pen.Color := $FFFFFF;
       Background.Canvas.Pen.Style := psSolid;
       Background.Canvas.MoveTo(0,1)
       Background.Canvas.LineTo(0,WidgetForm.Height-1)
       Background.Canvas.LineTo(WidgetForm.Width-1,WidgetForm.Height-1)
       Background.Canvas.LineTo(WidgetForm.Width-1,1) }
       end;
    
    procedure DragForm(Sender: TObject);
       begin
       getmousepos(wx1,wy1);
       WidgetForm.Top := WidgetForm.Top - (wy2-wy1);
       WidgetForm.Left := WidgetForm.Left - (wx2-wx1);
       wx2 := wx1;
       wy2 := wy1;
       end;
    
    procedure DragDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
       begin
       getmousepos(wx2,wy2);
       if (y < 19) then
          DragTimer.Interval := 1;
       end;
    
    procedure DragUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
       begin
       DragTimer.Interval := 10000000;
       end;
    
    procedure CloseForm(Sender:TObject);
       begin
       WidgetForm.ModalResult := mrOk;
       end;
    
    procedure MinimizeForm(Sender:TObject);
       begin
       WidgetForm.WindowState := WSMinimized;
       end;
    
    procedure MakeForm;
       begin
       WidgetForm := CreateForm;
       with WidgetForm do
          begin
          SetBounds(0,0,277,65);
          Caption := 'Generic Player Form';
          Color := clBlack;
          Font.Color := clRed;
          Position := poScreenCenter;
          Borderstyle := bsNone;
          OnMouseDown := @DragDown;
          OnMouseUp := @DragUp;
          Ctl3d := False;
          end;
       Background := TImage.Create(WidgetForm);
       with Background do
          begin
          Parent := WidgetForm;
          SetBounds(0,0,WidgetForm.Width,1500);
          OnMouseDown := @DragDown;
          OnMouseUp := @DragUp;
          i := BitmapFromString(1, 1, '000000');
          SafeCopyCanvas(GetBitmapCanvas(i),Canvas,0,0,1,1,0,0,Width,Height);
          FreeBitmap(i);
          with Canvas do
             begin
             Pen.Color := $FFFFFF;
             MoveTo(0,0);
             LineTo(WidgetForm.Width-1,0);
             LineTo(WidgetForm.Width-1,WidgetForm.Height-1);
             MoveTo(0,WidgetForm.Height-1);
             LineTo(0,0);
             Pen.Color := $555555;
             MoveTo(5,16);
             LineTo(WidgetForm.Width-5,16);
             MoveTo(5,18);
             LineTo(WidgetForm.Width-5,18);
             Brush.Style := bsClear;
             Font.Color := $FFFFFF;
             Font.Size := 10;
             TextOut((WidgetForm.Width-TextWidth(WidgetForm.Caption))/2,0,WidgetForm.Caption)
             end;
          end;
       i := BitmapFromString(11, 11, 'z78DAAD924B0EC02008' +
          '44AFD45F50B7357AFF2335C36C68D0DAD4CEDB18022382B2CB24B' +
          '9804A05E5B56E0E5ABB259005F87CC6C3091A0E26678DC0FAF4E2' +
          '8D57B8FC74005FFBEC40B17651F13C98C34F3DCCCCA154D0BBCBF' +
          'A705FDC9DEF813E03993F631DBE41870BCEA4B212');
       Close := TImage.Create(WidgetForm);
       with Close do
          begin
          Parent := WidgetForm
          SetBounds(WidgetForm.Width-13,2,11,11);
          SafeCopyCanvas(GetBitmapCanvas(i),Canvas,0,0,11,11,0,0,11,11);
          FreeBitmap(i);
          OnClick := @CloseForm;
          end;
       i := BitmapFromString(11, 11, 'z78DA333336A3103ABB82' +
          'A01B5900A277D4045A98407C0CE232C1D00004F103881A5AF8821' +
          '208008BAEBA31');
       Minimize := TImage.Create(WidgetForm);
       with Minimize do
          begin
          Parent := WidgetForm
          SetBounds(WidgetForm.Width-26,2,11,11);
          SafeCopyCanvas(GetBitmapCanvas(i),Canvas,0,0,11,11,0,0,11,11);
          FreeBitmap(i);
          OnClick := @MinimizeForm;
          end;
       DragTimer := TTimer.Create(WidgetForm);
       DragTimer.Interval := 10000000;
       DragTimer.OnTimer := @DragForm;
       Add := TButton.Create(WidgetForm);
       with Add do
          begin
          Parent := WidgetForm;
          SetBounds(5,40,75,20);
          Caption := 'Add Player';
          OnClick := @AddUser;
          end;
       Delet := TButton.Create(WidgetForm);
       with Delet do
          begin
          Parent := WidgetForm;
          SetBounds(85,40,75,20);
          Caption := 'Delete Player';
          OnClick := @DeleteUser;
          end;
       AddUser(WidgetForm);
       end;
    
    
    
    
    procedure SafeShowWF;
       var tva: TVariantArray;
       begin
       setarraylength(tva, 0);
       ThreadSafeCall('MakeForm', tva);
       end;
    
    procedure ShowFormModal;
       begin
       WidgetForm.ShowModal
       end;
    
    procedure SafeShowFormModal;
       var tva: TVariantArray;
       begin
       setarraylength(tva, 0);
       ThreadSafeCall('ShowFormModal', tva);
    end;
    
    procedure Form;
       begin
       SafeShowWF;
       SafeShowFormModal;
       FreeForm(WidgetForm);
       end;
       
       
    procedure makform(sender: TObject);
    begin
      Form;
    end;
    
    procedure IniForm;
    var
      TimeInitForm: Integer;
    begin
      TimeInitForm := GetSystemTime;
      frmDesign := CreateForm;
      with frmDesign do
      begin
        OnClose := @InitFormOnClose;
        Position := poScreenCenter;
        FormStyle := fsStayOnTop;
        Width := 387;
        Height := 329;
        Cursor := crArrow;
        Caption := 'Ashur2good and Haxor'#39's MonkBSER';
        Color := clBtnFace;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      Label5 := TLabel.Create(frmDesign);
      with Label5 do
      begin
        Parent := frmDesign;
        Left := 11;
        Top := 258;
        Width := 345;
        Height := 23;
        Caption := 'Guarrented to kill at least 50 monks an hour!';
        Font.Color := clWindowText;
        Font.Height := -16;
        Font.Name := 'Simpsonfont';
        Font.Style := [];
        ParentFont := False;
      end;
      UseMagic := TLabel.Create(frmDesign);
      with UseMagic do
      begin
        Parent := frmDesign;
        Left := 36;
        Top := 121;
        Width := 69;
        Height := 19;
        Caption := 'Use magic';
        Font.Color := clWindowText;
        Font.Height := -16;
        Font.Name := 'Times New Roman';
        Font.Style := [fsBold];
        ParentFont := False;
      end;
      Spell := TLabel.Create(frmDesign);
      with Spell do
      begin
        Parent := frmDesign;
        Left := 36;
        Top := 152;
        Width := 33;
        Height := 19;
        Caption := 'Spell';
        Font.Color := clWindowText;
        Font.Height := -16;
        Font.Name := 'Times New Roman';
        Font.Style := [fsBold];
        ParentFont := False;
      end;
      Label1 := TLabel.Create(frmDesign);
      with Label1 do
      begin
        Parent := frmDesign;
        Left := 12;
        Top := 2;
        Width := 357;
        Height := 31;
        Caption := 'Ashur2good and Haxor'#39's MonkBSER';
        Font.Color := clWindowText;
        Font.Height := -24;
        Font.Name := 'WillyWonka';
        Font.Style := [];
        ParentFont := False;
      end;
      Healing := TLabel.Create(frmDesign);
      with Healing do
      begin
        Parent := frmDesign;
        Left := 36;
        Top := 56;
        Width := 91;
        Height := 19;
        Caption := 'HP to Heal at';
        Font.Color := clWindowText;
        Font.Height := -16;
        Font.Name := 'Times New Roman';
        Font.Style := [fsBold];
        ParentFont := False;
      end;
      ATTStyle := TLabel.Create(frmDesign);
      with ATTStyle do
      begin
        Parent := frmDesign;
        Left := 36;
        Top := 89;
        Width := 83;
        Height := 19;
        Caption := 'Attack Style';
        Font.Color := clWindowText;
        Font.Height := -16;
        Font.Name := 'Times New Roman';
        Font.Style := [fsBold];
        ParentFont := False;
      end;
      Killa := TLabel.Create(frmDesign);
      with Killa do
      begin
        Parent := frmDesign;
        Left := 36;
        Top := 187;
        Width := 112;
        Height := 19;
        Caption := 'How many to kill';
        Font.Color := clWindowText;
        Font.Height := -16;
        Font.Name := 'Times New Roman';
        Font.Style := [fsBold];
        ParentFont := False;
      end;
      Start := TButton.Create(frmDesign);
      with Start do
      begin
        Parent := frmDesign;
        Left := 138;
        Top := 228;
        Width := 71;
        Height := 23;
        Hint := 'Start the script';
        Caption := 'Start';
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 8;
        OnClick := @ButtonClick;
      end;
      Magic := TComboBox.Create(frmDesign);
      with Magic do
      begin
        Parent := frmDesign;
        Left := 152;
        Top := 123;
        Width := 145;
        Height := 21;
        Hint := 'Use magic?';
        ItemHeight := 13;
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 9;
        Text := 'Magic';
        with Magic.Items do
        begin
          Add('True');
          Add('False');
        end;
      end;
      MagicNumber := TEdit.Create(frmDesign);
      with MagicNumber do
      begin
        Parent := frmDesign;
        Left := 162;
        Top := 155;
        Width := 121;
        Height := 21;
        Hint := 'If magic is true, then what spell number?';
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 10;
        Text := 'MagicNumber';
      end;
      Kills := TEdit.Create(frmDesign);
      with Kills do
      begin
        Parent := frmDesign;
        Left := 163;
        Top := 188;
        Width := 121;
        Height := 21;
        Hint := 'Put in how many monks to kill';
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 11;
        Text := 'Kills';
      end;
      AStyle := TEdit.Create(frmDesign);
      with AStyle do
      begin
        Parent := frmDesign;
        Left := 162;
        Top := 92;
        Width := 121;
        Height := 21;
        Hint := 'What attack style? 1 is Att, 2 is Str, 3 is shared, 4 is Def';
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 12;
        Text := 'AStyle';
      end;
      HP := TEdit.Create(frmDesign);
      with HP do
      begin
        Parent := frmDesign;
        Left := 162;
        Top := 58;
        Width := 121;
        Height := 21;
        Hint := 'What hp to heal at';
        ParentShowHint := False;
        ShowHint := True;
        TabOrder := 13;
        Text := 'HP';
      end;
      PlayerForm := TButton.Create(frmDesign);
      with PlayerForm do
      begin
        Parent := frmDesign;
        Left := 266;
        Top := 228;
        Width := 75;
        Height := 25;
        Caption := 'Player Setup';
        TabOrder := 14;
        OnClick := @makform;
      end;
      WriteLn('InitForm compiled in ' + IntToStr(GetSystemTime - TimeInitForm) + ' milliseconds!');
    end;
    
    procedure SafeInitForm;
    var
    
      V: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('IniForm', V);
    end;
    
    procedure ShowIniFormModal;
    begin
      frmDesign.ShowModal;
    end;
    
    procedure SafeShowIniFormModal;
    var
      V: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowIniFormModal', V);
    end;
    
    procedure MainInitForm;
    begin
      try
        SafeInitForm;
        SafeShowIniFormModal;
      finally
        FreeForm(frmDesign);
      except
        WriteLn('An error seems to have occurred in: InitForm');
      end;
    end;
    
    procedure SetupAll;
    begin
      AttackStyle := AStyle.Text;
      Nuber := StrToInt(MagicNumber.Text);
      HpAmount := StrToInt(HP.Text);
      Time := StrToInt(Kills.Text);
      case Magic.Text of
        'True': Magices := True;
        'False': Magices := False;
      end;
    end;
    
    ////////////////////////////////Form////////////////////////////////////////////
    
    
    
    
    
    
    
    
    
    
    
    
    
    ////////////////////////////Logging In/////////////////////////////////////////
    
    procedure LoggingIn;
    begin
      SetUpSRL;
      LoginPlayer;
    end;
    /////////////////////////////Logging In/////////////////////////////////////////
    
    
    
    
    
    
    ///////////////////////////////LoadDTMs/////////////////////////////////////////
    
    procedure LoadDTMs;
    begin
      Swarm := DTMFromString('78DA63946760605065C00A18A134000908004' +
        '7');
    
    end;
    ///////////////////////////////LoadDTMs/////////////////////////////////////////
    
    
    
    
    
    
    //////////////////////////////MonkColours///////////////////////////////////////
    
    procedure MonkColour;
    begin
      MonkColors[1] := 8562644;
      MonkColors[2] := 8497364;
      MonkColors[3] := 8562644;
      MonkColors[4] := 8497364;
    end;
    //////////////////////////////MonkColours///////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////Auto Talk1/////////////////////////////////////////
    
    procedure AutoTalk1;
    begin
      if (InChat('noobs')) or
        (InChat('noobz')) or
        (InChat('noob')) or
        (InChat('nub')) or
        (InChat('nab')) or
        (InChat('froob')) or
        (InChat('loser')) or
        (InChat('choob')) then
      begin
        Ha := Ha + 1;
        if Ha = 3 then
        begin
          Wait(500 + Random(500));
          TypeSend('your the noob');
          Ha := 0;
        end;
      end;
    end;
    /////////////////////////////Auto Talk1/////////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////Auto Talk2/////////////////////////////////////////
    
    procedure AutoTalk2;
    begin
      if (InChat('i own')) or
        (InChat('i rule')) or
        (InChat('i rulz')) or
        (InChat('i good')) or
        (InChat('im good')) or
        (InChat('ure a nub')) or
        (InChat('ure a noob')) or
        (InChat('loser')) or
        (InChat('i pwn')) or
        (InChat('i score')) or
        (InChat('im hot')) or
        (InChat('ure ugly')) or
        (InChat('ch00b')) or
        (InChat('fr00b')) or
        (InChat('youre a noob')) or
        (InChat('youre a nub')) then
      begin
        Ha := Ha + 1;
        if Ha = 3 then
        begin
          Wait(500 + Random(500));
          TypeSend('you wish...');
          Ha := 0;
        end;
      end;
    end;
    /////////////////////////////Auto Talk2/////////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////Auto Talk3/////////////////////////////////////////
    
    procedure AutoTalk3;
    begin
      if (InChat('fak')) or
        (InChat('bi+(#h')) or
        (InChat('faken ')) or
        (InChat('dik')) or
        (InChat('4uk')) then
      begin
        Ha := Ha + 1;
        if Ha = 3 then
        begin
          Wait(500 + Random(500));
          TypeSend('reported :)');
          Ha := 0;
        end;
      end;
    end;
    /////////////////////////////Auto Talk3/////////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////Auto Talker////////////////////////////////////////
    
    procedure AutoTalker;
    begin
      AutoTalk1;
      AutoTalk2;
      AutoTalk3;
    end;
    /////////////////////////////Auto Talker////////////////////////////////////////
    
    
    
    
    
    
    ///////////////////////////////Randoms//////////////////////////////////////////
    
    function FindFastRandoms: Boolean; //By WT-Fakawi.
    var
      f: Integer;
    begin
      for f := 1 to 8 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';
                Logout;
                Exit;
              end;
            end;
          7:
            begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          8: RC;
        end;
        wait(1);
      end;
      if (Result = true) then
        Randomz := Randomz + 1;
    end;
    ///////////////////////////////Randoms//////////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////AntiRandoms////////////////////////////////////////
    
    procedure DoAntiRandoms;
    begin
      FindTalk;
      FindNormalRandoms;
      FindFastRandoms;
      PopUp('ontinue');
    end;
    /////////////////////////////AntiRandoms////////////////////////////////////////
    
    
    
    
    
    
    {*******************************************************************************
    procedure FTWaitRandom(Time: Integer);
    By: WT-Fakawi/Edited by ashur for my use :)
    Description: Performs Wait and DoAntiRandoms :). Time is multiple of 250 msec, so FTWait(4)
    waits approx 1 sec and performs 4 DoAntiRandoms; :)
    *******************************************************************************}
    
    procedure FTWaitRandom(Time: Integer);
    var
      t: Integer;
    begin
      for T := 1 to Time do
      begin
        Wait(200 + Random(50));
        DoAntiRandoms;
      end;
    end;
    //////////////////////////////FTWaitRandom//////////////////////////////////////
    
    
    
    
    
    
    //////////////////////////////RandomAClick//////////////////////////////////////
    {*******************************************************************************
    procedure RandomAClick;
    By: phantombmx/Fixed by Ashur2good for my own purposes :)
    Description: Performs random right click to stay active.
    *******************************************************************************}
    
    procedure RandomAClick;
    var
      m: Integer;
    begin
      if (not (LoggedIn)) then Exit;
      m := MouseSpeed;
      MouseSpeed := 15;
      case Random(7) of
        0: MouseBox(533, 345, 757, 200, 2);
        1: MouseBox(521, 386, 553, 496, 2);
        2: MouseBox(743, 265, 764, 497, 2);
        3: MouseBox(456, 467, 763, 498, 2);
        4: MouseBox(499, 342, 552, 496, 2);
        5: MouseBox(121, 345, 521, 355, 2);
        6: MouseBox(124, 346, 14, 499, 2);
      end;
      MouseSpeed := m;
    end;
    //////////////////////////////RandomAClick//////////////////////////////////////
    
    
    
    
    
    
    //////////////////////////////AntiDie///////////////////////////////////////////
    
    procedure AntiDie;
    begin
      case Random(30) of
        1: FTWaitRandom((6) + Random(4));
        2: RandomMovement;
        3: FTWaitRandom((6) + Random(4));
        4: BoredHuman;
        5: FTWaitRandom((6) + Random(4));
        6: DoAntiRandoms;
        7: FTWaitRandom((6) + Random(4));
        8: RandomMovement
        9: FTWaitRandom((6) + Random(4));
        10: DoAntiRandoms;
        11: FTWaitRandom((6) + Random(4));
        12: BoredHuman;
        13: FTWaitRandom((6) + Random(4));
        14: FTWaitRandom((6) + Random(4));
        15: FTWaitRandom((6) + Random(4));
        16: DoAntiRandoms;
        17: FTWaitRandom((6) + Random(4));
        18: BoredHuman;
        19: FTWaitRandom((6) + Random(4));
        20: FTWaitRandom((6) + Random(4));
        21: FTWaitRandom((6) + Random(4));
        22: FTWaitRandom((6) + Random(4));
        23: FTWaitRandom((6) + Random(4));
        24: FTWaitRandom((6) + Random(4));
        25: FTWaitRandom((6) + Random(4));
        26: FTWaitRandom((6) + Random(4));
        27: FTWaitRandom((6) + Random(4));
        28: FTWaitRandom((6) + Random(4));
        29: FTWaitRandom((6) + Random(4));
      end;
    end;
    
    //////////////////////////////AntiDie///////////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////MonkSafety//////////////////////////////////////////
    
    procedure MonkSafety;
    begin
      case Random(8) of
        1: MakeCompass('N');
        2: FTWaitRandom((6) + Random(4));
        3: MakeCompass('E');
        4: FTWaitRandom((6) + Random(4));
        5: MakeCompass('S');
        6: FTWaitRandom((6) + Random(4));
        7: MakeCompass('W');
      end;
    end;
    ////////////////////////////MonkSafety//////////////////////////////////////////
    
    
    
    
    
    
    
    //////////////////////////////Anti Ban//////////////////////////////////////////
    
    procedure AntiBans;
    begin
      case Random(25) of
        1: PickUpMouse;
        2: MouseBox(MSx1, MSy1, MSx2, MSy2, 3);
        3: AlmostLogout;
        4: HoverSkill('Defence', False);
        5: HoverSkill('Attack', False);
        6: MouseBox(MIx1, MIy1, MIx2, MIy2, 3);
        7: HoverSkill('Strength', False);
        8: RandomAClick;
        9: BoredHuman;
        10: GameTab(5);
        11: GameTab(6);
        12: GameTab(13);
        13: FTWaitRandom((6) + Random(4));
        14: FTWaitRandom((6) + Random(4));
        15: FTWaitRandom((6) + Random(4));
        16: FTWaitRandom((6) + Random(4));
        17: FTWaitRandom((6) + Random(4));
        19: BoredHuman;
        20: AntiDie;
        21: AntiDie;
        22: AntiDie;
        23: AntiDie;
        24: AntiDie;
      end;
    end;
    //////////////////////////////Anti Ban//////////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////////Anti////////////////////////////////////////////
    
    procedure Anti;
    begin
      case random(7) of
        1: AutoTalker;
        2: AntiBans;
        3: AntiDie;
        4: BoredHuman;
      end;
    end;
    ////////////////////////////////Anti////////////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////FightMode//////////////////////////////////////////
    
    procedure SetsFightMode;
    begin
      GameTab(1);
      if AttackStyle = 'Attack' then SetFightMode(1);
      if AttackStyle = 'Strength' then SetFightMode(2);
      if AttackStyle = 'Defence' then SetFightMode(4);
    end;
    /////////////////////////////FightMode//////////////////////////////////////////
    
    
    
    
    
    ////////////////////////////FindMSColour////////////////////////////////////////
    {*******************************************************************************
    function FindMSColour(var x, y: Integer; color: Integer): Boolean;
    By: Stupid3ooo/Fixed by Ashur2Good( His one didin't look in the main screen )
    Description: Finds color on MainScreen.
    *******************************************************************************}
    
    function FindMSColour(var x, y: Integer; color: Integer): Boolean;
    begin
      Result := FindColor(x, y, color, MSX1, MSY1, MSX2, MSY2);
    end;
    
    ////////////////////////////FindMSColour////////////////////////////////////////
    
    
    
    
    
    
    //////////////////////////////RClicking/////////////////////////////////////////
    
    procedure MonkKilla;
    begin
      case Random(2) of
        0:
          begin
            Writeln(' Found a free monk or not already killing one, proceding to kill');
            Mouse(x, y, 0, 0 + random(3), True);
            Writeln('Left clicked on the monk');
            FTWaitRandom(1);
          end;
    
        1:
          begin
            Writeln(' Found a free monk or not already killing one, proceding to kill');
            Mouse(x, y, 0, 0 + random(3), False);
            ClickOption('ttac', 1);
            Writeln('Right clicked on the monk');
            FTWaitRandom(1);
          end;
      end;
    end;
    //////////////////////////////RClicking/////////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////FindMonk///////////////////////////////////////////
    
    function KillMonk: Boolean;
    begin
      x := MSCX;
      y := MSCY;
      for Monks := 1 to 4 do
      begin
        FindObj(x, y, 'onk', MonkColors[Monks], 2);
        if (not (InFight) or not (IsFightAt(x, y))) then
        begin
          Writeln('Found Monk');
          MonkKilla;
          Boom := True;
        end
        else
        begin
          MonkSafety;
          FTWaitRandom((6) + Random(4));
        end;
        Boom := False;
      end;
    end;
    /////////////////////////////FindMonk///////////////////////////////////////////
    
    
    
    
    
    
    //////////////////////////////Healing///////////////////////////////////////////
    
    procedure Healin;
    begin
      repeat
        GameTab(2);
        if (HpPercent < HpAmount) then
        begin
          Writeln('You have low HP :( Time to heal ;D');
          Wait(500 + Random(100));
          Writeln('Looking for a Monk to BS Muwhahaha');
          FindObj(x, y, 'onk', MonkColors[Monks], 5);
          FTWait((6) + Random(4));
          Mouse(x, y, 0, 0, False);
          ChooseOption(x, y, 'lk-');
          FTWait((6) + Random(4));
          ClickToContinue;
          FTWait((6) + Random(4));
          ChooseOptionEx('heal');
          TalkToRand;
          FTWait((6) + Random(4));
          DoAntiRandoms;
          HealTime := HealTime + 1;
        end;
      until (HpPercent >= HpAmount);
    end;
    //////////////////////////////Healing///////////////////////////////////////////
    
    
    
    
    
    
    //////////////////////////Blue Hit, Red Hit/////////////////////////////////////
    
    procedure HitHeal; //Kinda taken from WT-Fawaki :)
    begin
      if (FindMSColour(x, y, 192)) then
      begin
        Hits := Hits + 1;
        if Hits >= 2 + random(2) then
        begin
          Wait(100 + Random(10));
          Healin;
          Hits := 0;
        end;
      end;
    end;
    //////////////////////////Blue Hit, Red Hit/////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////////Killa///////////////////////////////////////////
    
    procedure AttackingMonkz;
    begin
      if (HpPercent > HpAmount) then
      begin
        if Magices = True then
        begin
          CastSpell(Nuber);
        end;
        if Magices = False then
        begin
          KillMonk;
          HitHeal;
          repeat
            case Random(4) of
              1: Anti;
              2: FTWait((6) + Random(4));
            end;
          until (not (InFight));
          if (InFight = True) then
          begin
            Writeln('Fighting Monk');
            Wait(100 + Random(100));
            OutFight;
            Monks := Monks + 1;
          end
          else
            Writeln('Did not find monk, Going to new area to search :)');
          case random(4) of
            1: MouseBox(MSx1, MSy1, MSx2, MSy2, 1);
            2: FindSymbol(x, y, 'water');
            3: FindSymbol(x, y, 'water');
          end;
          Wait(500 + Random(100));
          KillMonk;
          MonkKilla;
          Wait(500 + Random(100));
          DoAntiRandoms;
          case Random(3) of
            1: Anti;
            2: FTWait((6) + Random(4));
          end;
          Wait(500 + Random(100));
          HitHeal;
          if (InFight = True) then
          begin
            Writeln('Fighting Monk');
            Wait(500 + Random(100));
            Monks := Monks + 1;
            if (not (Loggedin)) then NextPlayer(false);
          end;
        end;
      end;
    end;
    ////////////////////////////////Killa///////////////////////////////////////////
    
    
    
    
    
    
    /////////////////////////////World Switching////////////////////////////////////
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               » WorldSwitch routines                        --//
    //-----------------------------------------------------------------//
    //
    // * function SelectWorld(Which:integer):Boolean; // by WT-Fakawi
    // * procedure OrderBy(Which, UpDown:string);     // by WT-Fakawi
    // * procedure GetWorldList(Var WList:array of integer);  // by WT-Fakawi
    //        The worldswitcher include doesn't work, so i had to put them all in my
    //        script, but the fixed version :)
    
    var
      B0, B1, B2, B3, B4, B5, B6, B7, B8, B9: Integer;
    
    { type TWorld;
      Description: Hols world number and coordinates of the button }
    type
      TWorld = record
        Nr: Integer;
        X: Integer;
        Y: Integer;
      end;
    
    var
      Worlds: array of TWorld;
    
    const
      HowManyWorlds = 150;
    
    // -------------------------------------------------------------------------- //
    
    procedure SetupWorldSwitcher;
    begin
      B0 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
        '911C1653E252A71D9489E4A6AB996D4302126E4016F196571');
      B1 := BitmapFromString(6, 10, 'z78DA333040003724608001DC300' +
        '07E595CE61063D7D052E346040000CE02516D');
      B2 := BitmapFromString(7, 10, 'z78DA33300001371CC00009902A8' +
        'E0B10AF9E189543518D01DE30C7040082BE5DB5');
      B3 := BitmapFromString(6, 10, 'z78DA33300001371CC00043D6000' +
        '9E012A75C0D7EF750D72EFC6A88F73B7E5D00595A52F9');
      B4 := BitmapFromString(7, 10, 'z78DA7373430003BCC06D90A9C4A' +
        '597D62AF1035A840600F8D25EBD');
      B5 := BitmapFromString(6, 10, 'z78DA7373230D18E000A4AA21463' +
        'DF12693E7064ADC89298E5F1700DB4A52F9');
      B6 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
        '911C105C85389DF9DB8644975273176512B4CF0DB020094FD6151');
      B7 := BitmapFromString(6, 10, 'z78DA7373230C0C7000FC6A464D4' +
        '00600B0AF4FE1');
      B8 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
        '911A19D09F4B465A07C04006C5261D5');
      B9 := BitmapFromString(7, 10, 'z78DA3330000137BCC000438D010' +
        '6C0AF977295F8DD408C383136126326FD5502003C6F6049');
      SetArrayLength(Worlds, HowManyWorlds);
    end;
    
    // -------------------------------------------------------------------------- //
    
    procedure FreeNumbers;
    begin
      FreeBitmap(B0);
      FreeBitmap(B1);
      FreeBitmap(B2);
      FreeBitmap(B3);
      FreeBitmap(B4);
      FreeBitmap(B5);
      FreeBitmap(B6);
      FreeBitmap(B7);
      FreeBitmap(B8);
      FreeBitmap(B9);
    end;
    
    {*******************************************************************************
    function ReturnNumber(BX, BY: Integer): Integer;
    By: WT-Fakawi
    Description: OCR machine.
    *******************************************************************************}
    
    function ReturnNumber(BX, BY: Integer): Integer;
    var
      Number, BM: Integer;
    begin
      for Number := 0 to 9 do
      begin
        case Number of
          0: BM := B0;
          1: BM := B1;
          2: BM := B2;
          3: BM := B3;
          4: BM := B4;
          5: BM := B5;
          6: BM := B6;
          7: BM := B7;
          8: BM := B8;
          9: BM := B9;
        end;
        if FindBitmapMaskTolerance(BM, x, y, BX, BY, BX + 9, BY + 11, 0, 0) then
        begin
          Result := Number;
          Exit;
        end
      end;
      Result := -1;
    end;
    
    {*******************************************************************************
    procedure OrderBy(Which, UpDown: string);
    By: WT-Fakawi
    Description: Orders Display.
    *******************************************************************************}
    
    procedure OrderBy(Which, UpDown: string);
    var
      Origin, OBx, OBy: Integer;
    begin
      case Which of
        'world':
          begin
            case UpDown of
              'up': Origin := 284;
              'down': Origin := 297;
            end
          end;
        'players':
          begin
            case UpDown of
              'up': Origin := 393;
              'down': Origin := 409;
            end
          end;
        'location':
          begin
            case UpDown of
              'up': Origin := 503;
              'down': Origin := 519;
            end
          end;
        'type':
          begin
            case UpDown of
              'up': Origin := 613;
              'down': Origin := 629;
            end
          end;
      end;
    
      MMouse(Origin, 7, 7, 7)
        GetMousePos(OBx, OBy);
      repeat
        Mouse(OBx, OBy, 0, 0, True);
        Wait(500);
      until FindColorSpiralTolerance(OBx, OBy, 2851375, Origin, 7, Origin + 7, 7 + 7, 50);
    end;
    
    {*******************************************************************************
    Procedure GetWorldRecord;
    By: WT-Fakawi
    Description: Performs old school OCR on bitmaps.
    *******************************************************************************}
    
    procedure GetWorldRecord;
    var
      Row, Column, RN, World, Index: Integer;
    begin
      for Row := 0 to 6 do
      begin
        for Column := 0 to 19 do
        begin
          RN := ReturnNumber(63 + (93 * Row), 39 + (23 * Column)); //Digit 1 of 3 digit worlds
          if RN <> -1 then
          begin
            World := RN * 100;
            RN := ReturnNumber(70 + (93 * Row), 39 + (23 * Column)); //Digit 2 of 3 digit worlds
            if RN <> -1 then
            begin
              World := (RN * 10) + World;
              RN := ReturnNumber(78 + (93 * Row), 39 + (23 * Column)); //Digit 2 of 3 digit worlds
              if RN <> -1 then
              begin
                World := RN + World;
                Index := Index + 1;
                Worlds[Index].Nr := World;
                Worlds[Index].X := 78 + (93 * Row);
                Worlds[Index].Y := 39 + (23 * Column);
                World := 0;
              end;
            end
          end
          else
          begin
            RN := ReturnNumber(66 + (93 * Row), 39 + (23 * Column)); //Digit 1 of 2 digit worlds
            if RN <> -1 then
            begin
              World := (RN * 10) + World;
              RN := ReturnNumber(74 + (93 * Row), 39 + (23 * Column)); // Digit 2 of 2 digit worlds
              if RN <> -1 then
              begin
                World := RN + World;
                Index := Index + 1;
                Worlds[Index].Nr := World;
                Worlds[Index].X := 74 + (93 * Row);
                Worlds[Index].Y := 39 + (23 * Column);
                World := 0;
              end;
            end
            else
            begin
              RN := ReturnNumber(70, 39 + (23 * Column)); //Digit 1 of 1 digit worlds
              if RN <> -1 then
              begin
                World := RN;
                Index := Index + 1;
                Worlds[Index].Nr := World;
                Worlds[Index].X := 71 + (93 * Row);
                Worlds[Index].Y := 39 + (23 * Column);
                World := 0;
              end
              else
              begin
                Index := Index + 1;
              end;
            end;
          end;
        end;
      end;
    end;
    
    
    // -------------------------------------------------------------------------- //
    
    procedure ReadOutRecord;
    var
      i: Integer;
    begin
      for i := 1 to HowManyWorlds - 1 do
        Writeln('Index :' + IntToStr(i) + ' = ' + IntToStr(Worlds[i].Nr));
    end;
    
    {*******************************************************************************
    procedure ClickWorldSwitchButton;
    By: WT-Fakawi
    Description: Click button
    *******************************************************************************}
    
    procedure ClickWorldSwitchButton;
    begin
      MMouse(8, 466, 90, 25);
      GetMousePos(x, y);
      Mouse(x, y, 0, 0, True);
      repeat
        Wait(10);
      until (GetColor(17, 477) = 0);
    end;
    
    {*******************************************************************************
    function SelectWorld(Which: Integer): Boolean;
    By: WT-Fakawi
    Description: Selects World using ingame switcher.
    *******************************************************************************}
    
    function SelectWorld(Which: Integer): Boolean;
    var
      i: Integer;
    begin
      SetupWorldSwitcher;
      if not WelcomeToRuneScape then
      begin
        Result := False;
        Exit
      end;
      ClickWorldSwitchButton;
      OrderBy('location', 'down');
      OrderBy('players', 'down');
      OrderBy('type', 'down');
      Wait(1000);
      GetWorldRecord;
    //  ReadOutRecord;
      for i := 1 to HowManyWorlds - 1 do
        if Which = Worlds[i].Nr then
        begin
          Mouse(Worlds[i].X, Worlds[i].Y, 0, 0, True);
          Result := True;
          Exit;
        end;
      FreeNumbers;
    end;
    /////////////////////////////World Switching////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////World Switching/////////////////////////////////////
    Procedure GoLessPeeps;
    begin
    Case Random(5) of
    1: SelectWorld(125);
    2: SelectWorld(87);
    3: SelectWorld(75);
    4: SelectWorld(55);
    end;
    end;
    ////////////////////////////World Switching/////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////Progress Report/////////////////////////////////////
    
    procedure AshursReport;
    begin
      Writeln('[]//////////////////////////////////////////////[]');
      Writeln('    ~~~~~~~~~~~~~~Report~~~~~~~~~~~~~~');
      Writeln('   Worked For : ' + ScriptTime2(2))
      Writeln('       Bsed ' + IntToStr(Monks) + ' Monkz');
      Writeln('   Healed ' + IntToStr(HealTime) + ' Times ');
      Writeln('   Have got ' + IntToStr(Randomz) + ' Randoms Since start');
      Writeln('    ~~~~~~~~~~~~~~Report~~~~~~~~~~~~~~');
      Writeln('[]//////////////////////////////////////////////[]');
      SRLRandomsReport;
      GetAllLevels;
    end;
    ////////////////////////////Progress Report/////////////////////////////////////
    
    
    
    
    
    
    ///////////////////////////////Welcoming////////////////////////////////////////
    
    procedure Ashur;
    begin
      Writeln('        A            SSSSSSSSSSS  H          H  U           U  RRRRR');
      Wait(100 + Random(10));
      Writeln('       A A          S             H          H  U           U  R    R');
      Wait(100 + Random(10));
      Writeln('      A   A        S              H          H  U           U  R     R');
      Wait(100 + Random(10));
      Writeln('     A     A      S               H          H  U           U  R      R');
      Wait(100 + Random(10));
      Writeln('    AAAAAAAAA     SSSSSSSSSSSSSS  HHHHHHHHHHHH  U           U  RRRRRRRR');
      Wait(100 + Random(10));
      Writeln('   A         A                 S  H          H  U           U  R R');
      Wait(100 + Random(10));
      Writeln('  A           A                S  H          H  U           U  R  R');
      Wait(100 + Random(10));
      Writeln(' A             A               S  H          H  U           U  R   R');
      Wait(100 + Random(10));
      Writeln('A               A  SSSSSSSSSSSSS  H          H   UUUUUUUUUUU   R    R');
      Wait(100 + Random(10));
      Writeln('                           A    NN   N DDD');
      Wait(100 + Random(10));
      Writeln('                          A A   N N  N D  D');
      Wait(100 + Random(10));
      Writeln('                         A   A  N  N N DDD');
      Wait(100 + Random(10));
      Writeln('   H          H         A        X        X OOOOOOOOOO  RRRRRR');
      Wait(100 + Random(10));
      Writeln('   H          H        A A        X      X  O        O  R     R');
      Wait(100 + Random(10));
      Writeln('   H          H       A   A        X    X   O        O  R      R');
      Wait(100 + Random(10));
      Writeln('   H          H      A     A        X  X    O        O  R       R');
      Wait(100 + Random(10));
      Writeln('   HHHHHHHHHHHH     AAAAAAAAA        XX     O        O  R        R');
      Wait(100 + Random(10));
      Writeln('   H          H    A         A       XX     O        O  RRRRRRRRRRR');
      Wait(100 + Random(10));
      Writeln('   H          H   A           A     X  X    O        O  R R');
      Wait(100 + Random(10));
      Writeln('   H          H  A             A   X    X   O        O  R  R ');
      Wait(100 + Random(10));
      Writeln('   H          H A               A X      X  OOOOOOOOOO  R   R ');
      Wait(1000 + Random(100));
      Writeln('                 Thanks for using the');
      Wait(1000 + Random(100));
      Writeln('                   MonkBSER! :)');
      Wait(100 + Random(10));
      Wait(1000 + Random(100));
      Writeln('Have fun autoing :D');
      Wait(1000 + Random(100));
      Writeln('This script was made by Ashur2good And haxor, Remeber that :)');
      Wait(1000 + Random(100));
      Writeln('Script version ' + Version + ' ');
    end;
    ///////////////////////////////Welcoming////////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////////Setup///////////////////////////////////////////
    
    procedure SetupScript;
    begin
      MonkColour;
      MouseSpeed := 15;
      CheckUserNicks;
    end;
    ////////////////////////////////Setup///////////////////////////////////////////
    
    
    
    
    
    
    ////////////////////////////////Main Loop///////////////////////////////////////
    begin
      ClearDebug;
      LoadUs;
      MainInitForm;
      FreeForm(frmDesign);
      Ashur;
      SetupScript;
      ActivateClient;
      LoggingIn;
      HighestAngle;
      MakeCompass('N');
      SetRun(True);
      SetsFightMode;
      repeat
        AttackingMonkz;
        AshursReport;
        LogOutEvery(3, 10);
        if (Time = Monks) then
        begin
          GoLessPeeps;
          NextPlayer(True);
          HighestAngle;
          MakeCompass('N');
          SetRun(True);
          SetsFightMode;
          Writeln('Switched players successfully :)');
        end;
      until (False);
    end.
    
     
< Scar help! | I need help with sumthin >

Users viewing this thread
1 guest


 
 
Adblock breaks this site