If I start on memory value 1 it goes for reds and if I start on memory value 2 it goes for blues...If I change during the game it doesnt recognize the memory change and still goes for the initial starting color...
So Im presuming that it needs to be looping the memory scan for changes or something along them lines ....
Any ideas guys??
This is probably a bit scrapping but I am new to this...but enjoying a challenge!
#include <GUIConstants.au3> #include <GUIListBox.au3> #include <Misc.au3> #include <Array.au3> #include <NomadMemory.au3> Global $on = 0;On/Off Variable Global $coords;Coords needed to click Hotkeyset("{F1}", "_power");On/Off Key Global $colorswitch = 0 $ID=_MemoryOpen(ProcessExists("game.exe")) $Address=0x01000146 $team=_MemoryRead($Address,$ID) Func _power();On/Off Function If $on = 1 Then $on = 0 Else $on = 1 EndIf EndFunc While 1;Start Loop Sleep(50);Pause If $team = 01 then $BrightMDLS = "0xBB0000"; T $shadowMDLS = "0xFE0000" Elseif $team = 02 then $shadowMDLS = "0x080A32"; CTS $BrightMDLS = "0x0000FE" EndIf If $on = 1 Then If $colorswitch = 0 Then $colorswitch = 1 $coords = PixelSearch(60, 40, 800, 600, $shadowMDLS, 5, 3);Search for cts in shadows If IsArray($coords) Then;Check if we found any MouseClick("Left", $coords[0], $coords[1] + 2, 2, 1);SHOOT! $colorswitch = 0 EndIf EndIf EndIf Sleep(100);Pause If $team = 01 then $BrightMDLS = "0xBB0000"; T $shadowMDLS = "0xFE0000" Elseif $team = 02 then $shadowMDLS = "0x080A32"; CTS $BrightMDLS = "0x0000FE" EndIf If $colorswitch = 1 Then If $on = 1 Then;Only search if its on. $colorswitch = 0 $coords = PixelSearch(60, 40, 800, 600, $BrightMDLS, 70, 3);Search for cts If IsArray($coords) Then;Check if we found any MouseClick("Left", $coords[0], $coords[1] + 2, 2, 1);SHOOT! $colorswitch = 1 EndIf EndIf EndIf Wend
regards bluerein
Edited by bluerein, 18 September 2008 - 02:36 PM.






