Initial commit: POE2 automated trade bot
Monitors pathofexile.com/trade2 for new listings, travels to seller hideouts, buys items from public stash tabs, and stores them. Includes persistent C# OCR daemon for fast screen capture + Windows native OCR, web dashboard for managing trade links and settings, and full game automation via Win32 SendInput. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
41d174195e
28 changed files with 6449 additions and 0 deletions
58
src/types.ts
Normal file
58
src/types.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
export interface Config {
|
||||
tradeUrls: string[];
|
||||
poe2LogPath: string;
|
||||
poe2WindowTitle: string;
|
||||
browserUserDataDir: string;
|
||||
travelTimeoutMs: number;
|
||||
stashScanTimeoutMs: number;
|
||||
waitForMoreItemsMs: number;
|
||||
betweenTradesDelayMs: number;
|
||||
}
|
||||
|
||||
export interface Region {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export interface ScreenRegions {
|
||||
stashArea: Region;
|
||||
priceWarningDialog: Region;
|
||||
priceWarningNoButton: Region;
|
||||
inventoryArea: Region;
|
||||
stashTabArea: Region;
|
||||
}
|
||||
|
||||
export interface TradeInfo {
|
||||
searchId: string;
|
||||
itemIds: string[];
|
||||
whisperText: string;
|
||||
timestamp: number;
|
||||
tradeUrl: string;
|
||||
page: unknown; // Playwright Page reference
|
||||
}
|
||||
|
||||
export interface StashItem {
|
||||
name: string;
|
||||
stats: string;
|
||||
price: string;
|
||||
position: { x: number; y: number };
|
||||
}
|
||||
|
||||
export type TradeState =
|
||||
| 'IDLE'
|
||||
| 'TRAVELING'
|
||||
| 'IN_SELLERS_HIDEOUT'
|
||||
| 'SCANNING_STASH'
|
||||
| 'BUYING'
|
||||
| 'WAITING_FOR_MORE'
|
||||
| 'GOING_HOME'
|
||||
| 'IN_HIDEOUT'
|
||||
| 'FAILED';
|
||||
|
||||
export interface LogEvent {
|
||||
timestamp: Date;
|
||||
type: 'area-entered' | 'whisper-received' | 'trade-accepted' | 'unknown';
|
||||
data: Record<string, string>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue