Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > 12Sky2
You last visited: Today at 03:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AutoIT - Help (Loot Scrpit)

Discussion on AutoIT - Help (Loot Scrpit) within the 12Sky2 forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 111
Received Thanks: 7
AutoIT - Help (Loot Scrpit)

Can anyone help me, Am trying to see if its possible to run a scrip that loots for you and also let's you re-cast your buff.

Id imagine id try to make the auto loot key "`" spam for a infinite loop picking up everything, and the buff skill set on my hot bar to be pressed every 3mins (aka auto cast).

Can I have some help in this? Id greatly appreciate it, am slowly learning how to code so am not "OMG PRO". So bear with me.
Krzy305 is offline  
Old 07/20/2009, 22:41   #2
 
elite*gold: 0
Join Date: May 2008
Posts: 133
Received Thanks: 9
Well you can easily learn this cause, there is an autoloot script with pixel detection auto attack i suggest looking at that scrip and then modifying to what u would prefer to do.
XiaoBao is offline  
Old 07/20/2009, 22:45   #3
 
elite*gold: 0
Join Date: Jul 2009
Posts: 111
Received Thanks: 7
I see, do you have a link to this script if possible? Am already searching these forums now, but just asking just in case, also this script is functional with AutoIT, I plan to use this with CE for auto potting.

Thank you
Krzy305 is offline  
Old 07/20/2009, 22:53   #4
 
elite*gold: 0
Join Date: May 2008
Posts: 133
Received Thanks: 9
Okay this is trinys code from:


Code:
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Comment=Autopot (Mayn Mem.)
#AutoIt3Wrapper_Res_Description=Autopot (Mayn Mem.)
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0.0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Nomadmemory.au3>
#include <Array.au3>
#include <memory.au3>
WinWaitActive("TwelveSky2")

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

;HP and Chi Base, editting these will change when the bot takes a pill
$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
$ChiAddy = 0x00B8347F
$HPAddy = 0x00B83447
$Chi = _MemoryRead($Chiaddy, $ID)
$HP = _MemoryRead($HPaddy, $ID)
$HPBase = $HP*.90
$ChiBase = $Chi*.40
;Edit these to change the percents
$SpeedAddy = 0x00B8349B


Func AOE ()	
WinActive("TwelveSky2")
Send("e") 
Sleep(100)
EndFunc ;==>AOE

Func Chi()
	SetPrivilege("SeDebugPrivilege", 1)
	$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
	$Address = $ChiAddy
	$Chi = _MemoryRead($Address, $ID)
	While $Chi < $ChiBase
		;Edit the value below ("2") to change the Chi pill key
		Send("w")
		Sleep(500) 
		$Chi = _MemoryRead($Address, $ID)
	WEnd
	_MemoryClose($ID)
EndFunc   ;==>Chi

Func HP()
	SetPrivilege("SeDebugPrivilege", 1)
	$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
	$Address = $HPAddy
	$HP = _MemoryRead($Address, $ID)
	While $HP < $HPBase
		;Edit the value below ("1") to change the HP Pill key
		Send("q") 
		Sleep(500)
		$HP = _MemoryRead($Address, $ID)
	WEnd
	_MemoryClose($ID)
EndFunc   ;==>HP
Func SpeedHackFreeze()
	SetPrivilege("SeDebugPrivilege", 1)
	$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
	_MemoryWrite($SpeedAddy, $ID, 200)
	While 1       
     SpeedHackFreeze()
	Wend
 _MemoryClose($ID) 
 EndFunc
While 1 
	HP()
	Chi() 
	AOE() 
WEnd

Func TogglePause()
	$Paused = Not $Paused
	While $Paused
		Sleep(100)
		ToolTip('AOE BOT "Paused"', 512, 15)
	WEnd
	ToolTip("")
EndFunc   ;==>TogglePause

Func Terminate()
	ToolTip('AOE BOT "Exiting"', 512, 15)
	Sleep(1000)
	ToolTip("")
	Exit 0
EndFunc   ;==>Terminate
And this is loot + more of a bot made by kasewea taken from:


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
EndFuncTo 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
XiaoBao is offline  
Old 07/20/2009, 23:05   #5
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,357
Received Thanks: 1,263
i'm a beginner and this is the best i could do. hahah. these loop commands are tricky to assign hotkeys lol.

i've been messin around with kasewea's script all day. i think i've made some good changes. lol.

edit: woops wrong file. hahah and no instructions.

basically the buttons are

"Home" = Start Looting
"Insert" = Stop Looting
"End" = Exit
strikeraid is offline  
Old 07/20/2009, 23:26   #6
 
elite*gold: 0
Join Date: Jul 2009
Posts: 111
Received Thanks: 7
Ya ive seen those before already, except for strikes you sure you got a working script? I tried to open it but wouldn't let me using AutoIT.

Thanks again.

PS: Xiao both of those scripts posted could be run on autoIT? I don't need to use Scar?
Krzy305 is offline  
Old 07/20/2009, 23:33   #7
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,357
Received Thanks: 1,263
Those scripts run on AutoIt not scar. I'm also gonna edit this post and upload an updated version of the Looter with a "revive where you died" button just like the one tri407tiny made a while back.

edit:

"Home" = Start Looting
"Insert" = Stop Looting
"Delete" = Revive
"End" = Exit

Note:After Reviving at the spot where you died, you need to recover HP using that Recover skill or by using a pot.

