Results 1 to 13 of 13

Thread: Mobilising Armies

  1. #1
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Arrow Mobilising Armies

    This is my personal version of a Mobilising Armies script. All you need is 400-500k in investment credits, 1 special unit contract with cannons (or empty), and 10 light goblin contracts (dead or alive) in inventory. Start anywhere near the middle of the minigame area. Always works if started logged in but not ingame. Haven't tested it logging into Runescape but I am somewhat sure it doesn't work if started inside the minigame. It has couple bugs due to cords being slightly off but it should run smoothly if babysit. Doesn't renew credits on its own but shouldn't be too bad to legit the credit replenishing. Since the minigame doesn't make money anymore, this is in case people want to get reward credits for items and other cool rewards. Enjoy.

    Simba Code:
    program DemiseMobArmies;
    {$DEFINE SRL5}
    {$i srl/srl/misc/smart.simba}
    {$i srl/srl.simba}

    {<<<<<<<<<<<<<<<Demise Mob Armies>>>>>>>>>>>>>>>>}
    {<<<<<<<<<<<<<<<<<<<<<V 1.0>>>>>>>>>>>>>>>>>>>>>>}

    var
      x, y, xx, yy, Ticket, SpecialTable, Tent, Outside, Stairs, Special, Squad: Integer;
      NorthWall, EastWall, SouthWall, WestWall, Finish, Leave: Integer;
      aFound: Extended;

    procedure Settings;
    begin
      MouseSpeed := 25;
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Active := True;
    end;

    procedure SetSmart;
    begin
      Smart_Server := 64;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      ClearDebug;
    end;

    function DTime: Integer;
    var
      Hour, Mins, Sec, MSec: Word;
    begin
      DecodeTime(Now, Hour, Mins, Sec, MSec);
      Result := Hour;
    end;

    function DDate: Integer;
    var
      Year, Month, Day: Word;
    begin
      DecodeDate(Date, Year, Month, Day);
      Result := Day;
    end;

    procedure DLogInPlayer;
    begin
      LoginPlayerToLob;
      OpenWorldScreen;
      if (DDate mod 2 = 1) then
      begin
        case DTime of
          0..5:
            begin
              Writeln('We are logging in with World A');
              SelectWorld(76);
            end;
          6..11:
            begin
              Writeln('We are logging in with World B');
              SelectWorld(76);
            end;
          12..17:
            begin
              Writeln('We are logging in with World C');
              SelectWorld(76);
            end;
          18..23:
            begin
              Writeln('We are logging in with World D');
              SelectWorld(76);
            end;
        end;
      end else
      begin
        case DTime of
          0..5:
            begin
              Writeln('We are logging in with World E');
              SelectWorld(76);
            end;
          6..11:
            begin
              Writeln('We are logging in with World F');
              SelectWorld(76);
            end;
          12..17:
            begin
              Writeln('We are logging in with World G');
              SelectWorld(76);
            end;
          18..23:
            begin
              Writeln('We are logging in with World H');
              SelectWorld(76);
            end;
        end;
      end;
      LogInPlayer;
    end;

    procedure DefineMode;
    begin
      Ticket := DTMFromString('mrAAAAHic42BgYJjOxMAwG4gnQ/EcIO4D4oVAvAiIAxgZGHyAOIQRwg4G4jAg9gLicCCeYqrHsHLJQoZVyxYzbJsoDcb9qQ5wLAK0Ax9mJIBhAAA9gBNQ');
      SpecialTable := DTMFromString('mlwAAAHicY2dgYJBgZGDgBWIFINYGYhEg5gRiTSAuAspnAHEWEOcDcR2UrgLiv+9vMWTFBzHkJ4Uy5CQGw2mQmCRQHhdmwoOhAADTNg4k');
      Tent := DTMFromString('m1gAAAHicjco9DkVQFEXh/RQKyW2ojMhMjMOM1AxBoiRoNC/R+cl7InFJrIrWSb6sXRxP0h8rLCZU8D9ST11a04CO9MSBFCUK5Mgw4IttrpTEkYwxskur89fd9rm5d8jvG85Lz11gEieY');
      Outside := DTMFromString('mWAAAAHicY2FgYOhlYmCYxAShlwCxI1AsA4jTgdgLiJ9/Z2BgY2ViiDVkZ/gIpEWAYsiYCQkzM0AAALgbB4g=');
      Stairs := DTMFromString('mbQAAAHicY2VgYJjIxMAwCYh7oXgJEKcCxTOBOB2IHYDYG4hjDdkZ2FiZwPTz7wwMH4FsEaA4OmZCw8wMUAAAj4YJLQ==');
      Special := DTMFromString('mWAAAAHicY2FgYJjHxMBQBMRdQDwBiJ2AYkFAHAXFhZGKDJ+/8jK8YWQAYxEGVMyEhkEAAN+DCJE=');
      Squad := DTMFromString('mWAAAAHicY2FgYIhkYmDwBWInIK4A4nygWA0QFwBxFRA//w7Bd94wMLAysTGIAMWQMRMaBgEA8j8JKw==');
      NorthWall := DTMFromString('mlwAAAHicY2dgYGBmhOB3QLYkkOYG4ptA9kkgvgLEF5HwCyg+AcSZKdEMB7cvZzi8cyXDxWNbGRbN6mFwc3ZiSIyWYxAByuPCjHgwFAAAcOYUXQ==');
      EastWall := DTMFromString('m1gAAAHic42JgYGhlZGDoA+JuIO4F4klAXAvElUCcBMRxQDwXiLcC1S6F4l1AvAOItwHxEij/JBBfB+JJXXUMJ/atZUhLjABjEHvXxoUM+7cuZQhwl2QIcJJkmNLTwCACVEsMZiQSIwAAEjAceg==');
      SouthWall := DTMFromString('m6wAAAHic42ZgYPgAxc+B+BcQ8zEyMDxggOD3QMwC5H8E0leAuBCIs4G4CIqDgVgaiA2AuBoqlwTE8UCcnhTJcGLvWobcjDgwtkqPZejqamHYsHwGw8HtyxnOH93MsGxuP4O/owSDCFA9sZiRBIwEAPIwHmA=');
      WestWall := DTMFromString('m1gAAAHic42JgYFgNxAugeAkUbwfiLUB8DoinA/FVIN6MJLcTiJcB8WIoexcQXwHiW0Dc3lDKcPrgBoYD25czBPi4gvH+rUvBYgFOkgxL5/QzZCRHMYgA1RKDGYnECAAAb30ecw==');
      Finish := DTMFromString('mKgEAAHic42NgYAiEYg8gdgTiKCBOhPIjgTgAiJ2BOAGqzgaIM4B4CRD3QnEPEr0bivcD8XogXgvErUA8GYgnAfGKGd4My6d5MURHtzOsn+fHEBbWABZbNdMHjCOjWsE4IrIZjGFsEaBecjAjmRgVAADghSFF');
      Leave := DTMFromString('mlwAAAHicY2dgYEgB4hggzgXiTCCOA+IwIE4HYjkglgBiJSSaD4h1Qeq8TRjWLJ7CMGdKO0O0pzFDgo8pQ1aoNZgtApTHhZnwYCgAAF7tDCA=');
    end;

    procedure FrDTM;
    begin
      FreeDTM(Ticket);
      FreeDTM(SpecialTable);
      FreeDTM(Tent);
      FreeDTM(Outside);
      FreeDTM(Stairs);
      FreeDTM(Special);
      FreeDTM(Squad);
      FreeDTM(NorthWall);
      FreeDTM(EastWall);
      FreeDTM(SouthWall);
      FreeDTM(WestWall);
      FreeDTM(Finish);
      FreeDTM(Leave);
    end;

    function Spin: Boolean;
    begin
      MMouse(407, 282, 3, 3);
      Result := WaitUpText('Play', 900);
      if Result then
      begin
        Mouse(464, 283, 1, 1, False);
        WaitOption('Select', 900);
        Wait(750 + Random(250));
      end;
    end;

    function DTicket: Boolean;
    begin
      if FindDTM(Ticket, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        Mouse(x, y, 3, 3, False);
        WaitOption('Destroy', 900);
        Wait(850 + Random(150));
        Mouse(300, 400, 3, 3, True);
        Wait(350 + Random(150));
        Mouse(370, 400, 3, 3, True);
        Wait(350 + Random(150));
        Result := True;
      end;
    end;

    procedure DSetup;
    begin
      SRL_DisableIPLog := True;
      Settings;
      DLogInPlayer;
      DefineMode;
      AddOnTerminate('FrDTM');
      Wait(350 + Random(150));
      SetAngle(SRL_Angle_High);
      Wait(350 + Random(150));
      MakeCompass('n');
      Wait(350 + Random(150));
      Spin;
      Wait(350 + Random(150));
      SetAngle(SRL_Angle_High);
      MakeCompass('n');
      Wait(350 + Random(150));
    end;

    function InvestScreen: Boolean;
    begin
      Result := (GetTextAtExWrap(159, 40, 363, 62, 0, 50, 10, 2071039, 5, UpCharsEx) = 'InvestmentCreditExchange');
    end;

    function OpenInvest: Boolean;
    var
      x, y, i, ii, r, L: integer;
      T: TPoint;
      NPCs, TPA: TPointArray;
      ATPA: T2DPointArray;
      BoxArr: TBoxArray;
      BankerColors: TIntegerArray;
    begin
      if (not(InvestScreen)) then
      begin
        repeat
          BankerColors := [5066065];
          NPCs := GetMMDotsOnMS('npc');
          L := Length(NPCs);
          if L < 1 then
            Exit;
          SetLength(BoxArr, L);
          for i := 0 to L-1 do
          begin
            T := MMtoMS(NPCs[i]);
            BoxArr[i] := IntToBox(Max(T.x-15, MSX1), Max(T.y-15, MSY1), Min(T.x+15, MSX2), Min(T.y+15, MSY2));
          end;
          for i := 0 to L-1 do
          with BoxArr[i] do
          begin
            SetLength(ATPA, Length(BankerColors));
            For ii := 0 to High(BankerColors) do
              FindColorsTolerance(ATPA[ii], BankerColors[ii], X1, Y1, X2, Y2, 255);
            TPA := MergeATPA(ATPA);
            if Length(TPA) > 0 then
            begin
              ATPA := SplitTPA(TPA, 6);
              SortATPASize(ATPA, True);
              T := MiddleTPA(ATPA[0]);
              MMouse(T.X, T.Y, 3, 3);
              if WaitUpTextMulti(['Banker', 'Dwarf'], 300) then
              begin
                ClickMouse2(False);
                Result := WaitOption('Invest', 300);
                if Result then
                begin
                  FFlag(0);
                  Wait(350 + Random(50));
                  Exit;
                end else
                  Continue;
              end;
            end;
          end;
        until InvestScreen or (not(LoggedIn));
      end;
    end;

    function RestoreInvest: Boolean;
    begin
    end;

    function SpecialUnitScreen: Boolean;
    begin
      Result := (GetTextAtExWrap(140, 8, 207, 32, 0, 50, 10, 2071039, 5, UpCharsEx) = 'Purchase');
    end;

    function OpenSpecialUnit: Boolean;
    begin
      if (not(SpecialUnitScreen)) then
      begin
        repeat
          if FindDTMRotated(SpecialTable, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
          begin
            Mouse(x, y, 3, 3, False);
            Result := WaitOption('Special un', 300);
            if Result then
            begin
              FFlag(0);
              Wait(550 + Random(50));
            end;
          end;
        until SpecialUnitScreen or FindColorTolerance(x, y, 526085, 266, 348, 298, 363, 5) or (not(LoggedIn));
      end;
    end;

    function RestoreSpecialUnit: Boolean;
    begin
      OpenSpecialUnit;
      if SpecialUnitScreen then
      begin
        MMouse(408, 91, 3, 3);
        if WaitUptext('Add', 300) then
        begin
          Mouse(408, 91, 3, 3, True);
          Wait(100 + Random(50));
          Mouse(408, 91, 3, 3, True);
          Wait(100 + Random(50));
          Mouse(408, 91, 3, 3, True);
          Wait(100 + Random(50));
          Mouse(408, 91, 3, 3, True);
          Wait(100 + Random(50));
          Mouse(408, 91, 3, 3, True);
          Wait(100 + Random(50));
          Mouse(408, 91, 3, 3, True);
          Wait(100 + Random(50));
          Mouse(450, 315, 3, 3, False);
          Result := WaitOption('Buy', 300);
        end;
      end;
    end;

    function UnitScreen: Boolean;
    begin
      Result := (GetTextAtExWrap(149, 13, 191, 32, 0, 50, 10, 2071039, 5, UpCharsEx) = 'Squad');
    end;

    function OpenUnit: Boolean;
    var
      x, y, i, ii, r, L: integer;
      T: TPoint;
      NPCs, TPA: TPointArray;
      ATPA: T2DPointArray;
      BoxArr: TBoxArray;
      BankerColors: TIntegerArray;
    begin
      if (not(InvestScreen)) then
      begin
        repeat
          BankerColors := [3967358, 5024925];
          NPCs := GetMMDotsOnMS('npc');
          L := Length(NPCs);
          if L < 1 then
            Exit;
          SetLength(BoxArr, L);
          for i := 0 to L-1 do
          begin
            T := MMtoMS(NPCs[i]);
            BoxArr[i] := IntToBox(Max(T.x-15, MSX1), Max(T.y-15, MSY1), Min(T.x+15, MSX2), Min(T.y+15, MSY2));
          end;
          for i := 0 to L-1 do
          with BoxArr[i] do
          begin
            SetLength(ATPA, Length(BankerColors));
            For ii := 0 to High(BankerColors) do
              FindColorsTolerance(ATPA[ii], BankerColors[ii], X1, Y1, X2, Y2, 255);
            TPA := MergeATPA(ATPA);
            if Length(TPA) > 0 then
            begin
              ATPA := SplitTPA(TPA, 6);
              SortATPASize(ATPA, True);
              T := MiddleTPA(ATPA[0]);
              MMouse(T.X, T.Y, 3, 3);
              if WaitUpTextMulti(['Banker', 'Goblin'], 300) then
              begin
                ClickMouse2(False);
                Result := WaitOption('Manage', 300);
                if Result then
                begin
                  FFlag(0);
                  Wait(350 + Random(50));
                  Exit;
                end else
                  Continue;
              end;
            end;
          end;
        until UnitScreen or (not(LoggedIn));
      end;
    end;

    function RestoreUnit: Boolean;
    begin
      OpenUnit;
      Wait(450 + Random(50));
      if UnitScreen then
      begin
        Wait(450 + Random(50));
        Mouse(81, 309, 3, 3, False);
        if WaitOption('all', 400) then
        begin
          Mouse(81, 309, 3, 3, True);
          Wait(150 + Random(50));
          Mouse(81, 309, 3, 3, True);
          Wait(150 + Random(50));
          Mouse(329, 225, 3, 3, False);
          Result := WaitOption('Resupply', 400);
        end;
        if UnitScreen then
        begin
          CloseWindow;
          Wait(550 + Random(50));
        end;
      end;
    end;

    function ScenarioScreen: Boolean;
    begin
      Result := (GetTextAtExWrap(194, 29, 258, 47, 0, 50, 10, 2071039, 5, UpCharsEx) = 'Scenario');
    end;

    function OpenScenario: Boolean;
    begin
      if (not(ScenarioScreen)) then
      begin
        repeat
          if FindDTMRotated(Tent, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
          begin
            Mouse(x, y, 3, 3, False);
            Result := WaitOption('Briefing room', 300);
            if Result then
            begin
              FFlag(0);
              Wait(550 + Random(50));
            end;
          end;
        until ScenarioScreen or FindColorTolerance(x, y, 526085, 266, 348, 298, 363, 5) or (not(LoggedIn));
      end;
    end;

    function StartScenario: Boolean;
    begin
      OpenScenario;
      if ScenarioScreen then
      begin
        Mouse(339, 129, 3, 3, True);
        Wait(550 + Random(50));
        MMouse(438, 293, 3, 3);
        Wait(350 + Random(50));
        if WaitUptext('Next', 300) then
        begin
          Mouse(438, 293, 3, 3, True);
          Wait(350 + Random(50));
          Mouse(244, 123, 3, 3, True);
          Wait(350 + Random(50));
          Mouse(244, 123, 3, 3, True);
          Wait(350 + Random(50));
          Mouse(389, 302, 3, 3, False);
          Result := WaitOption('Play', 300);
        end;
        if ScenarioScreen then
        begin
          CloseWindow;
          Wait(350 + Random(50));
        end;
      end;
    end;

    function InGame: Boolean;
    begin
      if (not(TabExists(tab_Combat))) and (not(TabExists(tab_Magic))) and (TabExists(tab_Music)) and FindColorTolerance(x, y, 1988847, 672, 170, 701, 200, 5) then
        Result := True;
    end;

    function WaitGame: Boolean;
    begin
      if (not(InGame)) then
      begin
        repeat
          RandomRClick;
          Wait(5000 + Random(500));
        until InGame or (not(LoggedIn));
      end;
      Wait(750 + Random(250));
    end;

    function GetTeam: String;
    begin
      //Writeln(GetTextAtExWrap(473, 66, 502, 81, 0, 50, 10, 16777215, 15, StatChars));
      case GetTextAtExWrap(473, 66, 502, 81, 0, 50, 10, 16777215, 15, StatChars) of
        'ireen': // Green
          begin
            Result := 'W';
          end;
        'ellow': // Yellow
          begin
            Result := 'E';
          end;
        'Red': // Red
          begin
            Result := 'S';
          end;
        'Blue': // Blue
          begin
            Result := 'N';
          end;
      end;
    end;

    function GetGameTime: String;
    begin
      Result := GetTextAtExWrap(459, 29, 475, 44, 0, 50, 10, 16777215, 15, StatChars);
    end;

    function Walk(DTM: Integer): Boolean;
    begin
      if FindDTMRotated(DTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/12, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        Wait(250 + Random(50));
        FFlag(0);
        Result := True;
      end;
    end;

    function WalkTo(DTM: Integer): Boolean;
    begin
      if (not(Walk(DTM))) then
      begin
        Walk(Outside);
        if Walk(DTM) then
          Result := True;
      end else
      begin
        Result := True;
      end;
    end;

    function Tab(Window: String): Boolean;
    begin
      case Window of
        'Squad':
          Result := (GetTextAtExWrap(603, 206, 679, 222, 0, 50, 10, 3512807, 5, UpCharsEx) = 'MySquads');
        'Special':
          Result := (GetTextAtExWrap(596, 206, 688, 223, 0, 50, 10, 3512807, 5, UpCharsEx) = 'SpecialUnits');
        'Command':
          Result := (GetTextAtExWrap(586, 206, 702, 222, 0, 50, 10, 3512807, 5, UpCharsEx) = 'SquadCommands');
      end;
    end;

    function MakeTab(Window: String): Boolean;
    begin
      if InGame then
      begin
        if (not(Tab(Window))) then
        begin
          case Window of
            'Squad':
              begin
                Mouse(658, 187, 3, 3, True);
                Wait(250 + Random(50));
                Result := Tab(Window);
              end;
            'Special':
              begin
                Mouse(626, 187, 3, 3, True);
                Wait(250 + Random(50));
                Result := Tab(Window);
              end;
            'Command':
              begin
                Mouse(596, 187, 3, 3, True);
                Wait(250 + Random(50));
                Result := Tab(Window);
              end;
          end;
        end else
        begin
          Result := True;
        end;
      end;
    end;

    function MoveCamera: Boolean;
    begin
      case GetTeam of
        'N':
          begin
            if FindColorTolerance(x, y, 16777215, 52, 88, 64, 98, 5) then
            begin
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Result := True;
            end;
          end;
        'E':
          begin
            if FindColorTolerance(x, y, 16777215, 37, 70, 49, 81, 5) then
            begin
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Result := True;
            end;
          end;
        'S':
          begin
            if FindColorTolerance(x, y, 16777215, 52, 46, 61, 56, 5) then
            begin
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Result := True;
            end;
          end;
        'W':
          begin
            if FindColorTolerance(x, y, 16777215, 68, 71, 79, 78, 5) then
            begin
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Mouse(x, y, 1, 1, True);
              Wait(250 + Random(150));
              Result := True;
            end;
          end;
      end;
    end;

    function PlayGame: Boolean;
    begin
      if InGame then
      begin
        case GetTeam of
          'N':
            begin
              if (not(FindDTMRotated(NorthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound))) then
                MoveCamera;
              if FindDTMRotated(NorthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
              begin
                Wait(750 + Random(250));
                FindDTMRotated(NorthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound);
                MakeTab('Squad');
                repeat
                  Mouse(623, 235, 1, 1, True); // #1
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(712, 235, 1, 1, True); // #2
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(623, 278, 1, 1, True); // #3
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(712, 278, 1, 1, True); // #4
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(623, 321, 1, 1, True); // #5
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(712, 321, 1, 1, True); // #6
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(623, 364, 1, 1, True); // #7
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(712, 364, 1, 1, True); // #8
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(623, 407, 1, 1, True); // #9
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(712, 407, 1, 1, True); // #10
                  Wait(1050 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                Result := True;
              end;
            end;
          'E':
            begin
              if (not(FindDTMRotated(EastWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound))) then
                MoveCamera;
              if FindDTMRotated(EastWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
              begin
                Wait(750 + Random(250));
                FindDTMRotated(EastWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound);
                MakeTab('Squad');
                repeat
                  Mouse(625, 234, 3, 3, True); // #1
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 234, 3, 3, True); // #2
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(625, 279, 3, 3, True); // #3
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 279, 3, 3, True); // #4
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(625, 321, 3, 3, True); // #5
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 321, 3, 3, True); // #6
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(625, 363, 3, 3, True); // #7
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(713, 363, 3, 3, True); // #8
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(625, 407, 3, 3, True); // #9
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 407, 3, 3, True); // #10
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                Result := True;
              end;
            end;
          'S':
            begin
              if (not(FindDTMRotated(SouthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound))) then
                MoveCamera;
              if FindDTMRotated(SouthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
              begin
                Wait(750 + Random(250));
                FindDTMRotated(SouthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound);
                MakeTab('Squad');
                repeat
                  Mouse(625, 234, 3, 3, True); // #1
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 234, 3, 3, True); // #2
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(625, 279, 3, 3, True); // #3
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 279, 3, 3, True); // #4
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(625, 321, 3, 3, True); // #5
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 321, 3, 3, True); // #6
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(625, 363, 3, 3, True); // #7
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(713, 363, 3, 3, True); // #8
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(625, 407, 3, 3, True); // #9
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 407, 3, 3, True); // #10
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                Result := True;
              end;
            end;
          'W':
            begin
              if (not(FindDTMRotated(WestWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound))) then
                MoveCamera;
              if FindDTMRotated(WestWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
              begin
                Wait(750 + Random(250));
                FindDTMRotated(WestWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound);
                MakeTab('Squad');
                repeat
                  Mouse(625, 234, 3, 3, True); // #1
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 234, 3, 3, True); // #2
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(625, 279, 3, 3, True); // #3
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 279, 3, 3, True); // #4
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(625, 321, 3, 3, True); // #5
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 321, 3, 3, True); // #6
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(625, 363, 3, 3, True); // #7
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(713, 363, 3, 3, True); // #8
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');   repeat
                  Mouse(625, 407, 3, 3, True); // #9
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                repeat
                  Mouse(713, 407, 3, 3, True); // #10
                  Wait(850 + Random(350));
                until Tab('Command') or (not(LoggedIn));
                Mouse(xx, yy, 1, 1, False);
                WaitOption('Attack', 300);
                MakeTab('Squad');
                Result := True;
              end;
            end;
        end;
      end;
    end;

    function EndGame: Boolean;
    begin
      if InGame then
      begin
        repeat
          Wait(750 + Random(250));
        until (StrToInt(GetGameTime) <= 26) or (not(LoggedIn));
        MakeTab('Special');
        case GetTeam of
          'N':
            begin
              if FindDTMRotated(NorthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
              begin
                Mouse(664, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy-60), 2, 2, True);
                Wait(150 + Random(150));
                Mouse(664, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy-60), 2, 2, True);
                Wait(150 + Random(150));
                Mouse(664, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy-60), 2, 2, True);
                Wait(150 + Random(150));
                Mouse(664, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy-60), 2, 2, True);
                Wait(150 + Random(150));
                Mouse(664, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy-60), 2, 2, True);
                Wait(150 + Random(150));
              end;
            end;
          'E':
            begin
              if FindDTMRotated(EastWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
              begin
                Mouse(708, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse((xx+90), yy, 2, 2, True);
                Wait(150 + Random(150));
                Mouse(708, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse((xx+90), yy, 2, 2, True);
                Wait(150 + Random(150));
                Mouse(708, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse((xx+90), yy, 2, 2, True);
                Wait(150 + Random(150));
                Mouse(708, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse((xx+90), yy, 2, 2, True);
                Wait(150 + Random(150));
                Mouse(708, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse((xx+90), yy, 2, 2, True);
                Wait(150 + Random(150));
              end;
            end;
          'S':
            begin
              if FindDTMRotated(SouthWall, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) then
              begin
                Mouse(573, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy+140), 2, 2, True);
                Wait(150 + Random(150))
                Mouse(573, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy+140), 2, 2, True);
                Wait(150 + Random(150));
                Mouse(573, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy+140), 2, 2, True);
                Wait(150 + Random(150));
                Mouse(573, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy+140), 2, 2, True);
                Wait(150 + Random(150));
                Mouse(573, 250, 3, 3, True);
                Wait(150 + Random(150));
                Mouse(xx, (yy+140), 2, 2, True);
                Wait(150 + Random(150));
              end;
            end;
          'W':
            begin
              Mouse(618, 250, 3, 3, True);
              Wait(150 + Random(150));
              Mouse((xx-100), yy, 2, 2, True);
              Wait(150 + Random(150));
              Mouse(618, 250, 3, 3, True);
              Wait(150 + Random(150));
              Mouse((xx-100), yy, 2, 2, True);
              Wait(150 + Random(150));
              Mouse(618, 250, 3, 3, True);
              Wait(150 + Random(150));
              Mouse((xx-100), yy, 2, 2, True);
              Wait(150 + Random(150));
              Mouse(618, 250, 3, 3, True);
              Wait(150 + Random(150));
              Mouse((xx-100), yy, 2, 2, True);
              Wait(150 + Random(150));
              Mouse(618, 250, 3, 3, True);
              Wait(150 + Random(150));
              Mouse((xx-100), yy, 2, 2, True);
              Wait(150 + Random(150));
            end;
        end;
        repeat
          Wait(750 + Random(250));
        until FindDTM(Finish, x, y, MSX1, MSY1, MSX2, MSY2) or (not(LoggedIn));
        Wait(1050 + Random(250));
        Mouse(457, 58, 3, 3, True);
        Wait(250 + Random(250));
        Mouse(236, 92, 3, 3, True);
        FFlag(0);
        repeat
          Wait(250 + Random(50));
        until FindDTMRotated(Leave, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/12, aFound) or (not(LoggedIn));
        Mouse(x, y, 2, 2, False);
        WaitOption('Climb', 400);
        Wait(750 + Random(250));
      end;
    end;

    procedure Ending;
    begin
      FrDTM;
      SmartgetFieldObject(1488,'crash');
      Terminatescript;
    end;

    begin
      SetSmart;
      SetupSRL;
      DSetup;
      repeat
        if (not(InGame)) then
        begin
          repeat
            Wait(250 + Random(50));
          until WalkTo(Special) or (not(LoggedIn));
          if WalkTo(Special) then
            RestoreSpecialUnit;
          repeat
            Wait(250 + Random(50));
          until WalkTo(Squad) or (not(LoggedIn));
          if WalkTo(Squad) then
            RestoreUnit;
          repeat
            Wait(250 + Random(50));
          until WalkTo(Stairs) or (not(LoggedIn));
          if WalkTo(Stairs) then
          begin
            StartScenario;
            WaitGame;
          end;
        end;
        if InGame then
          Wait(500 + Random(250));
          if (StrToInt(GetGameTime) > 26) then
          begin
            if PlayGame then
              EndGame;
          end else
          begin
            EndGame;
          end;
      until (not(LoggedIn));
      Ending;
    end.

    Features:

    -Uses Cannons to suicide.
    -11 to 12 Games per hour.
    -Invests Maximum of credits.

    Again, its not perfect and I wrote this all in a day and just never got back to it. I will not update it since I am no longer actively scripting but I felt like it was worth of releasing and stable enough to use. It is way less botic than other MA scripts which is always a nice touch. Farewell,

    ~ DemiseScythe

  2. #2
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks good. I never thought of using DTMs for MA script. Could learn something out of this script

    Never update mine anymore since the last time I used it.

  3. #3
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    Quote Originally Posted by CephaXz View Post
    Looks good. I never thought of using DTMs for MA script. Could learn something out of this script

    Never update mine anymore since the last time I used it.
    I do everything with DTMs, that is just my style and all of my code is similar to what you can see above, its somewhat unique and I am pretty good at using DTM in creative ways. Glad it may help. Thank you.

  4. #4
    Join Date
    Jan 2012
    Location
    In A Farm
    Posts
    3,301
    Mentioned
    30 Post(s)
    Quoted
    444 Post(s)

    Default

    Nice Release dude, The bad news is that I dont have a members acoount to try it out with..Hopefully others find it helpful.

  5. #5
    Join Date
    Apr 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ill test it out. Botted 7 accounts 300 rank so yah.........

  6. #6
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i need help keeps giving me srl error my msn is blake4us@aol.com

  7. #7
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rainthunder7 View Post
    i need help keeps giving me srl error my msn is blake4us@aol.com
    What error you're getting?

    EDIT: DAFUQ? I thought this is my thread

  8. #8
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sec , let me tell you

  9. #9
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Exception in Script: Unable to find file 'srl/srl/misc/smart.simba' used from ''

  10. #10
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rainthunder7 View Post
    Exception in Script: Unable to find file 'srl/srl/misc/smart.simba' used from ''
    Probably didn't install Simba yet, have you?

    http://villavu.com/forum/showthread.php?t=68981

    EDIT: Wait, how could you get errors if you didn't have simba installed lol

  11. #11
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol its installed i just dunno wtf that means add my msn n ill show u

  12. #12
    Join Date
    May 2012
    Location
    Runescape
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rainthunder7 View Post
    Exception in Script: Unable to find file 'srl/srl/misc/smart.simba' used from ''
    http://villavu.com/forum/showthread.php?t=71645 :P

  13. #13
    Join Date
    Mar 2012
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Does it always use 10,000 credits? Is there anyway around that? Like using 10 ?

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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