i don't know why but if i beginning in bonus map the script work and if my ship is at50% or 75%, he stop shoot and he go repair, but if i beginning in normal map he select the bonus map slot (7) and he shoot the npc but at the moment i'm at 50% or 75% he does not go repair
my config
procedure Settings;
begin
DebugMode := true; //If true, it will give a lot of messages about the activity of the script///
////////////////////////////////////////////////////////////
AutoDefineSeamap := false; /////////////////////////////////////
AutoDefineMinimap := false; ////////////////LINES 65-83/////////
AutoDefineRepButton := false; //////////////////////////////////
AutoDefineURLbarAndLogOutButton := true; //Will define logout button and url bar///
AutoChangeAmmo := false; ///autochanges ammo to hollows///
Level5Carpenter := true;///true->level5, false->level 4 or lower///
RefreshAfterMap := false; //Refreshes page when map is finished///
AttackMode := 2; //1->Damage npcs randomly, 2->Kills them one-by-one
FireKey := 'f';
DriveKey := 'v';
ToggleOpponentsKey:='n';
RepKey := 'q';
ToShipKey := 'x';
AbortAttack := 'e';
HollowsSlotNumber := '1';
DoAllMaps := true;///when you have no 1st maps, goes to 2nd/3rd/4th maps, else logs out after 1st maps are finished///
Map1SlotNumber := '7';///your 1st map number///
Map2SlotNumber := '8';//2nd map, not needed if DoAllMaps = false///
Map3SlotNumber := '9';//3rd map, not needed if DoAllMaps = false///
Map4SlotNumber := '0';//4th map, not needed if DoAllMaps = false///
UpKey:=38; //Key to move chart Up, Default 'w', please use the VBKeycode, find it at:

DownKey:=40; //Key to move chart Down, Default 's', please use the VBKeycode, find it at:

LeftKey:=37; //Key to move chart Left, Default 'a', please use the VBKeycode, find it at:

RightKey:=39; //Key to move chart Right, Default 'd', please use the VBKeycode, find it at:

HpPerc := 3; ///Repair on ...1=25%, 2=50%, 3=75% of hp////
HpTol := 15; ///If hp is not found, increase it each time by 1 until it is found//
//Do not use values greater than 35//
CannonType := 2; //1->50s, 2->55s,admirals,voodoos, 3->55s,admirals,voodoos + talents//
//////OPTIONAL//////
KeyWait := 0; //How much time will "wsad" keys be pushed for ranging(in ms)///
//If you use attackmode 2 better set keywait low (like 20)//
///////////////////////
and i set CheckMoveWait := 4000;
because for me 1700=1.7 seconde it's too short
and i set KeyWait := 0 because i wan't dodge the npc
DB (31.05.2017 02:27:34): Firing Target, Ranging
DB (31.05.2017 02:27:35): PROCEDURE: StopAttackCheck - START
DB (31.05.2017 02:27:35): Already Firing Target
DB (31.05.2017 02:27:35): PROCEDURE: StopAttackCheck - END
DB (31.05.2017 02:27:35): PROCEDURE: RangePos - START
DB (31.05.2017 02:27:35): PROCEDURE: PlayerPos - START
DB (31.05.2017 02:27:35): Player Found Top Right
DB (31.05.2017 02:27:35): PROCEDURE: PlayerPos - END
DB (31.05.2017 02:27:35): PROCEDURE: RangePos - END
DB (31.05.2017 02:27:35): PROCEDURE: RangeDist - START
DB (31.05.2017 02:27:35): PROCEDURE: RangeDist - END
DB (31.05.2017 02:27:35): PROCEDURE: Range - START
DB (31.05.2017 02:27:35): Counter2 exceeded 5
DB (31.05.2017 02:27:35): PROCEDURE: Range - END
DB (31.05.2017 02:27:35): PROCEDURE: NpcLoop - END
DB (31.05.2017 02:27:35): PROCEDURE: CloseMessages - START
DB (31.05.2017 02:27:35): PROCEDURE: CloseMessages - END
DB (31.05.2017 02:27:35): PROCEDURE: RepLoop - START
DB (31.05.2017 02:27:35): PROCEDURE: HpCheck - START
DB (31.05.2017 02:27:36): Ship Partly Repaired, No Repair Needed
DB (31.05.2017 02:27:36): PROCEDURE: HpCheck - END
DB (31.05.2017 02:27:36): PROCEDURE: RepLoop - END
DB (31.05.2017 02:27:36): PROCEDURE: CloseMessages - START
DB (31.05.2017 02:27:36): PROCEDURE: CloseMessages - END
DB (31.05.2017 02:27:36): PROCEDURE: BooleanReset - START
DB (31.05.2017 02:27:36): PROCEDURE: BooleanReset - END
DB (31.05.2017 02:27:36): PROCEDURE: FlashCrash - END
DB (31.05.2017 02:27:36): PROCEDURE: CloseMessages - START
DB (31.05.2017 02:27:36): PROCEDURE: CloseMessages - END
DB (31.05.2017 02:27:36): PROCEDURE: BonusCheckLoop - Start
DB (31.05.2017 02:27:36): PROCEDURE: BonusCheck - START
DB (31.05.2017 02:27:36): Player Is In Bonus Map
DB (31.05.2017 02:27:36): PROCEDURE: BonusCheck - END
DB (31.05.2017 02:27:36): PROCEDURE: BonusCheckLoop - END
DB (31.05.2017 02:27:36): PROCEDURE: CloseMessages - START
DB (31.05.2017 02:27:36): PROCEDURE: CloseMessages - END
DB (31.05.2017 02:27:36): PROCEDURE: NpcLoop - START
DB (31.05.2017 02:27:36): Firing Target, Ranging
Ship Partly Repaired, No Repair Needed
i suppose this is the probleme but i don't know why he say that and I do not know how to fix it