Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;======= Script Settings =======
- F11::Reload
- #SingleInstance, Force
- ; #IfWinActive, ahk_exe archeage.exe
- SendMode, Input
- ; ======= Functions =======
- WaitRandom(a, b)
- {
- Random, amount, a, b
- Sleep, amount
- return
- }
- Press(key)
- {
- Send, {Blind}{%key% down}
- WaitRandom(15,30)
- Send, {Blind}{%key% up}
- return
- }
- MoveNear(x, y)
- {
- Random, shiftX, -5, 5
- Random, shiftY, -5, 5
- MouseMove, x+shiftX, y+shiftY, 10
- return
- }
- ClickNear(x, y)
- {
- MoveNear(x, y)
- WaitRandom(100, 250)
- Press("LButton")
- return
- }
- ToggleCapsLock()
- {
- if GetKeyState("CapsLock", "T") = 1
- {
- SetCapsLockState, off
- }
- else
- {
- SetCapsLockState, on
- }
- return
- }
- ; ======= Routines =======
- OpenHiram()
- {
- ClickNear(865, 400)
- WaitRandom(300, 600)
- ClickNear(925, 805)
- WaitRandom(300, 600)
- ClickNear(920, 585)
- return
- }
- ; ======= Keybinds =======
- F1::OpenHiram()
- ; LWin::Send, {Numpad6}
- *CapsLock::
- Send, {Home}
- Send, {Blind}{Insert}
- ; ~*Home::Press("Insert")
- ; ======= Space =======
- enableS = false
- F8::
- if (enableS := !enableS)
- setTimer, routineS, -1
- return
- routineS:
- while enableS
- {
- Press("Space")
- ; Press("LButton")
- WaitRandom(420000, 840000)
- }
- return
- ; ======= Mouse =======
- enableM = false
- F9::
- if (enableM := !enableM)
- setTimer, routineM, -1
- return
- routineM:
- while enableM
- {
- MoveNear(940, 220)
- WaitRandom(50,150)
- Send, {LButton down}
- MoveNear(960, 220)
- WaitRandom(50, 150)
- Send, {LButton up}
- WaitRandom(420000, 840000)
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement