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>
58 lines
1.1 KiB
TypeScript
58 lines
1.1 KiB
TypeScript
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>;
|
|
}
|