CM Wizard: Autohotkey saved my life

  • #41

    As a reminder, we don't permit the use of hacks or other third-party software in conjunction with Diablo III. Most of the programs out there that are intended for use with the game are actually cheat programs and automation programs ("bots") that exploit Diablo III's mechanics and provide players with an unfair advantage. However, "third-party software" also refers to any file or program that attempts to:

    Obtain information about Diablo III that's not normally available to the player
    Transmit or modify the Diablo III game files
    Provide access to features or abilities beyond what is allowed by the game's design
    Change how Diablo III interacts with Battle.net

    And yes people already got banned just for using the razor macros and its easy to track if keystrokes are manuell done or made by a script/macro/what ever.

    How ever the chances to get banned are kinda low but still its bannable. :)
  • #42
    Quote from RaidenFreeman

    My girlfriend is playing CM, and she's complaining that her right hand hurts. I was thinking of telling her to use AHK, but I'm still unsure if it really is "illegal". I know it's against the ToS, but that doesn't mean anything if it's not enforced. Many things are "illegal" in my country, but noone is going to court for doing them, mostly because the law should be interpreted by its intent, not its wording. AHK may be technically automatation, but it's not botting, or even doing many things without actually being there (automating them). It's just a shortcut to switch one button with 4.

    I was thinking of writing a script that while a button is pressed, it cycles between 4 buttons. Isn't that 1 button for 1 action? They don't happen simultaneously, or even in consecution (with artificial time delay - even random). When you keep a button pressed in D3, it's -for some skills- like pressing it again and again, so it's one "action" with multiple results.

    What do you think? I don't want her to lose her account...


    I think that's at the edge of acceptable play since it is still 1 key press for 1 action. It's still possible to be banned, I suppose, because the software is still 3rd party software, but you can also argue that they allow 3rd party software to be used to remap keys, so this isn't much different. Also I have to imagine there's plenty more people they would ban first who use 1 key press to spam 3-4 keys at once. It's still "use at your own risk" but with extremely low chance of anything bad happening.

    That's one of the reasons they never come out and say directly what is and isn't bannable, since if they say you can use that, and everyone uses it, it could cause some unforeseen issues with the game or servers. Then if they decided they needed to stop people from using that, they'd be stuck with their response saying it's ok.
    Wizard DPS and EHP Spreadsheet, mostly useful for wizards.
    Crusader DPS and EHP Spreadsheet, meant for Crusaders
    My Wizard
  • #43
    i mostly lurk. but i like to code. took a look at this and got a few ideas. the below script will randomly time the CM sequence. i basically coded up a little app that timed how fast i could cycle 432 and shaved a bit off.

    i'm a bit weird, i like '3' as the hotkey. also note this uses the {Blind} modifier which will pass on any ctrl/alt/shift modifier if you want to be stationary.

    F12 will enable/disable everything

    it can optionally refresh armor every 105-250s. F11 toggles this

    it can optionally randomly click the right mouse button (in case you have meteor or teleport-safe passage). F10 toggles this. F9 modifies the chance between ~3-50%

    it's a fun academic exercise. do take into account all warnings Loroese has mentioned, use at your own risk
    #SingleInstance force
    
    hotkeyEnabled = 1
    armorEnabled = 1
    rbuttonEnabled = 0
    rbuttonModifier = 2
    
    SetTimer, RefreshArmor, 10000 ; setup initial armor refresh to happen in 10s
    
    #IfWinActive ahk_class D3 Main Window Class ; only use these hotkeys if D3 is active
        ; 3 is the hotkey to engage CM sequence - {Blind} resends with any mod keys (shift/ctrl/alt) to allow stationary
        $*3::
            if (hotkeyEnabled) { ; do CM sequence
                Click, down
                while GetKeyState("3", "P") {
                    Send, {Blind}4 ; diamond skin
                    RandomSleep(20, 40) ; randomness helps prevent detection
                    Send, {Blind}3 ; frost nova
                    RandomSleep(40, 80) ; randomness helps prevent detection
                    Send, {Blind}2 ; eb:cr
                    RandomSleep(80, 120) ; randomness helps prevent detection
                    if (rbuttonEnabled) {
                        Random, rbuttonRoll, 1.0, 100.0
                        rbuttonChance:= 100.0 / rbuttonModifier / 2.0
                        if (rbuttonRoll <= rbuttonChance or rbuttonRoll >= (100.0 - rbuttonChance))
                            Click, right
                    }
                }
                Click, up
            } else { ; just send 3 if hotkeys are disabled
                Send, {Blind}3
            }
            return
    
        ; F12 toggles whether all hotkey functionality is enabled or disabled
        F12::
            hotkeyEnabled := !hotkeyEnabled
            if(hotkeyEnabled && armorEnabled)
                SetTimer, RefreshArmor, 1000
            else
                SetTimer, RefreshArmor, off
            SplashMessage("Hotkeys " ((hotkeyEnabled) ? "enabled" : "disabled"))
            return
    
        ; F11 toggles auto-refresh of armor
        F11::
            armorEnabled := !armorEnabled
            if(hotkeyEnabled && armorEnabled)
                SetTimer, RefreshArmor, 1000
            else
                SetTimer, RefreshArmor, off
            SplashMessage("Armor refresh " ((armorEnabled) ? "enabled" : "disabled"))
            return
    
        ; F10 toggles whether whatever ability is on right mouse button is randomly used in CM sequence
        ; Ex: if meteors are on right button, meteors will be randomly thrown
        ;     teleport-safe passage is another possibility, becomes very easy to keep the 30% damage reduction up
        F10::
            rbuttonEnabled := !rbuttonEnabled
            SplashMessage("Random chance " ((rbuttonEnabled) ? "enabled" : "disabled"))
            return
    
        ; F9 cycles the actual random chance
        F9::
            rbuttonModifier *= 2
            if (rbuttonModifier > 32)
                rbuttonModifier = 2
            SplashMessage("Random chance is now " (100.0 / rbuttonModifier))
            return
    
    ; timer event that occurs for armor refresh
    RefreshArmor:
        WinWaitActive, ahk_class D3 Main Window Class, , 1 ; don't do this if D3 isn't active
        if (hotkeyEnabled && armorEnabled && !ErrorLevel) {
            SetTimer, RefreshArmor, off
            Send, 1 ; 1 = armor
            Random armorTimer, 105000, 125000 ; setup the next refresh to be in 105-125s - randomness helps prevent detection
            SetTimer, RefreshArmor, %armorTimer%
        }
        return
    
    ; function to sleep a random amount of time
    RandomSleep(min, max) {
        Random, rand, %min%, %max%
        Sleep %rand%
    }
    
    ; function to splash a message for 1s
    SplashMessage(msg) {
        SplashTextOn, , , %msg%
        Sleep, 1000
        SplashTextOff
    }
  • #44
    you should consider trying out a script i made
    http://www.autohotkey.com/board/topic/93352-diablo-iii-cm-wizard-script-save-your-fingers-while-you-can/
  • #45
    So how can i bind this script to this key ~ instead of X? very annoying key if u want to write to someone because X won't be in the keyboard to type it....
  • #46
    realized there is no reason to spam keys so much. can do a pixel check to see whether a key is in cooldown.
    the below script is for my resolution, 1680x1050. my laptop is 1920x1080, i'll work it out later. change the coords for your res.
    example:
    note that 2,3,4 are not spammed insanely when they are on cooldown.

    #SingleInstance force
    SendMode Input
    
    hotkeyEnabled:= 1
    armorEnabled:= 1
    SetTimer, RefreshArmor, 10000 ; setup initial armor refresh to happen in 10s
    
    #IfWinActive ahk_class D3 Main Window Class ; only use these hotkeys if D3 is active
    
        ; 3 is the hotkey to engage CM sequence
        $*3::
            if (hotkeyEnabled) { ; do CM sequence
                Click, down
                while GetKeyState("3", "P") {
                    PixelSearch, , , 741, 973, 741, 973, 0x181E19, 5, Fast
                    if !ErrorLevel
                        Send, {Blind}4
                    PixelSearch, , , 676, 973, 676, 973, 0x181E19, 5, Fast
                    if !ErrorLevel
                        Send, {Blind}3
                    PixelSearch, , , 611, 973, 611, 973, 0x181E19, 5, Fast
                    if !ErrorLevel
                        Send, {Blind}2
                    RandomSleep(100, 200)
                }
                Click, up
            } else { ; just send 3 if hotkeys are disabled
                Send, {Blind}3
            }
            return
    
        ; F12 toggles whether all hotkey functionality is enabled or disabled
        F12::
            hotkeyEnabled := !hotkeyEnabled
            if(hotkeyEnabled && armorEnabled)
                Gosub, RefreshArmor
            else
                SetTimer, RefreshArmor, off
            SplashMessage("Hotkeys " ((hotkeyEnabled) ? "enabled" : "disabled"))
            return
    
        ; F11 toggles auto-refresh of armor
        F11::
            armorEnabled := !armorEnabled
            if(hotkeyEnabled && armorEnabled)
                Gosub, RefreshArmor
            else
                SetTimer, RefreshArmor, off
            SplashMessage("Armor refresh " ((armorEnabled) ? "enabled" : "disabled"))
            return
    
    ; timer event that occurs for armor refresh
    RefreshArmor:
        WinWaitActive, ahk_class D3 Main Window Class, , 1 ; don't do this if D3 isn't active
        if (hotkeyEnabled && armorEnabled && !ErrorLevel) {
            SetTimer, RefreshArmor, off
            Send, 1 ; 1 = armor
            Random armorTimer, 105000, 118000 ; setup the next refresh to be in 105-125s
            SetTimer, RefreshArmor, %armorTimer%
        }
        return
    
    ; function to sleep a random amount of time
    RandomSleep(min, max) {
        Random, rand, %min%, %max%
        Sleep %rand%
    }
    
    ; function to splash a message
    SplashMessage(msg) {
        SplashTextOn, , , %msg%
        Sleep, 800
        SplashTextOff
    }


    fwiw, you can do really insane stuff with similar code. you can pixel check mana level, determine percentages, and calculate when to throw the meteors and when to stop. not including that to keep this simple.
  • #47
    I really had to do something as I started to have wrist problems and i had to wear a plastic cuff (i don't know hopw to call it in english, sorry) for 2 weeks. So I personally use AHK because I can't afford a g15 keyboard with built in macro.
  • #48
    Hopefully maybe whoever posted the above code, could maybe help me change it to suite the "a" "w" "d" keys for me please? d is FN, w is EB, and a is diamond skin, i use s for storm armor. also i use left shift to stand in place if that button matters at all? I looked through the code but when im looking to change from numbers to letters it gets kind of confusing. Greatly appreciate anyone taking the time to help me out thanks.
  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes