|
You last visited: Today at 09:32
Advertisement
AutoHotKey tutorial
Discussion on AutoHotKey tutorial within the CO2 Guides & Templates forum part of the Conquer Online 2 category.
11/04/2010, 23:52
|
#106
|
elite*gold: 0
Join Date: Apr 2009
Posts: 51
Received Thanks: 12
|
nice +K
|
|
|
11/26/2010, 13:41
|
#107
|
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
|
So I have been looking at this code for mining that was posted and have changed some of the things that were highlighted and wondering if this is about correct now?
It seems that it just left clicks the floor without dropping ores? How to set it up?
Code:
;creación del GUI---Creates Gui
Gui, Show , w220 h160, Aurum
Gui, Add, Text, x10 y10 w150 Left,Welcome to AURUM
Gui, Add, Button, x80 y40 w60 h20 vSTARTBUTTON gMINE ,start
Gui, Add, Checkbox, x10 y80 vDROPGOLDORE,drop gold ores
Gui, Add, Checkbox, x10 y100 vDROPSILVERORE,drop silver ores
Gui, Add, Checkbox, x100 y80 vDROPCOPPERORE,drop copper ores
Gui, Add, Checkbox, x100 y100 vDROPIRONORE,drop iron ores
Gui, Add, Text, x10 y120 w200 Left,press ctrl+alt+c to set initial coords
Gui, Add, Text, x10 y140 w200 Left,press ctrl+alt+s to exit the program
return
;-----------------------------------------------------------------------
^!S::
{
MsgBox,Thanks for using aurum c u next time
sleep, 100
ExitApp
}
;-----------------------------------------------------------------------
;Código para buscar ores---Ore searcher code
^!C::
{
;Posicion inicial de la ventana---Initial Window position
MouseGetPos,IPosX, IPosY
MsgBox,Initial coords: %IPosY% %IPosX%
return
}
MINE:
{
MsgBox,The bot will begin in 3 seconds
Sleep,3000
InitialcoordX:=IposX
Initialcoordy:=IposY
;Copper Ore
MINING:
FposX:=IPosX+43
FPosY:=IPosY+43
{
loop,40
{
Pixelsearch, CopperX, CopperY, %IPosX%,%IPosY%,%FPosX%,%FPosY%,0xDEEFF,10
if ErrorLevel
{
;Iron Ore
Pixelsearch, IronX, IronY, %IPosX%,%IPosY%,%FPosX%,%FPosY%,0x525152,10
If ErrorLevel
{
;Silver Ore
Pixelsearch, SilverX, SilverY, %IPosX%,%IPosY%,%FPosX%,%FPosY%,0x5C5B5D,10
If ErrorLevel
{
;gold Ore
Pixelsearch, GoldX, GoldY, %IPosX%,%IPosY%,%FPosX%,%FPosY%,0x07365C,10
If ErrorLevel
{
;scroll
Pixelsearch, ScrollX, ScrollY, %IPosX%,%IPosY%,%FPosX%,%FPosY%,0x31458C,10
If ErrorLevel<>1
{
;Move to next box in item box
Gosub, Next
}
else
{
Click left, %scrollX% %scrollY%
Sleep, 1000
Click left, 515,482
Gosub, Next
}
}
else
{
Gosub, Dropgoldore
Gosub, Next
}
}
else
{
Gosub, Dropsilverore
Gosub, Next
}
}
else
{
Gosub, Dropironore
Gosub, Next
}
}
else
{
Gosub, Dropcopperore
Gosub, Next
}
}
return
}
;Sleep,10000
Gosub, MINING
}
;-----------------------------------------------------------------------
;FUNCTIONS
OresTirados:=1
Next:
{
IPosX:=IposX+43
If IposX>=(172+InitialcoordX)
{
IPosX:=InitialcoordX
IPosY:=IPosY+43
}
If IposY>=(1849+InitialcoordY)
{
IPosX:=InitialcoordX
IPosY:=InitialcoordY
}
FPosX:=FposX+43
If FposX>=(172+43+InitialcoordX)
{
FPosX:=InitialcoordX+43
FPosY:=FPosY+43
}
If FposY>=(1849+43+InitialcoordY)
{
FPosX:=InitialcoordX+43
FPosY:=InitialcoordY+43
}
return
}
Drop:
{
mouseclickx:=(IPosX+21)
mouseclicky:=(IPosY+21)
click left,%mouseclickx%,%mouseclicky%
Sleep,1000
Click left, 515,482
OresTirados:=OresTirados+1
If OresTirados>=9
{
click left, 515,482
Sleep,1000
Click right, 515,482
OresTirados:=0
}
return
}
Dropgoldore:
{
If DROPGOLDORE Checked
{
Gosub, Drop
}
else
{
Gosub, Next
}
return
}
Dropsilverore:
{
If DROPSILVERORE Checked
{
Gosub, Drop
}
else
{
Gosub, Next
}
return
}
Dropironore:
{
If DROPIRONORE Checked
{
Gosub, Drop
}
else
{
Gosub, Next
}
return
}
Dropcopperore:
{
If DROPCOPPERORE Checked
{
Gosub, Drop
}
else
{
Gosub, Next
}
return
}
return
GuiClose:
ExitApp
|
|
|
01/07/2011, 18:03
|
#108
|
elite*gold: 0
Join Date: Jan 2011
Posts: 1
Received Thanks: 0
|
I need a bind that holds down CTRL and presses X. Thanks in advance.
|
|
|
09/05/2011, 14:43
|
#109
|
elite*gold: 0
Join Date: Apr 2008
Posts: 6
Received Thanks: 0
|
send, {CTRLDOWN}{x}{CTRLUP}
|
|
|
11/20/2011, 15:53
|
#110
|
elite*gold: 0
Join Date: Aug 2010
Posts: 14
Received Thanks: 8
|
@Coolcountry
well you made a little bit mistakes, i'll put them in red colour
Quote:
Gui,Show,h150 w250, Learning
Gui, Add, Button, x20 y110 w50 h20 gDOUBLE,Answer
Gui, Add, Text, x10 y50 w90 Center,Random + 2 x
Gui, Add, Edit, w60 h20 x130 y50 vNUMBER Center,
return
DOUBLE:
{
Random,A_number,10,2000
Gui,Submit,NoHide
; if you noticed i removed the (2*number) thingy in here so it works
DOUBLE = %A_number%
Msgbox,,Result, The Result is %DOUBLE%
return
}
GuiClose:
ExitApp
|
|
|
|
09/21/2012, 16:01
|
#111
|
elite*gold: 0
Join Date: Sep 2012
Posts: 2
Received Thanks: 0
|
Where can i download AHK now since its main site is down? Can someone share theirs? i wanna learn how to use this program thanks.
|
|
|
 |