The file i gave you is zipped. I'm sure you know how to unzip it. The file inside is a .exe file. All you have to do is double-click and run with TwelveSky2.

If you want the script itself I can PM it to you. Its not that long.
strikeraid is offline  
Thanks
2 Users
Old 07/21/2009, 00:03   #8
 
elite*gold: 0
Join Date: Jul 2009
Posts: 111
Received Thanks: 7
Ya send me the script cause am a visual learner, as I look at the script i learn its functions, I know am backwards when it comes to learning. Lol. Also I tried to run Trinis first script and I updated its chi and hp address to the current ones, but I get a error saying.

Code:
Line-1:


error: cant not declare a constant
Also am downloading and testing your script now also. Your script works perfectly, AWESOME!. Is there a way to make it pick up only certain items, like money, rares, and not UNIs?
Krzy305 is offline  
Old 07/21/2009, 00:10   #9
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,357
Received Thanks: 1,263
Just curious. Do you think people would prefer 2 buttons to start and stop or just have 1 button? Right now my script that i'm going to send you is different from the scripts that I uploaded. It uses the "Home" key as a toggle to turn the autoloot on and off.
strikeraid is offline  
Old 07/21/2009, 00:17   #10
 
elite*gold: 0
Join Date: Jul 2009
Posts: 111
Received Thanks: 7
Well either or is fine, but having just 1 button would make it easier to toggle it on and off faster.

Making the "home" key on/off would work. and keeping the revive key the same.
Krzy305 is offline  
Old 07/21/2009, 03:04   #11
 
elite*gold: 0
Join Date: Jul 2009
Posts: 106
Received Thanks: 21
Hahaha with your PERFECT loot bot I no longer need anything else

You just need enough money to fuel autpot for about 4 hours and you'll have mega rares and money. THank you so MUCH!

I am trying to fix Trin's bot now and I have some ideas. I will let oyu know when I am done. I will not post the completed bot unless he gives permission, but I will give instructions when If figure it out


Just to let you know!
With a revive functioning hack...you can sky walk.
"Hint"...jump!
blade3000 is offline  
Old 07/21/2009, 03:09   #12
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,357
Received Thanks: 1,263
lol. :P i've been trying to edit other ppl's bots all day. haven't found a good setup yet. but i revamped the looter into a Looter+Revive+2Rebuffers+Spdhack(so i don't have to set my hotkeys in CE anymore).
strikeraid is offline  
Old 07/21/2009, 03:42   #13
 
elite*gold: 0
Join Date: Jul 2009
Posts: 111
Received Thanks: 7
Pfft, who's pushing you to add more stuff =P

As for the auto loot, it would be awesome if we can pick between uni/money/rares etc, if not your bank will fill up to quick with random ****.

Also blade, let me know how the work goes on that bot cause am on the same mission maybe all 3 of us can share some ideas to make a super working bot.
Krzy305 is offline  
Old 07/21/2009, 03:55   #14
 
elite*gold: 0
Join Date: May 2008
Posts: 133
Received Thanks: 9
Man you guys got me excited about coding, lol most of people who really know how to do this stuff. Already have these bots, but keep them to them self lol.
XiaoBao is offline  
Old 07/21/2009, 04:19   #15
 
elite*gold: 0
Join Date: Jul 2009
Posts: 111
Received Thanks: 7
Meh it's a team effort, keep the code among those that helped out with it, and hope it stays between us =D I know there are people there with perfect bots, but I also want to learn it and not just copy it so meh +D


PS: Am working on a auto pet feeder into the script so your pet will never go hungry as long as you got food on your slot bar.
Krzy305 is offline  
Reply


Similar Threads Similar Threads
AutoIT V3 AutoBuff AOE & Loot Bot
06/24/2010 - 12Sky2 Hacks, Bots, Cheats & Exploits - 5 Replies
AfterBurns AutoBuffAOELooter has been updated and fully working with AUto Terminate function now. Forum has been moved here http://www.elitepvpers.com/forum/12sky2-hacks-bots- cheats-exploits/621939-afterburns-autobuffaoeloote r-v-1-updated-6-23-2010-a.html#post5736446
why their is no scrpit for GCPH??
11/12/2009 - Grand Chase Philippines - 10 Replies
pls answer y der si no scrpit for GCPH
help with making a auto loot with autoit
06/19/2009 - Dekaron - 7 Replies
well this is an easy thing to do but i am not used to autoit cause i havent used it in a while and havent had a clue on how to make it so that if you hold down spacebar.... it will keep tapping spacebar for you while you hold it down and when you let go of space bar... it will stop hitting space bar... this is for an auto loot kinda ..... so does any one know how to do this? if so can you post a script of this so that i can add it to the auto it editor? thanks alot
Best way to loot a mob with AutoIt?
05/12/2009 - AutoIt - 5 Replies
Hey I'm trying to make a bot for Talisman Online with AutoIt's PixelSearch function. I was wondering if anyone has any good ideas on how to loot mobs easily? If I use PixelSearch to search for the green circle underneath the mob, it will sometimes click a new mob that has spawned on top of it instantly (tends to do that a lot), so does anyone know a good way of looting mobs? Doesn't have to be PixelSearch, could be a completely new thing, all ideas are welcome. Thanks :)
any have scrpit to maze???
05/02/2008 - Dekaron - 1 Replies
hi i need script to maze any have??



All times are GMT +1. The time now is 03:12.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.