I was botting for zaraj coins and i noticed that the bot could not loot them since they are quest items. i made this script to loot them. It can be adjusted to work on any loot. If yoiu want to use for other loot just change the color cords to be true on the loot that u want. Set your loot in vge to sleep 2000 after looting to give time for script to loot. If anyone know how to do this in vge then let me know and ill put it in my bot and release it. Loot follow mouse must be off.
; Detect windows by class name
opt("winTitleMatchMode", 4)
If @error Then
MsgBox(4096, "Error", "detect window")
endif
; Set Coordinate mode to relative to window
AutoItSetOption ( "PixelCoordMode", 2 )
AutoItSetOption ( "MouseCoordMode", 2 )
AutoItSetOption ( "SendKeyDownDelay", 50 )
global $Window = winGetHandle("classname=vgclientUnrealWWindowsViewportWindow")
If @error Then
MsgBox(4096, "Error", "Could not find the correct window")
endif
; Main Loop
While WinExists($Window)
Sleep(1000);
$lootbox = lootbox();
$coinyes = coinyes();
if $lootbox = 1 and $coinyes = 1 Then
MouseClick("left", 37, 77, 2)
sleep (1000);
MouseClick("left", 742, 424, 2)
EndIf
if $lootbox = 1 and $coinyes = 0 Then
MouseClick("left", 89, 267, 2)
EndIf
Wend
Func lootbox()
WinActivate ($Window);
$color1="0x3E371E"
If pixelgetcolor(98, 19) = $color1 then
WinActivate($Window);
return 1;
Else
return 0;
endif
EndFunc
Func coinyes()
WinActivate ($Window);
$color2="0x096B8F"
If pixelgetcolor(66, 64) = $color2 then
WinActivate($Window);
return 1;
Else
return 0;
endif
EndFunc
|