taultunleashed logoLOTRO AutoIT HealBot v5.0 w/Fellowship Chat Commands : LOTRO - Bots and Hacks
newtopic  postreply
 [ 8 posts ] 
blue large dot

LOTRO AutoIT HealBot v5.0 w/Fellowship Chat Commands : LOTRO - Bots and Hacks

Posted: April 25th, 2011, 9:40 pm
 
cabledog2468

Total Posts: 13
Joined: March 21st, 2010, 8:21 pm
cabledog2468's Reps: 1
User avatar
premium
THIS BOT IS STILL FUNCTIONAL, HOWEVER, THE UPDATED HEALBOT6.0 IS LISTED FURTHER BELOW. BECAUSE OF THE # OF LINES IN THE POST, i WAS FORCED TO BREAK UP THE BOT INTO SEVERAL SECTIONS, ONE IS THE COMMENTS AND CHANGE LOG, THE OTHER IS THE BOT, AND FINALLY ANOTHER POST IS THE INI FILE. SORRY, IT'S THE LIMITATION OF THE FORUMS :/


Less than 3 weeks ago, I posted my very first, *crude* heal bot. It was functional, but it was extremely limited. And now, very much like the Master Control Program of Tron that grew from a simple chess game, the HealBot has grown beyond it's original scripting.

Everything is pretty self explained from within the script itself, but much like my first post, I cannot stress enough the YOU MUST SET THE VARIABLES!!!!!!!!!!!!!!!!!!

This bot performs a wide variety of functions, and the latest incarnation also includes a pause feature to toggle healing checks on and off (useful for loading screens and changing areas)

NOTES:
.YOU MUST SETUP A FELLOWSHIP CHAT TAB
.YOU CAN ONLY ISSUE COMMANDS FROM FELLOWSHIP CHAT
.YOU HAVE TO SET YOUR VARIABLES, THE CURRENT VALUES ARE MINE
.SCRIPT CHECKS THE LAST LINE OF THE LOG, IF YOU ISSUE A COMMAND AND THEN ISSUE ANOTHER BEFORE YOU GET CONFIRMATION THAT THE FIRST COMMAND WAS DONE, IT WILL MOST LIKELY FIRE THE SECOND COMMAND ONLY. WAIT FOR CONFIRMATION THE COMMAND WAS RECEIVED AND EXECUTED BEFORE ISSUING MORE COMMANDS
.ALL COMMANDS **ARE** CASE SENSITIVE... THAT'S HOW AUTOIT WORKS!

As of 042611, 0045hrs This bot is fully functioning without errors (aside from known issues)

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
Chat Command List:
am                 
Assist me, Target my Target, and attack

Assist
*Skirmish Mode* Send your Soldier to attack my Target

Follow me
Target and Follow me

Eat
Eat some buff food

Prepare for battle
*Skirmish Mode* Call your soldier, eat some food, target/follow me

Mount
Mount or Unmount your Horse, target me and follow

Healing on / Healing off
Toggles healing on and off, while off, Morale checks are not performed, but chat commands are still checked

Loot
Set the view downward and begin clicking in areas around the Pocket Healer.  Works best if you move your Commander in such a way that the pocket Healer follows you to stop over/extremely near the corpse

Remove fear
Tells the Pocket Healer to remove fear from the Commander

Call soldier
*Skirmish Mode* calls the healers soldier back if he falls in combat or gets stuck

Exit script
Exits and ends the current script


The Monster Script (well, not as bad as LotroBot!)
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
#comments-start
   ********************************************************************************************************************
   Script:   PocketHealer v5.0
   Author:   xXCableDogXx
   Date  :   04192011
   Descrp:   Automatic target/follow/heal boT

   The purpose of this script is to allow for a "Pocket Healer" who will check your vitals and if they fall below a
   certain  range,  begin  healing.  This script will then continue healing until you are healthy again.  This script
   will also respond to typed commands (more on this later) that will allow you to prepare your healer for  a  fight,
   mount and follow you on horseback, and even exit the script.

   This script is NOT without setup, however.  And there are a few things that MUST be setup BEFORE it will actually
   work.  This script will have to be created, and for the best performance, it should be located in your LOTRO folder
   located  in your MY DOCUMENTS folder.

   This script DOES NOT send/hold/log/spy for anyone other than YOU and YOUR chat. I will not receive your passwords
   or your Character information, it is NOT a keylogger.

   ***************
   *Installation:*
   ***************
   Copy this script into a new .au3 file and name it  whatever  you wish. And place the files in your:

   "C:\Documents and Settings\*YOUR USERNAME HERE*\My Documents\The Lord of the Rings Online"


   ***************
   *Known Issues:*
   ***************
   Because of the way the script checks health and the chat log, there are a few known issues that will never be  able
   to be avoided.  Understand that A) this bot is a giant loop, B) it  is  logic  engine,  just  looking  to  validate
   statements and arguements, and C) several of the checks require specific coordinates and colors or they fail, break
   -ing down the entire process.  Below is a list:

   1. Chat Commands:  Chat commands at this juncture require the use of Fellowship chat and a user created  Fellowship
   tab.  If you right click the General Tab you can select to Create or Add a tab.  Failing to do  so  breaks  down
   the GetLastLine() function and will cause your automated character to fail in responding to your  commands. Chat
   Commands are also CASE SENSITIVE... if the function calls  for  the  $LastLine to == "Mount"  you  cannot  enter
   "mount" and expect it to work, because it will not.

   2. Checking Health: The script checks a certain area of the screen, which YOU must define under  the  variables  in
   the  file.  It checks these specific coordinates for a specific color.  Anything the covers or blocks  the  view
   of the script will cause an invalid statement, which will trigger your healing functions.  This can be caused by
   (but not limited to) opening a Vendor Pane which covers the area the script  checks  for  said  coordinates  and
   color by essentially making that color at that specific coordinate to be something OTHER than the color  we  are
   checking.
   It's more of an annoyance than an actual break in the script, simply dragging the window away from the area that
   is being checked will keep it from happening.  Also, in this version of the  script, I  have  included  a  pause
   feature that will allow you to stop performing healing checks (more on this later).

   3. Sometimes you have to "reset" or change those coordinate values... I've noticed on several occasions that when I
   run my game in windowed mode, and run the bot, for some reasons my coordinates are invalid.  If they are off  by
   a single pixel, it will cause a break in the bot.

   **********
   *Credits:*
   **********
   Special thanks to all of the guys at the AutoIT forums who helped me understand a few things
   BIG thanks to BotXPert <LOTROBot@gmail.com>, for allowing his script  to  be  "open sourced"  which  essentially
   canabalized by anyone for their own purposes.

   ********
   *Usage:*
   ********
   Please feel free to use this script for your own purposes, to modify and change as you see fit or need.  But please
   if you use this script or any part of this script in your own  work and "publish", give  credit  to me,  xXCableDogXx
   it's all I ask.  Thanks

   ********************************************************************************************************************
   WISH LIST TO ADD
   Want to add a GUI to preset certain variables and use an INI file
   Want to add stop checks for healing so that we aren't wasting power and focusing on when to heal
   Want to add stop checks for the Attack Assist to cease combat when Commander is no longer in combat

   CHANGE LOG 042511
   Added a Pause command to toggle healing on and off without exiting the script
   Added more Globals and variables
   Added new functions to handle assistance in Combat
   Added Loot command
   Repaired Chat Log Parser
   Altered some key send delays and general delays to speed things up a tad

#comments-end

; Declare Global Variables
Global $LastLine             ; This is == to the last line of the current chat log
Global $line                ; This is a Line value
Global $CurrentLogFile          ; This is your current log file name (set automatically)
Global $CurrentLine          ; Returns the value of your Current Line in the Chat Log
Global $LastLineNumber          ; Sets your Last Line Number in the Chat Log
Global $LoggedChatTab          ; This is the name of your Fellowship tab
Global $HealToggle             ; This is a toggle variable to start/stop healing checks
Global $TabClickX             ; This is the on screen coordinate for your Fellowship tab (X)
Global $TabClickY             ; Same only for (Y)
Global $CharClickX            ; This is the on screen coordinate for your Commander Character (X)
Global $CharClickY             ; Same only for (Y)
Global $CheckMoraleX          ; This is the on screen coordinate for your Innitial Morale level check (X)
Global $CheckMoraleY          ; Same only for (Y)
Global $CheckMoraleColor       ; Same only for the pixel color located at X, Y
Global $ContinueCheckX          ; This is the on scree coordinate for your Continue to Heal check (X)
Global $ContinueCheckY          ; Same only for (Y)
Global $ContinueCheckColor       ; Same only for the pixel color located at x, y
Global $CommanderName          ; This is the name of the Character who will give you commands
Global $BigSingleHeal          ; This is your hotkey for Bolster Courage
Global $SmallSingleHeal       ; This is your hotkey for Raise the Spirit
Global $BigGroupHeal          ; This is your hotkey for Triumphant Spirit
Global $SmallGroupHeal          ; This is your hotkey for Inspire Fellows
Global $HorseMount             ; This is your hotkey for your Mount ability
Global $EatFood             ; This is your hotkey for your food (if any)
Global $GroupBuff             ; This is your hotkey for Tale of Heroism
Global $RemoveFear             ; This is your hotkey for Cure Fear ability
Global $CallSoldier          ; This is your hotkey for Soldier ability (only available in Skirmishes)
Global $Ballad1_1            ; This is your hotkey for your Ballad of Steel
Global $Ballad1_2            ; This is your hotkey for your Ballad of Resonance
Global $Ballad1_3            ; This is your hotkey for your Ballad of Vigor
Global $Ballad2_1            ; This is your hotkey for your Ballad of Swiftness
Global $Ballad2_2            ; This is your hotkey for your Ballad of Balance
Global $Ballad3_1            ; This is your hotkey for your Ballad of Composure
Global $Ballad3_2            ; This is your hotkey for your Ballad of War
Global $Ballad3_3            ; This is your hotkey for your Ballad of Flame
Global $Cry1_1               ; This is your hotkey for your Piercing Cry
Global $Cry1_2               ; This is your hotkey for your Echoes of Battle
Global $SongOSoothing         ; This is your hotkey for your Song of Soothing
Global $AssistCommander         ; This is your keyboard shortcut for Assist Fellow 2
Global $CombatAssistX         ; Not used anymore
Global $CombatAssistY         ; Not used anymore
Global $CombatAssistColor      ; Not used anymore