|
Similar Threads
|
[HELP]Autohotkey
06/11/2011 - AutoIt - 8 Replies
Hallu, elitepvpers! ichh habe gaanz kur ne frage, wo ich es echt nich raffe, habe schon sufu benutzt und gegoogelt, aber nix gefunden, außer die normale anleitung auf english, die ich iwie nich raffe; kann mir wer bei autoit in diesen"noob" script autohotkey einbauen, damit der bot wenn ich auf F7 klicke automatisch beenden!
hier der "noob" script!
while 1
sleep(500)
mousemove(1191,109,0)
sleep(200)
mouseclick("right")
sleep(200)
mousemove(1235,186,0)
|
AutoHotKey Help
01/17/2009 - General Coding - 1 Replies
Hi, Im having trouble with making a background macro for a game called ConquerOnline, refer to this thread . If anyone can help, I would really appreciate it.
|
AutoHotKey Help?
12/06/2007 - Conquer Online 2 - 11 Replies
I have Read the "Help" File but still cant figure out how to make a macro that works on client 1 while playing on client 2. Any ideas or codes for this :confused:
I'm working on a macro that heals/pots/sits/med/stig/dc/area to macro etc.
Pretty much it will play the game for u :D
|
Help with AutoHotKey
03/24/2006 - Conquer Online 2 - 3 Replies
Hey everyone i need some help. does anyone know how to write a command where you hold down ctrl while mouse clicking? all i've managed to do so far is make it click ctrl, let go, then mouse click. anyone know the codes to how i can do them both together? thanks.
shadowHacker
|
All times are GMT +1. The time now is 09:32.
|
|