Im working on a BIG bot which locates goldmines in a game called Warcraft 3, well, these goldmines is on diffrent places in each map, i have coded most of them, what i want to do with this script, is to get the Workers going to the goldmine when the game begins
Okay, so i will give u some of my code so you can see my problem
I have coded around 30 goldmines, and the last ones in the script takes so much time before they react because the bot is looking trough all these pixels... here is my code:
The red indicates the number of the goldmine... So this was 16 og them, i have around 30, i need all of them to react in no time, So, how do i get the last onces reacting faster? I thought about splitting them up in 2 files, or maybe 3, but if i can make it work without doing this i would prefer it...Waitkeydown>m
Getpixelcolor>303,376,Gold
IF>%Gold%=987931
Mousemove>303,376
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>676,352,Gold2
IF>%Gold2%=856605
Mousemove>676,352
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>346,475,Gold3
IF>%Gold3%=988191
Mousemove>346,475
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>633,469,Gold4
IF>%Gold4%=1185827
Mousemove>633,469
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>401,217,Gold5
IF>%Gold5%=725789
Mousemove>401,217
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>588,233,Gold6
IF>%Gold6%=1120291
Mousemove>588,233
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>370,238,Gold7
IF>%Gold7%=856350
Mousemove>370,238
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>605,484,Gold8
IF>%Gold8%=1383720
Mousemove>605,484
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>390,224,Gold9
IF>%Gold9%=724759
Mousemove>390,224
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>622,470,Gold10
IF>%Gold10%=1515050
Mousemove>622,470
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>360,242,Gold11
IF>%Gold11%=2308445
Mousemove>360,242
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>590,224,Gold12
IF>%Gold12%=1383465
Mousemove>590,224
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>586,490,Gold13
IF>%Gold13%=659225
Mousemove>586,490
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>516,215,Gold14
IF>%Gold14%=1317670
Mousemove>516,215
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>322,210,Gold15
IF>%Gold15%=2836588
Mousemove>322,210
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
Getpixelcolor>458,530,Gold16
IF>%Gold16%=922913
Mousemove>458,530
Getcursorpos>X,Y
Mousemove>12,44
ldown
mousemove>980,550
lup
Mousemove>%X%,%Y%
wait>0.1
Rclick
endif
So, if i need to split this macro, how do i do? I mean, so i click ONE file, the first one, then it goes trough the code, and then it starts the next macro (another file) And then in the last macro, it needs to jump back to macro number 1
Hope anyone can help me, and understand what i wanna do with this
Thx