; Setup Global Variables
; Non- Windows Info Tool Variables
$HealToggle = 0             ; This sets the healing checks off or paused by default, changed with a chat command
$LoggedChatTab = "Fellowship"    ; This sets the name of the chat tab that is logged (mine is FellowShip
                        ; You must create a tab and whatever you name it, that's what goes in this variable
$CommanderName = "YOURCOMMANDERNAMEHERE"       ; This is the name of the Character that will give you chat commands

; Hotkey Setups:  You must replace the values below with the location of YOUR hotkeys, *-OR-* you could simply place your abilities where I have mine  setup
;                 Remember that  + = Shift, ^ = Control, ! = Alt, so ^1 is the same as [CONTROL]+[1], etc.  If the hotkey doesn't use control/shift/alt then
;                 simply use the number, IE 1 or 5 or - or =, etc.  Information MUST reside within the " " (quotes)

$BigSingleHeal = "^1"          ; This is the hotkey for your Bolster Courage ability,   + = Shift, ^ = Control, ! = Alt
$SmallSingleHeal = "^3"       ; This is the hotkey for your Raise the Spirit ability,  + = Shift, ^ = Control, ! = Alt
$BigGroupHeal = "^4"          ; This is the hotkey for your Triumphant Spirit ability, + = Shift, ^ = Control, ! = Alt
$SmallGroupHeal = "^2"          ; This is the hotkey for your Inspire Fellows ability,   + = Shift, ^ = Control, ! = Alt
$HorseMount = "+1"             ; This is the hotkey for your current mount,             + = Shift, ^ = Control, ! = Alt
$EatFood = "+3"             ; This is the hotkey for your current food to eat,       + = Shift, ^ = Control, ! = Alt
$GroupBuff = "+7"             ; This is the hotkey for your Tale of Heroism ability,   + = Shift, ^ = Control, ! = Alt
$RemoveFear = "^5"             ; This is the hotkey for your Cure Fear ability,         + = Shift, ^ = Control, ! = Alt
$CallSoldier = "^8"          ; This is the hotkey for your Soldied ability,           + = Shift, ^ = Control, ! = Alt
$Ballad1_1 = "3"            ; This is your hotkey for your Ballad of Steel          + = Shift, ^ = Control, ! = Alt
$Ballad1_2 = "4"            ; This is your hotkey for your Ballad of Resonance       + = Shift, ^ = Control, ! = Alt
$Ballad1_3 = "5"            ; This is your hotkey for your Ballad of Vigor           + = Shift, ^ = Control, ! = Alt
$Ballad2_1 = "6"            ; This is your hotkey for your Ballad of Swiftness       + = Shift, ^ = Control, ! = Alt
$Ballad2_2 = "7"            ; This is your hotkey for your Ballad of Balance         + = Shift, ^ = Control, ! = Alt
$Ballad3_1 = "8"            ; This is your hotkey for your Ballad of Composure       + = Shift, ^ = Control, ! = Alt
$Ballad3_2 = "9"            ; This is your hotkey for your Ballad of War            + = Shift, ^ = Control, ! = Alt
$Ballad3_3 = "0"            ; This is your hotkey for your Ballad of Flame           + = Shift, ^ = Control, ! = Alt
$Cry1_1    = "1"            ; This is your hotkey for your Piercing Cry              + = Shift, ^ = Control, ! = Alt
$Cry1_2    = "2"            ; This is your hotkey for your Echoes of Battle          + = Shift, ^ = Control, ! = Alt
$SongOSoothing   = "!4"          ; This is your hotkey for your Song of Soothing          + = Shift, ^ = Control, ! = Alt
$AssistCommander = "+{F2}"      ; This is your keyboard shortcut for Assist Fellow 2     + = Shift, ^ = Control, ! = Alt
$CurrentLine = 1            ; Set the $CurrentLine to 1 so that we can mark the end of our chat log

; Windows Info Tool Specific Variables Setup
; * The following variables require than you RUN and USE the Windows Info Tool to check coordinates and colors at those coordinates, then paste the info here
;   in these variables (within the " " (quotes)).  If this information is NOT SET then the bot will either not  function,  OR  continue  to  perform  healing
;   The latter being the most likely.


$CombatAssistX = "248"         ; Not used anymore
$CombatAssistY = "98"         ; Not used anymore
$TabClickX = "265"             ; This is the on screen coordinate for your Fellowship tab (X)
$TabClickY = "472"             ; Same only for (Y)
$CharClickX = "52"             ; This is the on screen coordinate for your Commander Character (X)
$CharClickY = "91"             ; Same only for (Y)
$CheckMoraleX = "208"          ; This is the on screen coordinate for your Innitial Morale level check (X)
$CheckMoraleY = "93"          ; Same only for (Y)
$CheckMoraleColor = "0x2AD80D"  ; Same only for the pixel color located at X, Y
$ContinueCheckX = "208"       ; This is the on scree coordinate for your Continue to Heal check (X)
$ContinueCheckY = "93"          ; Same only for (Y)
$ContinueCheckColor = "0x2AD80D"; Same only for the pixel color located at x, y

#comments-start
   Definitions:
   Fellowship Pane = The list of character vital blocks under your main vitals block
   Targeting  Pane = The area of the screen where your character has targeted a companion or enemy

   The best way to setup the above variables is to open the Windows Info Tool and do the following:

   Open Windows Info Tool
   Switch to Game (running in Windowed Mode)
   Open Game Options, Change the "VITAL BAR TEXT DISPLAY" to "PERCENTAGE" under the UI Settings panel
   Move the mouse pointer over your "Commanding Character" located IN THE FELLOWSHIP PANE (IE the guy you will be keeping healthy) position it over his
   BRIGHT green morale bar about 2/3rds to 3/4s from FULL HEALTH
   WITHOUT MOVING THE MOUSE!!!!  [ALT]+[TAB] BACK to the Windows Info Tool and press [CTRL]+[ALT]+[F] (at the same time) to freeze the information (you can now move the mouse)
   Click on the "SUMMARY" tab of the tool, scroll down to the heading of >>>>> MOUSE <<<<<
   Copy the coordinates there to your $CheckMoraleX and $CheckMoraleY strings above.  Do this for the hex color information as well (put that in $CheckMoraleColor).

   Now do the exact same thing for your $ContinueCheckX, $ContinueCheckY, and $ContinueCheckColor, ONLY THIS TIME position the mouse near FULL HEALTH

   Continue with this for the rest of the variables tha must be defined using this tool, use the middle of your Fellowship tab for the $TabClickXY variables, use the
   middle of your Commanding Characters Picture under the Fellowship Pane for the $CharClickXY variables.
#comments-end

; Begin Scripting Setup and Checks

; Innitialize and Set Delays
Opt("WinWaitDelay", 0)
Opt("SendKeyDownDelay", 15)
Sleep(10000)                ; Give us time to get into the game window
; End Innitialize

; Verify LOTRO is Open and Running
$LOTROWindowName = "The Lord of the Rings Online™: Siege of Mirkwood™"
$pid = WinGetProcess("The Lord of the Rings Online™: Siege of Mirkwood™")

If $pid = -1 Then
   MsgBox(0x40000, "Error", "LOTRO Process not found.  Please Start LOTRO.  Exiting")
   Exit
EndIf
; End Verify

; Setup Chat Logging
; *** YOU MUST HAVE CREATED A CHAT TAB CALLED FELLOWSHIP
; *** YOU MUST HAVE SET THE CHAT FILTERS TO INCLUDE FELLOWSHIP CHAT ONLY
; *** AT THIS POINT YOU CANNOT INCLUDE ANY OTHER CHAT FILTERS ELSE YOUR COMMANDS WILL NOT FIRE
; *** YOU MUST, MUST, MUST ISSUE YOUR VERBAL COMMANDS FROM FELLOWSHIP CHAT
; *** YOUR "COMMANDING" CHARACTER DOES NOT HAVE TO BE IN/ON A FELLOWSHIP CHAT TAB
; *** ONCE THIS CHAT LOG HAS BEEN INNITIALIZED AND SET, YOU DO NOT HAVE TO HAVE YOUR BOT ON/IN THIS TAB (USEFUL FOR VERIFYING LOOT DROPS)
FileDelete ($LoggedChatTab & "_*.txt")
Sleep(5000)                                        ; Give us a little more time before the we do the next steps
MouseClick("left", $TabClickX, $TabClickY, 3, 2)            ; Click on the Fellowship Chat Tab
Sleep(1000)                                          ; Sleep for a sec
Send("{ENTER}/f  .{ENTER}")                              ; Put our Pocket Healer in Fellowship Chat
Sleep(1000)
Send("{ENTER}/Chatlog ON{ENTER}")                        ; Actually turn on Fellowship Chat Logging
Sleep(500)
Send("{ENTER}/f Fellowship Channel Logged, Fellowship Tab Selected, Fellowship Channel Joined{ENTER}")
                                                ; Confirm in Chat that we have set everything up correctly
Sleep(1000)
$CurrentLogFile = $LoggedChatTab&"_"&@YEAR&@MON&@MDAY&"_1.txt"    ; Can only be set once Chat Logging is turned on above
GetLastLine()                                        ; Get and Save the Last Line of the log now
; End Chat Log Setup

; Begin Main Loop
; Checks the Value of $HealToggle for constant.  If the value changes, then it begins the healing portion of the script and will NOT
; loop back to this position until it "reads" the specified command in the Fellowship Chat Log
While 1=1
   ; Check for any commands issued by the "Commander" in Fellowship Chat
   GetLastLine()
   CheckHealToggle_On()
   CheckHealToggle_Off()
   LootMob()
   CombatAssist()
   Eat_Meal()
   ClickAssist()
   Remove_Fear()
   Mount_Unmount()
   Call_Soldier()
   Ask_Follow()
   Prepare_Battle()
   Exit_Script()
   Sleep(Random(1, 2) * 1000)
   ; End Chat Log Checking

   Select
      Case $HealToggle = 0                           ; While $HealingToggle is = 0, We will only perform Chat Log Checks
         GetLastLine()
         CheckHealToggle_On()
         CheckHealToggle_Off()
         LootMob()
         CombatAssist()
         Eat_Meal()
         ClickAssist()
         Remove_Fear()
         Mount_Unmount()
         Call_Soldier()
         Ask_Follow()
         Prepare_Battle()
         Exit_Script()
         Sleep(Random(1, 2) * 1000)

      Case $HealToggle = 1                           ; While $HealingToggle is = 1, We will perfoem chat log checks and morale checks
         GetLastLine()
         CheckHealToggle_On()
         CheckHealToggle_Off()
         LootMob()
         CombatAssist()
         Eat_Meal()
         ClickAssist()
         Remove_Fear()
         Mount_Unmount()
         Call_Soldier()
         Ask_Follow()
         Prepare_Battle()
         Exit_Script()
         Sleep(Random(1, 2) * 1000)

         While PixelGetColor($CheckMoraleX, $CheckMoraleY) == $CheckMoraleColor
            Sleep(Random(1, 2) * 1000)
         WEnd
         While PixelGetColor($ContinueCheckX, $ContinueCheckY) <> $ContinueCheckColor
            Target_Follow()
            If PixelGetColor($ContinueCheckX, $ContinueCheckY) <> $ContinueCheckColor Then
               Send($BigSingleHeal)
               Sleep(2505)
            EndIf
            If PixelGetColor($ContinueCheckX, $ContinueCheckY) <> $ContinueCheckColor Then
               Send($BigSingleHeal)
               Sleep(2505)
            EndIf
            If PixelGetColor($ContinueCheckX, $ContinueCheckY) <> $ContinueCheckColor Then
               Send($SmallGroupHeal)
               Sleep(2505)
            EndIf
            If PixelGetColor($ContinueCheckX, $ContinueCheckY) <> $ContinueCheckColor Then
               Send($SmallSingleHeal)
               Sleep(1005)
            EndIf
            If PixelGetColor($ContinueCheckX, $ContinueCheckY) <> $ContinueCheckColor Then
               Send($SmallSingleHeal)
               Sleep(2505)
            EndIf
            If PixelGetColor($ContinueCheckX, $ContinueCheckY) <> $ContinueCheckColor Then
               Send($BigGroupHeal)
               Sleep(1005)
            EndIf
         WEnd
      Case Else
   EndSelect
WEnd

; Declare Functions
;*************************************************************************************************************
; LootMob() checks for a specified text string and begins to make the Pocket Healer look downwards, Then it
; Will move the mouse to the following coordinates and send an autoloot command key
; *** YOU MUST BIND YOUR AUTOLOOT FUNCTION TO THE PERIOD [.] KEY IN ORDER FOR THIS TO WORK
; *** YOU MAY USE ANOTHER KEY, BUT YOU WILL HAVE TO CHANGE EACH OF THE SEND COMMANDS TO YOUR HOTKEY
;
; This is extremely sloppy and doesn't work as well as I want it to, but this way is functional, just a little
; Slow
Func LootMob()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Loot" Then
      MouseClickDrag("right",400,200,800,600,10)
      Sleep (1000)
      Opt("SendKeyDownDelay", 15)
      MouseMove(550,400,2)
      Send(".")
      MouseMove(550,460,2)
      Send(".")
      MouseMove(640,480,2)
      Send(".")
      MouseMove(700,460,2)
      Send(".")
      MouseMove(700,400,2)
      Send(".")
      MouseMove(700,350,2)
      Send(".")
      MouseMove(640,325,2)
      Send(".")
      ;-------------------
      MouseMove(640,250,2)
      Send(".")
      MouseMove(500,250,2)
      Send(".")
      MouseMove(500,395,2)
      Send(".")
      MouseMove(480,525,2)
      Send(".")
      MouseMove(640,525,2)
      Send(".")
      MouseMove(840,525,2)
      Send(".")
      MouseMove(840,400,2)
      Send(".")
      MouseMove(840,250,2)
      Send(".")
      Target_Follow()
      Send("{ENTER}/f  Done{ENTER}")
   EndIf
EndFunc
;*************************************************************************************************************
; AssistMovenClick() is no longer used at this point, sending [SHIFT]+[F2} is better streamlined
Func AssistMovenClick()
   MouseMove ($CombatAssistX,$CombatAssistY,0)
   Sleep (500)
   MouseClick ("left", $CombatAssistX,$CombatAssistY, 2, 2)
EndFunc
;*************************************************************************************************************
; CombatAssist() Checks for a specified text string and then calls on Click Assist (a function used in battle
; grounds (skirmishes)).  From there it begins to send out keyboard commands to trigger your Pocket Healer's
; Tactical Combat abilities.
Func CombatAssist()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": am" Then
      ClickAssist()
      Send ($AssistCommander)
      Send ("{ENTER}/f  Assisting{ENTER}")
      Sleep (1000)
      Send ($Cry1_1)
      Sleep (2000)
      Send ($Cry1_2)
      Sleep (2000)
      Send ($Ballad1_1)
      Sleep (2000)
      Send ($Ballad1_2)
      Sleep (2000)
      Send ($Ballad1_3)
      Sleep (2000)
      Send ($Ballad2_1)
      Sleep (2000)
      Send ($Ballad2_2)
      Sleep (2000)
      Send ($Ballad1_1)
      Sleep (2000)
      Send ($Ballad1_2)
      Sleep (2000)
      Send ($Ballad1_3)
      Sleep (500)
      Target_Follow()
   EndIf
EndFunc
;*************************************************************************************************************

;*************************************************************************************************************
; ClickAssist() Checks for a specified text string and then orders the Pocket Healer to command her Soldier to
; Assist you in combat.  Then it returns to following you and healing you.
Func ClickAssist()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Assist" Then
      Send ($AssistCommander)
      Send ("^9")
      Sleep(500)
      Target_Follow()
   EndIf
EndFunc
;*************************************************************************************************************
; CheckHealToggle_On() Checks for specified text string and changes the value of $HealToggle  from 0  to 1 if  it
; see it.  If it sees this change in the Big Loop, then it will allow the Healing Check and  Continue  Healing
; Loops to proceed.
Func CheckHealToggle_On()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Healing on" Then
      $HealToggle = 1
      Send("{ENTER}/f  Healing Toggled On{ENTER}")
   EndIf
EndFunc   ;==>CheckHealToggle
;*************************************************************************************************************
; CheckHealToggle_Off() Checks for specified text string and changes the value of $HealToggle  from 1  to 0 if  it
; see it.  If it sees this change in the Big Loop, it will stop all healing.
Func CheckHealToggle_Off()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Healing off" Then
      $HealToggle = 0
      Send("{ENTER}/f  Healing Toggled Off{ENTER}")
   EndIf
EndFunc   ;==>CheckHealToggle
;*************************************************************************************************************
; Eat_Meal() Checks for specified text string and sends the keyboard shortcut to eat food that has been
; quickslotted @ that shortcut location
Func Eat_Meal()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Eat" Then
      Send($EatFood)
      Sleep(1005)
      Send("{ENTER}/f  Done Eating{ENTER}")
   EndIf
EndFunc   ;==>Eat_Meal
;*************************************************************************************************************
; Remove_Fear() Checks for specified text string and sends the keyboard shortcut to remove fear from your
; Commanding Character quickslotted @ that shortcut location
Func Remove_Fear()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Remove Fear" Then
      MouseClick("left", $CharClickX, $CharClickY, 3, 2)
      Send($RemoveFear)
      Sleep(3005)
      Send("{ENTER}/f  Done Casting{ENTER}")
   EndIf
EndFunc   ;==>Remove_Fear
;*************************************************************************************************************
; Mount_Unmount() Checks for a specified text string and sends the keyboard shortcut to mount or unmount
; your horse.  upon mounting, it will then target your commanding character and /follow them
Func Mount_Unmount()
   ;If $LastLine = "[Fellowship] Kethla: Mount" Then
    If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Mount" Then
      Send($HorseMount)
      Sleep(5000)
      Target_Follow()
      Sleep(1000)
      Send("{ENTER}/f  Done{ENTER}")
   EndIf
EndFunc   ;==>Mount_Unmount
;*************************************************************************************************************
; Call_Soldier() Checks for a specified text string and sends the keyboard shortcut to call your skirmish
; Soldier.
Func Call_Soldier()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Call soldier" Then
      Send($CallSoldier)
      Sleep(1005)
      Send("{ENTER}/f  Soldier called{ENTER}")
   EndIf
EndFunc   ;==>Call_Soldier
;*************************************************************************************************************
; Ask_Follow() Checks for a specified text string and sets the bot to follow the Commanding Character
Func Ask_Follow()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Follow me" Then
      MouseMove ($CharClickX, $CharClickY,0)
      MouseClick("left", $CharClickX, $CharClickY, 3, 2)
      Sleep(500)
      Send("{ENTER}/follow{ENTER}")
      Sleep(1000)
      Send("{ENTER}/f  Following you now{ENTER}")
   EndIf
EndFunc   ;==>Ask_Follow
;*************************************************************************************************************
; Target_Follow() Automatically Targets your commanding character and follows them, this function does not use
; a log check or keyboard command, it is called from other functions or the script itself
Func Target_Follow()
   MouseMove ($CharClickX,$CharClickY,0)
   MouseClick("left", $CharClickX, $CharClickY, 2, 2)
   Sleep(500)
   Send("{ENTER}/follow{ENTER}")
EndFunc   ;==>Target_Follow
;*************************************************************************************************************
; Prepare_Battle() Checks for a specified text string and beings preperation for battle in a Skirmish instance
; it should ONLY be used in a Skirmish, although it can be used outside, it simply won't call your Skirmish
; Soldier
Func Prepare_Battle()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Prepare for battle" Then
      Send($CallSoldier)
      Sleep(1005)
      Send($EatFood)
      Sleep(1005)
      ;Send($GroupBuff)
      Sleep(5005)
      Target_Follow()
      Sleep(1000)
      Send("{ENTER}/f  Battle Ready{ENTER}")
   EndIf
EndFunc   ;==>Prepare_Battle
;*************************************************************************************************************
; Exit_Script() Checks for a specfied text string and if the arguement is satisfied, it will end the script
; from running period.  This does not pause features, IT KILLS THE APPLICATION RUNNING IN THE SYSTEM TRAY!!
; You must "re-run" the script if you would like to turn it on again.
Func Exit_Script()
   If $LastLine = "[" & $LoggedChatTab & "] " & $CommanderName & ": Exit script" Then
      Send("{ENTER}/f  Ending Automation Now{ENTER}")
      Sleep(500)
      Exit
   EndIf
EndFunc   ;==>Exit_Script
;*************************************************************************************************************
; Get the last line of the log, and save that position to avoid parsing the entire log again
Func GetLastLine()
   While 1
      $line = FileReadLine($CurrentLogFile, $CurrentLine)
      If @error = -1 Then ExitLoop
      $CurrentLine = $CurrentLine + 1
   WEnd
   $LastLineNumber = $CurrentLine - 1
   $LastLine = FileReadLine($CurrentLogFile, $LastLineNumber)
EndFunc   ;==>GetLastLine


Last edited by cabledog2468 on May 9th, 2011, 2:53 pm, edited 1 time in total.

Reply with quote
Posted: April 25th, 2011, 9:52 pm
 
cabledog2468

Total Posts: 13
Joined: March 21st, 2010, 8:21 pm
cabledog2468's Reps: 1
User avatar
premium
Not too shabby considering I only downloaded AutoIT3 3 weeks ago, if I do say so myself.

Enjoy it buds!


Reply with quote
Posted: April 28th, 2011, 7:38 am
 
cabledog2468

Total Posts: 13
Joined: March 21st, 2010, 8:21 pm
cabledog2468's Reps: 1
User avatar
premium
I have made a few changes for this bot since I posted it a few days ago, I will be posting the update this evening.


Reply with quote
Posted: April 29th, 2011, 3:08 pm
 
Tault_admin

Total Posts: 29974
Joined: November 9th, 2002, 9:57 am
Tault_admin's Reps: 1444
User avatar
administrator
Mod in Training
Nicely going to grand 1500 tu bucks and move this beast to confirmed. Keep it coming cabledog :)


