Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select ; we have to set where the party members are located on the screen for healing to work correctly
- Case $PartySpot = 1
- $PartySpot_2 = 2
- $PartySpot_3 = 3
- Case $PartySpot = 2
- $PartySpot_2 = 1
- $PartySpot_3 = 3
- Case $PartySpot = 3
- $PartySpot_2 = 1
- $PartySpot_3 = 2
- EndSelect
- Func Battle()
- Do
- CheckBattleHealthP1()
- If $IsGroupHealer = "yes" Then
- CheckBattleHealthP2()
- CheckBattleHealthP3()
- EndIf
- Func CheckBattleHealthP1()
- Select
- Case $HealthPlace = 10
- Select
- Case $PartySpot = 1
- If Hex(PixelGetColor($xHealthCheck_P1_10_trigger_1,$yHealthCheck_P1_10_trigger_1),6) = $HealthCheck_P1_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_2,$yHealthCheck_P1_10_trigger_2),6) = $HealthCheck_P1_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_3,$yHealthCheck_P1_10_trigger_3),6) = $HealthCheck_P1_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_4,$yHealthCheck_P1_10_trigger_4),6) = $HealthCheck_P1_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_5,$yHealthCheck_P1_10_trigger_5),6) = $HealthCheck_P1_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P1_10_trigger_1,$yHealthCheck_P1_10_trigger_1),6) <> $HealthCheck_P1_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_2,$yHealthCheck_P1_10_trigger_2),6) <> $HealthCheck_P1_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_3,$yHealthCheck_P1_10_trigger_3),6) <> $HealthCheck_P1_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_4,$yHealthCheck_P1_10_trigger_4),6) <> $HealthCheck_P1_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_5,$yHealthCheck_P1_10_trigger_5),6) <> $HealthCheck_P1_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P1,$yHealthCheck_Battle_P1) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot = 2
- If Hex(PixelGetColor($xHealthCheck_P2_10_trigger_1,$yHealthCheck_P2_10_trigger_1),6) = $HealthCheck_P2_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_2,$yHealthCheck_P2_10_trigger_2),6) = $HealthCheck_P2_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_3,$yHealthCheck_P2_10_trigger_3),6) = $HealthCheck_P2_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_4,$yHealthCheck_P2_10_trigger_4),6) = $HealthCheck_P2_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_5,$yHealthCheck_P2_10_trigger_5),6) = $HealthCheck_P2_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P2_10_trigger_1,$yHealthCheck_P2_10_trigger_1),6) <> $HealthCheck_P2_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_2,$yHealthCheck_P2_10_trigger_2),6) <> $HealthCheck_P2_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_3,$yHealthCheck_P2_10_trigger_3),6) <> $HealthCheck_P2_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_4,$yHealthCheck_P2_10_trigger_4),6) <> $HealthCheck_P2_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_5,$yHealthCheck_P2_10_trigger_5),6) <> $HealthCheck_P2_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P2,$yHealthCheck_Battle_P2) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot = 3
- If Hex(PixelGetColor($xHealthCheck_P3_10_trigger_1,$yHealthCheck_P3_10_trigger_1),6) = $HealthCheck_P3_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_2,$yHealthCheck_P3_10_trigger_2),6) = $HealthCheck_P3_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_3,$yHealthCheck_P3_10_trigger_3),6) = $HealthCheck_P3_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_4,$yHealthCheck_P3_10_trigger_4),6) = $HealthCheck_P3_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_5,$yHealthCheck_P3_10_trigger_5),6) = $HealthCheck_P3_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P3_10_trigger_1,$yHealthCheck_P3_10_trigger_1),6) <> $HealthCheck_P3_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_2,$yHealthCheck_P3_10_trigger_2),6) <> $HealthCheck_P3_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_3,$yHealthCheck_P3_10_trigger_3),6) <> $HealthCheck_P3_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_4,$yHealthCheck_P3_10_trigger_4),6) <> $HealthCheck_P3_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_5,$yHealthCheck_P3_10_trigger_5),6) <> $HealthCheck_P3_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P3,$yHealthCheck_Battle_P3) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- EndSelect
- Case $HealthPlace = 100
- Select
- Case $PartySpot = 1
- If Hex(PixelGetColor($xHealthCheck_P1_100_trigger_1,$yHealthCheck_P1_100_trigger_1),6) = $HealthCheck_P1_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_2,$yHealthCheck_P1_100_trigger_2),6) = $HealthCheck_P1_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_3,$yHealthCheck_P1_100_trigger_3),6) = $HealthCheck_P1_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_4,$yHealthCheck_P1_100_trigger_4),6) = $HealthCheck_P1_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_5,$yHealthCheck_P1_100_trigger_5),6) = $HealthCheck_P1_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P1_100_trigger_1,$yHealthCheck_P1_100_trigger_1),6) <> $HealthCheck_P1_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_2,$yHealthCheck_P1_100_trigger_2),6) <> $HealthCheck_P1_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_3,$yHealthCheck_P1_100_trigger_3),6) <> $HealthCheck_P1_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_4,$yHealthCheck_P1_100_trigger_4),6) <> $HealthCheck_P1_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_5,$yHealthCheck_P1_100_trigger_5),6) <> $HealthCheck_P1_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P1,$yHealthCheck_Battle_P1) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot = 2
- If Hex(PixelGetColor($xHealthCheck_P2_100_trigger_1,$yHealthCheck_P2_100_trigger_1),6) = $HealthCheck_P2_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_2,$yHealthCheck_P2_100_trigger_2),6) = $HealthCheck_P2_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_3,$yHealthCheck_P2_100_trigger_3),6) = $HealthCheck_P2_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_4,$yHealthCheck_P2_100_trigger_4),6) = $HealthCheck_P2_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_5,$yHealthCheck_P2_100_trigger_5),6) = $HealthCheck_P2_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P2_100_trigger_1,$yHealthCheck_P2_100_trigger_1),6) <> $HealthCheck_P2_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_2,$yHealthCheck_P2_100_trigger_2),6) <> $HealthCheck_P2_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_3,$yHealthCheck_P2_100_trigger_3),6) <> $HealthCheck_P2_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_4,$yHealthCheck_P2_100_trigger_4),6) <> $HealthCheck_P2_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_5,$yHealthCheck_P2_100_trigger_5),6) <> $HealthCheck_P2_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P2,$yHealthCheck_Battle_P2) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot = 3
- If Hex(PixelGetColor($xHealthCheck_P3_100_trigger_1,$yHealthCheck_P3_100_trigger_1),6) = $HealthCheck_P3_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_2,$yHealthCheck_P3_100_trigger_2),6) = $HealthCheck_P3_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_3,$yHealthCheck_P3_100_trigger_3),6) = $HealthCheck_P3_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_4,$yHealthCheck_P3_100_trigger_4),6) = $HealthCheck_P3_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_5,$yHealthCheck_P3_100_trigger_5),6) = $HealthCheck_P3_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P3_100_trigger_1,$yHealthCheck_P3_100_trigger_1),6) <> $HealthCheck_P3_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_2,$yHealthCheck_P3_100_trigger_2),6) <> $HealthCheck_P3_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_3,$yHealthCheck_P3_100_trigger_3),6) <> $HealthCheck_P3_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_4,$yHealthCheck_P3_100_trigger_4),6) <> $HealthCheck_P3_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_5,$yHealthCheck_P3_100_trigger_5),6) <> $HealthCheck_P3_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P3,$yHealthCheck_Battle_P3) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- EndSelect
- EndSelect
- EndFunc
- Func CheckBattleHealthP2()
- If $IsGroupHealer = "yes" Then
- Select
- Case $HealthPlace = 10
- Select
- Case $PartySpot_P2 = 1
- If Hex(PixelGetColor($xHealthCheck_P1_10_trigger_1,$yHealthCheck_P1_10_trigger_1),6) = $HealthCheck_P1_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_2,$yHealthCheck_P1_10_trigger_2),6) = $HealthCheck_P1_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_3,$yHealthCheck_P1_10_trigger_3),6) = $HealthCheck_P1_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_4,$yHealthCheck_P1_10_trigger_4),6) = $HealthCheck_P1_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_5,$yHealthCheck_P1_10_trigger_5),6) = $HealthCheck_P1_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P1_10_trigger_1,$yHealthCheck_P1_10_trigger_1),6) <> $HealthCheck_P1_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_2,$yHealthCheck_P1_10_trigger_2),6) <> $HealthCheck_P1_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_3,$yHealthCheck_P1_10_trigger_3),6) <> $HealthCheck_P1_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_4,$yHealthCheck_P1_10_trigger_4),6) <> $HealthCheck_P1_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_5,$yHealthCheck_P1_10_trigger_5),6) <> $HealthCheck_P1_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P1,$yHealthCheck_Battle_P1) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P2 = 2
- If Hex(PixelGetColor($xHealthCheck_P2_10_trigger_1,$yHealthCheck_P2_10_trigger_1),6) = $HealthCheck_P2_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_2,$yHealthCheck_P2_10_trigger_2),6) = $HealthCheck_P2_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_3,$yHealthCheck_P2_10_trigger_3),6) = $HealthCheck_P2_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_4,$yHealthCheck_P2_10_trigger_4),6) = $HealthCheck_P2_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_5,$yHealthCheck_P2_10_trigger_5),6) = $HealthCheck_P2_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P2_10_trigger_1,$yHealthCheck_P2_10_trigger_1),6) <> $HealthCheck_P2_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_2,$yHealthCheck_P2_10_trigger_2),6) <> $HealthCheck_P2_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_3,$yHealthCheck_P2_10_trigger_3),6) <> $HealthCheck_P2_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_4,$yHealthCheck_P2_10_trigger_4),6) <> $HealthCheck_P2_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_5,$yHealthCheck_P2_10_trigger_5),6) <> $HealthCheck_P2_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P2,$yHealthCheck_Battle_P2) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P2 = 3
- If Hex(PixelGetColor($xHealthCheck_P3_10_trigger_1,$yHealthCheck_P3_10_trigger_1),6) = $HealthCheck_P3_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_2,$yHealthCheck_P3_10_trigger_2),6) = $HealthCheck_P3_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_3,$yHealthCheck_P3_10_trigger_3),6) = $HealthCheck_P3_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_4,$yHealthCheck_P3_10_trigger_4),6) = $HealthCheck_P3_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_5,$yHealthCheck_P3_10_trigger_5),6) = $HealthCheck_P3_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P3_10_trigger_1,$yHealthCheck_P3_10_trigger_1),6) <> $HealthCheck_P3_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_2,$yHealthCheck_P3_10_trigger_2),6) <> $HealthCheck_P3_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_3,$yHealthCheck_P3_10_trigger_3),6) <> $HealthCheck_P3_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_4,$yHealthCheck_P3_10_trigger_4),6) <> $HealthCheck_P3_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_5,$yHealthCheck_P3_10_trigger_5),6) <> $HealthCheck_P3_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P3,$yHealthCheck_Battle_P3) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- EndSelect
- Case $HealthPlace = 100
- Select
- Case $PartySpot_P2 = 1
- If Hex(PixelGetColor($xHealthCheck_P1_100_trigger_1,$yHealthCheck_P1_100_trigger_1),6) = $HealthCheck_P1_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_2,$yHealthCheck_P1_100_trigger_2),6) = $HealthCheck_P1_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_3,$yHealthCheck_P1_100_trigger_3),6) = $HealthCheck_P1_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_4,$yHealthCheck_P1_100_trigger_4),6) = $HealthCheck_P1_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_5,$yHealthCheck_P1_100_trigger_5),6) = $HealthCheck_P1_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P1_100_trigger_1,$yHealthCheck_P1_100_trigger_1),6) <> $HealthCheck_P1_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_2,$yHealthCheck_P1_100_trigger_2),6) <> $HealthCheck_P1_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_3,$yHealthCheck_P1_100_trigger_3),6) <> $HealthCheck_P1_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_4,$yHealthCheck_P1_100_trigger_4),6) <> $HealthCheck_P1_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_5,$yHealthCheck_P1_100_trigger_5),6) <> $HealthCheck_P1_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P1,$yHealthCheck_Battle_P1) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P2 = 2
- If Hex(PixelGetColor($xHealthCheck_P2_100_trigger_1,$yHealthCheck_P2_100_trigger_1),6) = $HealthCheck_P2_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_2,$yHealthCheck_P2_100_trigger_2),6) = $HealthCheck_P2_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_3,$yHealthCheck_P2_100_trigger_3),6) = $HealthCheck_P2_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_4,$yHealthCheck_P2_100_trigger_4),6) = $HealthCheck_P2_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_5,$yHealthCheck_P2_100_trigger_5),6) = $HealthCheck_P2_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P2_100_trigger_1,$yHealthCheck_P2_100_trigger_1),6) <> $HealthCheck_P2_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_2,$yHealthCheck_P2_100_trigger_2),6) <> $HealthCheck_P2_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_3,$yHealthCheck_P2_100_trigger_3),6) <> $HealthCheck_P2_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_4,$yHealthCheck_P2_100_trigger_4),6) <> $HealthCheck_P2_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_5,$yHealthCheck_P2_100_trigger_5),6) <> $HealthCheck_P2_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P2,$yHealthCheck_Battle_P2) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P2 = 3
- If Hex(PixelGetColor($xHealthCheck_P3_100_trigger_1,$yHealthCheck_P3_100_trigger_1),6) = $HealthCheck_P3_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_2,$yHealthCheck_P3_100_trigger_2),6) = $HealthCheck_P3_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_3,$yHealthCheck_P3_100_trigger_3),6) = $HealthCheck_P3_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_4,$yHealthCheck_P3_100_trigger_4),6) = $HealthCheck_P3_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_5,$yHealthCheck_P3_100_trigger_5),6) = $HealthCheck_P3_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P3_100_trigger_1,$yHealthCheck_P3_100_trigger_1),6) <> $HealthCheck_P3_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_2,$yHealthCheck_P3_100_trigger_2),6) <> $HealthCheck_P3_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_3,$yHealthCheck_P3_100_trigger_3),6) <> $HealthCheck_P3_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_4,$yHealthCheck_P3_100_trigger_4),6) <> $HealthCheck_P3_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_5,$yHealthCheck_P3_100_trigger_5),6) <> $HealthCheck_P3_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P3,$yHealthCheck_Battle_P3) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- EndSelect
- EndSelect
- Endif
- EndFunc
- Func CheckBattleHealthP3()
- If $IsGroupHealer = "yes" Then
- Select
- Case $HealthPlace = 10
- Select
- Case $PartySpot_P3 = 1
- If Hex(PixelGetColor($xHealthCheck_P1_10_trigger_1,$yHealthCheck_P1_10_trigger_1),6) = $HealthCheck_P1_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_2,$yHealthCheck_P1_10_trigger_2),6) = $HealthCheck_P1_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_3,$yHealthCheck_P1_10_trigger_3),6) = $HealthCheck_P1_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_4,$yHealthCheck_P1_10_trigger_4),6) = $HealthCheck_P1_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_5,$yHealthCheck_P1_10_trigger_5),6) = $HealthCheck_P1_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P1_10_trigger_1,$yHealthCheck_P1_10_trigger_1),6) <> $HealthCheck_P1_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_2,$yHealthCheck_P1_10_trigger_2),6) <> $HealthCheck_P1_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_3,$yHealthCheck_P1_10_trigger_3),6) <> $HealthCheck_P1_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_4,$yHealthCheck_P1_10_trigger_4),6) <> $HealthCheck_P1_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_10_trigger_5,$yHealthCheck_P1_10_trigger_5),6) <> $HealthCheck_P1_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P1,$yHealthCheck_Battle_P1) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P3 = 2
- If Hex(PixelGetColor($xHealthCheck_P2_10_trigger_1,$yHealthCheck_P2_10_trigger_1),6) = $HealthCheck_P2_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_2,$yHealthCheck_P2_10_trigger_2),6) = $HealthCheck_P2_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_3,$yHealthCheck_P2_10_trigger_3),6) = $HealthCheck_P2_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_4,$yHealthCheck_P2_10_trigger_4),6) = $HealthCheck_P2_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_5,$yHealthCheck_P2_10_trigger_5),6) = $HealthCheck_P2_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P2_10_trigger_1,$yHealthCheck_P2_10_trigger_1),6) <> $HealthCheck_P2_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_2,$yHealthCheck_P2_10_trigger_2),6) <> $HealthCheck_P2_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_3,$yHealthCheck_P2_10_trigger_3),6) <> $HealthCheck_P2_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_4,$yHealthCheck_P2_10_trigger_4),6) <> $HealthCheck_P2_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_10_trigger_5,$yHealthCheck_P2_10_trigger_5),6) <> $HealthCheck_P2_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P2,$yHealthCheck_Battle_P2) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P3 = 3
- If Hex(PixelGetColor($xHealthCheck_P3_10_trigger_1,$yHealthCheck_P3_10_trigger_1),6) = $HealthCheck_P3_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_2,$yHealthCheck_P3_10_trigger_2),6) = $HealthCheck_P3_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_3,$yHealthCheck_P3_10_trigger_3),6) = $HealthCheck_P3_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_4,$yHealthCheck_P3_10_trigger_4),6) = $HealthCheck_P3_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_5,$yHealthCheck_P3_10_trigger_5),6) = $HealthCheck_P3_10_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P3_10_trigger_1,$yHealthCheck_P3_10_trigger_1),6) <> $HealthCheck_P3_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_2,$yHealthCheck_P3_10_trigger_2),6) <> $HealthCheck_P3_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_3,$yHealthCheck_P3_10_trigger_3),6) <> $HealthCheck_P3_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_4,$yHealthCheck_P3_10_trigger_4),6) <> $HealthCheck_P3_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_10_trigger_5,$yHealthCheck_P3_10_trigger_5),6) <> $HealthCheck_P3_10_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P3,$yHealthCheck_Battle_P3) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- EndSelect
- Case $HealthPlace = 100
- Select
- Case $PartySpot_P3 = 1
- If Hex(PixelGetColor($xHealthCheck_P1_100_trigger_1,$yHealthCheck_P1_100_trigger_1),6) = $HealthCheck_P1_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_2,$yHealthCheck_P1_100_trigger_2),6) = $HealthCheck_P1_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_3,$yHealthCheck_P1_100_trigger_3),6) = $HealthCheck_P1_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_4,$yHealthCheck_P1_100_trigger_4),6) = $HealthCheck_P1_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_5,$yHealthCheck_P1_100_trigger_5),6) = $HealthCheck_P1_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P1_100_trigger_1,$yHealthCheck_P1_100_trigger_1),6) <> $HealthCheck_P1_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_2,$yHealthCheck_P1_100_trigger_2),6) <> $HealthCheck_P1_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_3,$yHealthCheck_P1_100_trigger_3),6) <> $HealthCheck_P1_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_4,$yHealthCheck_P1_100_trigger_4),6) <> $HealthCheck_P1_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P1_100_trigger_5,$yHealthCheck_P1_100_trigger_5),6) <> $HealthCheck_P1_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P1,$yHealthCheck_Battle_P1) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P3 = 2
- If Hex(PixelGetColor($xHealthCheck_P2_100_trigger_1,$yHealthCheck_P2_100_trigger_1),6) = $HealthCheck_P2_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_2,$yHealthCheck_P2_100_trigger_2),6) = $HealthCheck_P2_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_3,$yHealthCheck_P2_100_trigger_3),6) = $HealthCheck_P2_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_4,$yHealthCheck_P2_100_trigger_4),6) = $HealthCheck_P2_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_5,$yHealthCheck_P2_100_trigger_5),6) = $HealthCheck_P2_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P2_100_trigger_1,$yHealthCheck_P2_100_trigger_1),6) <> $HealthCheck_P2_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_2,$yHealthCheck_P2_100_trigger_2),6) <> $HealthCheck_P2_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_3,$yHealthCheck_P2_100_trigger_3),6) <> $HealthCheck_P2_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_4,$yHealthCheck_P2_100_trigger_4),6) <> $HealthCheck_P2_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P2_100_trigger_5,$yHealthCheck_P2_100_trigger_5),6) <> $HealthCheck_P2_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P2,$yHealthCheck_Battle_P2) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- Case $PartySpot_P3 = 3
- If Hex(PixelGetColor($xHealthCheck_P3_100_trigger_1,$yHealthCheck_P3_100_trigger_1),6) = $HealthCheck_P3_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_2,$yHealthCheck_P3_100_trigger_2),6) = $HealthCheck_P3_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_3,$yHealthCheck_P3_100_trigger_3),6) = $HealthCheck_P3_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_4,$yHealthCheck_P3_100_trigger_4),6) = $HealthCheck_P3_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_5,$yHealthCheck_P3_100_trigger_5),6) = $HealthCheck_P3_100_trigger_color_5 Then
- Sleep (1000) ;double If because script keeps thinking low health after battle is over
- If Hex(PixelGetColor($xHealthCheck_window_1,$yHealthCheck_window_1),6) = $HealthCheck_window_color_1 and Hex(PixelGetColor($xHealthCheck_window_2,$yHealthCheck_window_2),6) = $HealthCheck_window_color_2 and Hex(PixelGetColor($xHealthCheck_window_3,$yHealthCheck_window_3),6) = $HealthCheck_window_color_3 Then
- ToolTip('Health is low, healing self (BATTLE)',0,25)
- StopWhenLowHealth() ; health is low, if we need to stop the script because we can't heal, now is the time
- If $CanHeal = "yes" Then
- Do
- InventoryFull() ; Sometimes we get stuck after battle waiting on a full inventory
- MouseMove($xAbility,$yAbility) ;click Ability to bring up spell book
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- ;bug check to see if battle ended, this prevents getting stuck in this loop if we are hunting
- If Hex(PixelGetColor($xBattle_end_check,$yBattle_end_check),6) = $Battle_end_check_color Then ;checking for grey in icon at bottom of screen to see if battle is over
- Return
- Endif
- Until Hex(PixelGetColor($xAbility,$yAbility),6) = $Ability_selected_color ;Ability is now selected and pink
- ; Sleep (8000) ;need this because function will try to execute too soon
- If Hex(PixelGetColor($xHealthCheck_P3_100_trigger_1,$yHealthCheck_P3_100_trigger_1),6) <> $HealthCheck_P3_100_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_2,$yHealthCheck_P3_100_trigger_2),6) <> $HealthCheck_P3_100_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_3,$yHealthCheck_P3_100_trigger_3),6) <> $HealthCheck_P3_100_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_4,$yHealthCheck_P3_100_trigger_4),6) <> $HealthCheck_P3_100_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_P3_100_trigger_5,$yHealthCheck_P3_100_trigger_5),6) <> $HealthCheck_P3_100_trigger_color_5 Then
- Return ;checking to see if we were healed above threshold before we continue with healing
- EndIf
- Sleep (500) ;extra sleep in case spell book lags coming up
- MouseMove($BattleSpellSlot[$HealSlotBattle-1][0],$BattleSpellSlot[$HealSlotBattle-1][1]) ; calling array to cast spell
- MouseDown("left")
- MouseUp("left")
- Sleep (500)
- If Hex(PixelGetColor($xBattle_start_1,$yBattle_start_1),6) <> $Battle_start_color_1 and Hex(PixelGetColor($xBattle_start_2,$yBattle_start_2),6) <> $Battle_start_color_2 Then ;this breaks out in case battle ended
- Return
- EndIf
- MouseMove($xHealthCheck_Battle_P3,$yHealthCheck_Battle_P3) ;clicking self to cast heal upon
- MouseDown("left")
- MouseUp("left")
- Sleep (4000) ;giving time for spell to cast
- Endif
- Endif
- Endif
- EndSelect
- EndSelect
- Endif
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement