Battle Script

Ask gaming related questions (AHK v1.1 and older)
Lefvo
Posts: 1
Joined: 04 May 2024, 10:48

Battle Script

04 May 2024, 10:50

Okay so it should do this

w = double taps w then moves to looping script
a = double taps a, waits one second, then moves to "w"
d = double taps d, waits one second, then moves to "w"
Looping script = holds w for user, stops when the user is no longer holding w


This is what I wrote

Code: Select all

#NoEnv
#UseHook

w::
    Send {w down}
    Sleep 50
    Send {w up}
    Sleep 50
    Send {w down}
    Sleep 50
    Send {w up}

    LoopW := true
    While LoopW {
        Send {w down}
        Sleep 50
    }
    Return

a::
    Send {a down}
    Sleep 50
    Send {a up}
    Sleep 50
    Send {a down}
    Sleep 50
    Send {a up}

    Sleep 1000

    LoopW := true
    While LoopW {
        Send {w down}
        Sleep 50
    }
    Return

d::
    Send {d down}
    Sleep 50
    Send {d up}
    Sleep 50
    Send {d down}
    Sleep 50
    Send {d up}

    Sleep 1000

    LoopW := true
    While LoopW {
        Send {w down}
        Sleep 50
    }
    Return

w up::
    LoopW := false
    Send {w up}
    Return

[Mod action: Topic moved from "Ask for Help (v2)" since this is v1 code and it is for use with a game.]
Last edited by joedf on 04 May 2024, 11:11, edited 1 time in total.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 27 guests