[Tut-CodeSnippet] AutoPot

02/15/2010 08:51 rhotar#1
Well since everyone around here seems reluctant to release or even explain (due to ignorance or plain greediness) the autopot part of any bot i decided to share the functions i use in my personal bot.

Code:
  
 Func IsAutoPillOn()
		
	$Mem_Open = _MemoryOpen($ProcessID)
	$check = _MemoryRead($APActivate, $Mem_Open) 
		
	_MemoryClose($Mem_Open) 
	 if $check > 0 Then
		 
		return True
	Else
		
		return False
		EndIf	
	EndFunc

Func ActivateAutoPill($HPPercent,$MPPercent)
	$Mem_Open = _MemoryOpen($ProcessID)
	if not @error then
	_MemoryWrite($APActivate,$Mem_Open,1) ;activamos el autopill en el cliente
	_MemoryWrite($APhp,$Mem_Open,$HPPercent) ;configuramos el hp
	_MemoryWrite($APmp,$Mem_Open,$MPPercent) ;configuramos el mp
	_MemoryClose($Mem_Open)
Else
	
	EndIf
	;falta validaciones
	
	EndFunc

Thank me if you find this post useful or not (i really dont see the point tho) i might expand this post adding some of my findings or features on my bot as i see necessary.

Note: use the Nomad memory management unit in your autoit project in order to compile or use my functions.
02/25/2010 01:44 corner007#2
Were is eplain i mean how use put maby some no mean xd!
C++ is my pest friend u use onely and realase here autopill xd use just puffs and auto attack to xd!!
Maby i realase here c++ full bot in dll (autopill,buffs,autoattack)
Man autopill can make ewrione here!
03/01/2010 07:45 rhotar#3
Quote:
Originally Posted by corner007 View Post
Were is eplain i mean how use put maby some no mean xd!
C++ is my pest friend u use onely and realase here autopill xd use just puffs and auto attack to xd!!
Maby i realase here c++ full bot in dll (autopill,buffs,autoattack)
Man autopill can make ewrione here!


semantics? really..
03/02/2010 00:22 corner007#4
i mean were is explain to pees how use how complite it.wen its dll then hotkeys and how lanch it xd simple !
03/02/2010 02:00 Iktov#5
Quote:
Originally Posted by corner007 View Post
i mean were is explain to pees how use how complite it.wen its dll then hotkeys and how lanch it xd simple !
Its for you AutoIt, google for it.
03/02/2010 23:42 timeformiles#6
ohhhh SHIT~ Yayness~ alright now, when i did this, i was stuck at
Func IsAutoPillOn()

$Mem_Open = _MemoryOpen($ProcessID)
$check = _MemoryRead($APActivate, $Mem_Open)

_MemoryClose($Mem_Open)
if $check > 0 Then

return True
Else

return False
EndIf
EndFunc
_________________________________
After that, i didnt know what to do, but now since you have shared this Info i can move on XD. Well lets see now, where it shows - HPPercent,$MPPercent

Func ActivateAutoPill($HPPercent,$MPPercent)
$Mem_Open = _MemoryOpen($ProcessID)
if not @error then
_MemoryWrite($APActivate,$Mem_Open,1) ;activamos el autopill en el cliente
_MemoryWrite($APhp,$Mem_Open,$HPPercent) ;configuramos el hp
_MemoryWrite($APmp,$Mem_Open,$MPPercent) ;configuramos el mp
_MemoryClose($Mem_Open)
Else

EndIf
;falta validaciones

EndFunc

i put the HP and MP PErcent i want at that part? like 40% 40%.
03/03/2010 09:18 rhotar#7
Quote:
Originally Posted by timeformiles View Post
ohhhh SHIT~ Yayness~ alright now, when i did this, i was stuck at
Func IsAutoPillOn()

$Mem_Open = _MemoryOpen($ProcessID)
$check = _MemoryRead($APActivate, $Mem_Open)

_MemoryClose($Mem_Open)
if $check > 0 Then

return True
Else

return False
EndIf
EndFunc
_________________________________
After that, i didnt know what to do, but now since you have shared this Info i can move on XD. Well lets see now, where it shows - HPPercent,$MPPercent

Func ActivateAutoPill($HPPercent,$MPPercent)
$Mem_Open = _MemoryOpen($ProcessID)
if not @error then
_MemoryWrite($APActivate,$Mem_Open,1) ;activamos el autopill en el cliente
_MemoryWrite($APhp,$Mem_Open,$HPPercent) ;configuramos el hp
_MemoryWrite($APmp,$Mem_Open,$MPPercent) ;configuramos el mp
_MemoryClose($Mem_Open)
Else

EndIf
;falta validaciones

EndFunc

i put the HP and MP PErcent i want at that part? like 40% 40%.

yup but 40% = 4 100%=10

$ProcessID // is a global variable that holds the handle of the game client
$ProcessID=WinGetProcess("TwelveSky2")
$APActivate is the variable that holds the address to activate the autopill in game

$HPPercent and $MPPercent containt the address of the hp and chi value used by the built in autopill function.
03/04/2010 02:22 strikeraid#8
[Only registered and activated users can see links. Click Here To Register...]

I think my source should still be in that thread. If you look at the autopot on, there should be something similar.
03/26/2010 03:05 Hafus#9
How do i make it able to be above 50% Though?
03/26/2010 13:13 rhotar#10
Quote:
Originally Posted by Hafus View Post
How do i make it able to be above 50% Though?
check megabytes thread about 100% autopill method, he explains what needs to be done.
03/26/2010 17:11 Mega Byte#11
lol bet me to posting :P

Yeah i explain what needs to be done so people can follow it after patch I also update it after patch's to help in map fun.

The code is very simple just gota write those bytes to memory and set the Autopill on and the hp and chi amounts to 0-10 for the corosponding % out of 100. Eg 1=10 2=20 3=30 4=40 5=50 6=60 7=70 8=80 9=90 1=100 :P

You guys should be able to understand my 100% autopill method and do it just using cheat engine... :D
03/27/2010 23:36 Hafus#12
Yes i followed your tutorial but on 3 different computers i get the same error. these are my steps

Open cheat engine
Open 12sky2
Attach process
add autopill addy
add autopillhp addy
turn autopill to 1
turn autopillhp to 5
go in game
right click autopillhp, click find what accesses this address
get prompt to add debugger, click yes
12sky2 closes...

If you know what is wrong could you please help me? ive been trying to get this to work for days
03/28/2010 04:10 Iktov#13
Quote:
Originally Posted by Hafus View Post
Yes i followed your tutorial but on 3 different computers i get the same error. these are my steps

Open cheat engine
Open 12sky2
Attach process
add autopill addy
add autopillhp addy
turn autopill to 1
turn autopillhp to 5
go in game
right click autopillhp, click find what accesses this address
get prompt to add debugger, click yes
12sky2 closes...

If you know what is wrong could you please help me? ive been trying to get this to work for days
Themida is the problem. You need to enable the options in CheatEngine settings to prevent the debugger from being detected.

Click the "Settings" button highlighted in yellow in the screenshot below(screenshot is small wtf!).

Under "CodeFinder" tick "Try to prevent detection of debugger"
Under "Extra" tick "Use KernelModeDebugger Options when possible". I can't remember but you may need to enable "Enable use of process watcher" first. Now you should be able to use the debugging options in CE without it crashing the game.

You cannot use these options under 64bit AMD systems. Supposedly you can now use them under 64bit Intel systems but I don't know that for sure myself since I only have an AMD machine. Everything always wants to work against me(56).
03/28/2010 05:44 afkguy#14
Quote:
Originally Posted by strikeraid View Post
[Only registered and activated users can see links. Click Here To Register...]

I think my source should still be in that thread. If you look at the autopot on, there should be something similar.
Just look at his source for all the dll injection stuff you want to learn. Just don't straight up rip out his code. Use it to learn how it works or else you wont get far anyway.
03/28/2010 09:33 rhotar#15
Quote:
Originally Posted by afkguy View Post
Just look at his source for all the dll injection stuff you want to learn. Just don't straight up rip out his code. Use it to learn how it works or else you wont get far anyway.

i also released a code in autoit to use the nomad functions to acomplish the same task, is lost somewhere in the forum D: