Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;ReadLine3.au3
- #include <File.au3>
- #include <FileConstants.au3>
- ; Setup Guide
- ; 1. Setup Configuration below
- ; 2. Setup UI - Download uifile
- ; we need to fix that UI Combat Icon.
- ; https://1drv.ms/u/s!ApRBDeRyfdy7gdcNKXrbyn9_R1UTtg
- ; Download that into your ui folder that you use.
- ; Changes In Combat icon to Red Box instead of Shield graphic
- ; 3. Setup UI - Find the position of that Combat Icon
- ; Start -> AutoIt v3 -> AutoIt v3 Window Info -> Click and drag Target Icon onto your Shield graphic we just patched.
- ; Update $xIcon, $yIcon (position of your In-Combat icon
- ; ---------- Start CONFIGURATION ------------
- $s_EQPath = "D:\Games\Everquest\"
- $s_CharName = "Fiido" ; not implemented
- $s_ServerName = "coirnav"
- $xIcon = 2740;180
- $yIcon = 50
- ; This word will set AE stuns to start
- $s_StunTrigger = "STUN NOW"
- $s_GateTrigger = "Gate GoGoGo"
- ; Blank->Anyone or Define Trigger Person
- $s_TriggerPerson = ""
- ; Wait <X> seconds to start
- $s_TriggerDelay = 5
- ; Do at least <X> stuns before checking for in-combat
- $s_FinishDelay = 3
- ; Enchanter Hotkeys
- $s_ColorShift = "!1" ; e.g. !1 = Alt+1
- $s_ColorSkew = "!2" ; e.g. {NUMPAD1}
- $s_ColorSlant = "!3" ; e.g. 1 = 1
- $s_ColorFlux = "!4" ; e.g. ^1 = Ctrl+1
- ; Parse the Log every X millisec
- ; lower it if you want to check log more often
- ; raise it if it's lagging you
- $s_Delay = 10
- ; ---------- End CONFIGURATION ------------
- ; ---------- NOT CONFIGURATION ----------
- Local $s_FileName = $s_EQPath & "Logs\eqlog_" & $s_CharName & "_" & $s_ServerName & ".txt"
- Local $inCombat = False
- Local $stunContinue = True
- HotKeySet("{ESC}", "HotKeyPressed")
- ; Open the File
- $h_File = FileOpen( $s_Filename )
- FileSetPos( $h_File, 0, 2 )
- ; ---------- Main Loop ----------
- While 1
- ; Parse Chat
- WaitAndParse()
- ; Start if done waiting
- StartStun()
- WEnd
- ; ---------- Phase 1 : Wait for a trigger from Chat ----------
- Func WaitAndParse()
- While 1
- $line = FileReadLine( $h_File )
- If $line <> "" Then
- ConsoleWrite( $line & @LF )
- If StringInStr( $line, $s_StunTrigger )>0 Then
- Return 1
- EndIf
- EndIf
- Sleep( $s_Delay )
- WEnd
- EndFunc
- Func StartStun()
- ; variable
- $stunContinue = True
- $s_FinishDelay2 = $s_FinishDelay
- ; enchanter delay
- If $s_TriggerDelay > 0 Then
- Sleep( $s_TriggerDelay * 1000 )
- EndIf
- While $stunContinue
- SendStun( "!1", 9 )
- If CheckStop()=1 Then
- $stunContinue = False
- ContinueLoop
- EndIf
- SendStun( "!2", 15 )
- If CheckStop()=1 Then
- $stunContinue = False
- ContinueLoop
- EndIf
- SendStun( "!3", 14 )
- If CheckStop()=1 Then
- $stunContinue = False
- ContinueLoop
- EndIf
- WEnd
- EndFunc
- Func HotKeyPressed()
- Switch @HotKeyPressed ; The last hotkey pressed.
- Case "{ESC}" ; String is the {ESC} hotkey.
- Exit
- EndSwitch
- EndFunc ;==>HotKeyPressed
- Func CheckStop()
- If Not $inCombat Then
- ; Delay counter
- If $s_FinishDelay2 > 0 Then
- $s_FinishDelay2 = $s_FinishDelay2 - 1
- Return 0
- Else
- ; Combat check
- If PixelGetColor( $xIcon, $yIcon ) = 0xFF0000 Then
- $inCombat = True
- Else
- Sleep( 2000 )
- Send( "x" )
- Return 1
- EndIf
- EndIf
- Else
- If PixelGetColor( $xIcon, $yIcon ) <> 0xFF0000 Then
- Sleep( 2000 )
- Send( "x" )
- Return 1
- EndIf
- EndIf
- Return 0
- EndFunc
- ; $num = duration
- Func SendStun( $key, $num )
- WinActivate( "EverQuest" )
- $times = Int($num * 1000 / 500)
- For $i = 1 to $num
- Send( $key )
- Sleep( 500 )
- Next
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement