[RELEASE] AutoPot without memory addresses

06/26/2009 20:10 tri407tiny#31
Agreed
06/26/2009 20:54 kesawea#32
Quote:
Originally Posted by tri407tiny View Post
to disable the bot you should add a check box, or radio

i assumed you know what your doing so i just thru some of my old code from an old bot in their, assuming you know what includes are needed*nomad** and such ty, +rep if helped
COOL!!
that helped alot!
lol, you are right, i forgot the privilege stuff xDDD
well now it will be easy to pickup an item you desire :P

GL, and Thanks ^_^

PS: I'll edit the code post on Tuesday maybe, long weekend here :P
06/26/2009 21:06 tri407tiny#33
Quote:
Originally Posted by kesawea View Post
I use both, SCAR+AutoIt.
Thanks to Jinong81 for the autopot.

Bot -> skill (buton), loot (buton), revive (hack), autotarget (pixelsearch)
ah! leave the char on the mob spot first :P
this bot doesn't wait for any thing, so try to don't teleport with it activated :P
EDIT: Translated and better commented.
EDIT2: Added atck speed hack and run speed hack buttons :P ->atck speed doesn't get freezed on 100, and the buttons only works before the BOT button.
EDIT3: Added more hotkeys :) -> works before BOT button.
EDIT4: Scan from bottom to top to get the near mob first :P , autoOpen the autopot script made by Jinong81 :3 (read the bottom of this post).
EDIT5: Scan from bottom tested.

ToDo:
- Freeze atck spd
- Fix Hotkeys
- Add a button to stop the bot without closing it :P
- Add more stuff, like multiple mob attacking, NPC selling (gate master), etc.


Code:
;Ok, here is the code...
;This bot was build to bot with the following conditions:
; i.- Jinong-Female char ; ii.- Aeria games ; iii.- F1-Loot, F4 skill, F9 to exit.
; iv.- Red mob ; v.- R55 mob
;This bot uses action hack to revive.
; Special thanks to UPSman2, I used some of his code :P  : http://www.elitepvpers.com/forum/co2-guides-templates/118159-autoit-memory-address.html
; Made by me, Kesawea. (don't PM me questions about the code, unless u have made a contribution on this thread)
; Translated to english (and add some comments) because XiaoBao requested.

#include <GUIConstants.au3>
#include <NomadMemory.au3> ;because you need this for _memread functions
#include <Process.au3> ; to write on a DOS console.

HotKeySet("{F9}", "MyExit") ;Hit F9 to exit the script.
HotKeySet("{F10}", "FAtckspeed") ;Hit F10 to apply atck hack.
HotKeySet("{F11}", "FRunspeed") ;Hit F11 to apply run hack.

GUICreate("12Sky2",-1,150)

$Button_1 = GUICtrlCreateButton ("BOT", 10, 20, 150)
$Button_2 = GUICtrlCreateButton ("Revive!", 160, 20, 80)
$Button_3 = GUICtrlCreateButton ("Hack Attack spd on 100% (F10)", 160, 70, 160)
$Button_4 = GUICtrlCreateButton ("Hack Run spd on 50% (F11)", 160, 120, 160)
$Label_1 = GUICtrlCreateLabel("(Nš of times ressurected)",160, 0) ; Just to show how many times u died.

GUISetState ()
;the window to get PID
$Process1 = WinGetProcess("TwelveSky2")
Const $accion = 0x00C85D17, $revive = 1, $muerte1 = 6556776, $muerte2 = 3072, $muerte3 = 6556712, $muerte4 = 6556904, $muerte5 = 6556840 ; Death = muerte xD (those are the values of the animation addss. when this char dies, there might be more)
Const $nada[3] = [0,0,1], $sCommand = "start C:\autopot"
Global $contador = 1, $xTop = 5, $yTop = 82, $xBot = 1023, $yBot = 736, $mobGreen = "0x5C5672", $contador2 = 0, $x, $y  ; contador = counter, mobgreen = mob color
Global $atkspdA = 0x00C85D73, $runspdA = 0x00C60770, $atkspd = 100, $runspd = 50, $comodin[3] = [0,0,1], $coord[2] = [0,0], $coordm[3] = [0,0,0]

; _RunDOS ( $sCommand ) ; runs the autopot script :P
While 1   ;main loop
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE ; this doesn't work when you activate the bot.
            ExitLoop
		
		Case $msg = $Button_1 ; on click button "BOT", do:
			while 1
			buscamob()
			loot()
			revive()
			Wend
		Case $msg = $Button_2 ;Force ressurection, but doesn't work when the char dies in the loop execut. (for that it's the "revive()" funct)
			$Mem_Open = _MemoryOpen($Process1)
			_MemoryWrite($accion, $Mem_Open, $revive)
			_MemoryClose($Mem_Open) ;close it afterwards
			GUICtrlSetData($Label_1,$contador) ; sets label to value of read memory
			$contador = $contador + 1
		Case $msg = $Button_3  ;Atck Speed hack
			$Mem_Open = _MemoryOpen($Process1)
			_MemoryWrite($atkspdA, $Mem_Open, $atkspd)
			_MemoryClose($Mem_Open) ;close it afterwards
		Case $msg = $Button_4 ; Moving speed hack
			$Mem_Open = _MemoryOpen($Process1)
			_MemoryWrite($runspdA, $Mem_Open, $runspd)
			_MemoryClose($Mem_Open) ;close it afterwards
			
	EndSelect