Reply with quote
Posted: May 9th, 2011, 2:48 pm
 
cabledog2468

Total Posts: 13
Joined: March 21st, 2010, 8:21 pm
cabledog2468's Reps: 1
User avatar
premium
Ok, this version proceeds all other version (like there's only 3 now scoob).

So here's the complete list of functions you get with this one:
1. Turn healing on and off
2. Turn Anti-AFK on and off
3. Turn War Speech on and off
4. Switch instruments when assisting in combat (and changing back after)
5. Skirmish
A. Buffing (calling soldier, eating cooked food)
B. Calling soldier separately if he dies
C. Automatic accept and travel to a skirmish or classic instance
6. Automatic acceptance of Ranger "Guide" abilities (porting from on area to another)
7. Automatic acceptance of Trade requests
8. Automatic healing, spells based on the amount of health lost
9. Commanded to assist in combat
A. While in combat, the PH script will break off and heal if needed
B. While in combat, the PH script will detect if combat has ended and cease fighting.
10. Upon command, the PH will:
A. Follow you
B. Mount or Unmount
C. Eat cooked food, trail food, and or fortifying food (cooked food is the only one setup at this time)
D. Perform a Tale of Battle buff
E. Exit the script

PLEASE READ THE LIMITATIONS, KNOWN ISSUES, AND INSTALLATION INFORMATION IN THE CODE SECTION OF THE AUTOIT SCRIPT ITSELF BEFORE USING!!!!!!!!!!!!!!!!!!!!!!!!!!!!

From here out, the next section is all the chat commands used, and then the script itself, followed by the INI file. You must copy the script into an AU3 file and the INI must be copied to a text document NAMED healbot.ini (case sensitive) and both MUST be copied to your \Documents\The Lord of the Rings Online\ or \My Documents\The Lord of the Rings Online (for Win7 and WinXP users perspectively.

Chat Commands (NOT case sensitive):
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
Anti AFK On
...Turn On Anti AFK mode
Anti AFK Off
...Turn Off Anti AFK mode
Buff Up
...Cast Tale of Battle group buff
am
...Assist me in combat, will begin attacking your target
War Speech On
...Turn on war speech and set the flag on
War Speech Off
...Turn off war speech and set the flag off
Accept
...Accept a trade (from the trade window, not accepting an incoming trade, that is done automatically)
Loot
...Loot a corpse (Corpse must be directly in front, to the left or right or behind to function)
Assist
...Send your soldier to attack my target (skirmish mode only)
Healing On
...Turn on healing mode
Healing Off
...Turn Off healing mode
Eat Cooked
...Eat cooked food
Eat Trail
...Eat trail food (currently not setup)
Eat Fortify
...Eat fortifying food (currently not setup)
Mount
...Mount or unmount your horse
Call Soldier
...Call your soldier (skirmish mode only)
Follow me
...Target and follow me
Prepare for battle
...Calls your soldier, eats cooked food, and targets and follows you (can be used outside of skirmish mode, but it won't call the soldier)
Exit Script
...Exit the script and kill the script process in the icon tray.


Last edited by cabledog2468 on May 9th, 2011, 2:54 pm, edited 1 time in total.

Reply with quote
Posted: May 9th, 2011, 2:50 pm
 
cabledog2468

Total Posts: 13
Joined: March 21st, 2010, 8:21 pm
cabledog2468's Reps: 1
User avatar
premium
Script File (Copy to an au3 file, you can name it whatever)
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
#comments-start
================================================================================================================================================================
Script:         HealBot 6.0
Author:         xX CABLEDOG Xx
Function:      Automated Healer
            Skirmish Assistant
            Combat Assistant
            Misc/Mundane Command Respondant
================================================================================================================================================================
Functionality:   Automated healing based on PixelGetColor checks
            Automated "Guide to" accepts
            Automated Trade accepts
            Automated Skirmish Travel
            Automated Fellowship Manuever Respondant
            Follow/Mount/Eat Based on Chat Commands
            Buff/Assist in Combat or Skirmish/looting Based on Chat Commands
            Anti-Afk Function based on Chat Command (Sets a Toggle Flag)
            Automated Respondant to Chat Commands based on Fellowship Chat Logging
================================================================================================================================================================
Purpose:      To Automate assistance via healing and misc functionality using a seperate account and a seperate computer.
================================================================================================================================================================
Limitations:   Limitations based on limitations of the scripting language, IE, a PixelGetColor checks for a very specific
            value at a specific location, if anything covers or blocks that specific area in any way, it creates a "FALSE"
            for that specific arguement, thus triggering (or not triggering) a specified function.  A great example of this
            would be the healing functions (which can be toggled on and off via chat command).  This function checks a certain
            spot of your "commanders" health, if something covers that spot (a loading screen, for example), the script sees
            something other than what it is told to look for, thus triggering a set of healing spells fired off as soon as
            the loading screen is gone.  I classify this as a Limitation of the script, instead of a known issue.
================================================================================================================================================================
Known Issues:   Asside from the Limitations listed above, known issues are:
            1. Occasionally, coordinates and values become invalid, and cause certain functions to fire over and over again, or
               not work at all.  When this happens, the only way to repair this is to use the Windows Info Tool included with
               AutoIT3 to create new values to replace the old ones.  I've created a variable function to "move" the LOTRO window
               to the same location every time to minimalize this issue, however, I've noticed that on occasion, I am still seeing
               the "Fellowship Chat Tab" X and Y still becoming invalid (the script won't click the right tab, Fellowship Chat Logging
               never turns on, and all chat commands will not function at all).
            2. Occasionally, the loot function will not work properly, or work very slowly.  It is functioning properly, actually,
               but when small corpses are to be looted, and the commanding character is standing too close, the pocket healer will
               not loot the corpse.  To avoid this, if you see you are about to loot a small corpse (IE a badger or a bat), simply
               side step the pocket healer to the left or right and loot it again (if you don't manually loot it), and the end of
               the loot function, it will automatically target you and follow you.
            3. For some reason, I don't seem to be able to stack variables twice.  The idea was to have the $LoggedChatTab and the
               $CCCommandersName in one variable to keep from having to type it over and over again on the If Statements.  This does
               not work, unfortunately, but it will work as long as I type the information out.  Change Line 534 to match your
               information for now and it will work fine.  I might return to the old way of parsing the log, if I do, things will
               change slightly.
            4. In the Anti-Afk functions, I was trying to select a random thing to send when the time limit of 1 minute was up.
               This was another failed thing... if you can do it, please post the updated portion of the script so I can add it
               to the main bot, until then, it will wait until 60000ms (1 minute) has passed and "salute" what ever is targeted
               at the time.  Not as flashy as I wanted, but it is 100% functional.
================================================================================================================================================================
Installation:   The .INI File as well as the script function best when they reside in the
            Documents and Settings\YOURUSERNAMEHERE\My Documents\Lord Of the Rings Online\        Directory for WindowsXP, or the
            Users\YOURUSERNAMEHERE\Documents\Lord of the Rings Online\                       Directory for Windows7
            This is also where your chat log will be created from within the game.

            You must make several changes to the game itself for proper functionality as well:
            1. You must set the program to run in a windowed mode of your choosing (In Graphic Options).
            2. You must change the Vitals bar from the actual values to a percentage value (in UI Options).
            3. You must bind the auto-loot key to the [.] (period) key (or change this value in the INI file to your key).
            4. You must create a chat tab labeled "Fellowship" and set the chat filters to Fellowship Chat and Combat Events (again, or
               change these values in the INI file to ones of your choosing).
            5. You "should" change your toolbars to match my configuration, -*OR*- you will have to change all my setup values in the INI
               to match your settings.

            You will also have to setup the INI file by using the Windows Info Tool that comes with AutoIT3:
            1. These values include ANY X or Y coordinate value (Except the LootMatrix values).
               **NOTE:  I use different spots to check morale at different points to descern what healing spell should be sent first,
                      See the note for Color Values as well.
            2. Any color value (based on your X/Y coordinates)
               **NOTE:  Please pay EXTRA careful attention to things like health (morale).  Just because the value in the Windows Info
                        Tool tell you the color at 522,105 is equal to 0x28D00D DOES NOT MEAN that you will find color 0x28D00D at
                     coordinates 523, 105 or 522, 106.  Because the Morale bar in LOTRO is graphically designed to give a three
                     dimensional feel on a flat object (using shading), The color values can and sometimes will be different, even
                     if you are holding on the same Y plane and moving your checks left and right on the X plane.  I found this out
                     when I decided to streamline my healing functions to send appropriate healing based on the amount of health
                     lost, the end result was having a healing spell constantly fire.
                     My script uses the same color value at each check position, but, I have checked each coordinate to verify that
                     it matched the same color value I chose.  You may have to use different color values.
               **SIDE THOUGHT:   I also modified my UI (using the existing options in LOTRO, nothing 3rd Party) to increase the scale
                            of my Fellowship List Pane.  You do not have to do the same, but when checking health it is preferable
                           to check the health from the Fellowship List Pane because you might have the bot assist you in combat, if
                           you do, healing spells will fire off, because the same place you are checking for healing no longer applies
                           to the heal-ee anymore because it is replaced by the thing you are fighting.
            3. You will need to change name values for your Commanding Character and your Pocket Healer, along with chat tab information (if
               you choose not to use my setup).  This goes for the HotKey setups, and you can even change your Chat Commands, if you choose
               not to use what I setup for myself.
               **NOTE:   When making changes to this information, remember several things:
                      A. Hotkey information MUST reside within " " (quotes)
                     B. Hotkey Information MUST have the appropriate proclaimation (+ = Shift, ^ = Control, ! = Alt) if applicable.
                     C. Timer, Coordinate, and Color Values work fine within quotes or out of them, my INI file does not include this
                        information in quotes.
                     D. Chat Commands or Combat Messages must also reside within " " (quotes)

            Once this information is setup and completed, you should test your bot in a low level area for functionality and make changes to
            Coodinate and Color information as needed.  I will only warn one thing, it is a virtual PAIN IN THE !@#$%^&* to get the coordinates and
            color information for the STUPID Fellowship Manuever thing, at least it was for me... Using any other program, you could use the
            Window Info Tool's hotkey to freeze the information when you have it, but NOT LOTRO, because those bastages decided to lock ALL
            the keys for usage IN LOTRO and you can't bind ANY OF THEM to send commands OUTSIDE of LOTRO.  The easiest way to change these
            values (I've found) is to hunt Hoars in KingsFell, or run a Skirmish about 10 to 15 levels below your level.  At least that way you
            don't have a great chance of dying just to get the coordinates.  But man, once you have those suckers, it is an AWESOME thing!
================================================================================================================================================================
#comments-end

#comments-start
*****CHANGE LOG******
CHANGE LOG 042511
   Added a Pause command to toggle healing on and off without exiting the script
   Added more Globals and variables
   Added new functions to handle assistance in Combat
   Added Loot command
   Repaired Chat Log Parser
   Altered some key send delays and general delays to speed things up a tad

Changes 042611
   Added support for the Fellowship Manuevers while assisting in combat.  No support for While Healing yet
   Added support for when a ranger ports (guides) to an area, automatically click yes

Changes 042711
   Added Join Skirmish automatically
   Added Accept Trade feature
      -Because of the Ranger Port function, she automatically starts trades (unexpected and welcomed)
   Stream lined and sexified looting function

Changes 050911
   Performed script re-write and overhaul
      Most of of the functions were copied over from the older script
   Added inclusion of an INI file to make it more convenient to change variables
   Added Anti-Afk function and fellowship Chat command
   Re-wrote combat assistance function to break combat and heal if it is a really rough fight
      Also stops combat if combat is done, instead of continuing
**      Also the PH will switch to drums for maximum damage and change back to a Theorbo,
        Of course, this is my current setup, you may not use either, in which case you might
        want to place a ";" in fron of those functions in the PerformCommandChecks() to prevent
        something from firing when it's not needed
   Added Support for War Speech toggle on and off
      Certain combat cries and ballads will NOT fire unless War Speech is turned on.
   Re-wrote healing function to choose the best spell for the best time.  So far it works great
      Possible issue, it doesn't really fire the group spells as often as I would have thought it would
        One possible reason for this is that the PH puts you before it's own health, and it is possible that
        it is casting a healing spell on you and that by the time it's done and re-checks health, it's health
        is past the point of needing to cast the group heal.
   Fixed a few spelling mistakes here and there that were bugging me
   Added a Window re-size variable so that in addition to moving the window to a specific spot each time, it would also be the
      same size each time too, hopefully to avoid causing coordinates becoming invalid and not functioning right

****WISH LIST UPDATED****
1.      Would still like to include a GUI to make it even easier to setup certain variables in the INI file.
2.      Still unable to get the Check4Pinwheel() function to fire properly.  I don't know why.
3.      Been kicking around the idea of having an automatic (or chat commanded) quest updater, something that
      would allow you to move your quest along automatically, but I haven't formulated a decent way to do this
      yet, and then there's always the "choose" a reward that I'd have to get around.
#comments-end


Reply with quote
Posted: May 9th, 2011, 2:51 pm
 
cabledog2468

Total Posts: 13
Joined: March 21st, 2010, 8:21 pm
cabledog2468's Reps: 1
User avatar
premium
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
;========================================
;== Begin Global Variable Declarations ==
;========================================
Global $LastLine
Global $line
Global $CurrentLogFile
Global $CurrentLine
Global $NextToLastLine
Global $NextToLastLineNO
Global $SecondToLastLine
Global $SecondToLastLineNO
Global $ThirdToLastLine
Global $ThirdToLastLineNO
Global $FourthToLastLine
Global $FourthToLastLineNO
Global $FifthToLastLine
Global $FifthToLastLineNO
Global $LastLineNumber
Global $LoggedChatTab
Global $GameName
Global $PathToLog_INI
Global $CurrentINIFile
Global $WinPOSx
Global $WinPOSy
Global $WinSizeX
Global $WinSizeY
Global $LoggedTabX
Global $LoggedTabY
Global $LogLineInfo
Global $CommanderName
Global $CCMoraleCheckY
Global $CCMoraleFullX
Global $CCMoraleSmallX
Global $CCMoraleMedX
Global $CCMoraleBigX
Global $CCCombatWinMsg
Global $CCMoraleCheckColor
Global $CCCharClickX
Global $CCCharClickY
Global $PHName
Global $PHSelectX
Global $PHSelectY
Global $PHMoraleCheckColor
Global $PHMoraleCheckY
Global $PHMoraleSmallX
Global $PHMoraleBigX
Global $PHCombatWinMsg
Global $PHInCombatMsg
Global $PHCombatCheckX
Global $PHCombatCheckY
Global $PHCombatCheckColor
Global $PHCombatCheckColorN
Global $PHLootMatrixUX
Global $PHLootMatrixUY
Global $PHLootMatrixLX
Global $PHLootMatrixLY
Global $PHLootBindKey
Global $PHAntiAFK_1
Global $PHAntiAFK_2
Global $PHAntiAFK_3
Global $PHAntiAFK_4
Global $TaleOfBattle
Global $WarSpeech
Global $RaiseTheSpirit
Global $BolsterCourage
Global $TriumphantSpirit
Global $InspireFellows
Global $ChordOfSalvation
Global $BalladOfSteel
Global $BalladOfVigour
Global $BalladOfResonance
Global $BalladOfSwiftness
Global $BalladOfBalance
Global $BalladOfTheStout
Global $BalladOfComposure
Global $BalladOfWar
Global $PiercingCry
Global $CallOfTheSecondAge
Global $SongOSoothing
Global $CallOfOrome
Global $EchoesOfBattle
Global $HorseMount
Global $EatFood
Global $CallSoldier
Global $DirectSoldier
Global $AssistCommander
Global $SilvanShadows
Global $ChangeTheorbo
Global $ChangeDrums
Global $EatTrailFood
Global $EatFortifyFood
Global $RaiseTheSpirit_IT
Global $ChordOfSalvation_IT
Global $BolsterCourage_IT
Global $TriumphantSpirit_IT
Global $InspireFellows_IT
Global $RaiseTheSpirit_TI
Global $ChordOfSalvation_TI
Global $BolsterCourage_TI
Global $TriumphantSpirit_TI
Global $InspireFellows_TI
Global $RaiseTheSpirit_DF
Global $ChordOfSalvation_DF
Global $BolsterCourage_DF
Global $TriumphantSpirit_DF
Global $InspireFellows_DF
Global $RaiseTheSpirit_CD
Global $ChordOfSalvation_CD
Global $TriumphantSpirit_CD
Global $InspireFellows_CD
Global $CombatSleepTime
Global $FSManueverX
Global $FSManueverY
Global $FSManueverColor
Global $Check4PinwheelX
Global $Check4PinwheelY
Global $Check4PinwheelColor
Global $Check4PortX
Global $Check4PortY
Global $Check4PortColor
Global $ClickYes4PortX
Global $ClickYes4PortY
Global $AcceptTradeX
Global $AcceptTradeY
Global $Check4SkirmX
Global $Check4SkirmY
Global $Check4SkirmColor
Global $Click4SkirmX
Global $Click4SkirmY
Global $ARFollow
Global $ARTrade
Global $ARCombatEnd
Global $AREatCooked
Global $AREatTrail
Global $AREatFortify
Global $ARBuffing
Global $ARWarSpeechOn
Global $ARWarSpeechOff
Global $ARLooting
Global $ARAssisting
Global $ARMount
Global $ARCallSoldier
Global $ARPrepare4Battle
Global $ARExitScript
Global $ARHealingOn
Global $ARHealingOff
Global $CombatAssist
Global $FCBuffUp
Global $FCWarSpeechOn
Global $FCWarSpeechOff
Global $FCAcceptTrade
Global $FCLootCorpse
Global $FCSkirmishAssist
Global $FCTurnOnHealing
Global $FCTurnOffHealing
Global $FCEatCookedFood
Global $FCEatTrailFood
Global $FCEatFortifyFood
Global $FCMountUnmount
Global $FCCallSoldier
Global $FCFollowMe
Global $FCPrepareforSkirmish
Global $FCExitScript
Global $HealthCheck
Global $HealToggle
Global $WarSpeechOnOff
Global $AntiAFKOnOff
Global $RaiseTheSpirit_YN
Global $TriumphantSpirit_YN
Global $InspireFellows_YN
Global $ChordOfSalvation_YN
Global $InCombat_YN
Global $FCAntiAFKOn
Global $FCAntiAFKOff
Global $ARAntiAFKOn
Global $ARAntiAFKOff
Global $Anti_AFKSelection
Global $Anti_AFKSleep
Global $Anti_AFK_TI
Global $Anti_AFK_DF
Global $Anti_AFK_Response
Global $Anti_AFK_Wait
Global $Anti_AFK_HasFired_0_1

;****************************************************************************************************************************************************************
; [Game Information]
;****************************************************************************************************************************************************************
;$LogLineInfo         = "["&$LoggedChatTab&"]"&$CommanderName&": "

$PathToLog_INI         = "C:\Users\Gerald Maxwell\Documents\The Lord of the Rings Online\"
$CurrentINIFile         = $PathToLog_INI&"healbot.ini"
$GameName            = IniRead ($CurrentINIFile, "Game Information", "GameName", 0)
$WinPOSx            = IniRead ($CurrentINIFile, "Game Information", "GameX", -1)
$WinPOSy            = IniRead ($CurrentINIFile, "Game Information", "GameY", -1)
$WinSizeX            = IniRead ($CurrentINIFile, "Game Information", "WinSizeX", -1)
$WinSizeY            = IniRead ($CurrentINIFile, "Game Information", "WinSizeY", -1)
;$LoggedChatTab         = IniRead ($CurrentINIFile, "Chat Logging Data", "FellowshipTab", 0)
$LoggedChatTab         = "Fellowship"
$LoggedTabX            = IniRead ($CurrentINIFile, "Chat Logging Data", "FellowshipTabX", 0)
$LoggedTabY            = IniRead ($CurrentINIFile, "Chat Logging Data", "FellowshipTabY", 0)
$CurrentLine          = 1
$NextToLastLineNO      = $CurrentLine - 1
$SecondToLastLineNO      = $CurrentLine - 2
$ThirdToLastLineNO      = $CurrentLine - 3
$FourthToLastLineNO      = $CurrentLine - 4
$FifthToLastLineNO      = $CurrentLine - 5
$NextToLastLine         = FileReadLine ($CurrentLogFile, $NextToLastLineNO)
$SecondToLastLine      = FileReadLine ($CurrentLogFile, $SecondToLastLineNO)
$ThirdToLastLine      = FileReadLine ($CurrentLogFile, $ThirdToLastLineNO)
$FourthToLastLine      = FileReadLine ($CurrentLogFile, $FourthToLastLineNO)
$FifthToLastLine      = FileReadLine ($CurrentLogFile, $FifthToLastLineNO)

;****************************************************************************************************************************************************************
; [Commander Character Data]
;****************************************************************************************************************************************************************
;$CCCommanderName      = IniRead ($CurrentINIFile, "Commander Character Data", "Name", 0)
$CCCommanderName      = "Kethla"
$CCMoraleCheckY         = IniRead ($CurrentINIFile, "Commander Character Data", "MoraleCheckY", 0)
$CCMoraleFullX         = IniRead ($CurrentINIFile, "Commander Character Data", "MoraleFullX", 0)
$CCMoraleSmallX         = IniRead ($CurrentINIFile, "Commander Character Data", "MoraleSmallX", 0)
$CCMoraleMedX         = IniRead ($CurrentINIFile, "Commander Character Data", "MoraleMedX", 0)
$CCMoraleBigX         = IniRead ($CurrentINIFile, "Commander Character Data", "MoraleBigX", 0)
$CCMoraleCheckColor      = IniRead ($CurrentINIFile, "Commander Character Data", "MoraleCheckColor", 0)
$CCCharClickX         = IniRead ($CurrentINIFile, "Commander Character Data", "SelectX", 0)
$CCCharClickY         = IniRead ($CurrentINIFile, "Commander Character Data", "SelectY", 0)
$CCCombatWinMsg         = IniRead ($CurrentINIFile, "Commander Character Data", "CombatWinMsg", 0)

;****************************************************************************************************************************************************************
; [Pocket Healer Data]
;****************************************************************************************************************************************************************
$PHName               = IniRead ($CurrentINIFile, "Pocket Healer Data", "Name", 0)
$PHSelectX            = IniRead ($CurrentINIFile, "Pocket Healer Data", "SelectX", 0)
$PHSelectY            = IniRead ($CurrentINIFile, "Pocket Healer Data", "SelectY", 0)
$PHMoraleCheckColor      = IniRead ($CurrentINIFile, "Pocket Healer Data", "MoraleCheckColor", 0)
$PHMoraleCheckY         = IniRead ($CurrentINIFile, "Pocket Healer Data", "MoraleCheckY", 0)
$PHMoraleSmallX         = IniRead ($CurrentINIFile, "Pocket Healer Data", "MoraleSmallX", 0)
$PHMoraleBigX         = IniRead ($CurrentINIFile, "Pocket Healer Data", "MoraleBigX", 0)
$PHCombatWinMsg         = IniRead ($CurrentINIFile, "Pocket Healer Data", "CombatWinMsg", 0)
$PHInCombatMsg         = IniRead ($CurrentINIFile, "Pocket Healer Data", "InCombatMsg", 0)
$PHCombatCheckX         = IniRead ($CurrentINIFile, "Pocket Healer Data", "CombatCheckX", 0)
$PHCombatCheckY         = IniRead ($CurrentINIFile, "Pocket Healer Data", "CombatCheckY", 0)
$PHCombatCheckColor      = IniRead ($CurrentINIFile, "Pocket Healer Data", "CombatCheckColor", 0)
$PHCombatCheckColorN   = IniRead ($CurrentINIFile, "Pocket Healer Data", "CombatCheckColorN", 0)
$PHLootMatrixUX         = IniRead ($CurrentINIFile, "Pocket Healer Data", "LootMatrixUX", 0)
$PHLootMatrixUY         = IniRead ($CurrentINIFile, "Pocket Healer Data", "LootMatrixUY", 0)
$PHLootMatrixLX         = IniRead ($CurrentINIFile, "Pocket Healer Data", "LootMatrixLX", 0)
$PHLootMatrixLY         = IniRead ($CurrentINIFile, "Pocket Healer Data", "LootMatrixLY", 0)
$PHLootBindKey         = IniRead ($CurrentINIFile, "Pocket Healer Data", "LootBindKey", 0)
$PHAntiAFK_1         = IniRead ($CurrentINIFile, "Pocket Healer Data", "AntiAFK_1", 0)
$PHAntiAFK_2         = IniRead ($CurrentINIFile, "Pocket Healer Data", "AntiAFK_2", 0)
$PHAntiAFK_3         = IniRead ($CurrentINIFile, "Pocket Healer Data", "AntiAFK_3", 0)
$PHAntiAFK_4         = IniRead ($CurrentINIFile, "Pocket Healer Data", "AntiAFK_4", 0)

;****************************************************************************************************************************************************************
; [HotKey Data]
;****************************************************************************************************************************************************************
$TaleOfBattle         = IniRead ($CurrentINIFile, "HotKey Data", "TaleOfBattle", 0)
$WarSpeech            = IniRead ($CurrentINIFile, "HotKey Data", "WarSpeech", 0)
$RaiseTheSpirit         = IniRead ($CurrentINIFile, "HotKey Data", "RaiseTheSpirit", 0)
$BolsterCourage         = IniRead ($CurrentINIFile, "HotKey Data", "BolsterCourage", 0)
$TriumphantSpirit      = IniRead ($CurrentINIFile, "HotKey Data", "TriumphantSpirit", 0)
$InspireFellows         = IniRead ($CurrentINIFile, "HotKey Data", "InspireFellows", 0)
$ChordOfSalvation      = IniRead ($CurrentINIFile, "HotKey Data", "ChordofSalvation", 0)
$BalladOfSteel         = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfSteel", 0)
$BalladOfVigour         = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfVigour", 0)
$BalladOfResonance      = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfResonance", 0)
$BalladOfSwiftness      = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfSwiftness", 0)
$BalladOfBalance      = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfBallance", 0)
$BalladOfTheStout      = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfTheStout", 0)
$BalladOfComposure      = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfComposure", 0)
$BalladOfWar         = IniRead ($CurrentINIFile, "HotKey Data", "BalladOfWar", 0)
$PiercingCry         = IniRead ($CurrentINIFile, "HotKey Data", "PiercingCry", 0)
$CallOfTheSecondAge      = IniRead ($CurrentINIFile, "HotKey Data", "CallOfTheSecondAge", 0)
$SongOSoothing         = IniRead ($CurrentINIFile, "HotKey Data", "SongOfSoothing", 0)
$CallOfOrome         = IniRead ($CurrentINIFile, "HotKey Data", "CallOfOrome", 0)
$EchoesOfBattle         = IniRead ($CurrentINIFile, "HotKey Data", "EchoesOfBattle", 0)
$HorseMount            = IniRead ($CurrentINIFile, "HotKey Data", "HorseMount", 0)
$EatCookedFood         = IniRead ($CurrentINIFile, "HotKey Data", "EatCookedFood", 0)
$EatTrailFood         = IniRead ($CurrentINIFile, "HotKey Data", "EatTrailFood", 0)
$EatFortifyFood         = IniRead ($CurrentINIFile, "HotKey Data", "EatFortifyFood", 0)
$CallSoldier         = IniRead ($CurrentINIFile, "HotKey Data", "CallSoldier", 0)
$DirectSoldier         = IniRead ($CurrentINIFile, "HotKey Data", "DirectSoldier", 0)
$AssistCommander      = IniRead ($CurrentINIFile, "HotKey Data", "AssistCommander", 0)
$SilvanShadows         = IniRead ($CurrentINIFile, "HotKey Data", "SilvanShadows", 0)
$ChangeTheorbo         = IniRead ($CurrentINIFile, "HotKey Data", "ChangeTheorbo", 0)
$ChangeDrums         = IniRead ($CurrentINIFile, "HotKey Data", "ChangeDrums", 0)

;****************************************************************************************************************************************************************
; [Spell Induction And Cooldown Data]
;****************************************************************************************************************************************************************
$RaiseTheSpirit_IT      = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "RaiseTheSpirit_IT", 0)
$ChordOfSalvation_IT   = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "ChordOfSalvation_IT", 0)
$BolsterCourage_IT      = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "BolsterCourage_IT", 0)
$TriumphantSpirit_IT   = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "TriumphantSpirit_IT", 0)
$InspireFellows_IT      = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "InspireFellows_IT", 0)
$RaiseTheSpirit_CD      = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "RaiseTheSpirit_CD", 0)
$ChordOfSalvation_CD   = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "ChordOfSalvation_CD", 0)
$TriumphantSpirit_CD   = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "TriumphantSpirit_CD", 0)
$InspireFellows_CD      = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "InspireFellows_CD", 0)
$CombatSleepTime      = IniRead ($CurrentINIFile, "Spell Induction And Cooldown Data", "CombatSleepTime", 0)

