Skip to content

Instantly share code, notes, and snippets.

@TheRemote
Created March 2, 2025 15:52
Show Gist options
  • Save TheRemote/9d24a75bd049f43b526ebc246be379cc to your computer and use it in GitHub Desktop.
Save TheRemote/9d24a75bd049f43b526ebc246be379cc to your computer and use it in GitHub Desktop.
Core Keeper Fishing Bot
# 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