ELSE - multi-class ControlClick bot

12/09/2007 11:15 evanxxxm#91
btw, one question, why do u need to output current mouse cusor X,Y?
since u know my ELSE bot doesnt even move the mouse cursor a bit....
ok, i will try to put some comments on the script i edit, check this thread back few mins later

Code:
#notrayicon
sleep 500
[COLOR="Blue"];this is for the controlclick later[/COLOR]
WinGet,iddd, ID,[Conquer2.0]
[COLOR="Blue"];make sure CO window is on-top[/COLOR]
WinActivate, [Con
[COLOR="Blue"];get the PID[/COLOR]
Process, Exist,Conquer.exe
pid = %ErrorLevel%[COLOR="Blue"]
;dont have a single clue what the following does [/COLOR]
ExtInt(ByRef pSource, pOffset = 0, pIsSigned = false, pSize = 4)
{
Loop %pSize%
result += *(&pSource + pOffset + A_Index-1) << 8*(A_Index-1)
if (!pIsSigned OR pSize > 4 OR result < 0x80000000)
return result
return -(0xFFFFFFFF - result + 1)
}[COLOR="Blue"]
;Create 4 Byte (Int) Structure for Char Xcoordo Base Address[/COLOR]
VarSetCapacity(Xcoordo,4,0)[COLOR="Blue"]
;Create 4 Byte (Int) Structure for Char Ycoordo Base Address[/COLOR]
VarSetCapacity(Ycoordo,4,0)[COLOR="Blue"]
;Open the Process for Handling[/COLOR]
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
[COLOR="Blue"];Get the raw 4 Bytes for Xcoordo in Variable[/COLOR]
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",0x4E1028,"Str",Xcoordo,"UInt",4,"UInt *",0)
[COLOR="Blue"];Get the raw 4 Bytes for Ycoordo in Variable[/COLOR]
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",0x4E102C,"Str",Ycoordo,"UInt",4,"UInt *",0)
[COLOR="Blue"];output those values into OrgX[/COLOR]
OrgX:=( "" . ExtInt(Xcoordo))
[COLOR="Blue"];output those values into OrgY[/COLOR]
OrgY:=( "" . ExtInt(Ycoordo))
[COLOR="Blue"];that is to make sure StartingXY is not error[/COLOR]
if OrgX = 0
{
reload
return
}
[COLOR="Blue"];set the boundaries according to the startingXY[/COLOR]
lowerboundX := orgX - 20
lowerboundY := orgY - 20
UpperboundX := orgX + 20
UpperboundY := orgY + 20

[COLOR="Blue"];Start the real looping to output currentXY [/COLOR]
Loop
{[COLOR="Blue"]
;exactly like the above, just that it is saving to CurrentX and CurrentY[/COLOR]
VarSetCapacity(Xcoord,4,0)
VarSetCapacity(Ycoord,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",0x4E1028,"Str",Xcoord,"UInt",4,"UInt *",0)
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",0x4E102C,"Str",Ycoord,"UInt",4,"UInt *",0)
currentX:=( "" . ExtInt(Xcoord))
currentY:=( "" . ExtInt(Ycoord))

[COLOR="Blue"];display StartingXY and CurrentXY[/COLOR]
ToolTip, Starting: x%OrgX% y%OrgY%`nCurrent: x%currentX% y%currentY%,1,-30

[COLOR="Blue"];thats the compare function which i think its quite easy to understand
;so lets skip[/COLOR]
if currentX >= %UpperboundX%
{
ControlClick, x250 y230,ahk_id %iddd%,,Left
sleep 500
ControlClick, x130 y100,ahk_id %iddd%,,Left
sleep 500
ControlClick, x250 y230,ahk_id %iddd%,,Left
sleep 500
ControlClick, x130 y100,ahk_id %iddd%,,Left
sleep 500
}
else if currentX <= %lowerboundX%
{
ControlClick, x700 y521,ahk_id %iddd%,,Left
sleep 500
ControlClick, x900 y591,ahk_id %iddd%,,Left
sleep 500
ControlClick, x700 y521,ahk_id %iddd%,,Left
sleep 500
ControlClick, x900 y591,ahk_id %iddd%,,Left
sleep 500
}
else if currentY >= %UpperboundY%
{
ControlClick, x895 y100,ahk_id %iddd%,,Left
sleep 500
ControlClick, x774 y230,ahk_id %iddd%,,Left
sleep 500
ControlClick, x895 y100,ahk_id %iddd%,,Left
sleep 500
ControlClick, x774 y230,ahk_id %iddd%,,Left
sleep 500
}
else if currentY <= %lowerboundY%
{
ControlClick, x324 y521,ahk_id %iddd%,,Left
sleep 500
ControlClick, x124   y591,ahk_id %iddd%,,Left
sleep 500
ControlClick, x324 y521,ahk_id %iddd%,,Left
sleep 500
ControlClick, x124   y591,ahk_id %iddd%,,Left
sleep 500
}
sleep 1000 
[COLOR="Blue"][COLOR="Blue"]
;this is to check if my ELSE get reloaded, this script will exit[/COLOR][/COLOR]
IfWinActive, ELSE
{
exitapp
}


}
12/09/2007 11:54 Pastetas#92
Nice bot.But this bot worx for archers?Cus my arch is just using arrows and walks 5metters xD
12/09/2007 12:19 evanxxxm#93
Pastetas@
not sure what u meant.
if trying to use scatter, u should choose "skill function"
it walks, that means either there are no monster in screen or forgot to turn on "show name"
12/09/2007 14:15 lanoblesse#94
The futur else could have a monster list for no attack the guard?
12/09/2007 15:57 guilixz#95
:confused: I'm warrior.. when i click Start, it runs, no attack, and less of 5 sec, it desconnect ._.

why?
12/09/2007 16:03 frostbitten#96
does my Conquer need to be installed in Program Files folder to get your program working? Since i don't have it in that folder and after downloading that beta2 version it just says that Windows can't use the file and I don't have authorities to use it etc.
12/09/2007 16:12 lanoblesse#97
you have put sit or xxxx on f1 for heal pot
12/09/2007 20:31 evanxxxm#98
lanoblesse@
yes, it might happen, as long as someone can provide me with the location of monster
(requested in 1st thread)
right now, No, because its searching for red health bar

guilixz@
HP lower than half and without pots to heal back
or
DC timer = 0
or
clearly, ur CO is edited (health bar looking change)
or
the CO screen is not on focus, which means u click somewhere else and CO is not on-top
thats the only way the program will execute "winkill,[conquer2.0]" command

frostbitten@
No, ELSE does not check co directory, it checks win exist
all u need is [Conquer 2.0] program is on
12/09/2007 20:42 TT_TT#99
I tried it, looks good, but when I change screen for like firefox, CO closes... Tried to change the command but no success.


:/
12/09/2007 20:57 evanxxxm#100
TT_TT@
thats the Pause hotkey for (Ctrl+Q)
and in the video (if u have watched it, thats why i keep telling people must watch the video, it basically a demo teaching video that goes through the uniqueness of the programs)
it clearly stated that "u can do whatever u want in CO screen"
thats the function of it...u can pick things up, throw things, check stats, whatever
12/09/2007 21:26 herehere#101
is possible to minimize the co when you are running the bot and the co?
Thanks
PD: Sorry for my bad english ( i'm spanish ^^)
12/09/2007 22:17 evanxxxm#102
herehere@
possible = only if someone can generate a XY coordinate for monsters location (requested help in 1st thread)
so not possible right now
12/09/2007 22:18 Kyleisahomo#103
ahh u have some many things here to download... wat ones are neccessary to run the bot?? and where do i put those dds edits or w/e?? soo confused :S lol
12/09/2007 22:24 evanxxxm#104
Kyleisahomo@
Read 1st thread again, it has instruction where the dds files go
(right above the download link u click or under the super big purple paw image)
and of course, download beta2, its the newest
dds files are not necessary
12/10/2007 04:18 evanxxxm#105
ELSE will have a function to disable GoldGuard health bar
similar to this image:
so that u can bot safely without the risk of keep clicking guard =)
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
still developing how to do this without CheatEngine to change variables.
News will be out soon =)