Starcraft II:: Automation

This is a discussion on Starcraft II:: Automation within the Starcraft 2 Hacks, bots and tools board part of the Starcraft 2 forum category; I have an idea for a simple queue command using patrol for a unit to go all around the map ...

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 33
  1. #21
    lightdreamer is offline Member
    Array
    Join Date
    Apr 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    3
    I have an idea for a simple queue command using patrol for a unit to go all around the map non-stop. Would be great for like a couple of Overseers just patrolling with overlord speed.


  2. #22
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    Quote Originally Posted by lightdreamer View Post
    I have an idea for a simple queue command using patrol for a unit to go all around the map non-stop. Would be great for like a couple of Overseers just patrolling with overlord speed.

    Hmm, I like this idea of an "auto-patrol" on the minimap. I'm on it. Ill scrap together a script that supports this idea.

    my guess is to pre-record some patrol patters on the minimap, hotkey the overlords and send that group of units on a consistent patrol around the pre-recorded area.

  3. #23
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    Here is my logical lua script in it's entirety, if anyone is interested.



    Code:
    -- 7-1-2017
    -- Written By Darious4
    -- Macro Logic Script 3.0
    -- SUPPORT WOL, HOTS, LOTV gameMODE
    -- Logitech Gaming Keyboard, G1-G12 for performance optimization
    -- Status(Discontinued Script)
    
    
    
    function OnEvent(event, arg, family)
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    -- On ACTIVATED
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    if (event=="PROFILE_ACTIVATED" and GetRunningTime()< 50) then
    
    
    
     OutputLogMessage("==================== START SCRIPT ====================\n");
    
     ReleaseAll();
    
     ClearLog();
    
    
    
     SetMKeyState(1); -- Force M1
    
    
    
     -- INIT Variables for all Race
    
    SC2WOL = "1"
    
    
     SC2HOTS = "2";
    
    
    SC2LOTV = "3";
    
     CURRENTGAME = SC2LOTV;
    
     ARMY1 = "1";
    
     ARMY2 = "2";
    
     BASES = "5";
    
     SAVEDACTION = "0";
    
     SCV_LARVA="s";
    
     DRONE="d";
    
     PROBE="e";
    
     VAR_start=0;
    
    
    
     -- Init globals variables for Zerg 
    
     QUEEN = "9";
    
     QueenOK=0;
    
     TimeLastLarva=0;
    
     TimeSinceLastLarva=0;
    
    
    
     -- Init globals variables for Terran
    
    
    
    
    
     -- Init globals variables for Protoss
    
    
    
    end
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    -- On DEACTIVATED
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    if (event=="PROFILE_DEACTIVATED") then
    
     -- switch M2 and M1 at desactivation for keyboard and G13
    
     --SetMKeyState(2,"kb");
    
     --SetMKeyState(2,"lhc");
    
     --SetMKeyState(1,"kb");
    
     --SetMKeyState(1,"lhc");
    
    end
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    -- On every event do
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    showMousePosition();
    
    OutputLogMessage("OnEvent = %s, arg = %s\n", event, arg);
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    
    
    -- M1 for Zerg
    
    if (event=="M_PRESSED" and arg==1) then
    
    
    
     -- Init locals variables for Zerg 
    
     --SetBacklightColor(0,167,0);
    
     Race=1;
    
     SelectLarva="s"; -- Key for zerg larva
    
     VAR_CreatePeon="d" -- Key for create peon
    
     VAR_CreateArmy1="z"; -- Zergling
    
     VAR_CreateArmy2="r"; -- Roach
    
     VAR_CreateArmy3="h"; -- Hydralisk
    
     VAR_CreateArmy4="t"; -- Mutalisk
    
    
    
    end
    
    
    
    -- M2 for Terran 
    
    if (event=="M_PRESSED" and arg==2) then
    
     --SetBacklightColor(0,0,167);
    
     Race=2;
    
     VAR_CreatePeon="s"; -- Key for create peon
    
    end
    
    
    
    -- M3 for Protoss
    
    if (event=="M_PRESSED" and arg==3) then
    
     --SetBacklightColor(167,0,0);
    
     Race=3;
    
     VAR_CreatePeon="e"; -- Key for create peon
    
    end
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    -- G1 G2 G7 and G8 For M1, M2 and M3 (All race)
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    
    
    ---------------------------------------------------
    
    -- G1, 
    
    ---------------------------------------------------
    
    if (event=="G_PRESSED" and arg==1) then
    
     Init(SC2HOTS);
    
    end 
    
    
    
    ---------------------------------------------------
    
    -- G7, new game
    
    ---------------------------------------------------
    
    if (event=="G_PRESSED" and arg==7) then
    
     
    
    end 
    
    
    
    ---------------------------------------------------
    
    -- G11, Split units
    
    ---------------------------------------------------
    
    if (event=="G_PRESSED"  and arg==11) then
    
     splitUnits();
    
    end
    
    
    
    ---------------------------------------------------
    
    -- G2, Start
    
    ---------------------------------------------------
    
    if (event=="G_PRESSED" and arg==2) then
    
     --OutputLogMessage("OnEvent = %s, arg = %s\n", event, arg);
    
     OutputLogMessage("VAR_Start Debut = %s\n",VAR_start);
    
     start();
    
     OutputLogMessage("VAR_Start Fin = %s\n",VAR_start);
    
    end 
    
    
    
    ---------------------------------------------------
    
    -- G8, Kitte
    
    ---------------------------------------------------
    
    if (event=="G_PRESSED" and arg==8) then
    
     kitteWithRangedUnits();
    
    end 
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    -- M1 for Zerg
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    if (Race==1) then
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    -- On every Zerg event do
    
    ------------------------------------------------------------------------------------------------------
    
    
    
     if QueenOK==1 then
    
      TimeSinceLastLarva=GetRunningTime()-TimeLastLarva;
    
     end
    
    
    
     OutputLogMessage("TimeSinceLastLarva = %s\n", TimeSinceLastLarva);
    
    
    
     -- check if must make larva
    
     if QueenOK==1 and TimeSinceLastLarva > 35000 then
    
      MakeLarva()
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G3, Mass Zerglings
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==3) then
    
      --saveCurrentAction();
    
      masseProduction(25, VAR_CreateArmy1);
    
      -- Select transformation larva and add to group 1
    
      AddGroup("1",1,1)
    
      --goToSavedAction();
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G9, Mass Roach
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==9) then
    
      masseProduction(25, VAR_CreateArmy2);
    
      -- Select transformation larva and add to group 2
    
      AddGroup("2",1,1)
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G4, Mass Hydralisk
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==4) then
    
      masseProduction(25, VAR_CreateArmy3);
    
      -- Select transformation larva and add to group 3
    
      AddGroup("3",1,1)
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G10, Mass Mutalisk
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==10) then
    
      masseProduction(25, VAR_CreateArmy4);
    
      -- Select transformation larva and add to group 4
    
      AddGroup("4",1,1)
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G5, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==5) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G6, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==7) then
    
      --Nothing
    
     end 
    
    
    
    ---------------------------------------------------
    
    -- G12, Queen make larva
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==12) then
    
      MakeLarva()
    
     end
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    -- M1 for Terran 
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    elseif (Race==2) then
    
    -- Nothing at the moment
    
    ------------------------------------------------------------------------------------------------------
    
    -- On every Terran  event do
    
    ------------------------------------------------------------------------------------------------------
    
    
    
    --Nothing
    
    
    
    ---------------------------------------------------
    
    -- G3, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==3) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G9, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==9) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G4, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==4) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G10, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==10) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G5, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==5) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G6, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==7) then
    
      --Nothing
    
     end 
    
    
    
    ---------------------------------------------------
    
    -- G12, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==12) then
    
      MakeLarva()
    
     end
    
    
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    -- M3 for Protoss
    
    ------------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------------------------------
    
    elseif (Race==3) then
    
    -- Nothing at the moment
    
    ------------------------------------------------------------------------------------------------------
    
    -- On every Protoss event do
    
    ------------------------------------------------------------------------------------------------------
    
    
    
    --Nothing
    
    
    
    ---------------------------------------------------
    
    -- G3, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==3) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G9, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==9) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G4, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==4) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G10, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==10) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G5, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==5) then
    
      --Nothing
    
     end
    
    
    
    ---------------------------------------------------
    
    -- G6, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==7) then
    
      --Nothing
    
     end 
    
    
    
    ---------------------------------------------------
    
    -- G12, Nothing
    
    ---------------------------------------------------
    
     if (event=="G_PRESSED" and arg==12) then
    
      MakeLarva()
    
     end
    
    
    
    end
    
    
    
    end
    
    
    
    ---------------------------------------------------
    
    -- Functions
    
    ---------------------------------------------------
    
    function Init(gameMode)
    
     CURRENTGAME = gameMode;
    
     OutputLogMessage("VAR_Start Init = %s\n",VAR_start);
    
     ReleaseAll();
    
     ClearLog();
    
     VAR_start=0;
    
     QueenOK=0;
    
     TimeLastLarva=0;
    
     TimerQueen=0;
    
    end
    
    
    
    ---------------------------------------------------
    
    
    
    function kitteWithRangedUnits()
    
     f=0;
    
     while f<5 do
    
    
    
      PressAndReleaseMouseButton(3);
    
      Sleep(math.random(1050, 1100)); -- //marine shoot at 0.8608
    
      PressAndReleaseKey("S"); -- //Stop the units
    
      Sleep(math.random(100, 110));
    
      f = f+1;
    
     end
    
    end
    
    
    
    ---------------------------------------------------
    
    
    
    function splitUnits()
    
     PressAndReleaseKey(ARMY1);
    
     MoveMouseTo(25476, 55756);
    
     PressAndReleaseMouseButton(1);
    
     
    
     PressAndReleaseKey(ARMY1);
    
     MoveMouseTo(25476, 55756);
    
     PressAndReleaseMouseButton(1);
    
     
    
     PressAndReleaseKey(ARMY1);
    
     MoveMouseTo(27969, 55756);
    
     PressAndReleaseMouseButton(1);
    
     
    
     PressAndReleaseKey(ARMY1);
    
     MoveMouseTo(29813, 55574);
    
     PressAndReleaseMouseButton(1);
    
     
    
     PressAndReleaseKey(ARMY1);
    
     MoveMouseTo(31384, 55392);
    
     PressAndReleaseMouseButton(1);
    
     
    
    -- Mouse is at 23871, 55392
    
    -- Mouse is at 25476, 55756
    
    -- Mouse is at 27969, 55756
    
    -- Mouse is at 29813, 55574
    
    -- Mouse is at 31384, 55392
    
    -- Mouse is at 33194, 55574
    
    -- Mouse is at 35380, 55635
    
    -- Mouse is at 37327, 55392
    
    
    
    -- Mouse is at 23393, 58793
    
    -- Mouse is at 25408, 58611
    
    -- Mouse is at 27491, 59340
    
    -- Mouse is at 29950, 59097
    
    -- Mouse is at 31316, 59097
    
    -- Mouse is at 33331, 59401
    
    -- Mouse is at 35482, 58975
    
    -- Mouse is at 37224, 59036
    
    
    
    -- Mouse is at 23803, 62680
    
    -- Mouse is at 25510, 62498
    
    -- Mouse is at 27491, 62559
    
    
    
    end
    
    
    
    ---------------------------------------------------
    
    
    
    function MakeLarva()
    
     saveCurrentAction();
    
     i=0;
    
     while i<5 do
    
      i = i+1;
    
      PressAndReleaseKey(QUEEN);
    
      Sleep(math.random(10, 20));
    
      PressAndReleaseKey("v");
    
      -- Center mouse on screen and click the left mouse button
    
      MoveMouseTo(32817,23600);
    
      Sleep(math.random(10, 20));
    
      PressAndReleaseKey("backspace")
    
      Sleep(math.random(30, 50));
    
      PressAndReleaseMouseButton(1);
    
      Sleep(math.random(10, 20));
    
     end
    
     goToSavedAction();
    
     TimeLastLarva= GetRunningTime();
    
     QueenOK=1;
    
    end
    
    
    
    ---------------------------------------------------
    
    
    
    function showMousePosition()
    
     x, y = GetMousePosition();
    
     OutputLogMessage("Mouse is at %d, %d\n", x, y);
    
    end
    
    
    
    ---------------------------------------------------
    
    function saveCurrentAction()
    
     OutputLogMessage("saveCurrentAction\n");
    
     PressKey("lctrl")
    
     Sleep(10);
    
     PressAndReleaseKey(SAVEDACTION);
    
     Sleep(10);
    
     ReleaseKey("lctrl");
    
     Sleep(10);
    
    end
    
    
    
    ---------------------------------------------------
    
    function goToSavedAction()
    
     OutputLogMessage("goToSavedAction\n");
    
     Sleep(10);
    
     PressAndReleaseKey(SAVEDACTION, SAVEDACTION);
    
    end
    
    
    
    ---------------------------------------------------
    
    function masseProduction(amount, UnitType)
    
     OutputLogMessage("MASSE\n");
    
     OutputLogMessage(BASES,"\n");
    
     PressAndReleaseKey(BASES);
    
     Sleep(math.random(10, 20));
    
    
    
    
    
     if (Race==1) then -- Zerg case
    
      OutputLogMessage("======== ZERG ========\n");
    
      PressAndReleaseKey(SelectLarva);
    
      Sleep(math.random(10, 20));
    
     elseif (Race==2) then -- Marine case
    
      OutputLogMessage("Marine");
    
     elseif (Race==3) then -- Protoss case
    
      OutputLogMessage("Protoss");
    
     end
    
    
    
    
    
     while amount > 0 do
    
      PressAndReleaseKey(UnitType);
    
      Sleep(math.random(10, 20));
    
      amount = amount - 1;
    
     end
    
     --Sleep (270);
    
     --MoveMouseTo(22460, 55207);
    
     OutputLogMessage("END");
    
    end
    
    
    
    
    
    ---------------------------------------------------
    
    function start()
    
    
    
     -- 1st run
    
     if VAR_start==0 then
    
      OutputLogMessage("Function start");
    
      if CURRENTGAME == SC2WOLthen
    
       SelectWorkers(0);
    
       UnSelect(3);
    
       AddGroup("0",0,0);
    
       PressAndReleaseKey("0");
    
       UnSelect(2);
    
       AddGroup("8",0,0);
    
    
    
       SelectWorkers(0);
    
      end
    
      
    
      PressAndReleaseKey("backspace");
    
      Sleep(math.random(40, 50));
    
    
    
      MoveMouseTo(32819, 23566);
    
      PressAndReleaseMouseButton(1);
    
       
    
      PressKey("lctrl");
    
      Sleep(math.random(10, 20));
    
    
    
      PressAndReleaseKey(BASES);
    
      Sleep(math.random(10, 20));
    
    
    
      ReleaseKey("lctrl");
    
      Sleep(math.random(10, 20));
    
      
    
      CreatePeonRandom();
    
    
    
      PressAndReleaseKey(BASES);
    
      Sleep(math.random(10, 20));
    
    
    
      SelectWorkers(1);
    
    
    
      VAR_start=1;
    
     
    
     elseif VAR_start==1 then
    
      PressAndReleaseKey("0");
    
      VAR_start=2;
    
    
    
     elseif VAR_start==2 then
    
      PressAndReleaseKey("8");
    
      VAR_start=3;
    
    
    
     elseif VAR_start==3 then
    
      CreatePeon(1);
    
     end
    
    
    
    end
    
    
    
    ---------------------------------------------------
    
    function CreatePeon(amount)
    
     OutputLogMessage("CreatePeon Start\n");
    
     OutputLogMessage(BASES,"\n");
    
    
    
     PressAndReleaseKey(BASES);
    
     if (Race==1) then -- Zerg case
    
      OutputLogMessage("======== ZERG ========\n");
    
      PressAndReleaseKey(SelectLarva);
    
      Sleep(math.random(10, 20));
    
     elseif (Race==2) then -- Terran case
    
      OutputLogMessage("Terran");
    
     elseif (Race==3) then -- Protoss case
    
      OutputLogMessage("Protoss");
    
     end
    
    
    
     i=0;
    
    
    
     while i<amount do
    
      PressAndReleaseKey(VAR_CreatePeon);
    
      Sleep(math.random(10, 20));
    
      i=i+1;
    
     end
    
    
    
     OutputLogMessage("CreatePeon END\n");
    
    end
    
    
    
    ---------------------------------------------------
    
    function CreatePeonRandom()
    
     OutputLogMessage("CreatePeonRandom Start\n");
    
     OutputLogMessage(BASES,"\n");
    
    
    
     PressAndReleaseKey(BASES);
    
     PressAndReleaseKey(SCV_LARVA);
    
     Sleep(math.random(10, 20));
    
     PressAndReleaseKey(DRONE);
    
     Sleep(math.random(10, 20));
    
     PressAndReleaseKey(PROBE);
    
     Sleep(math.random(10, 20));
    
    
    
     OutputLogMessage("CreatePeonRandom END\n");
    
    end
    
    
    
    ---------------------------------------------------
    
    function UnSelect(number)
    
     OutputLogMessage("started unselect\n");
    
     PressKey("lshift");
    
     Sleep(math.random(10, 20));
    
     MoveMouseTo(23564,55693);
    
     i=0;
    
     while i<number do
    
      PressAndReleaseMouseButton(1);
    
      Sleep(math.random(10, 20));
    
      i = i + 1;
    
     end
    
     ReleaseKey("lshift");
    
     MoveMouseTo(32819, 23566);
    
     OutputLogMessage("end unselect\n");
    
    end
    
    ---------------------------------------------------
    
    function SelectWorkers(Action)
    
    --Action=0 only select
    
    --Action=1 add
    
     OutputLogMessage("started selectWorkers action : %s\n",Action);
    
     PressKey("lctrl");
    
     Sleep(math.random(10, 20));
    
    
    
     if Action==1 then
    
      PressKey("lshift");
    
      Sleep(math.random(10, 20));
    
     end
    
    
    
     PressAndReleaseKey("F1");
    
     Sleep(math.random(10, 20));
    
    
    
     if Action==1 then
    
      ReleaseKey("lshift");
    
      Sleep(math.random(10, 20));
    
     end
    
    
    
     ReleaseKey("lctrl");
    
     Sleep(math.random(10, 20));
    
     
    
     OutputLogMessage("end selectWorkers\n");
    
    end
    
    
    
    ---------------------------------------------------
    
    function AddGroup(Group,Action,Safe)
    
    --Action=0 only select
    
    --Action=1 add
    
    --Safe=1 add only same type of the 1st unit
    
    
    
     if Safe==1 then
    
      OutputLogMessage("AddGroup\n");
    
      Sleep(math.random(10, 20));
    
      MoveMouseTo(23564,55693);
    
      Sleep(math.random(10, 20));
    
      PressKey("lctrl");
    
      Sleep(math.random(10, 20));
    
      PressAndReleaseMouseButton(1);
    
      Sleep(math.random(10, 20));
    
      ReleaseKey("lctrl");
    
      Sleep(math.random(10, 20));
    
     else
    
      PressAndReleaseKey(Group);
    
     end
    
    
    
     if Action==0 then
    
      PressKey("lctrl");
    
      Sleep(math.random(10, 20));
    
     elseif Action==1 then
    
      PressKey("lshift");
    
      Sleep(math.random(10, 20));
    
     end
    
    
    
     PressAndReleaseKey(Group);
    
     Sleep(math.random(10, 20));
    
    
    
     if Action==0 then
    
      ReleaseKey("lctrl");
    
      Sleep(math.random(10, 20));
    
     elseif Action==1 then
    
      ReleaseKey("lshift");
    
      Sleep(math.random(10, 20));
    
     end
    
    
    
     PressAndReleaseKey(Group);
    
    end
    
    
    
    ---------------------------------------------------
    
    function ReleaseAll()
    
     ReleaseKey("lctrl");
    
     ReleaseKey("lshift");
    
    end

  4. #24
    lightdreamer is offline Member
    Array
    Join Date
    Apr 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    3
    Got another idea. A hotkey to send your army patrolling around all your bases. Probably utilizing the base camera hotkey.

  5. #25
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    Quote Originally Posted by lightdreamer View Post
    Got another idea. A hotkey to send your army patrolling around all your bases. Probably utilizing the base camera hotkey.
    I fail to see how this is effective.

  6. #26
    LongJohns is offline Newbie
    Array
    Join Date
    Sep 2016
    Posts
    7
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    Another idea - either super easy to do in ahk or not possible at all - being able to spam the smart command like we could in hots.

    Why is this useful? It is good for worker stacking on closer patches in early game, stacking air units for maximizing dmg output, smoother unit control when spammed.

    The idea is simply to put smart command on a customizable hotkey, and hold it down to repeat itself. Repeatability in keystrokes (ie 25 commands/s ) is the key here since creating an alternate hotkey is already doable BUT cannot repeat itself anymore to my knowledge.

    If there is a way to accomplish this already like in hots (other than mashing the rmb), please tell me and disregard the earlier part of this post.

  7. #27
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    Quote Originally Posted by LongJohns View Post
    Another idea - either super easy to do in ahk or not possible at all - being able to spam the smart command like we could in hots.

    Why is this useful? It is good for worker stacking on closer patches in early game, stacking air units for maximizing dmg output, smoother unit control when spammed.

    The idea is simply to put smart command on a customizable hotkey, and hold it down to repeat itself. Repeatability in keystrokes (ie 25 commands/s ) is the key here since creating an alternate hotkey is already doable BUT cannot repeat itself anymore to my knowledge.

    If there is a way to accomplish this already like in hots (other than mashing the rmb), please tell me and disregard the earlier part of this post.
    This is simple to do. Set the hotkey you want to trigger the effect into an ahk script and make it hold down and repeat the smart command key.

    Here try this::



    Code:
    #NoEnv
    #IfWinActive, StarCraft II
    SendMode Input
    SetDefaultMouseSpeed 0
    
    
    
    global Micro_PosX := []
    global Micro_PosY := []
    global Micro_Positioning := 0
    
    $`::
    Smart_Command()
    return
    
    
    
    Micro_PosList(X, Y)
    {
        Micro_Positioning := Micro_Positioning + 1
        Micro_Positioning[Micro_Positioning] := X
        Micro_Positioning[Micro_Positioning] := Y
    }
    
    Smart_Command()
    {
        Coordmode, mouse, screen
     MouseGetPos, xpos, ypos
        SetKeyDelay -1
        Sleep -1
        SetBatchLines -1
        MouseClick, Right, %Micro_PosX%, %Micro_PosY%
        MouseClick, Right, %Micro_PosX%, %Micro_PosY%
        MouseClick, Right, %Micro_PosX%, %Micro_PosY%
     }
    
    Return   

  8. The Following User Says Thank You to Darious4 For This Useful Post:


  9. #28
    LongJohns is offline Newbie
    Array
    Join Date
    Sep 2016
    Posts
    7
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    Works like a charm!

  10. #29
    verbz is offline Newbie
    Array
    Join Date
    Nov 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    Was curious if it's possible to make a script for Expanding? For example to expand currently you have to

    1) Go to one of your bases
    2) Box you Drones (SCV's or Probes)
    3) Hit the hotkey for Basic Structures
    4) Then hit the hotkey for the Hatchery
    5) Click on the mini map or scroll to the location
    6) Left Mouse click down in the right spot near the minerals

    Is there anyway to reduce these steps and speed up the expanding process? Maybe even do it off the mini map somehow?
    Last edited by verbz; 12-07-2017 at 07:12 AM.

  11. #30
    KappaPrideMe is offline Newbie
    Array
    Join Date
    Oct 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    1
    Quote Originally Posted by verbz View Post
    Was curious if it's possible to make a script for Expanding? For example to expand currently you have to

    1) Go to one of your bases
    2) Box you Drones (SCV's or Probes)
    3) Hit the hotkey for Basic Structures
    4) Then hit the hotkey for the Hatchery
    5) Click on the mini map or scroll to the location
    6) Left Mouse click down in the right spot near the minerals

    Is there anyway to reduce these steps and speed up the expanding process? Maybe even do it off the mini map somehow?
    Yup, that's easy to do.

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Introducing Robot - The Next Step in System Automation
    By Torpedoes in forum Development
    Replies: 0
    Last Post: 04-26-2016, 09:07 PM
  2. Replies: 0
    Last Post: 08-30-2012, 01:19 AM
  3. Replies: 3
    Last Post: 03-05-2012, 05:31 AM
  4. What Starcraft 2 automation hacks should look like !
    By maximalista in forum Starcraft 2 Hacks, bots and tools
    Replies: 12
    Last Post: 02-21-2012, 05:49 PM
  5. [Release] [DETECTED] Vuno's Automation Hack
    By Vuno in forum Starcraft 2 Hacks, bots and tools
    Replies: 65
    Last Post: 04-30-2011, 11:32 PM

Posting Permissions

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