Need dev help/another pair of eyes/@Siion;
Instead of randomized attacks...Trying to utilize the pixelsearch concept and apply it to enemies on the minimap. Then translate minimap position (using offset) to mouse cursor center of your actual character in-game. This should move the mouse in the direction of the enemy, however, nothing's happening...sad.
In the settings file, I added:
Code:
BasicTargetAttacks := true
In the main file, I added:
Code:
UseBasicTargetAttack() {
global
if (!BasicTargetAttacks || !InBattle) {
return
}
Sleep, BasicAttackDelay
;Defining target colour variable detection
DetectedTargetColour := PixelSearch, MiniTargetX, MiniTargetY, 1724, 228, 1764, 188, 0xD01818, 8, Fast
MiniTargetXOffset := MiniTargetX - 1744
MiniTargetYOffset := MiniTargetY - 208
gameWidthOffsetTarget := MiniTargetXOffset * 2.5
gameHeightOffsetTarget := MiniTargetYOffset * 2.5
gameWidthCenter := (gameWidth / 2)
gameHeightCenter := (gameHeight / 2)
TargetX := gameWidthCenter + gameWidthOffsetTarget
TargetY := gameHeightCenter + gameHeightOffsetTarget
if (DetectedTargetColour) {
; Log(">> BasicTargetAttacks: " TargetX " / " TargetY)
RightClickPosition(TargetX, TargetY)
}
}