I made this for both fun and learning. I was trying to find a way to select gold mine on any resolution or gfx settings and any race without using PictureSearch or coords for every map and race which would have taken forever to make.
This technique of texture replacement could lead to bigger things such as playing bots.
Download:
pinkmine.zip - FileFront.com
When you press a pre-chosen hotkey, it selects your workers and sends them to mine. It works with all races, all resolutions (hopefully), all graphic settings(tested on high).
For Night elf, it selects the 5 wisps and sends them to mine, then selects main base, sets rally point on mine and creates 2 wisps.
As for orc, human and undead, it selects workers and sends them to mine.
Pros:
- Works with all races, all resolutions, all graphic settings.
- Open source.
Cons:
- You have to press a hotkey when game begins.
This could be fixed with a script that would do this:
1. Picturesearch for initial number of gold in a picture [500]
2. If picturefound, then start goldmine script
3. Sleep(5000) to let time for gold to change to something higher than 500
- Your mine will have pink spots so that the bot can perform a pixelsearch.
- The file is huge because you have to replace War3xlocal.mpq.
- Autogoldmining ain't very useful.
Installation and use:
- Place war3xlocal.mpq in your warcraft III directory.
- Place gold.ini in the same place as your .au3 or .exe
- Start GPmineNE.exe for night elf or GPmine.exe for any race
- In-game, press your hotkey (changeable in gold.ini, default F5) You can press it multiple times when game starts.
- If you receive an error message, it means the script couldn't find the pink pixel.
I hope I compressed the right files. If it doesn't work for you you can always edit the scripts

. Can't guarantee it will work 100% of the time.
Source:
GPmine.au3 Quote:
$var = IniRead("gold.ini", "Settings", "minekey", "NotFound")
HotKeySet($var, "mine")
While 1=1
WEnd
Func mine()
MouseMove (150,150,1)
MouseDown("left")
MouseMove (1500,795,1)
sleep(10)
MouseUp("left")
$Color = 0xF405C1
$ColorCoord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight,$Color, 30)
MouseMove($ColorCoord[0], $ColorCoord[1], 0)
MouseClick("right")
MouseClick("right")
MouseClick("right")
EndFunc
|
GPmineNE.au3 Quote:
$var = IniRead("gold.ini", "Settings", "minekey", "NotFound")
$var2 = IniRead("gold.ini", "Settings", "wispkey", "NotFound")
HotKeySet($var, "mine")
While 1=1
WEnd
Func mine()
MouseMove (150,150,1)
MouseDown("left")
MouseMove (1500,795,1)
Sleep(10)
MouseUp("left")
$Color = 0xF405C1
$ColorCoord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight,$Color, 30)
MouseMove($ColorCoord[0], $ColorCoord[1], 0)
MouseClick("right")
MouseClick("right")
MouseClick("right")
Sleep(1000)
MouseMove (150,150,2)
MouseDown("left")
MouseMove (1500,795,1)
Sleep(10)
MouseUp("left")
MouseMove($ColorCoord[0], $ColorCoord[1], 0)
Sleep(50)
Send($var2)
Sleep(50)
Send($var2)
Sleep(50)
MouseClick("right")
MouseClick("right")
MouseClick("right")
EndFunc
|
gold.ini Quote:
[Settings]
minekey = "{F5}"
wispkey = "{W}"
|