$Status = GetMercLifeStatus()
;Rescue Merc
If $Status < 0 Then
;DownStairsToQual
FromBlockClickTo (30, 200, 300, 550, 30, 110, $GREEN_BLOCKS_Color, 2)
FromBlockClickTo (200, 100, 450, 350, - 330, 0, $GREEN_BLOCKS_Color, 2)
FromBlockClickTo (300, 40, 480, 250, - 300, - 80, $GREEN_BLOCKS_Color, 2)
LogEvent(0, "Try to rescue Merc")
Sleep(3000)
FromBlockClickTo (5, 5, 600, 300, 15, 15, $NPC_BODY_Color, 2)
;$No_Menu = 1
;While $No_Menu
Sleep($nomenu_delay)
$Open_Menu = PixelSearch(300, 75, 600, 300, $NPC_MENU_Color, 0, 5)
If @error Then
Sleep(3000)
FromBlockClickTo (5, 5, 600, 300, 15, 15, $NPC_BODY_Color, 2)
Sleep($nomenu_delay)
$Open_Menu = PixelSearch(300, 75, 600, 300, $NPC_MENU_Color, 0, 5)
If Not @error Then
Sleep($random_delay2)
MouseClick("left", $Open_Menu[0] + 125, $Open_Menu[1] + 40, 1, 10)
Sleep($random_delay2)
EndIf
Else
Sleep($random_delay2)
MouseClick("left", $Open_Menu[0] + 125, $Open_Menu[1] + 40, 1, 10)
Sleep($random_delay2)
;$No_Menu = 0
EndIf
;WEnd
;QualToDownStairs
FastClick("Left", 718, 388, 20, 2)
CheckMove ($Char_CheckMoveDelay)
FromBlockClickTo (100, 100, 550, 270, -50, 230, $GREEN_BLOCKS_Color, 2)
FromBlockClickTo (300, 30, 530, 200, 220, 410, $GREEN_BLOCKS_Color, 2)
FromBlockClickTo (430, 200, 690, 380, 50, 140, $GREEN_BLOCKS_Color, 2)
FromBlockClickTo (180, 70, 380, 280, 270, -110, $GREEN_BLOCKS_Color, 2)
$Status = GetMercLifeStatus()
If $Status < 0 Then
LogEvent(0, "Faild to rescue Merc")
Else
LogEvent(0, "succeed to rescue Merc")
EndIf
EndIf