;****************************************************************************************************************************************************************
; [Fellowship Data]
;****************************************************************************************************************************************************************
$FSManueverX         = IniRead ($CurrentINIFile, "Fellowship Data", "FSManueverX", 0)
$FSManueverY         = IniRead ($CurrentINIFile, "Fellowship Data", "FSManueverY", 0)
$FSManueverColor      = IniRead ($CurrentINIFile, "Fellowship Data", "FSManueverColor", 0)
$Check4PinwheelX      = IniRead ($CurrentINIFile, "Fellowship Data", "Check4PinwheelX", 0)
$Check4PinwheelY      = IniRead ($CurrentINIFile, "Fellowship Data", "Check4PinwheelY", 0)
$Check4PinwheelColor   = IniRead ($CurrentINIFile, "Fellowship Data", "Check4PinwheelColor", 0)
$Check4PortX         = IniRead ($CurrentINIFile, "Fellowship Data", "Check4PortX", 0)
$Check4PortY         = IniRead ($CurrentINIFile, "Fellowship Data", "Check4PortY", 0)
$Check4PortColor      = IniRead ($CurrentINIFile, "Fellowship Data", "Check4portColor", 0)
$ClickYes4PortX         = IniRead ($CurrentINIFile, "Fellowship Data", "ClickYes4PortX", 0)
$ClickYes4PortY         = IniRead ($CurrentINIFile, "Fellowship Data", "ClickYes4PortY", 0)
$AcceptTradeX         = IniRead ($CurrentINIFile, "Fellowship Data", "AcceptTradeX", 0)
$AcceptTradeY         = IniRead ($CurrentINIFile, "Fellowship Data", "AcceptTradeY", 0)
$Check4SkirmX         = IniRead ($CurrentINIFile, "Fellowship Data", "Check4SkirmX", 0)
$Check4SkirmY         = IniRead ($CurrentINIFile, "Fellowship Data", "Check4SkirmY", 0)
$Check4SkirmColor      = IniRead ($CurrentINIFile, "Fellowship Data", "Check4SkirmColor", 0)
$Click4SkirmX         = IniRead ($CurrentINIFile, "Fellowship Data", "Click4SkirmX", 0)
$Click4SkirmY         = IniRead ($CurrentINIFile, "Fellowship Data", "Click4SkirmY", 0)