Wend

Func ataca() ; Attack Function
	$vivo2 = estavivo()
	While $vivo2 = "1"
		Send("{F4 down}")
		Sleep(100)
		Send("{F4 up}")
		$vivo2 = estavivo()
	WEnd
EndFunc
	
Func loot() ; Loot Function
	Send("{F1 down}")
	Sleep(100)
	Send("{F1 up}")
	Send("{F1 down}")
	Sleep(100)
	Send("{F1 up}")
	Send("{F1 down}")
	Sleep(100)
	Send("{F1 up}")
	Send("{F1 down}")
	Sleep(100)
	Send("{F1 up}")
	Send("{F1 down}")
	Sleep(100)
	Send("{F1 up}")
	Send("{F1 down}")
	Sleep(100)
	Send("{F1 up}")
EndFunc
Func estavivo() ; checks if the mob is alive/sellected , esta vivo = it's ALIVE! xDDD
	PixelSearch(456, 36, 531, 49,"0xFF0000",2)
	$r=@error
	if Not @error Then
		Return ("1")
	Else
		Return ("2")
	EndIf
EndFunc

Func revive() ; revive = resurrects
	$Mem_Open = _MemoryOpen($Process1)
	$check = _MemoryRead($accion, $Mem_Open) ;reads value at memory address
	_MemoryClose($Mem_Open) ;close it afterwards
	If $check = $muerte1 Or $check = $muerte2 Or $check = $muerte3 Or $check = $muerte4 Or $check = $muerte5 Then ;if it dies with any of this animations.
		$Mem_Open = _MemoryOpen($Process1)
		_MemoryWrite($accion, $Mem_Open, $revive)
		_MemoryClose($Mem_Open) ;close it afterwards
		GUICtrlSetData($Label_1,$contador) ; sets label to value of read memory
		$contador = $contador + 1
	EndIf
EndFunc


Func buscamob() ;Auto clicking function.
	$coordm = bottomtotop()
	If $coordm[2] = 0 Then; If the pixel color was found, then:
		while $coordm[2] = 0  ;Mientras el pixel exista, hace:
			$x = Random($coordm[0], $coordm[0]+10, 1) ; random for randomness xDD (make click around the original coord).
			$y = Random($coordm[1], $coordm[1]+10, 1)
			MouseClick("left", $x, $y, 1, 0);  Click on the coords obtained on the previous lines.
			$vivo = estavivo()
			Sleep(500)
			If $vivo = "1" Then  ; CHecks if the mob is selected.
					ExitLoop   ; If it's true then exit the loop
			EndIf
			$coordm = bottomtotop()
			revive()
		wend
		If $vivo = "1" Then  ; checks again if the mob is selected.
			while $vivo = "1" ; while the mob it's selected, do:
				ataca()
				$vivo = estavivo()
			wend
			$contador2 = 0
		Else
			$contador2 = $contador2 + 1
			If $contador2 = 8 Then ; if i fool around with a pixel in the ground that looks like the mob color, do...
				MouseClickDrag("left", 515, 388, 352, 388, 6) ; turns the camera to the right.
				MouseClick("left", $x, $y, 1, 0) ; move to the last position of the mouse, I whould disable this if the char gets too far.
			EndIf
			revive()
		EndIf
	Else  ; if there is no mob then...
		MouseClickDrag("right", 515, 388, 352, 388, 6) ; turns the camera to the left.
	Endif
EndFunc

Func MyExit() ; What does the F9? -> exit
    Exit 
EndFunc 	

Func FAtckspeed() ; What does the F10? -> atck speed
	$Mem_Open = _MemoryOpen($Process1)
	_MemoryWrite($atkspdA, $Mem_Open, $atkspd)
	_MemoryClose($Mem_Open) ;close it afterwards
EndFunc

Func FRunspeed() ; What does the F11? ->  Run speed
	$Mem_Open = _MemoryOpen($Process1)
	_MemoryWrite($runspdA, $Mem_Open, $runspd)
	_MemoryClose($Mem_Open) ;close it afterwards
EndFunc

Func bottomtotop() ; i search for the mob with $mobGreen color with a tolerance of 5
	$ymov = 732
	While 1
		$coord = PixelSearch($xTop,$ymov,$xBot,$yBot,$mobGreen,5)
		$n = @error
		If Not @error Then
			$comodin[0] = $coord[0]
			$comodin[1] = $coord[1]
			$comodin[2] = 0
			Return $comodin
		Else
			$ymov = $ymov - 10
			If $ymov = $yTop Then
				Return $nada
			EndIf
		EndIf
	WEnd
