Hey all. I was hoping to start a thread for the auto-clickers out there.

Discussion in 'Time Clickers' started by VastLite, Sep 8, 2015.

  1. VastLite

    VastLite Rookie

    Joined:
    Aug 15, 2015
    Messages:
    1
    Likes Received:
    1
    When I'm at home on my desktop, I like to use a couple of auto-hotkey scripts with TimeClickers. My phone is kind of hit or miss with the mobile client, so making worthwhile progress while out and about is pretty frustrating. (This game is very addicting, but I'm stuck with my S3 for now. :sadface: )

    I'm pretty much a newbie with macro-scripting, so I was hoping to start a utilitarian topic where fellow auto-clickers could share their ideas. - So far I've copied, pasted and adapted existing scrips I've come across. Mostly to a satisfactory degree, but I am always amazed by the creativity of others when it comes to usefulness and efficiency. (Case in point, I've yet to be able to merge the two into one functional script.)

    I'm going to attempt to post links to the sources of my two AHK scripts, but I'm also pretty new to forum formatting/links, so please forgive me if I have to edit this post..

    The first one is an active window auto-clicking script: http://pastebin.com/14yretuz - This one starts full-on, but Ctrl+F1 toggles it on and off. You can disable it whenever you need to change the window placement or focus on any other application. (The script will interact with TimeClickers no matter which window is in focus, so toggling it off is a good way to prevent 100 instances of your default browser from loading the live leaderboard. - I had to learn that caveat the hard way... >.< )

    Keep in mind I've only been able to test these with the windows steam client, so modifications would need to be made for the web client. I'm unsure of any other platform compatibility.

    The second one is an automated upgrade script: http://pastebin.com/NZPCY0TF - This one doesn't start active, but once it's toggled by F2 it's a bit buggy regarding other programs. I haven't figured out how to isolate its key-presses specifically to TimeClickers, so activating it while focused on any other program will spam the upgrade keys to it. - I only use it when I'm going to be afk for a while.

    I know not everyone uses scripts, so as the topic states, I'm looking for feedback from fellow auto-clicker users.

    Once leagues are properly implemented, I'm hopeful that this differentiation won’t be too divisive to the user-base. (Or at this point, even. xD )


    2015-09-09 Edit:
    I've refined my two scripts a bit:

    http://pastebin.com/d6MvB5Eq - (Auto-Upgrade/*Skill usage)

    http://pastebin.com/nxDGAmyQ - (Auto-Clicker)

    Both are still very much a work-in-progress, but the added pause keys make multi-tasking a little less chaotic.

    *The added skill usage is rudimentary. At this point it’s explicitly tied to the upgrade loop, but it should be pretty straightforward to modify or remove based on preference.
     
    #1 VastLite, Sep 8, 2015
    Last edited: Sep 9, 2015
    Vang likes this.
  2. Morgath

    Morgath Advanced

    Joined:
    Aug 27, 2015
    Messages:
    36
    Likes Received:
    17
    I use an autoclicker as am very busy so don't have time to play properly and away from my PC most of the time. Would like to hit 4000 before the year 4000 :) I'll post a couple of scripts I found and people can snip out the bits they want and play around with them a bit.

    The one I am using now is based on the one posted here, https://www.reddit.com/r/TimeClickers/comments/3hhfvm/my_tc_script/cu7rbe0 I just modified the hotkeys. It autoclicks, upgrades the team, and uses abilities for you. It requires the window to be active, so I run in on my windows machine so can use my linux box for normal day to day stuff when I'm home.

    Also found this one posted by DevourlordGig in the same reddit thread. http://pastebin.com/raw.php?i=JNthRMMf It does much the same except it doesn't need the window to be active (in fact doesn't work at all if it is) So you could put it on another monitor if you have more than one and do something else on the same machine. I found that the fact that you can't use idle mode, and that the clicking is not very good compared to idle mode and autoclick, makes it a lot less useful, and prefer the first. Someone could modify the script to take out that bit, I don't have the time to do that, as not good at scripting so mostly trial and error.

    If they ever add leagues or something, hopefully there will be a way to sort out autoclicker users from those wanting a purer game. Would probably make a new steam account and have a go doing it without autoclicker when I had time, although I doubt I would get very high up.

    Edit: Just found this now. Has explanations to what each part of the script does which is useful for those like myself and VastLite who are new to this. https://www.reddit.com/r/TimeClickers/comments/3jue8i/my_first_ahk_script/
     
    #2 Morgath, Sep 8, 2015
    Last edited: Sep 8, 2015
    Vang likes this.
  3. uxfvtxla

    uxfvtxla Rookie

    Joined:
    Aug 19, 2015
    Messages:
    8
    Likes Received:
    6
    My autoclicker program is divided into 4 scripts, all made to fit the 1280 x 600 screen resolution:
    • A script solely for sending clicks
    • A script to do all the initial upgrades, save the game, and time warp later on
    • A script to pause all my programs if Time Clickers isn't the active window (need it if you have kids around lol)
    • A script dedicated to upgrades - using the xP mode for upgrades
    Now the first 3 are pretty simple, and have nothing fancy, or tricky to them. But this is my first time programming with autohotkey so i'm pretty proud of my upgrades script http://pastebin.com/nfYh3kwq
    It's split into 3 different parts:
    • Pixelfind - this first part finds when a new boss has appeared (using the red text at the top with the wave #, or the boss timer appearing). It then starts a timer and if the timer exceeds 22 seconds, it sends the script to the small upgrades section. This is really great for efficiency because it only upgrades your guns after 22 seconds have gone by between bosses. So you don't have any wasted damage when the waves are going by really fast.
    • Small upgrades - this basically clicks the 'single upgrades' for you. So right here it would send 'a' and only upgrade the pulse pistol. once it's done that it sends the program to "weapons".
    • Weapons - this upgrades all the guns, in a loop. combined with small upgrades it maximizes your levels gained per loop, and sends the program back to pixelfind.
     
    Morgath and Vang like this.
  4. Morgath

    Morgath Advanced

    Joined:
    Aug 27, 2015
    Messages:
    36
    Likes Received:
    17
    Really like the upgrade script you wrote uxfvtxla. Mind posting the other one that does the initial updates and warps later on? Am going away for a few days soon, and would like to have something running that means I can just leave it running and building up:timecube: and:weaponcube: while I am gone. Don't have the time to try to work it out in the next couple of days.
     
  5. Dimps

    Dimps Elite

    Joined:
    Aug 11, 2015
    Messages:
    110
    Likes Received:
    37
    @uxfvtxla, my first thought: "Wow!!"

    After I've read your scripts and explanations (tyvm for providing them, would be hard to read a goto-program without it), I am left wondering, are you really right with statements about it's efficiency.

    Can you please do a little test?

    1. Run your program the way you usually do it, and make it run controllable amount of time or waves (whatever is easier for you to measure).

    2. Write it down, time warp (don't buy more :timecube:/:weaponcube: upgrades to make it somewhat fair) and run it with following upgrade script instead:
    loop
    {
    Send asdfg ; or Send asdfg{Space}70 depending on where you put your {space}70
    Sleep 5000
    }Until Getkeystate("f6","P") ; this is how you use it in your script, never tried loop with until, but you've got the idea.

    I see your runs are usually about 2 hours long, please have this tests run about this long, not just "10 minutes test".
    Then post the results please. My bet is that my example script should not lose (much). Or maybe it will win? :)
     
  6. uxfvtxla

    uxfvtxla Rookie

    Joined:
    Aug 19, 2015
    Messages:
    8
    Likes Received:
    6
    Morgath and Dimps like this.
  7. RebelKeithy

    RebelKeithy Rookie

    Joined:
    Jul 28, 2015
    Messages:
    7
    Likes Received:
    6
    This is the script I'm using for my RebelBot account, it's written in Java. http://pastebin.com/2rGRHgPz
    It's main features are that once a weapon reaches a promotion, it stops upgrading all other weapons until it can promote.
    Also since it's going on a super-deep run with no :timecube:s (on stage 655 now), it has to focus all it's firepower to beat bosses. Knowing this, it doesn't use skills all the time, but every 10 minutes it resets the boss timer and activates all skills in an attempt to beat the boss.
     
  8. Dimps

    Dimps Elite

    Joined:
    Aug 11, 2015
    Messages:
    110
    Likes Received:
    37
    Good insight.
     
  9. Fuhrious

    Fuhrious Spec Ops

    Joined:
    Aug 19, 2015
    Messages:
    7
    Likes Received:
    3
    I just use a simple ahk script that just clicks each weapon level up and each ability. I let idle mode handle the targeting. I'm not looking to get fancy at all and just let is run pretty much 24/7 on a old spare laptop.
    http://pastebin.com/kaNWCAHR
     
  10. uxfvtxla

    uxfvtxla Rookie

    Joined:
    Aug 19, 2015
    Messages:
    8
    Likes Received:
    6
    @Dimps I tested out your script and the results are just about identical, mine just gained 10-20 waves more then yours after an hour of it running. not too big of a difference.
     
  11. Dimps

    Dimps Elite

    Joined:
    Aug 11, 2015
    Messages:
    110
    Likes Received:
    37
    Good to know, @uxfvtxla. Thank you!

    I think logic of @RebelKeithy "once a weapon reaches a promotion, it stops upgrading all other weapons until it can promote" should actually be significant, especially when tearing through waves that are not all 1-shot.
     
  12. Morgath

    Morgath Advanced

    Joined:
    Aug 27, 2015
    Messages:
    36
    Likes Received:
    17
    Have been trying your scripts for a couple of days uxfvtxla and its going really well. Couple of problems though - kept coming up with an error message everytime it reset saying that there was another instance running and did you want to reload. And twice I found it had gone on to the weapon cube screen after a reset (last just now, so had to try to sort it out). Am thinking the error message came up in the wrong place and it got clicked by accident and somehow messed with the procedure. So anyone else wanting to run the scripts, make sure to put "#SingleInstance ignore" without the quotes on the top of the scripts to stop this happening. I also bumped up the sleep time of the click pistol in case that was the problem. Not sure what else it could be and don't have time to figure it out, so fingers crossed.

    Edit: had to run the old script at the last second because my tinkering meant I caused it to pause the upgrade script at the end of a reset. Gonna try to merge the scripts to make it easier to run things now I have the time.
     
    #12 Morgath, Sep 13, 2015
    Last edited: Sep 16, 2015
  13. Syntaxerror

    Syntaxerror Rookie

    Joined:
    Jul 25, 2015
    Messages:
    1
    Likes Received:
    0
    May I ask how you send the clicks?
    Personally, I'm doing it like this and it's probably the fastest you can achieve:
    Code (Text):
    +^s::
        SleepDuration := 1
        TimePeriod := 1
        DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)
        __ESCpressed = 0                ; Make sure that the loop doesn't break instantly
        Sleep 50                        ; Wait a moment for the variable to update
        Loop {
            Click
            DllCall("Sleep", UInt, SleepDuration)
            if __ESCpressed {            ; If ESCpressed was set to 1 (happens through an independent Hotkey)
                __ESCpressed = 0        ; break the loop and set it back to 0 (it's global)
                break
            }
        }
        DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
    return

    ~Esc::
       If (__ESCpressed) {
         __ESCpressed = 0
       } else {
         splash("Script stops",0.5)
         __ESCpressed = 1
       }
    return

    splash(text, seconds = 1.0) {
       SplashTextOn,200,20,,%text%
       Sleep % seconds * 1000
       SplashTextOff
    }
    Or in short do this:
    Code (Text):
    DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)
    TimePeriod should be 7 or 3. 7 Is mostly a sleep of around 15.6ms whereas anything below 3 will give you the shortest possible sleep without the Script becoming unresponsive.

    Instead of Sleep you should then use
    Code (Text):
    DllCall("Sleep", UInt, SleepDuration)
    whereas SleepDuration can be used for fine-adjusting the sleeptime (I use 1 in both, because I get 0.92ms sleeps like that but fidling around may give you better results. I noticed that the sleeps get shorter if your processor is running on full speed).

    After you're done be sure to reset the system-sleeptimer to it's normal value like this:
    Code (Text):
    DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
    You have to do this because timePeriod affects the whole OS.

    There's an example in the corresponsing section in the documentation for SLEEP.
     
  14. Dimps

    Dimps Elite

    Joined:
    Aug 11, 2015
    Messages:
    110
    Likes Received:
    37
    Start with playing with SetMouseDelay, without it you are automatically missing 10 ms on every click. You may want to play with SendModes, who knows.
    Then just don't sleep after each click, you could do Click 100 or MouseClick,,,,100 for example, then sleep (just default sleep, disregard the hacks) and it would still be much faster.

    Be careful with splash text. Afaik clicking it can change current focus, leading to unpredictable results.
    You also sleep there before you actually start telling your script to try to stop. Something like this would be better (non-blocking)

    Code (Text):
    notify(text, delay := -300)
    {
        tooltip, %text%

        if (delay >= 0)
        {
            delay *= -1
        }
        SetTimer, tooltip_hide, %delay%
    }
    tooltip_hide:
        tooltip
        return
    It'd also be a good usability idea to always start it on your S-hotkey and always stop (not toggle) it on Esc. This way even if for some reason script or system went unresponsive (for example you set too long of an action to be done before next Sleep), one could safely spam or hold Esc, not fearing of re-starting your script again.
     
  15. Dimps

    Dimps Elite

    Joined:
    Aug 11, 2015
    Messages:
    110
    Likes Received:
    37
    Combining your changing system timer resolution technique with my "reduce delay" may produce even greater results than just my example alone.
    Please report on how your experiment went. (a screenshots of a different streams of rockets while mouse points same exact spot and no artifacts enabled would be a good visual way to really judge it's success)
     
  16. CubeClick

    CubeClick Rookie

    Joined:
    Jul 27, 2015
    Messages:
    10
    Likes Received:
    3
    I use a macro program "super macro" wich happens to be in french.

    For the clicking, i set my rockets on auto-aim while my pistol fires quickly all over the window.

    Let's say the frame where cubes appear is x in [0-490] and y in [0-500].
    The program works well only under max damages conditions.

    I set alternatively x to 120 then 370 : the multiple bullets ensure shots are spread all over horizontal coodinates.

    I set y like this.

    Next y = previous y + 309
    If Next y > 500, then substract 500 to Next y.

    309 has no common divisor with 500 : i will reach all y coordinates in a rotation.
    500/309 is close to the gold number : this ensure the fact my shots will spread nicely over any period of time.

    This way, the click pistol get rid of the easy cubes, while the rocket launcher focus on harder cubes, and get more chances to have bonus when easy cubes are gone.
     
  17. gent00m

    gent00m Rookie

    Joined:
    Sep 1, 2015
    Messages:
    12
    Likes Received:
    3
    I saw this thread two days ago and never heard of AutoHotKey before (I just used a dumb clicker program, so no autoupgrades, no auto timewarps and so on) but after reading a bit about AutoHotkey, I tried myself. From auto-timewarping after three hours, to auto-upgrading weapons and turning on idle mode + a clicker everything is integrated:
    https://gist.github.com/stieglma/25ea53a2191ff515a753

    The upgrading process is quite bad as it always upgrades the cheapest weapon, perhaps something with pixelfind could be done so that at least for the early game (up to weapon level 2500 or so) only weapons are bought if the next promotion/upgrade is reachable
     
    Dimps likes this.
  18. opti

    opti Elite

    Joined:
    Aug 9, 2015
    Messages:
    12
    Likes Received:
    1
    1280x600? i dont have that option...
    i have 1280x 720, 768, 800, 960, 1024,
    of the 18 total choices there's one that has 600 and it's 800x600
    which is to run your scripts?
     
  19. gent00m

    gent00m Rookie

    Joined:
    Sep 1, 2015
    Messages:
    12
    Likes Received:
    3
    @opti you can just try it out. The importance of the screen size comes from automated clicks to certain coordinates (e.g. for Timewarps, ...). If the script doesn't work in the resolution you are using currently, then just try out the other one ;)
    Additionally:
    With the 1.3 update more parts of the autoclickeres/upgrades will become independant of the screensize, as very helpful hotkeys are introduced for the idle modes, changing buying modes and buying active abilities.
     
  20. Dimps

    Dimps Elite

    Joined:
    Aug 11, 2015
    Messages:
    110
    Likes Received:
    37
    Introduction of hotkeys for everything means game can be run minimized and all required keypresses could be sent with SendMessage.
    I don't personally like how they make botting easier :))

    First "idle mode" where one could just spam asdfg to upgrade, and spam left clicks. Now more hotkeys for even easier botting.