;****************************************************************************************************************************************************************
; [Automated Responses]
;****************************************************************************************************************************************************************
$ARHealingOn         = IniRead ($CurrentINIFile, "Automated Responses", "ARHealingOn", 0)
$ARHealingOff         = IniRead ($CurrentINIFile, "Automated Responses", "ARHealingOff", 0)
$ARFollow            = IniRead ($CurrentINIFile, "Automated Responses", "ARFollow", 0)
$ARTrade            = IniRead ($CurrentINIFile, "Automated Responses", "ARTrade", 0)
$ARCombatEnd         = IniRead ($CurrentINIFile, "Automated Responses", "ARCombatEnd", 0)
$AREatCooked         = IniRead ($CurrentINIFile, "Automated Responses", "AREatCooked", 0)
$AREatTrail            = IniRead ($CurrentINIFile, "Automated Responses", "AREatTrail", 0)
$AREatFortify         = IniRead ($CurrentINIFile, "Automated Responses", "AREatFortify", 0)
$ARBuffing            = IniRead ($CurrentINIFile, "Automated Responses", "ARBuffing", 0)
$ARWarSpeechOn         = IniRead ($CurrentINIFile, "Automated Responses", "ARWarSpeechOn", 0)
$ARWarSpeechOff         = IniRead ($CurrentINIFile, "Automated Responses", "ARWarSpeechOff", 0)
$ARLooting            = IniRead ($CurrentINIFile, "Automated Responses", "ARLooting", 0)
$ARAssisting         = IniRead ($CurrentINIFile, "Automated Responses", "ARAssisting", 0)
$ARMount            = IniRead ($CurrentINIFile, "Automated Responses", "ARMount", 0)
$ARCallSoldier         = IniRead ($CurrentINIFile, "Automated Responses", "ARCallSoldier", 0)
$ARPrepare4Battle      = IniRead ($CurrentINIFile, "Automated Responses", "ARPrepare4Battle", 0)
$ARExitScript         = IniRead ($CurrentINIFile, "Automated Responses", "ARExitScript", 0)
$ARAntiAFKOn         = IniRead ($CurrentINIFile, "Automated Responses", "ARAntiAFKOn", 0)
$ARAntiAFKOff         = IniRead ($CurrentINIFile, "Automated Responses", "ARAntiAFKOff", 0)