EndFunc
To make the Autopot works u need to make a file on the C:\ with the name "autopot.bat" with the following lines inside (the autpot script i have it's named autopotTS2.scar and its located on the Scripts folder of the SCAR root):
Code:
cd "C:\Archivos de programa\SCAR 3.20"
scar.exe -open scripts\autopotTS2.scar -run



I u wan't to PM me a question about this script, post a hack contribution here first.
GL, ^_^
Quote:
Originally Posted by kesawea View Post
COOL!!
that helped alot!
lol, you are right, i forgot the privilege stuff xDDD
well now it will be easy to pickup an item you desire :P

GL, and Thanks ^_^

PS: I'll edit the code post on Tuesday maybe, long weekend here :P


TY and GL with bot, you ever need anymore help with scripts just pm me
06/27/2009 02:38 andrewfam#34
@kesawea: you can use this code for multi mobs attack

Code:
Func AOE()
	$AOE = Not $AOE
	While $AOE		
		If WinActive("TwelveSky2") = 1 Then
			Send("9")  ; or whatever key for AOE attack
			Sleep(100)			
			If PixelGetColor(8,8) = 0 Then ExitLoop ; exit AOE if char changes zone or die
		Else
			Sleep(100)	
		EndIf
	WEnd	
EndFunc
06/28/2009 08:17 Deadman88#35
some here can give me software to make bot?
im wan download it..Thx
06/29/2009 01:44 tri407tiny#36
[Only registered and activated users can see links. Click Here To Register...]
06/29/2009 05:54 XiaoBao#37
Hmm soo i got the bot working now.. which is great success compared to the last time i tried the bot. Now im wondering, it doesnt wanna pick up items, i tried inserting the code for the aoe dmg, but i also failed lol. Any wanna try to help me? Help with be greatly appriciated.

Edit: I also might be big idiot, but i will try the autoloot if it works tomorrow. Thinking of the scrip of the jinong autopot, im wondering if its possible to pill from multiple slots any1 know?
06/29/2009 18:30 Deadman88#38
how to install it?im dunno at Select a default option *.3au files
some here can tell me???plzzzz
07/13/2009 22:52 eddykyke#39
:confused:i really tried to do this myself and searched almost all over for answer
cant find it. so i need to ask 1 question here..

so, i copy and pasted loaded the script and moved the crosshair to the game screen and pressed run script. then it keep on saying
"Ready
F**k, you died!
Waiting for respawn..."

keep on doing this...
game is on window mode 1024 x 768
hotkey '1' has hp pot and '2' has mp pot

what am i doing wrong? please help me out ^^;
07/14/2009 20:05 arttato#40
Where i can change code for new patch?
07/19/2009 18:42 Krazeg#41
Was wondering if the revive part of this script could be used in anotehr script if i used lines:



Func revive() ; revive = resurrects
$Mem_Open = _MemoryOpen($Process1)
$check = _MemoryRead($accion, $Mem_Open) ;reads value at memory address
_MemoryClose($Mem_Open) ;close it afterwards
If $check = $muerte1 Or $check = $muerte2 Or $check = $muerte3 Or $check = $muerte4 Or $check = $muerte5 Then ;if it dies with any of this animations.
$Mem_Open = _MemoryOpen($Process1)
_MemoryWrite($accion, $Mem_Open, $revive)
_MemoryClose($Mem_Open) ;close it afterwards
GUICtrlSetData($Label_1,$contador) ; sets label to value of read memory
$contador = $contador + 1
EndIf
EndFunc
07/19/2009 19:16 powerfear#42
Quote:
Originally Posted by Krazeg View Post
Was wondering if the revive part of this script could be used in anotehr script if i used lines:



Func revive() ; revive = resurrects
$Mem_Open = _MemoryOpen($Process1)
$check = _MemoryRead($accion, $Mem_Open) ;reads value at memory address
_MemoryClose($Mem_Open) ;close it afterwards
If $check = $muerte1 Or $check = $muerte2 Or $check = $muerte3 Or $check = $muerte4 Or $check = $muerte5 Then ;if it dies with any of this animations.
$Mem_Open = _MemoryOpen($Process1)
_MemoryWrite($accion, $Mem_Open, $revive)
_MemoryClose($Mem_Open) ;close it afterwards
GUICtrlSetData($Label_1,$contador) ; sets label to value of read memory
$contador = $contador + 1
EndIf
EndFunc
Yes but be sure to put right value for every variables..
07/21/2009 00:53 Krzy305#43
I tried running the auto pot script but my character just walks around aimlessly on a map, and when he does finally decide to hit a monster he melee's him instead of AOEing him.

Any help on this situation? Ive already got the auto loot, revive, hp, and chi. Just missing the whole auto monster attack thing.

Also I got a error Line 1: [Error] (1:1): Char error in script C:\Program Files\SCAR 3.20\Scripts\12sky2bot.scar

When I try to run the script using scar.

Any help would be greatly appreciated, am learning to code as I go.
07/24/2009 09:47 legolia#44
How do you make scar target 12sky, I looked up tutorials but still couldn't find out how to :S. I thought you target it with the crosshair thing but it still didnd't work.
08/02/2009 14:49 mangdiabloz#45
ahmmm... is this still working?>.. coz i tried it and when i click "BOT" my char doestn do anything... it just stand there... need help plss...