After you make your submission feel free to check back from time to time to see the status of your post. Keep in mind we get lots of duplicates submitted; however, there are tons of exploit, guides, and macros out there. If its not in our database and you submit it you will get a lifetime membership to our site.
I sure wish somebody would reply. Am I being impatient?
I can see people are reading it, so there seems to be interest, but why won't anyone reply?
Ok, here is V2.2, which corrects almost all of the problems I have encountered. Feedback from the community is required to correct any of the problems you may be having which I have not discovered, or that I am unaware of simply because it is not reproducable here.
It should be noted I downloaded AutoIt for the first time myself, the day I submitted this macro, this is my first attempt at macro writing in general. I chose AutoIt because of the powerful scripting language. Feedback of any kind would be most welcomed, and appreciated.
Is there already something better already in use perhaps?
Frustrated by the lack of response,
-TDS
Changes:
- Now you cean leave the macro running w/o it interfering with your ESC keypress. Since we now forward the ESC keypress on to the application. -- I had such trouble with using my ESC key to abort casts or untarget, glad this is finally fixed, and opens the door to add features to perform other repetative tasks besides logins. (suggestions welcome)
- Further increased the delay default to 600
- You can now unload the macro before you actually start the game if you have changed your mind. (now use + on the numpad instead of Shift-Alt-ESC however)
Release Notes wrote:I changed the gamma settings on my system to see if the macro still properly detected the character select screen under different conditions, but I was unable to break it.
There is a minor problem, where the macro tries to login one more time after the character select screen pops up, but sending the keystrokes and mouseclicks required to login appears to have no effect there. Once it runs that last time it properly detects the character select screen and loops the tada.wav (thereby stopping further attempts to login).
You should be careful NOT to select a character and load the game until you have pressed ESC or + on your number pad at least once. This will abort the macro so that your password CAN NOT be sent to the chat window in the game once it loads. Failure to stop the macro using ESC before you select a character and enter the game will result in one of the following:
- if the character select screen was not detected, or you select a character and load the game before it has a chance to detect it, you may be putting your password at risk, because the macro is probably still trying to log into the game.
- if the screen WAS detected, it is playing tada.wav over and over again. It will not stop playing the wav until you press ESC. If the tada.wav is playing, the login code is effectively disabled and there is no chance of sending your password to the chat window, unless you use the Shift-Alt-L key combo again. Just press ESC once to get rid of that annoying tada.wav, it is only there so that you can walk away from the computer and be notified when login is successful.
The Shift-Alt-L and ESC HotKeys are not functional until the macro detects a Lineage II window, this is an attempt to prevent you from enabling the macro
The future...
Future updates to this code will be mostly reported bugfixes unless someone has ideas on how to enhance it. If there is ever a v3 it will provide a dialog the first time you run the macro asking you to setup your password and delay (defaults provided of course) and save them into an ini file which is used from then on.
On with the code...
Code: Select all
;
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
;
; Where to find the latest version of this macro, including all known
; bugfixes and the newest features? http://www.tault.com/ of course
;
; Script Author: Anonymous
; Script Version: v2.2
; Script Function:
; AutoLogin for Lineage II
; Verified to work under 800x600, 1024x768, and 1280x1024 32-bit color.
;
; To effectively use this macro:
; ------------------------------
; Download and install AutoIt v3 (AutoIt v3 is an opensource BASIC-like
; scripting language designed for automating the Windows GUI.)
; It can be obtained from the official website: http://www.hiddensoft.com/autoit3/
;
; Once you have installed AutoIt v3 (not v2!!!):
; ----------------------------------------------
; Copy this script into a file named l2login.au3
; Edit the $pass variable below to reflect your Lineage II Password.
; Double-click on l2login.au3 to load it
; (You will see an AutoIt icon appear in your system tray)
; Run Lineage II
; Type Your login name into the ID box, make sure the cursor is still in the ID box.
; Press Shift-Alt-L to activate the macro.
;
; The macro will repeatedly attempt to login. Once it has successfully reashed the
; character select screen. It will automatically detect this and stop tring to login.
; To notify you of the successful login, it will play tada.wav every 2 seconds until you
; stop the macro by pressing ESC, or by unloading the macro by pressing the + key on
; your number pad.
;
; You can also stop the macro at any time before a successful login using the ESC key.
; The macro will stop at the end of the current iteration (when you are next returned to
; the login box). Using the + key on the number pad will unload the macro from memory,
; thereby stopping it instantly wherever it happens to have left off.
;
Dim $pass, $stoplogin, $res, $delay
Dim $res[3] ; 3 resolutions mapped, format of each array element: color,x,srvr1y,srvr2y...srvr5y
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; BEGIN CONFIGURATION SECTION ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$pass = "mypass"
$server = 0 ; 0 = default server, 1 = server 1, 2 = server 2, etc..
$delay = 600 ; increase if dialog lag causes the macro to malfunction, decrease for higher speed
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; END CONFIGURATION SECTION ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ------------------------------------------------------
; You should NOT need to edit anything beyond this point
; ------------------------------------------------------
$res[0] = "1449253,540,362,376,389,402,416" ; 1280 x 1024
$res[1] = "2569277,400,235,250,260,275,285" ; 1024 x 768
$res[2] = "1712938,300,150,160,175,190,200" ; 800 x 600
AutoItSetOption("MouseCoordMode",0)
AutoItSetOption("SendKeyDelay", 1)
HotKeySet("{NUMPADADD}", "TerminateMe") ; + on the Number Pad
;WinActivate("Lineage II")
WinWaitActive("Lineage II")
HotKeySet("{ESC}", "StopLogin") ; Escape key
HotKeySet("+!l", "AutoLogin") ; Shift-Alt-L
Func AutoLogin()
WinActivate("Lineage II")
WinWaitActive("Lineage II")
Local $color,$size,$chk,$ary
$size = WinGetPos("Lineage II")
If $size[2] == 1280 Then
$chk = 0
ElseIf $size[2] == 1024 Then
$chk = 1
ElseIf $size[2] == 800 Then
$chk = 2
EndIf
$ary = StringSplit($res[$chk],",")
$stoplogin = 0
While WinActive("Lineage II") AND NOT $stoplogin
Send("{TAB}")
Send($pass)
Send("{ENTER}")
Sleep($delay)
Send("{ENTER}")
Sleep($delay * 3)
If $server == 0 Then
Send("{ENTER}")
Else
MouseClick("left",$ary[2],$ary[$server + 2],2,1)
EndIf
Sleep(1000)
$color = PiXelGetColor($size[2] - 1,$size[3] - 1)
If $color == $ary[1] Then
SoundSetWaveVolume(100)
While NOT $stoplogin
SoundPlay(@WindowsDir & "\media\tada.wav")
Sleep(3000)
WEnd
ExitLoop
EndIf
WEnd
EndFunc
Func StopLogin()
$stoplogin = 1
HotKeySet("{ESC}")
Send("{ESC}")
HotKeySet("{ESC}", "StopLogin")
EndFunc
Func TerminateMe()
Exit 0
EndFunc
;;;; Just loop and wait for some HotKey press ;;;;
While 1
Sleep($delay)
WEnd
;;;;;;;;
; Finished!
As with any other submitted code, you probably should not use this if you do not understand what it does. You assume all liability, yada, yada..
And above all else, Enjoy playing Lineage II!!
See ya in there.