;****************************************************************************************************************************************************************
; [Chat Log Commands]
;****************************************************************************************************************************************************************
$FCBuffUp            = IniRead ($CurrentINIFile, "Chat Log Commands", "BuffUp", 0)
$FCCombatAssist         = IniRead ($CurrentINIFile, "Chat Log Commands", "CombatAssist", 0)
$FCWarSpeechOn         = IniRead ($CurrentINIFile, "Chat Log Commands", "WarSpeechOn", 0)
$FCWarSpeechOff         = IniRead ($CurrentINIFile, "Chat Log Commands", "WarSpeechOff", 0)
$FCAcceptTrade         = IniRead ($CurrentINIFile, "Chat Log Commands", "AcceptTrade", 0)
$FCLootCorpse         = IniRead ($CurrentINIFile, "Chat Log Commands", "LootCorpse", 0)
$FCSkirmishAssist      = IniRead ($CurrentINIFile, "Chat Log Commands", "SkirmishAssist", 0)
$FCTurnOnHealing      = IniRead ($CurrentINIFile, "Chat Log Commands", "TurnOnHealing", 0)
$FCTurnOffHealing      = IniRead ($CurrentINIFile, "Chat Log Commands", "TurnOffHealing", 0)
$FCEatCookedFood      = IniRead ($CurrentINIFile, "Chat Log Commands", "EatCookedFood", 0)
$FCEatTrailFood         = IniRead ($CurrentINIFile, "Chat Log Commands", "EatTrailFood", 0)
$FCEatFortifyFood      = IniRead ($CurrentINIFile, "Chat Log Commands", "EatFortifyFood", 0)
$FCMountUnmount         = IniRead ($CurrentINIFile, "Chat Log Commands", "MountUnmount", 0)
$FCCallSoldier         = IniRead ($CurrentINIFile, "Chat Log Commands", "CallSoldier", 0)
$FCFollowMe            = IniRead ($CurrentINIFile, "Chat Log Commands", "FollowMe", 0)
$FCPrepareforSkirmish   = IniRead ($CurrentINIFile, "Chat Log Commands", "PrepareforSkirmish", 0)
$FCExitScript         = IniRead ($CurrentINIFile, "Chat Log Commands", "ExitScript", 0)
$FCAntiAFKOn         = IniRead ($CurrentINIFile, "Chat Log Commands", "AntiAFKOn", 0)
$FCAntiAFKOff         = IniRead ($CurrentINIFile, "Chat Log Commands", "AntiAFKOff", 0)
;****************************************************************************************************************************************************************
; [Default Toggle Values]
;****************************************************************************************************************************************************************
$Anti_AFKSelection      = 1
$Anti_AFK_Wait         = 5000
$AntiAFKOnOff         = 1               ; 0 Indicates Off, while 1 Indicates On
$InCombat_YN         = 0               ; 0 Indicates No, while 1 Indicates Yes
$HealthCheck         = 0               ; 0 Indicates Full Health, while 6 Indicates needing largest Heal
$HealToggle            = 0               ; 0 Indicates Off, while 1 Indicates On
$WarSpeechOnOff         = 0               ; 0 Indicates Off, while 1 Indicates On
$AntiAFKOnOff         = 0               ; 0 Indicates Off, while 1 Indicates On
$RaiseTheSpirit_YN      = 1               ; 0 Indicates No, while 1 Indicates Yes
$TriumphantSpirit_YN   = 1               ; 0 Indicates No, while 1 Indicates Yes
$InspireFellows_YN      = 1               ; 0 Indicates No, while 1 Indicates Yes
$ChordOfSalvation_YN   = 1               ; 0 Indicates No, while 1 Indicates Yes

; WHEW Why I do declare, that's a lot of !@#$%^&* to declare!  Hopefully, all this organization will make it easier to find and change !@#$%^&* if I need to, otherwise,
; what a monumental pain in the freaking !@#$%^&*!  I have to admit though, it looks nicer than my previous incarnation.
;****************************************************************************************************************************************************************
;****************************************************************************************************************************************************************
;****************************************************************************************************************************************************************

; ====================================
; == Begin Preliminary Script Setup ==
; ====================================

Opt("WinWaitDelay", 0)
Opt("SendKeyDownDelay", 15)
$LogLineInfo         = "[Fellowship] YOURCOMMANDERHERE: "
;$LogLineInfo          = "["&$LoggedChatTab&"]"&$CCCommanderName&": "
Sleep(1000)
$pid    = WinGetProcess($GameName)
WinActivate ($GameName)
WinMove    ($GameName, "", $WinPOSx, $WinPOSy, $WinSizeX, $WinSizeY, 0)
If $pid = -1 Then
   MsgBox(0x40000, "Error", "LOTRO Process not found.  Please Start LOTRO.  Exiting")
   Exit
EndIf
FileDelete ($LoggedChatTab&"_*.txt")
Sleep   (0500)
MouseMove ($LoggedTabX, $LoggedTabY, 0)
MouseClick("left", $LoggedTabX, $LoggedTabY, 3, 2)
Sleep   (0500)
Send   ("{ENTER}/f  Entering Fellowship Chat.{ENTER}")
Sleep   (0500)
Send   ("{ENTER}/Chatlog ON{ENTER}")
Sleep   (0500)
Send   ("{ENTER}/F  Previous log deleted, Fellowship Tab Selected, Current Session logged.{ENTER}")
Sleep   (0500)
;$CurrentLogFile         = $PathToLog_INI&$LoggedChatTab&"_"&@YEAR&@MON&@MDAY&"_1.txt"
$CurrentLogFile         = $LoggedChatTab&"_"&@YEAR&@MON&@MDAY&"_1.txt"
GetLastLine()
PerformCommandChecks()
;****************************************************************************************************************************************************************
;****************************************************************************************************************************************************************
;****************************************************************************************************************************************************************

; ==================================
; == Begin Primary Scripting Loop ==
; ==================================

While 1 = 1
   GetLastLine()
   PerformCommandChecks()
   Select
      Case $HealToggle = 0
         GetLastLine()
         Check4Pinwheel()
         PerformCommandChecks()
         Check4Pinwheel()
      Case $HealToggle = 1
         GetLastLine()
         Check4Pinwheel()
         PerformHealing()
         PerformCommandChecks()
         Check4Pinwheel()
      Case Else
   EndSelect
WEnd

;****************************************************************************************************************************************************************
;****************************************************************************************************************************************************************
;****************************************************************************************************************************************************************

; ================================
; == Begin Function Definitions ==
; ================================

;*************************************************************************************************************
; Anti_AFKSelection() Chooses an Anti-AFK function to perform while in game.  These options are chosen at   **
; random using the AntiAFKSelect() function                                                   **
;*************************************************************************************************************
Func Anti_AFKSelection()
   If $Anti_AFKSelection = 1 Then $Anti_AFK_Response = $PHAntiAFK_1
   If $Anti_AFKSelection = 2 Then $Anti_AFK_Response = $PHAntiAFK_2
   If $Anti_AFKSelection = 3 Then $Anti_AFK_Response = $PHAntiAFK_3
   If $Anti_AFKSelection = 4 Then $Anti_AFK_Response = $PHAntiAFK_4
EndFunc

;*************************************************************************************************************
; AntiAFKSelect() Checks to see if the toggle is on, if it is, it randomly sleeps and randomly chooses an   **
; action to perform while the toggle is on.                                                   **
;*************************************************************************************************************
Func AntiAFKSelect()
   Select
      Case $AntiAFKOnOff = 0

      Case $AntiAFKOnOff = 1
         Select
            Case $Anti_AFK_HasFired_0_1 = 0
               ;$Anti_AFKSelection = (Random(1,4)*1)
               ;If $Anti_AFKSelection = 1 Then Send ($PHAntiAFK_1)
               ;If $Anti_AFKSelection = 2 Then Send ($PHAntiAFK_2)
               ;If $Anti_AFKSelection = 3 Then Send ($PHAntiAFK_3)
               ;If $Anti_AFKSelection = 4 Then Send ($PHAntiAFK_4)
               Send ($PHAntiAFK_2)
               $Anti_AFK_TI = TimerInit()
               $Anti_AFK_HasFired_0_1 = 1
            Case $Anti_AFK_HasFired_0_1 = 1
               $Anti_AFK_Wait = 60000
               $Anti_AFK_DF = TimerDiff($Anti_AFK_TI)
               If $Anti_AFK_DF >= $Anti_AFK_Wait Then
                  $Anti_AFK_HasFired_0_1 = 0
               EndIf
            Case Else
         EndSelect
      Case Else
   EndSelect
EndFunc

;*************************************************************************************************************
; AntiAFKToggle() Checks for a specified text string to know if we need to change the $AntiAFKOnOff from 0  **
; to 1 and back again.                                                                  **
;*************************************************************************************************************
Func AntiAFKToggle_On()
   If $LastLine = $LogLineInfo&$FCAntiAFKOn Then
      $AntiAFKOnOff = 1
      Send ($ARAntiAFKOn)
   EndIf
EndFunc
Func AntiAFKToggle_Off()
   If $LastLine = $LogLineInfo&$FCAntiAFKOff Then
      $AntiAFKOnOff = 0
      Send ($ARAntiAFKOff)
   EndIf
EndFunc

;*************************************************************************************************************
; PerformCommandChecks() Runs through the log to check for any Fellowship chat commands that may have been  **
; sent, and it also check any and all of the automatic PixelGetColor functions                              **
;*************************************************************************************************************
Func PerformCommandChecks()
   BuffUp()
   AntiAFKToggle_On()
   AntiAFKToggle_Off()
   AntiAFKSelect()
   WarSpeechOn()
   WarSpeechOff()
   Check4Port()
   Check4Pinwheel()
   Exit_Script()
   LootMob()
   EatCookedMeal()
   EatTrailMeal()
   EatFortifyMeal()
   Mount_Unmount()
   CheckHealToggle_On()
   CheckHealToggle_Off()
   Check4Port()
   Check4Pinwheel()
   CombatAssist()
   Prepare_Battle()
   Ask_Follow()
   Call_Soldier()
   ClickAssist()
   Check4Skirm()
   AcceptTrade()
   Check4Port()
   Check4Pinwheel()
EndFunc
;*************************************************************************************************************
; Check4Combat() Performs a GetPixelColor check at a specific area of the screen, if the arguement is sated   **
; then it changes the $InCombat_YN toggle from 0 to 1 and vise versa                              **
;*************************************************************************************************************
Func Check4Combat()
   If PixelGetColor ($PHCombatCheckX, $PHCombatCheckY) <> $PHCombatCheckColor Then
   ;   $InCombat_YN = 1
   ;Else
      $InCombat_YN = 0
   EndIf
EndFunc
;*************************************************************************************************************
; CombatAssist() Checks for a specified text string in the log and then commits to attacking.  Right now it **
; does not break combat in favor of healing, but it will cease combat if combat stops.                  **
;*************************************************************************************************************
Func CombatAssist()
   If $LastLine = $LogLineInfo&$FCCombatAssist Then
      $InCombat_YN = 1
      Send ($AssistCommander)
      ChangeDrums()
      Sleep(500)
      DirectSoldier()
      Sleep(1000)
      Send("{NUMPAD0}")
      Check4Combat()
      EchoesOfBattle()
      CallOfOrome()
      CallOfTheSecondAge()
      PiercingCry()
      BalladOfSteel()
      BalladOfVigour()
      BalladOfResonance()
      BalladOfSwiftness()
      BalladOfBalance()
      BalladOfTheStout()
      Check4Combat()
      Target_Follow()
      ChangeThoerbo()
      ;Send ("{ENTER}/F It's Dead Jim!{ENTER}")
   EndIf
   ;If $InCombat_YN = 0 Then
   ;   Send ($ARCombatEnd)
   ;EndIf
EndFunc
;*************************************************************************************************************
; Combat Spells These functions will call upon each of the combat abilities your PH has, and check to see if**
; are still in combat, if you are not, it will stop casting                                       **
;*************************************************************************************************************
Func EchoesOfBattle()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($EchoesOfBattle)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func CallOfOrome()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 And $WarSpeechOnOff = 1 Then
      Send ($CallOfOrome)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func CallOfTheSecondAge()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 And $WarSpeechOnOff = 1 Then
      Send ($CallOfTheSecondAge)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func PiercingCry()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($PiercingCry)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func BalladOfSteel()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($BalladOfSteel)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func BalladOfVigour()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($BalladOfVigour)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func BalladOfResonance()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($BalladOfResonance)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func BalladOfSwiftness()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($BalladOfSwiftness)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func BalladOfBalance()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($BalladOfBalance)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
Func BalladOfTheStout()
   Check4Combat()
   If $InCombat_YN = 0 Then Return
   If $InCombat_YN = 1 Then
      Send ($BalladOfTheStout)
      Sleep($CombatSleepTime)
      PerformHealing()
      Check4Combat()
   EndIf
EndFunc
;*************************************************************************************************************
; CheckFullHealth() Performs a GetPixelColor check at a specific area of the screen, if the if the arguement**
; is false, then it calls upon AssessHealth() so we can send an appropriate heal                     **
; *****Not used right now, placing the PixelGetColor as the Case Select functions better               **
;*************************************************************************************************************
Func CheckFullHealth()
   If PixelGetColor ($CCMoraleFullX, $CCMoraleCheckY) = $CCMoraleCheckColor Then
      $HealthCheck = 0
   Else
      AssessHealth()
   EndIf
EndFunc
;*************************************************************************************************************
; AssessHealth() Performs a PixelGetColor check at several points on the Moral Bar, if the any of the      **
; arguements come back true, then it assings the appropriate flag to $HealthCheck so we can send the right  **
; healing spell                                                                        **
; *****Not used right now, placing the PixelGetColor as the Case Select functions better               **
;*************************************************************************************************************
Func AssessHealth()
   If PixelGetColor ($CCMoraleSmallX,$CCMoraleCheckY)<>$CCMoraleCheckColor Then
      $CheckHealth = 1
   ElseIf PixelGetColor ($CCMoraleMedX,$CCMoraleCheckY)<>$CCMoraleCheckColor Then
      $CheckHealth = 2
   ElseIf PixelGetColor ($CCMoraleBigX,$CCMoraleCheckY)<>$CCMoraleCheckColor Then
      $CheckHealth = 3
   ElseIf PixelGetColor ($CCMoraleSmallX,$CCMoraleCheckY)<>$CCMoraleCheckColor And PixelGetColor ($PHMoraleSmallX, $PHMoraleCheckY) <> $PHMoraleCheckColor Then
      $CheckHealth = 4
   ElseIf PixelGetColor ($CCMoraleBigX,$CCMoraleCheckY)<>$CCMoraleCheckColor And PixelGetColor ($PHMoraleBigX, $PHMoraleCheckY) <> $PHMoraleCheckColor Then
      $CheckHealth = 5
   EndIf
EndFunc
;*************************************************************************************************************
; PerformHealing() Uses the Flag settings from CheckFullHealth() and AssessHealth() to choose which healing **
; spell should be sent at any given time.  The higher the flag value, the heavier the healing spell         **
;*************************************************************************************************************
Func PerformHealing()
   Select
      Case PixelGetColor ($CCMoraleSmallX,$CCMoraleCheckY)<>$CCMoraleCheckColor
         Target()
         BolsterCourage_Cast()
      Case PixelGetColor ($CCMoraleMedX,$CCMoraleCheckY)<>$CCMoraleCheckColor
         Target()
         RaiseTheSpirit_Cast()
      Case PixelGetColor ($CCMoraleBigX,$CCMoraleCheckY)<>$CCMoraleCheckColor
         Target()
         ChordofSalvation_Cast()
      Case PixelGetColor ($CCMoraleSmallX,$CCMoraleCheckY)<>$CCMoraleCheckColor And PixelGetColor ($PHMoraleSmallX, $PHMoraleCheckY) <> $PHMoraleCheckColor
         Target()
         InspireFellows_Cast()
      Case PixelGetColor ($CCMoraleBigX,$CCMoraleCheckY)<>$CCMoraleCheckColor And PixelGetColor ($PHMoraleBigX, $PHMoraleCheckY) <> $PHMoraleCheckColor
         Target()
         TriumphantSpirit_Cast()
      Case Else
   EndSelect
EndFunc
;*************************************************************************************************************
; Healing Functions Below are all the healing spells which will fire by hotkey and sleep for the duration of**
; the Induction timers.                                                                  **
;*************************************************************************************************************
Func BolsterCourage_Cast()
   Send ($BolsterCourage)
   Sleep($BolsterCourage_IT)
EndFunc
Func InspireFellows_Cast()
   Send ($InspireFellows)
   Sleep($InspireFellows_IT)
EndFunc
Func RaiseTheSpirit_Cast()
   Send ($RaiseTheSpirit)
   Sleep($RaiseTheSpirit_IT)
EndFunc
Func ChordofSalvation_Cast()
   Send ($ChordOfSalvation)
   Sleep($ChordOfSalvation_IT)
EndFunc
Func TriumphantSpirit_Cast()
   Send ($TriumphantSpirit)
   Sleep($TriumphantSpirit_IT)
EndFunc
;*************************************************************************************************************
; GetLastLine() Parses the Chat Log and records the last line of the log in $Line.  It also sets a "place"  **
; holder so the entire log doesn't have to be parsed, it will simply start from the last point recorded      **
;*************************************************************************************************************
Func GetLastLine()
   While 1
      $line = FileReadLine($CurrentLogFile, $CurrentLine)
      If @error = -1 Then ExitLoop
      $CurrentLine = $CurrentLine + 1
   WEnd
   $LastLineNumber = $CurrentLine - 1
   $LastLine = FileReadLine($CurrentLogFile, $LastLineNumber)
EndFunc
;*************************************************************************************************************
; Exit_Script() Checks for a specfied text string and if the arguement is satisfied, it will end the script **
; from running period.  This does not pause features, IT KILLS THE APPLICATION RUNNING IN THE SYSTEM TRAY!! **
; You must "re-run" the script if you would like to turn it on again.                              **
;*************************************************************************************************************
Func Exit_Script()
   If $LastLine = $LogLineInfo&$FCExitScript Then
      Send($ARExitScript)
      Sleep(500)
      Exit
   EndIf
EndFunc
;*************************************************************************************************************
; Prepare_Battle() Checks for a specified text string and beings preperation for battle in a Skirmish       **
; instance it should ONLY be used in a Skirmish, although it can be used outside, it simply won't call your **
; Skirmish Soldier                                                                     **
;*************************************************************************************************************
Func Prepare_Battle()
   If $LastLine = $LogLineInfo&$FCPrepareforSkirmish Then
      Send($CallSoldier)
      Sleep(0500)
      Send($EatCookedFood)
      Sleep(0500)
      Target_Follow()
      Sleep(2000)
      Send($ARPrepare4Battle)
   EndIf
EndFunc
;*************************************************************************************************************
; Target() Automatically Targets your commanding character, this function does not use a log check or       **
; keyboard command, it is called from other functions or the script itself                           **
;*************************************************************************************************************
Func Target()
   MouseMove ($CCCharClickX,$CCCharClickY,0)
   MouseClick("left", $CCCharClickX,$CCCharClickY, 2, 0)
EndFunc
;*************************************************************************************************************
; Target_Follow() Automatically Targets your commanding character and follows them, this function does not  **
; use a log check or keyboard command, it is called from other functions or the script itself            **
;*************************************************************************************************************
Func Target_Follow()
   Target()
   Sleep(500)
   Send("{ENTER}/follow{ENTER}")
EndFunc
;*************************************************************************************************************
; Ask_Follow() Checks for a specified text string and sets the bot to follow the Commanding Character      **
;*************************************************************************************************************
Func Ask_Follow()
   If $LastLine = $LogLineInfo&$FCFollowMe Then
      Target_Follow()
      Sleep(0500)
      Send($ARFollow)
   EndIf
EndFunc
;*************************************************************************************************************
; Call_Soldier() Checks for a specified text string and sends the keyboard shortcut to call your skirmish   **
; Soldier.                                                                           **
;*************************************************************************************************************
Func Call_Soldier()
   If $LastLine = $LogLineInfo&$FCCallSoldier Then
      Send($CallSoldier)
      Sleep(0500)
      Send($ARCallSoldier)
   EndIf
EndFunc
;*************************************************************************************************************
; Mount_Unmount() Checks for a specified text string and sends the keyboard shortcut to mount or unmount   **
; your horse.  upon mounting, it will then target your commanding character and /follow them            **
;*************************************************************************************************************
Func Mount_Unmount()
   If $LastLine = $LogLineInfo&$FCMountUnmount Then
      Send($HorseMount)
      Sleep(5000)
      Target_Follow()
      Sleep(0500)
      Send($ARMount)
   EndIf
EndFunc
;*************************************************************************************************************
; Eat_Meal() Checks for specified text string and sends the keyboard shortcut to eat food that has been      **
; quickslotted @ that shortcut location                                                      **
;*************************************************************************************************************
Func EatCookedMeal()
   If $LastLine = $LogLineInfo&$FCEatCookedFood Then
      Send($EatCookedFood)
      Sleep(2505)
      Send($AREatCooked)
   EndIf
EndFunc
;*************************************************************************************************************
; Eat_Meal() Checks for specified text string and sends the keyboard shortcut to eat food that has been      **
; quickslotted @ that shortcut location                                                      **
;*************************************************************************************************************
Func EatTrailMeal()
   If $LastLine = $LogLineInfo&$FCEatTrailFood Then
      Send($EatTrailFood)
      Sleep(2505)
      Send($AREatTrail)
   EndIf
EndFunc
;*************************************************************************************************************
; Eat_Meal() Checks for specified text string and sends the keyboard shortcut to eat food that has been      **
; quickslotted @ that shortcut location                                                      **
;*************************************************************************************************************
Func EatFortifyMeal()
   If $LastLine = $LogLineInfo&$FCEatFortifyFood Then
      Send($EatFortifyFood)
      Sleep(2505)
      Send($AREatFortify)
   EndIf
EndFunc
;*************************************************************************************************************
; CheckHealToggle_On() Checks for specified text string and changes the value of $HealToggle  from 0  to 1  **
; if  it see it.  If it sees this change in the Big Loop, then it will allow the Healing Check and  Continue**
; Healing Loops to proceed.                                                               **
;*************************************************************************************************************
Func CheckHealToggle_On()
   If $LastLine = $LogLineInfo&$FCTurnOnHealing Then
      $HealToggle = 1
      Send($ARHealingOn)
   EndIf
EndFunc
;*************************************************************************************************************
; CheckHealToggle_Off() Checks for specified text string and changes the value of $HealToggle  from 1  to 0 if  it
; see it.  If it sees this change in the Big Loop, it will stop all healing.
;*************************************************************************************************************
Func CheckHealToggle_Off()
   If $LastLine = $LogLineInfo&$FCTurnOffHealing Then
      $HealToggle = 0
      Send($ARHealingOff)
   EndIf
EndFunc
;*************************************************************************************************************
; ClickAssist() Checks for a specified text string and then orders the Pocket Healer to command her Soldier **
; to Assist you in combat.  Then it returns to following you and healing you.                        **
;*************************************************************************************************************
Func DirectSoldier()
   Send ($AssistCommander)
   Send ($DirectSoldier)
   Sleep(500)
EndFunc
;*************************************************************************************************************
; ClickAssist() Checks for a specified text string and then orders the Pocket Healer to command her Soldier **
; to Assist you in combat.  Then it returns to following you and healing you.                        **
;*************************************************************************************************************
Func ClickAssist()
   If $LastLine = $LogLineInfo&$FCSkirmishAssist Then
      DirectSoldier()
      Sleep(500)
      Target_Follow()
      Send ($ARAssisting)
   EndIf
EndFunc
;*************************************************************************************************************
; FIX THIS FUNCTION, MAKE IT WORK PROPERLY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!**
;*************************************************************************************************************
Func Check4Pinwheel()
   If $LastLine = "["&$LoggedChatTab&"] "&$CommanderName&": fm" Then
      MouseMove (880,502,0)
      Sleep (500)
      Mouseclick ("left", 880,502, 2, 0)
      MouseClick ("left", 0,0, 2, 2)
      Send ("{ENTER}/f  Done{ENTER}")
      Target_Follow()
   EndIf
EndFunc
;*************************************************************************************************************
; While assisting in combat, check the coordinates of the screen that the Fellowship Manuever pops up, if we**
; see a red color, then click on it automatically                                             **
;*************************************************************************************************************
Func CheckForManuever()
   If PixelGetColor ($FSManueverX, $FSManueverY) = $FSManueverColor Then
      MouseClick ("left", $FSManueverX, $FSManueverY, 2, 2)
   EndIf
