Documentation ¶
Index ¶
- Constants
- func KillAllClientHandles() error
- func StartGame(username string, password string, authmethod string, authToken string, ...) (uint32, win.HWND, error)
- type CrashDetector
- type Data
- type HID
- func (hid *HID) Click(btn MouseButton, x, y int)
- func (hid *HID) ClickWithModifier(btn MouseButton, x, y int, modifier ModifierKey)
- func (hid *HID) GetASCIICode(key string) byte
- func (hid *HID) KeyDown(kb data.KeyBinding)
- func (hid *HID) KeyUp(kb data.KeyBinding)
- func (hid *HID) MovePointer(x, y int)
- func (hid *HID) PressKey(key byte)
- func (hid *HID) PressKeyBinding(kb data.KeyBinding)
- func (hid *HID) PressKeyWithModifier(key byte, modifier ModifierKey)
- type Manager
- type MemoryInjector
- func (i *MemoryInjector) CursorPos(x, y int) error
- func (i *MemoryInjector) Load() error
- func (i *MemoryInjector) OverrideGetKeyState(key byte) error
- func (i *MemoryInjector) OverrideSetCursorPos() error
- func (i *MemoryInjector) RestoreGetCursorPosAddr() error
- func (i *MemoryInjector) RestoreGetKeyState() error
- func (i *MemoryInjector) RestoreMemory() error
- func (i *MemoryInjector) Unload() error
- type MemoryReader
- type ModifierKey
- type MouseButton
Constants ¶
View Source
const ( RightButton MouseButton = win.MK_RBUTTON LeftButton MouseButton = win.MK_LBUTTON ShiftKey ModifierKey = win.VK_SHIFT CtrlKey ModifierKey = win.VK_CONTROL )
Variables ¶
This section is empty.
Functions ¶
func KillAllClientHandles ¶
func KillAllClientHandles() error
Types ¶
type CrashDetector ¶ added in v0.5.0
type CrashDetector struct {
// contains filtered or unexported fields
}
func NewCrashDetector ¶ added in v0.5.0
func (*CrashDetector) Start ¶ added in v0.5.0
func (cd *CrashDetector) Start()
func (*CrashDetector) Stop ¶ added in v0.5.0
func (cd *CrashDetector) Stop()
type Data ¶
type Data struct { data.Data CharacterCfg config.CharacterCfg }
func (Data) CanTeleport ¶
func (Data) PlayerCastDuration ¶
type HID ¶
type HID struct {
// contains filtered or unexported fields
}
func NewHID ¶
func NewHID(gr *MemoryReader, gi *MemoryInjector) *HID
func (*HID) Click ¶
func (hid *HID) Click(btn MouseButton, x, y int)
Click just does a single mouse click at current pointer position
func (*HID) ClickWithModifier ¶
func (hid *HID) ClickWithModifier(btn MouseButton, x, y int, modifier ModifierKey)
func (*HID) GetASCIICode ¶
func (*HID) KeyDown ¶
func (hid *HID) KeyDown(kb data.KeyBinding)
KeyDown sends a key down event to the game window
func (*HID) KeyUp ¶
func (hid *HID) KeyUp(kb data.KeyBinding)
KeyUp sends a key up event to the game window
func (*HID) MovePointer ¶
MovePointer moves the mouse to the requested position, x and y should be the final position based on pixels shown in the screen. Top-left corner is 0,0
func (*HID) PressKey ¶
PressKey receives an ASCII code and sends a key press event to the game window
func (*HID) PressKeyBinding ¶
func (hid *HID) PressKeyBinding(kb data.KeyBinding)
func (*HID) PressKeyWithModifier ¶
func (hid *HID) PressKeyWithModifier(key byte, modifier ModifierKey)
PressKeyWithModifier works the same as PressKey but with a modifier key (shift, ctrl, alt)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewGameManager ¶
func NewGameManager(gr *MemoryReader, hid *HID, sueprvisorName string) *Manager
func (*Manager) CreateOnlineGame ¶
func (*Manager) JoinOnlineGame ¶
type MemoryInjector ¶
type MemoryInjector struct {
// contains filtered or unexported fields
}
func InjectorInit ¶
func InjectorInit(logger *slog.Logger, pid uint32) (*MemoryInjector, error)
func (*MemoryInjector) CursorPos ¶
func (i *MemoryInjector) CursorPos(x, y int) error
func (*MemoryInjector) Load ¶
func (i *MemoryInjector) Load() error
func (*MemoryInjector) OverrideGetKeyState ¶
func (i *MemoryInjector) OverrideGetKeyState(key byte) error
func (*MemoryInjector) OverrideSetCursorPos ¶
func (i *MemoryInjector) OverrideSetCursorPos() error
func (*MemoryInjector) RestoreGetCursorPosAddr ¶
func (i *MemoryInjector) RestoreGetCursorPosAddr() error
func (*MemoryInjector) RestoreGetKeyState ¶
func (i *MemoryInjector) RestoreGetKeyState() error
func (*MemoryInjector) RestoreMemory ¶
func (i *MemoryInjector) RestoreMemory() error
func (*MemoryInjector) Unload ¶
func (i *MemoryInjector) Unload() error
type MemoryReader ¶
type MemoryReader struct { *memory.GameReader CachedMapSeed uint HWND win.HWND WindowLeftX int WindowTopY int GameAreaSizeX int GameAreaSizeY int // contains filtered or unexported fields }
func NewGameReader ¶
func NewGameReader(cfg *config.CharacterCfg, supervisorName string, pid uint32, window win.HWND, logger *slog.Logger) (*MemoryReader, error)
func (*MemoryReader) GetCachedMapData ¶ added in v0.5.0
func (gd *MemoryReader) GetCachedMapData(isNewGame bool) map_client.MapData
func (*MemoryReader) GetData ¶
func (gd *MemoryReader) GetData(isNewGame bool) Data
func (*MemoryReader) Screenshot ¶
func (gd *MemoryReader) Screenshot() image.Image
type ModifierKey ¶
type ModifierKey byte
type MouseButton ¶
type MouseButton uint
Source Files ¶
Click to show internal directories.
Click to hide internal directories.