[Guide] Simple AutoIt for BL retarget - leech-friendly

10/16/2012 09:17 168Atomica#1
Description:
Claw retargetting is awesome. But tiring. So instead of damaging my fingers and my keyboard keys, i created a very small code to retarget.

Here is the meat of the code, you need a little background on how autoit works but nonetheless, all the code you need is here ;0

Update: You DO NOT NEED A BYPASS for this to work :)

Requirements:
You need to set "X" as bind to "Select character"
You need to put normal atk (or anything that will cause claw attack) to slot "2" of your skill slots

OR you could modify the code to suit your needs

Note: modify the attack sleep values based on your retarget frequency (retarget after 2 hits or 1 hit)

Code:
Global $Toggle
HotKeySet("{PAUSE}", "Retarget")
HotKeySet("{ESC}", "Terminate")
AutoItSetOption("SendKeyDownDelay", 10)

While 1
    Sleep(100)
WEnd

Func Retarget()
	$Toggle = Not $Toggle
	while $Toggle
		if WinActive("CABAL", "") then
			sendkey("x")
			sleep(100)
			sendkey("z")
			sleep(100)		
			sendkey("2")
			sleep(200)
		endif
		Tooltip("Paused",0,0)
		sleep(100)
	WEnd
	Tooltip("Retarget OFF",0,0)
EndFunc   ;==>Terminate

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Func SendKey($keys)
   $length = stringlen($keys)
   
   for $i=1 To $length
	  $chr = stringmid($keys,$i,1)

	  send($chr)
	  ToolTip("Sending key to window: " & $keys, 0,0)
	  ;sleep(150)
   next
EndFunc
FAQ:
1. Why do I need sendkey function? Why not use send?
- I made a custom send function to insert codes between characters. I could add another 1 sec delay between the characters being sent and use it for other purposes (HINT: auto log-in, debugging, etc)

2. How to invoke the program?
- Compile it to make an exe. PAUSE key is the one used in the code above.

3. How to stop retargetting?
- Click away from cabal window - this is a temporary pause. Retargetting resumes after you click back to cabal window.
To turn off retargetting, hit PAUSE key.
To stop the program completely, hit ESCAPE key.

4. Your code is useles.
- I don't care. It is useful for me though. Someone might benefit from it. No flaming please :)

5. Does this work on normal cabal? (Actually I find this question irrelevant...)
Yes it works on all versions that supports key bind.

Note that this is only a replacement of the grueling task of pressing 2 keys (or 3 keys) repeatedly. Save yourself from damaging your fingers.

Thanks are always appreciated :D
10/16/2012 09:35 joxof#2
Quote:
Originally Posted by 168Atomica View Post
4. Your code is useles.
I don't care. It is useful for me though. Someone might benefit from it. No flaming please :)
~ Don't worry Sir, your code is very useful for The Leech King :D

Thanks in advance :)
10/16/2012 09:51 genesisVI#3
will these work w/ GG/xtrap

never encountered sendkeys b4

but if it can its much easier than dllcall :D
10/16/2012 09:57 168Atomica#4
Quote:
Originally Posted by genesisVI View Post
will these work w/ GG/xtrap

never encountered sendkeys b4

but if it can its much easier than dllcall :D
It should. It works on my client with GG. The code is just the equivalent of pressing repetitive keys so I find no reason for it to be detected by GG.
10/16/2012 10:13 genesisVI#5
nc ill try it later :D

whats ur OS btw?
10/16/2012 11:21 168Atomica#6
Quote:
Originally Posted by genesisVI View Post
nc ill try it later :D

whats ur OS btw?
Win7 64bit
10/16/2012 12:00 genesisVI#7
Quote:
Originally Posted by 168Atomica View Post
Win7 64bit
oh thats why

i dont think it will work on 32bit
10/16/2012 12:07 168Atomica#8
Quote:
Originally Posted by genesisVI View Post
oh thats why

i dont think it will work on 32bit
My answer is partially correct. I run Win7 64 bit "Virtual PC"
10/17/2012 21:31 krazeenookie#9
thanks, i'll try this later on war...
10/19/2012 06:10 elitepvpersdummy#10
Spoonfeed me please?! :D
LOL
10/20/2012 20:54 lintekens02#11
didn't work for me. both bypass and normal. i have win7 64 bit ph.

btw,the tooltip shows that it is sending x z and 2 but nothing happens in game.
10/21/2012 02:35 m00n_fox#12
noob here...how to compile the codes to make exe...? please share knowledge....
10/22/2012 05:19 168Atomica#13
Quote:
Originally Posted by lintekens02 View Post
didn't work for me. both bypass and normal. i have win7 64 bit ph.

btw,the tooltip shows that it is sending x z and 2 but nothing happens in game.
Actually, it doesn't matter whether your client is bypassed or not. It just send the keys to the game.

Have you pressed PAUSE key after running the program?
{Hint: Press PAUSE -o u t s i d e- cabal window }

My advice, learn the program and how I constructed it. (Although the code is a little dumb :D )

:bandit:

If you want it to be functional i-n-s-i-d-e cabal window, you may want to learn dll creation and ... well inject it. (But that is another topic of its own).

Quote:
Originally Posted by m00n_fox View Post
noob here...how to compile the codes to make exe...? please share knowledge....
After installing autoit, you could create scripts. Copy my code and save it.
Right clicking on a file would give you options to choose from - one of them is to compile using 64Bit.

Ok. Enough spoonfeeding. :) The code is working for me. Learn from this simple code and you could go on from there. I will no longer entertain questions on autoit. But questions related to my code are always welcome.
10/22/2012 15:28 Moookie#14
what version of autoit do i need to run this with gameguard? i tried this code but it only works without gameguard.thanks anyway
10/25/2012 03:51 stephyoneg4ever#15
what version of AUTO IT?