EndFunc
;*************************************************************************************************************
; LootMob() checks for a specified text string and begins to make the Pocket Healer look downwards, Then it **
; Will move the mouse to the following coordinates and send an autoloot command key                     **
; *** YOU MUST BIND YOUR AUTOLOOT FUNCTION TO THE PERIOD [.] KEY IN ORDER FOR THIS TO WORK               **
; *** YOU MAY USE ANOTHER KEY, BUT YOU WILL HAVE TO CHANGE EACH OF THE SEND COMMANDS TO YOUR HOTKEY         **
;*************************************************************************************************************
Func LootMob()
   If $LastLine = $LogLineInfo&$FCLootCorpse Then
      Opt ("SendKeyDownDelay",3000)
      Send("{NUMPAD8}")
      Opt ("SendKeyDownDelay", 15)
      For $X = $PHLootMatrixUX To $PHLootMatrixUY Step -25
         For $Y = $PHLootMatrixLX To $PHLootMatrixLY Step 25
            MouseMove ($X, $Y, 0)
            Send ($PHLootBindKey)
         Next
      Next
      ;Send ("{ENTER}/F  Get Da Paper G!{ENTER}")
      Send("{NUMPAD0}")
      Send ($ARLooting)
      Target_Follow()
   EndIf
EndFunc
;*************************************************************************************************************
; Check4Port() Checks to see if the "Would you like to Port to This location" pane is up, and if it is, it  **
; will automatically click on "YES" so that you don't have to                                    **
;*************************************************************************************************************
Func Check4Port()
   If PixelGetColor ($Check4PortX, $Check4PortY) = $Check4PortColor Then
      MouseMove  ($ClickYes4PortX, $ClickYes4PortY, 0)
      MouseClick ("left", $ClickYes4PortX, $ClickYes4PortY, 2, 2)
   EndIf
EndFunc
;*************************************************************************************************************
; Check4Skirm() Checks to see if a Join Skirmish pane is open and will automatically accept it and travel   **
;*************************************************************************************************************
Func Check4Skirm()
   If PixelGetColor ($Check4SkirmX, $Check4SkirmY) = $Check4SkirmColor Then
      MouseMove ($Click4SkirmX, $Click4SkirmY, 0)
      MouseClick("left", $Click4SkirmX, $Click4SkirmY, 2, 0)
   EndIf
EndFunc
;*************************************************************************************************************
; AcceptTrade() Checks for a specified text string and clicks in the corrisponding spot to accept a trade   **
;*************************************************************************************************************
Func AcceptTrade()
   If $LastLine = $LogLineInfo&$FCAcceptTrade Then
      MouseClick ("left", $AcceptTradeX, $AcceptTradeY, 2, 0)
      Sleep(500)
      Send ("{NUMPAD0}")
      Sleep(500)
      Send ($ARTrade)
   EndIf
EndFunc
;*************************************************************************************************************
; BuffUp() Checks for a specified text string and sends the hotkey for Tale of Battle                  **
;*************************************************************************************************************
Func BuffUp()
   If $LastLine = $LogLineInfo&$FCBuffUp Then
      Send ($TaleOfBattle)
      Sleep(500)
      Send ($ARBuffing)
      Sleep (500)
   EndIf
EndFunc
;*************************************************************************************************************
; WarSpeechOn() Checks for a specified text string and sends the hotkey for War Speech.  It will also turn  **
; it off if called upon again.                                                            **
;*************************************************************************************************************
Func WarSpeechOn()
   If $LastLine = $LogLineInfo&$FCWarSpeechOn Then
      Send ($WarSpeech)
      $WarSpeechOnOff = 1
      Sleep(500)
      Send ($ARWarSpeechOn)
      Sleep (500)
   EndIf
EndFunc
;*************************************************************************************************************
; WarSpeechOff() Checks for a specified text string and sends the hotkey for War Speech.  It will also turn **
; it off if called upon again.                                                            **
;*************************************************************************************************************
Func WarSpeechOff()
   If $LastLine = $LogLineInfo&$FCWarSpeechOff Then
      Send ($WarSpeech)
      $WarSpeechOnOff = 0
      Sleep(500)
      Send ($ARWarSpeechOff)
      Sleep (500)
   EndIf
EndFunc
;*************************************************************************************************************
; ChangeThoerbo() Sends the Hotkey for your Thoerbo to for healing, it is called upon from another Function **
;*************************************************************************************************************
Func ChangeThoerbo()
   Send ($ChangeTheorbo)
   Sleep(500)
EndFunc
;*************************************************************************************************************
; ChangeDrums() Sends the Hotkey for your Drums to for Combat, it is called upon from another Function      **
;*************************************************************************************************************
Func ChangeDrums()
   Send ($ChangeDrums)
   Sleep(500)
EndFunc


Reply with quote
Posted: May 9th, 2011, 2:51 pm
 
cabledog2468

Total Posts: 13
Joined: March 21st, 2010, 8:21 pm
cabledog2468's Reps: 1
User avatar
premium
INI File (Copy to text document, name it healbot.ini all lowercase)
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
[Game Information]
Instruction 1="I've included this, because the name of the game has a tendancie to change.  This will make it a little easier "
Instruction 2="to change instead of skimming lines of code.                                                                   "
GameName="The Lord of the Rings Online™: Siege of Mirkwood™"
Instruction 3="Also, in order to help prevent our found coordinates from becoming invalid, use the Window Info Tool and find  "
Instruction 4="the current window coordinate on screen, enter these values below.  This way the script will always make sure  "
Instruction 5="that the window is at these exact coordinates.
GameX=34
GameY=0
WinSizeX=1297
WinSizeY=734
[Pathing information]
PathToLog="C:\Users\YOURUSERNAMEHERE\Documents\The Lord of the Rings Online\" & $LoggedChatTab & "_" & @YEAR&@MON&@MDAY & "_1.txt"
PathToINI="C:\Users\YOURUSERNAMEHERE\Documents\The Lord of the Rings Online\Healbot.ini"
[Commander Character Data]
Name="YOURCHARACTERNAMEHERE"
SelectX=90
SelectY=90
MoraleCheckColor=0x2AD80D
MoraleCheckY=93
MoraleFullX=268
MoraleSmallX=241
MoraleMedX=230
MoraleBigX=220
CombatWinMsg=$CommanderName & " defeated the"
[Pocket Healer Data]
Name="YOURCHARACTERNAMEHERE"
SelectX=350                           
SelectY=100                           
MoraleCheckColor=0x28D00D
MoraleCheckY=105
MoraleSmallX=522
MoraleBigX=513
CombatWinMsg="Your mighty blow defeated the"
InCombatMsg="You cannot do that in combat"
CombatCheckX=750
CombatCheckY=106
CombatCheckColor=0xFF4D11
CombatCheckColorN=0xDECB0A
Instruction 1="The coordinates for the LootMatrix are about as good as they will ever get, changing these values could result in    "
Instruction 2="unpredictable behavior, that will most likely end with the corpse NOT ever being looted, change at your own risk.    "
LootMatrixUX=775
LootMatrixUY=525
LootMatrixLX=275
LootMatrixLY=525
LootBindKey="."
AntiAFK_1="{ENTER}/Smile{ENTER}"
AntiAFK_2="{ENTER}/Salute{ENTER}"
AntiAFK_3="{ENTER}/F This is taking a long time.{ENTER}"
AntiAFK_4="{ENTER}/F Are we there yet+/{ENTER}"
[Chat Logging Data]
GeneralTab="General"                   
GeneralTabX=
GeneralTabY=
CombatTab="Combat"                   
CombatTabX=
CombatTabY=
FellowshipTab="Fellowship"
FellowshipTabX=295
FellowshipTabY=482
[HotKey Data]
Instruction 1="Hotkey assignment is any number or letter bound to perform function while in game.  If the assignment is proceeded by"
Instruction 2="a special key (IE Control, Alt  or  Shift),  use  the  following  convention: + = Shift, ^ = Control, ! = Alt.  These"
Instruction 3="conventions must proceed the hotkey itself.  Whereas 1 = [1], +1 = [SHIFT]+[1], ^1 = [CTRL]+[1] and !1 = [ALT]+[1]   "
Instruction 4="This information MUST reside within "" (qoutes) to be read and sent via the script.                                  "
TaleOfBattle="+7"
WarSpeech="!="
RaiseTheSpirit="^3"
BolsterCourage="^1"
TriumphantSpirit="^4"
InspireFellows="^2"
ChordOfSalvation="^5"
BalladOfSteel="5"
BalladOfVigour="6"
BalladOfResonance="7"
BalladOfSwiftness="8"
BalladOfBalance="9"
BalladOfTheStout="0"
BalladOfComposure="-"
BalladOfWar="="
PiercingCry="3"
CallOfTheSecondAge="4"
SongOSoothing="!4"
CallOfOrome="2"
EchoesOfBattle="1"
HorseMount="+1"
EatCookedFood="+3"
EatTrailFood=" "
EatFortifyFood=" "
CallSoldier="^8"
DirectSoldier="^9"
AssistCommander="+{F2}"
SilvanShadows="^-"
ChangeTheorbo="+-"
ChangeDrums="+="
[Spell Induction And Cooldown Data]
Instruction 1="IT = Induction Timer, CD = Cooldown Timers.  All time slices are represented in milliseconds, conversions are as follows"
Instruction 2="1000ms = 1s      60000ms = 1m        300000ms = 5m       900000ms = 15m                                                 "
RaiseTheSpirit_IT=1005
ChordOfSalvation_IT=1005
BolsterCourage_IT=2505
TriumphantSpirit_IT=1005
InspireFellows_IT=2505
RaiseTheSpirit_CD=1505
ChordOfSalvation_CD=30005
TriumphantSpirit_CD=900005
InspireFellows_CD=50005
CombatSleepTime=1505
[Fellowship Data]
Instruction 1="FSManuever is the Fellowship manuever (Pinwheel of options) when you break down an enemies defenses.  The current setting"
Instruction 2="Is for the red option at the top.  You would need to change both X and Y and the color value if you would like to set a  "
Instruction 3="different option.  Included is an option to check for the "pinwheel", but I've yet to successfully perform this in function"
FSManueverX=889
FSManueverY=459
FSManueverColor=0x8C0700
Check4PinwheelX=880
Check4PinwheelY=502
Check4PinwheelColor=0x7B7469
Instruction 4="Check for port coordinates and color actually perform two functions, it will click yes to port when a Hunter uses a guide"
Instruction 5="skill, and it will also automatically accept an incoming trade (as it uses the same window)                              "
Check4PortX=448
Check4PortY=296
Check4PortColor=0x777777
ClickYes4PortX=651
ClickYes4PortY=442
AcceptTradeX=160
AcceptTradeY=627
Check4SkirmX=892
Check4SkirmY=442
Check4SkirmColor=0xFFFFFF
Click4SkirmX=1031
Click4SkirmY=590
[Automated Responses]
ARHealingOn="{ENTER}/f Healing toggled on{ENTER}"
ARHealingOff="{ENTER}/f Healing toggled off{ENTER}"
ARFollow="{ENTER}/f Following you{ENTER}"
ARTrade="{ENTER}/f Trade Accepted{ENTER}"
ARCombatEnd="{ENTER}/f It's Dead Jim+1{ENTER}"
AREatCooked="{ENTER}/f BURP! Over cooked...{ENTER}"
AREatTrail="{ENTER}/f BURP! Under cooked...{ENTER}"
AREatFortify="{ENTER}/f BURP! Good Chowder...{ENTER}"
ARBuffing="{ENTER}/f Steriods Up+1{ENTER}"
ARWarSpeechOn="{ENTER}/f War Speech Active, 1{ENTER}"
ARWarSpeechOff="{ENTER}/f War Speech DeActive 0{ENTER}"
ARLooting="{ENTER}/f Get da papa G+1{ENTER}"
ARAssisting="{ENTER}/f Beat 'em like he owe you money+1{ENTER}"
ARMount="{ENTER}/f Ready to go.{ENTER}"
ARCallSoldier="{ENTER}/f Slice N Dice in DA Hizzle+1{ENTER}"
ARPrepare4Battle="{ENTER}/f Battle Ready+1{ENTER}"
ARExitScript="{ENTER}/f Exiting Automation Now...{ENTER}"
ARAntiAFKOn="{ENTER}/F Anti AFK Toggled on{ENTER}"
ARAntiAFKOff="{ENTER}/F Anti AFK Toggled Off{ENTER}"
[Chat Log Commands]
Instruction 1="These are the commands that you want your healer to respond to from within the game, currently, using fellowship chat"
Instruction 2="to perform these actions.
AntiAFKOn="Anti AFK on"
AntiAFKOff="Anti AFK off"                                                                                            "
BuffUp="buff up"
CombatAssist="am"
WarSpeechOn="War speech on"
WarSpeechOff="War speech off"
AcceptTrade="Accept"
LootCorpse="Loot"
SkirmishAssist="Assist"
TurnOnHealing="Healing on"
TurnOffHealing="Healing Off"
Instruction 3="Eat cooked food is currenttly the only one used, I have plans to include a function for trail food and chowders      "
EatCookedFood="Eat Cooked"
EatTrailFood="Eat Trail"
EatFortifyFood="Eat Fortify"
MountUnmount="Mount"
CallSoldier="Call Soldier"
FollowMe="Follow me"
PrepareforSkirmish="Prepare for battle"
ExitScript="Exit script"


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 8 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of LOTRO - Bots and Hacks RSS Feed 
Sitemap of LOTRO - Bots and Hacks Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?