1 items

File information

Last updated

Original upload

Created by

DeeRopshot

Uploaded by

DeeRopshot

Virus scan

Some suspicious files

Tags for this mod

About this mod

This macro is designed to automatically play out all 18 holes of the extremely short Shuzz123 map for quick xp farming.

Share
Permissions and credits
Using this macro on the Shuzz123 map, it takes about 2 minutes to go through all 18 holes and earn around 500xp. It only works on the Shuzz123 map, and you need to be on the highest player difficulty to get that xp per run. It uses a library to mute the PGA Tour window when you activate the macro and unmute the window when it finishes so that you can listen to other things while it runs.

Controls: 
  • Numpad Multiplication key (*): Mutes only the PGA Tour window and starts the 18-hole loop. On finish, it will unmute the PGA Tour window.
  • f4: Closes the script
Notes:
  • Your controls must be set to Keyboard & Mouse (the game doesn't support dynamic input switching)
  • It only works for the Shuzz123 map
  • You should set your player difficulty to the most difficult settings for the best xp gain
  • Your antivirus may flag this macro/script as malicious because it "modifies system settings", or more specifically, it automatically changes the volume setting in the Windows Volume Mixer for the PGA Tour window. They also tend to flag compiled AutoHotkey scripts in general. If you don't trust it, you can build it yourself using AutoHotkey v1 and the source code provided below.
Source Code (AutoHotkey)
main:
Spoiler:  
Show
#include CloseScript_GUI.ahk ; add f4 to close script
#include VA.ahk ; add audio library to mute and unmute the window
; functions to mute and unmute a specified window
muteWindow(winName:="a"){
winGet,winPid,PID,% winName
if !(volume:=GetVolumeObject(winPid))
return
VA_ISimpleAudioVolume_SetMasterVolume(volume,0),objRelease(volume)
}
unmuteWindow(winName:="a"){
winGet,winPid,PID,% winName
if !(volume:=GetVolumeObject(winPid))
return
VA_ISimpleAudioVolume_SetMasterVolume(volume,1),objRelease(volume)
}
#IfWinActive, PGA TOUR 2K21
NumpadMult::
muteWindow("PGA TOUR 2K21") ; mute the window while it auto-golfs
Loop, 18
{
; Calculate the center coordinates
xMidScreen := A_ScreenWidth // 2
yMidScreen := A_ScreenHeight // 2

MouseMove, %xMidScreen%, %yMidScreen%, 10
Sleep, 100
Click, Down
Sleep, 100
Click, Up
Click, Down
MouseMove, 0, 100, 10, R
MouseMove, 0, -300, 10, R
Click, Up
Sleep, 1200
Send, {Space down}
Sleep, 25
Send, {Space up}
Sleep, 1000
Send, {Space down}
Sleep, 25
Send, {Space up}
Sleep, 1500
Send, {Space down}
Sleep, 25
Send, {Space up}
Sleep, 500
}
unmuteWindow("PGA TOUR 2K21")
return
#IfWinActive
CloseScript_GUI:
Spoiler:  
Show
f4::
    Gui, ClosingScript:New, -Caption, Closing Script
Gui, font, s15 w500 q5, Arial
Gui, Add, Text, vClosingText, Closing Script
Gui, Add, Progress, w200 h15 cBlue vMyProgress, 0
Gui, Show, AutoSize

Loop, 100
{
GuiControl,, MyProgress, +1
Sleep, 20
}
Sleep, 100
Gui, Destroy
ExitApp
return

I used the VA Library and setWindowVol Script by Masonjar13 for making the window volume interactions.