Created
March 2, 2025 15:52
-
-
Save TheRemote/9d24a75bd049f43b526ebc246be379cc to your computer and use it in GitHub Desktop.
Core Keeper Fishing Bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://jamesachambers.com/making-a-core-keeper-fishing-bot-using-ai-grok-3/ | |
# Define the MouseSimulator class to handle mouse events | |
Add-Type -TypeDefinition @" | |
using System; | |
using System.Runtime.InteropServices; | |
public class MouseSimulator { | |
[DllImport("user32.dll", SetLastError = true)] | |
public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, IntPtr dwExtraInfo); | |
public const uint MOUSEEVENTF_RIGHTDOWN = 0x0008; | |
public const uint MOUSEEVENTF_RIGHTUP = 0x0010; | |
public static void RightClick() { | |
mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, IntPtr.Zero); | |
mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, IntPtr.Zero); | |
} | |
} | |
"@ | |
# Create WScript.Shell object to interact with windows | |
$shell = New-Object -ComObject WScript.Shell | |
# Activate the game window | |
$activated = $shell.AppActivate("Core Keeper") | |
if (-not $activated) { | |
Write-Host "Failed to activate Core Keeper window. Please ensure the game is running." | |
exit | |
} | |
# Infinite loop to perform the clicks and waits | |
Write-Host "Starting click automation. Press Ctrl+C to stop." | |
while ($true) { | |
Write-Host "Performing first right click..." | |
[MouseSimulator]::RightClick() | |
Start-Sleep -Seconds 6 | |
Write-Host "Performing second right click..." | |
[MouseSimulator]::RightClick() | |
Start-Sleep -Seconds 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment