begin A1_DAT_SRT_CoE_V_Mid

Short Teleport
Short CellX
Short CellY
Float Pos

; only run If Teleporting
Set Teleport to "A1_DAT_SRT_TeleState"
If ( Teleport != 1 )
  Return
EndIf

; calculate destination Cells
Set Pos to "A1_DAT_SRT_RecPosX"
Set CellX to ( Pos / 8192 )
Set Pos to "A1_DAT_SRT_RecPosY"
Set CellY to ( Pos / 8192 )

; try to Teleport

; Range (14,-25) to (14,17)
If ( CellY == 14 )
 If ( CellX == -25 )
  CoE -25 14
 ElseIf ( CellX == -24 )
  CoE -24 14
 ElseIf ( CellX == -23 )
  CoE -23 14
 ElseIf ( CellX == -22 )
  CoE -22 14
 ElseIf ( CellX == -21 )
  CoE -21 14
 ElseIf ( CellX == -20 )
  CoE -20 14
 ElseIf ( CellX == -19 )
  CoE -19 14
 ElseIf ( CellX == -18 )
  CoE -18 14
 ElseIf ( CellX == -17 )
  CoE -17 14
 ElseIf ( CellX == -16 )
  CoE -16 14
 ElseIf ( CellX == -15 )
  CoE -15 14
 ElseIf ( CellX == -14 )
  CoE -14 14
 ElseIf ( CellX == -13 )
  CoE -13 14
 ElseIf ( CellX == -12 )
  CoE -12 14
 ElseIf ( CellX == -11 )
  CoE -11 14
 ElseIf ( CellX == -10 )
  CoE -10 14
 ElseIf ( CellX == -9 )
  CoE -9 14
 ElseIf ( CellX == -8 )
  CoE -8 14
 ElseIf ( CellX == -7 )
  CoE -7 14
 ElseIf ( CellX == -6 )
  CoE -6 14
 ElseIf ( CellX == -5 )
  CoE -5 14
 ElseIf ( CellX == -4 )
  CoE -4 14
 ElseIf ( CellX == -3 )
  CoE -3 14
 ElseIf ( CellX == -2 )
  CoE -2 14
 ElseIf ( CellX == -1 )
  CoE -1 14
 ElseIf ( CellX == 0 )
  CoE 0 14
 ElseIf ( CellX == 1 )
  CoE 1 14
 ElseIf ( CellX == 2 )
  CoE 2 14
 ElseIf ( CellX == 3 )
  CoE 3 14
 ElseIf ( CellX == 4 )
  CoE 4 14
 ElseIf ( CellX == 5 )
  CoE 5 14
 ElseIf ( CellX == 6 )
  CoE 6 14
 ElseIf ( CellX == 7 )
  CoE 7 14
 ElseIf ( CellX == 8 )
  CoE 8 14
 ElseIf ( CellX == 9 )
  CoE 9 14
 ElseIf ( CellX == 10 )
  CoE 10 14
 ElseIf ( CellX == 11 )
  CoE 11 14
 ElseIf ( CellX == 12 )
  CoE 12 14
 ElseIf ( CellX == 13 )
  CoE 13 14
 ElseIf ( CellX == 14 )
  CoE 14 14
 ElseIf ( CellX == 15 )
  CoE 15 14
 ElseIf ( CellX == 16 )
  CoE 16 14
 ElseIf ( CellX == 17 )
  CoE 17 14
 EndIf
EndIf

; Range (13,-18) to (13,18)
If ( CellY == 13 )
 If ( CellX == -18 )
  CoE -18 13
 ElseIf ( CellX == -17 )
  CoE -17 13
 ElseIf ( CellX == -16 )
  CoE -16 13
 ElseIf ( CellX == -15 )
  CoE -15 13
 ElseIf ( CellX == -14 )
  CoE -14 13
 ElseIf ( CellX == -13 )
  CoE -13 13
 ElseIf ( CellX == -12 )
  CoE -12 13
 ElseIf ( CellX == -11 )
  CoE -11 13
 ElseIf ( CellX == -10 )
  CoE -10 13
 ElseIf ( CellX == -9 )
  CoE -9 13
 ElseIf ( CellX == -8 )
  CoE -8 13
 ElseIf ( CellX == -7 )
  CoE -7 13
 ElseIf ( CellX == -6 )
  CoE -6 13
 ElseIf ( CellX == -5 )
  CoE -5 13
 ElseIf ( CellX == -4 )
  CoE -4 13
 ElseIf ( CellX == -3 )
  CoE -3 13
 ElseIf ( CellX == -2 )
  CoE -2 13
 ElseIf ( CellX == -1 )
  CoE -1 13
 ElseIf ( CellX == 0 )
  CoE 0 13
 ElseIf ( CellX == 1 )
  CoE 1 13
 ElseIf ( CellX == 2 )
  CoE 2 13
 ElseIf ( CellX == 3 )
  CoE 3 13
 ElseIf ( CellX == 4 )
  CoE 4 13
 ElseIf ( CellX == 5 )
  CoE 5 13
 ElseIf ( CellX == 6 )
  CoE 6 13
 ElseIf ( CellX == 7 )
  CoE 7 13
 ElseIf ( CellX == 8 )
  CoE 8 13
 ElseIf ( CellX == 9 )
  CoE 9 13
 ElseIf ( CellX == 10 )
  CoE 10 13
 ElseIf ( CellX == 11 )
  CoE 11 13
 ElseIf ( CellX == 12 )
  CoE 12 13
 ElseIf ( CellX == 13 )
  CoE 13 13
 ElseIf ( CellX == 14 )
  CoE 14 13
 ElseIf ( CellX == 15 )
  CoE 15 13
 ElseIf ( CellX == 16 )
  CoE 16 13
 ElseIf ( CellX == 17 )
  CoE 17 13
 ElseIf ( CellX == 18 )
  CoE 18 13
 EndIf
EndIf

; Range (12,-18) to (12,18)
If ( CellY == 12 )
 If ( CellX == -18 )
  CoE -18 12
 ElseIf ( CellX == -17 )
  CoE -17 12
 ElseIf ( CellX == -16 )
  CoE -16 12
 ElseIf ( CellX == -15 )
  CoE -15 12
 ElseIf ( CellX == -14 )
  CoE -14 12
 ElseIf ( CellX == -13 )
  CoE -13 12
 ElseIf ( CellX == -12 )
  CoE -12 12
 ElseIf ( CellX == -11 )
  CoE -11 12
 ElseIf ( CellX == -10 )
  CoE -10 12
 ElseIf ( CellX == -9 )
  CoE -9 12
 ElseIf ( CellX == -8 )
  CoE -8 12
 ElseIf ( CellX == -7 )
  CoE -7 12
 ElseIf ( CellX == -6 )
  CoE -6 12
 ElseIf ( CellX == -5 )
  CoE -5 12
 ElseIf ( CellX == -4 )
  CoE -4 12
 ElseIf ( CellX == -3 )
  CoE -3 12
 ElseIf ( CellX == -2 )
  CoE -2 12
 ElseIf ( CellX == -1 )
  CoE -1 12
 ElseIf ( CellX == 0 )
  CoE 0 12
 ElseIf ( CellX == 1 )
  CoE 1 12
 ElseIf ( CellX == 2 )
  CoE 2 12
 ElseIf ( CellX == 3 )
  CoE 3 12
 ElseIf ( CellX == 4 )
  CoE 4 12
 ElseIf ( CellX == 5 )
  CoE 5 12
 ElseIf ( CellX == 6 )
  CoE 6 12
 ElseIf ( CellX == 7 )
  CoE 7 12
 ElseIf ( CellX == 8 )
  CoE 8 12
 ElseIf ( CellX == 9 )
  CoE 9 12
 ElseIf ( CellX == 10 )
  CoE 10 12
 ElseIf ( CellX == 11 )
  CoE 11 12
 ElseIf ( CellX == 12 )
  CoE 12 12
 ElseIf ( CellX == 13 )
  CoE 13 12
 ElseIf ( CellX == 14 )
  CoE 14 12
 ElseIf ( CellX == 15 )
  CoE 15 12
 ElseIf ( CellX == 16 )
  CoE 16 12
 ElseIf ( CellX == 17 )
  CoE 17 12
 ElseIf ( CellX == 18 )
  CoE 18 12
 EndIf
EndIf

; Range (11,-18) to (11,19)
If ( CellY == 11 )
 If ( CellX == -18 )
  CoE -18 11
 ElseIf ( CellX == -17 )
  CoE -17 11
 ElseIf ( CellX == -16 )
  CoE -16 11
 ElseIf ( CellX == -15 )
  CoE -15 11
 ElseIf ( CellX == -14 )
  CoE -14 11
 ElseIf ( CellX == -13 )
  CoE -13 11
 ElseIf ( CellX == -12 )
  CoE -12 11
 ElseIf ( CellX == -11 )
  CoE -11 11
 ElseIf ( CellX == -10 )
  CoE -10 11
 ElseIf ( CellX == -9 )
  CoE -9 11
 ElseIf ( CellX == -8 )
  CoE -8 11
 ElseIf ( CellX == -7 )
  CoE -7 11
 ElseIf ( CellX == -6 )
  CoE -6 11
 ElseIf ( CellX == -5 )
  CoE -5 11
 ElseIf ( CellX == -4 )
  CoE -4 11
 ElseIf ( CellX == -3 )
  CoE -3 11
 ElseIf ( CellX == -2 )
  CoE -2 11
 ElseIf ( CellX == -1 )
  CoE -1 11
 ElseIf ( CellX == 0 )
  CoE 0 11
 ElseIf ( CellX == 1 )
  CoE 1 11
 ElseIf ( CellX == 2 )
  CoE 2 11
 ElseIf ( CellX == 3 )
  CoE 3 11
 ElseIf ( CellX == 4 )
  CoE 4 11
 ElseIf ( CellX == 5 )
  CoE 5 11
 ElseIf ( CellX == 6 )
  CoE 6 11
 ElseIf ( CellX == 7 )
  CoE 7 11
 ElseIf ( CellX == 8 )
  CoE 8 11
 ElseIf ( CellX == 9 )
  CoE 9 11
 ElseIf ( CellX == 10 )
  CoE 10 11
 ElseIf ( CellX == 11 )
  CoE 11 11
 ElseIf ( CellX == 12 )
  CoE 12 11
 ElseIf ( CellX == 13 )
  CoE 13 11
 ElseIf ( CellX == 14 )
  CoE 14 11
 ElseIf ( CellX == 15 )
  CoE 15 11
 ElseIf ( CellX == 16 )
  CoE 16 11
 ElseIf ( CellX == 17 )
  CoE 17 11
 ElseIf ( CellX == 18 )
  CoE 18 11
 ElseIf ( CellX == 19 )
  CoE 19 11
 EndIf
EndIf

; Range (10,-18) to (10,21)
If ( CellY == 10 )
 If ( CellX == -18 )
  CoE -18 10
 ElseIf ( CellX == -17 )
  CoE -17 10
 ElseIf ( CellX == -16 )
  CoE -16 10
 ElseIf ( CellX == -15 )
  CoE -15 10
 ElseIf ( CellX == -14 )
  CoE -14 10
 ElseIf ( CellX == -13 )
  CoE -13 10
 ElseIf ( CellX == -12 )
  CoE -12 10
 ElseIf ( CellX == -11 )
  CoE -11 10
 ElseIf ( CellX == -10 )
  CoE -10 10
 ElseIf ( CellX == -9 )
  CoE -9 10
 ElseIf ( CellX == -8 )
  CoE -8 10
 ElseIf ( CellX == -7 )
  CoE -7 10
 ElseIf ( CellX == -6 )
  CoE -6 10
 ElseIf ( CellX == -5 )
  CoE -5 10
 ElseIf ( CellX == -4 )
  CoE -4 10
 ElseIf ( CellX == -3 )
  CoE -3 10
 ElseIf ( CellX == -2 )
  CoE -2 10
 ElseIf ( CellX == -1 )
  CoE -1 10
 ElseIf ( CellX == 0 )
  CoE 0 10
 ElseIf ( CellX == 1 )
  CoE 1 10
 ElseIf ( CellX == 2 )
  CoE 2 10
 ElseIf ( CellX == 3 )
  CoE 3 10
 ElseIf ( CellX == 4 )
  CoE 4 10
 ElseIf ( CellX == 5 )
  CoE 5 10
 ElseIf ( CellX == 6 )
  CoE 6 10
 ElseIf ( CellX == 7 )
  CoE 7 10
 ElseIf ( CellX == 8 )
  CoE 8 10
 ElseIf ( CellX == 9 )
  CoE 9 10
 ElseIf ( CellX == 10 )
  CoE 10 10
 ElseIf ( CellX == 11 )
  CoE 11 10
 ElseIf ( CellX == 12 )
  CoE 12 10
 ElseIf ( CellX == 13 )
  CoE 13 10
 ElseIf ( CellX == 14 )
  CoE 14 10
 ElseIf ( CellX == 15 )
  CoE 15 10
 ElseIf ( CellX == 16 )
  CoE 16 10
 ElseIf ( CellX == 17 )
  CoE 17 10
 ElseIf ( CellX == 18 )
  CoE 18 10
 ElseIf ( CellX == 19 )
  CoE 19 10
 ElseIf ( CellX == 20 )
  CoE 20 10
 ElseIf ( CellX == 21 )
  CoE 21 10
 EndIf
EndIf

; Range (9,-17) to (9,21)
If ( CellY == 9 )
 If ( CellX == -17 )
  CoE -17 9
 ElseIf ( CellX == -16 )
  CoE -16 9
 ElseIf ( CellX == -15 )
  CoE -15 9
 ElseIf ( CellX == -14 )
  CoE -14 9
 ElseIf ( CellX == -13 )
  CoE -13 9
 ElseIf ( CellX == -12 )
  CoE -12 9
 ElseIf ( CellX == -11 )
  CoE -11 9
 ElseIf ( CellX == -10 )
  CoE -10 9
 ElseIf ( CellX == -9 )
  CoE -9 9
 ElseIf ( CellX == -8 )
  CoE -8 9
 ElseIf ( CellX == -7 )
  CoE -7 9
 ElseIf ( CellX == -6 )
  CoE -6 9
 ElseIf ( CellX == -5 )
  CoE -5 9
 ElseIf ( CellX == -4 )
  CoE -4 9
 ElseIf ( CellX == -3 )
  CoE -3 9
 ElseIf ( CellX == -2 )
  CoE -2 9
 ElseIf ( CellX == -1 )
  CoE -1 9
 ElseIf ( CellX == 0 )
  CoE 0 9
 ElseIf ( CellX == 1 )
  CoE 1 9
 ElseIf ( CellX == 2 )
  CoE 2 9
 ElseIf ( CellX == 3 )
  CoE 3 9
 ElseIf ( CellX == 4 )
  CoE 4 9
 ElseIf ( CellX == 5 )
  CoE 5 9
 ElseIf ( CellX == 6 )
  CoE 6 9
 ElseIf ( CellX == 7 )
  CoE 7 9
 ElseIf ( CellX == 8 )
  CoE 8 9
 ElseIf ( CellX == 9 )
  CoE 9 9
 ElseIf ( CellX == 10 )
  CoE 10 9
 ElseIf ( CellX == 11 )
  CoE 11 9
 ElseIf ( CellX == 12 )
  CoE 12 9
 ElseIf ( CellX == 13 )
  CoE 13 9
 ElseIf ( CellX == 14 )
  CoE 14 9
 ElseIf ( CellX == 15 )
  CoE 15 9
 ElseIf ( CellX == 16 )
  CoE 16 9
 ElseIf ( CellX == 17 )
  CoE 17 9
 ElseIf ( CellX == 18 )
  CoE 18 9
 ElseIf ( CellX == 19 )
  CoE 19 9
 ElseIf ( CellX == 20 )
  CoE 20 9
 ElseIf ( CellX == 21 )
  CoE 21 9
 EndIf
EndIf

; Range (8,-16) to (8,22)
If ( CellY == 8 )
 If ( CellX == -16 )
  CoE -16 8
 ElseIf ( CellX == -15 )
  CoE -15 8
 ElseIf ( CellX == -14 )
  CoE -14 8
 ElseIf ( CellX == -13 )
  CoE -13 8
 ElseIf ( CellX == -12 )
  CoE -12 8
 ElseIf ( CellX == -11 )
  CoE -11 8
 ElseIf ( CellX == -10 )
  CoE -10 8
 ElseIf ( CellX == -9 )
  CoE -9 8
 ElseIf ( CellX == -8 )
  CoE -8 8
 ElseIf ( CellX == -7 )
  CoE -7 8
 ElseIf ( CellX == -6 )
  CoE -6 8
 ElseIf ( CellX == -5 )
  CoE -5 8
 ElseIf ( CellX == -4 )
  CoE -4 8
 ElseIf ( CellX == -3 )
  CoE -3 8
 ElseIf ( CellX == -2 )
  CoE -2 8
 ElseIf ( CellX == -1 )
  CoE -1 8
 ElseIf ( CellX == 0 )
  CoE 0 8
 ElseIf ( CellX == 1 )
  CoE 1 8
 ElseIf ( CellX == 2 )
  CoE 2 8
 ElseIf ( CellX == 3 )
  CoE 3 8
 ElseIf ( CellX == 4 )
  CoE 4 8
 ElseIf ( CellX == 5 )
  CoE 5 8
 ElseIf ( CellX == 6 )
  CoE 6 8
 ElseIf ( CellX == 7 )
  CoE 7 8
 ElseIf ( CellX == 8 )
  CoE 8 8
 ElseIf ( CellX == 9 )
  CoE 9 8
 ElseIf ( CellX == 10 )
  CoE 10 8
 ElseIf ( CellX == 11 )
  CoE 11 8
 ElseIf ( CellX == 12 )
  CoE 12 8
 ElseIf ( CellX == 13 )
  CoE 13 8
 ElseIf ( CellX == 14 )
  CoE 14 8
 ElseIf ( CellX == 15 )
  CoE 15 8
 ElseIf ( CellX == 16 )
  CoE 16 8
 ElseIf ( CellX == 17 )
  CoE 17 8
 ElseIf ( CellX == 18 )
  CoE 18 8
 ElseIf ( CellX == 19 )
  CoE 19 8
 ElseIf ( CellX == 20 )
  CoE 20 8
 ElseIf ( CellX == 21 )
  CoE 21 8
 ElseIf ( CellX == 22 )
  CoE 22 8
 EndIf
EndIf

; Range (7,-16) to (7,23)
If ( CellY == 7 )
 If ( CellX == -16 )
  CoE -16 7
 ElseIf ( CellX == -15 )
  CoE -15 7
 ElseIf ( CellX == -14 )
  CoE -14 7
 ElseIf ( CellX == -13 )
  CoE -13 7
 ElseIf ( CellX == -12 )
  CoE -12 7
 ElseIf ( CellX == -11 )
  CoE -11 7
 ElseIf ( CellX == -10 )
  CoE -10 7
 ElseIf ( CellX == -9 )
  CoE -9 7
 ElseIf ( CellX == -8 )
  CoE -8 7
 ElseIf ( CellX == -7 )
  CoE -7 7
 ElseIf ( CellX == -6 )
  CoE -6 7
 ElseIf ( CellX == -5 )
  CoE -5 7
 ElseIf ( CellX == -4 )
  CoE -4 7
 ElseIf ( CellX == -3 )
  CoE -3 7
 ElseIf ( CellX == -2 )
  CoE -2 7
 ElseIf ( CellX == -1 )
  CoE -1 7
 ElseIf ( CellX == 0 )
  CoE 0 7
 ElseIf ( CellX == 1 )
  CoE 1 7
 ElseIf ( CellX == 2 )
  CoE 2 7
 ElseIf ( CellX == 3 )
  CoE 3 7
 ElseIf ( CellX == 4 )
  CoE 4 7
 ElseIf ( CellX == 5 )
  CoE 5 7
 ElseIf ( CellX == 6 )
  CoE 6 7
 ElseIf ( CellX == 7 )
  CoE 7 7
 ElseIf ( CellX == 8 )
  CoE 8 7
 ElseIf ( CellX == 9 )
  CoE 9 7
 ElseIf ( CellX == 10 )
  CoE 10 7
 ElseIf ( CellX == 11 )
  CoE 11 7
 ElseIf ( CellX == 12 )
  CoE 12 7
 ElseIf ( CellX == 13 )
  CoE 13 7
 ElseIf ( CellX == 14 )
  CoE 14 7
 ElseIf ( CellX == 15 )
  CoE 15 7
 ElseIf ( CellX == 16 )
  CoE 16 7
 ElseIf ( CellX == 17 )
  CoE 17 7
 ElseIf ( CellX == 18 )
  CoE 18 7
 ElseIf ( CellX == 19 )
  CoE 19 7
 ElseIf ( CellX == 20 )
  CoE 20 7
 ElseIf ( CellX == 21 )
  CoE 21 7
 ElseIf ( CellX == 22 )
  CoE 22 7
 ElseIf ( CellX == 23 )
  CoE 23 7
 EndIf
EndIf

; Range (6,-14) to (6,23)
If ( CellY == 6 )
 If ( CellX == -14 )
  CoE -14 6
 ElseIf ( CellX == -13 )
  CoE -13 6
 ElseIf ( CellX == -12 )
  CoE -12 6
 ElseIf ( CellX == -11 )
  CoE -11 6
 ElseIf ( CellX == -10 )
  CoE -10 6
 ElseIf ( CellX == -9 )
  CoE -9 6
 ElseIf ( CellX == -8 )
  CoE -8 6
 ElseIf ( CellX == -7 )
  CoE -7 6
 ElseIf ( CellX == -6 )
  CoE -6 6
 ElseIf ( CellX == -5 )
  CoE -5 6
 ElseIf ( CellX == -4 )
  CoE -4 6
 ElseIf ( CellX == -3 )
  CoE -3 6
 ElseIf ( CellX == -2 )
  CoE -2 6
 ElseIf ( CellX == -1 )
  CoE -1 6
 ElseIf ( CellX == 0 )
  CoE 0 6
 ElseIf ( CellX == 1 )
  CoE 1 6
 ElseIf ( CellX == 2 )
  CoE 2 6
 ElseIf ( CellX == 3 )
  CoE 3 6
 ElseIf ( CellX == 4 )
  CoE 4 6
 ElseIf ( CellX == 5 )
  CoE 5 6
 ElseIf ( CellX == 6 )
  CoE 6 6
 ElseIf ( CellX == 7 )
  CoE 7 6
 ElseIf ( CellX == 8 )
  CoE 8 6
 ElseIf ( CellX == 9 )
  CoE 9 6
 ElseIf ( CellX == 10 )
  CoE 10 6
 ElseIf ( CellX == 11 )
  CoE 11 6
 ElseIf ( CellX == 12 )
  CoE 12 6
 ElseIf ( CellX == 13 )
  CoE 13 6
 ElseIf ( CellX == 14 )
  CoE 14 6
 ElseIf ( CellX == 15 )
  CoE 15 6
 ElseIf ( CellX == 16 )
  CoE 16 6
 ElseIf ( CellX == 17 )
  CoE 17 6
 ElseIf ( CellX == 18 )
  CoE 18 6
 ElseIf ( CellX == 19 )
  CoE 19 6
 ElseIf ( CellX == 20 )
  CoE 20 6
 ElseIf ( CellX == 21 )
  CoE 21 6
 ElseIf ( CellX == 22 )
  CoE 22 6
 ElseIf ( CellX == 23 )
  CoE 23 6
 EndIf
EndIf

; Range (5,-14) to (5,23)
If ( CellY == 5 )
 If ( CellX == -14 )
  CoE -14 5
 ElseIf ( CellX == -13 )
  CoE -13 5
 ElseIf ( CellX == -12 )
  CoE -12 5
 ElseIf ( CellX == -11 )
  CoE -11 5
 ElseIf ( CellX == -10 )
  CoE -10 5
 ElseIf ( CellX == -9 )
  CoE -9 5
 ElseIf ( CellX == -8 )
  CoE -8 5
 ElseIf ( CellX == -7 )
  CoE -7 5
 ElseIf ( CellX == -6 )
  CoE -6 5
 ElseIf ( CellX == -5 )
  CoE -5 5
 ElseIf ( CellX == -4 )
  CoE -4 5
 ElseIf ( CellX == -3 )
  CoE -3 5
 ElseIf ( CellX == -2 )
  CoE -2 5
 ElseIf ( CellX == -1 )
  CoE -1 5
 ElseIf ( CellX == 0 )
  CoE 0 5
 ElseIf ( CellX == 1 )
  CoE 1 5
 ElseIf ( CellX == 2 )
  CoE 2 5
 ElseIf ( CellX == 3 )
  CoE 3 5
 ElseIf ( CellX == 4 )
  CoE 4 5
 ElseIf ( CellX == 5 )
  CoE 5 5
 ElseIf ( CellX == 6 )
  CoE 6 5
 ElseIf ( CellX == 7 )
  CoE 7 5
 ElseIf ( CellX == 8 )
  CoE 8 5
 ElseIf ( CellX == 9 )
  CoE 9 5
 ElseIf ( CellX == 10 )
  CoE 10 5
 ElseIf ( CellX == 11 )
  CoE 11 5
 ElseIf ( CellX == 12 )
  CoE 12 5
 ElseIf ( CellX == 13 )
  CoE 13 5
 ElseIf ( CellX == 14 )
  CoE 14 5
 ElseIf ( CellX == 15 )
  CoE 15 5
 ElseIf ( CellX == 16 )
  CoE 16 5
 ElseIf ( CellX == 17 )
  CoE 17 5
 ElseIf ( CellX == 18 )
  CoE 18 5
 ElseIf ( CellX == 19 )
  CoE 19 5
 ElseIf ( CellX == 20 )
  CoE 20 5
 ElseIf ( CellX == 21 )
  CoE 21 5
 ElseIf ( CellX == 22 )
  CoE 22 5
 ElseIf ( CellX == 23 )
  CoE 23 5
 EndIf
EndIf

; Range (4,-14) to (4,23)
If ( CellY == 4 )
 If ( CellX == -14 )
  CoE -14 4
 ElseIf ( CellX == -13 )
  CoE -13 4
 ElseIf ( CellX == -12 )
  CoE -12 4
 ElseIf ( CellX == -11 )
  CoE -11 4
 ElseIf ( CellX == -10 )
  CoE -10 4
 ElseIf ( CellX == -9 )
  CoE -9 4
 ElseIf ( CellX == -8 )
  CoE -8 4
 ElseIf ( CellX == -7 )
  CoE -7 4
 ElseIf ( CellX == -6 )
  CoE -6 4
 ElseIf ( CellX == -5 )
  CoE -5 4
 ElseIf ( CellX == -4 )
  CoE -4 4
 ElseIf ( CellX == -3 )
  CoE -3 4
 ElseIf ( CellX == -2 )
  CoE -2 4
 ElseIf ( CellX == -1 )
  CoE -1 4
 ElseIf ( CellX == 0 )
  CoE 0 4
 ElseIf ( CellX == 1 )
  CoE 1 4
 ElseIf ( CellX == 2 )
  CoE 2 4
 ElseIf ( CellX == 3 )
  CoE 3 4
 ElseIf ( CellX == 4 )
  CoE 4 4
 ElseIf ( CellX == 5 )
  CoE 5 4
 ElseIf ( CellX == 6 )
  CoE 6 4
 ElseIf ( CellX == 7 )
  CoE 7 4
 ElseIf ( CellX == 8 )
  CoE 8 4
 ElseIf ( CellX == 9 )
  CoE 9 4
 ElseIf ( CellX == 10 )
  CoE 10 4
 ElseIf ( CellX == 11 )
  CoE 11 4
 ElseIf ( CellX == 12 )
  CoE 12 4
 ElseIf ( CellX == 13 )
  CoE 13 4
 ElseIf ( CellX == 14 )
  CoE 14 4
 ElseIf ( CellX == 15 )
  CoE 15 4
 ElseIf ( CellX == 16 )
  CoE 16 4
 ElseIf ( CellX == 17 )
  CoE 17 4
 ElseIf ( CellX == 18 )
  CoE 18 4
 ElseIf ( CellX == 19 )
  CoE 19 4
 ElseIf ( CellX == 20 )
  CoE 20 4
 ElseIf ( CellX == 21 )
  CoE 21 4
 ElseIf ( CellX == 22 )
  CoE 22 4
 ElseIf ( CellX == 23 )
  CoE 23 4
 EndIf
EndIf

; Range (3,-13) to (3,23)
If ( CellY == 3 )
 If ( CellX == -13 )
  CoE -13 3
 ElseIf ( CellX == -12 )
  CoE -12 3
 ElseIf ( CellX == -11 )
  CoE -11 3
 ElseIf ( CellX == -10 )
  CoE -10 3
 ElseIf ( CellX == -9 )
  CoE -9 3
 ElseIf ( CellX == -8 )
  CoE -8 3
 ElseIf ( CellX == -7 )
  CoE -7 3
 ElseIf ( CellX == -6 )
  CoE -6 3
 ElseIf ( CellX == -5 )
  CoE -5 3
 ElseIf ( CellX == -4 )
  CoE -4 3
 ElseIf ( CellX == -3 )
  CoE -3 3
 ElseIf ( CellX == -2 )
  CoE -2 3
 ElseIf ( CellX == -1 )
  CoE -1 3
 ElseIf ( CellX == 0 )
  CoE 0 3
 ElseIf ( CellX == 1 )
  CoE 1 3
 ElseIf ( CellX == 2 )
  CoE 2 3
 ElseIf ( CellX == 3 )
  CoE 3 3
 ElseIf ( CellX == 4 )
  CoE 4 3
 ElseIf ( CellX == 5 )
  CoE 5 3
 ElseIf ( CellX == 6 )
  CoE 6 3
 ElseIf ( CellX == 7 )
  CoE 7 3
 ElseIf ( CellX == 8 )
  CoE 8 3
 ElseIf ( CellX == 9 )
  CoE 9 3
 ElseIf ( CellX == 10 )
  CoE 10 3
 ElseIf ( CellX == 11 )
  CoE 11 3
 ElseIf ( CellX == 12 )
  CoE 12 3
 ElseIf ( CellX == 13 )
  CoE 13 3
 ElseIf ( CellX == 14 )
  CoE 14 3
 ElseIf ( CellX == 15 )
  CoE 15 3
 ElseIf ( CellX == 16 )
  CoE 16 3
 ElseIf ( CellX == 17 )
  CoE 17 3
 ElseIf ( CellX == 18 )
  CoE 18 3
 ElseIf ( CellX == 19 )
  CoE 19 3
 ElseIf ( CellX == 20 )
  CoE 20 3
 ElseIf ( CellX == 21 )
  CoE 21 3
 ElseIf ( CellX == 22 )
  CoE 22 3
 ElseIf ( CellX == 23 )
  CoE 23 3
 EndIf
EndIf

; Range (2,-14) to (2,23)
If ( CellY == 2 )
 If ( CellX == -14 )
  CoE -14 2
 ElseIf ( CellX == -13 )
  CoE -13 2
 ElseIf ( CellX == -12 )
  CoE -12 2
 ElseIf ( CellX == -11 )
  CoE -11 2
 ElseIf ( CellX == -10 )
  CoE -10 2
 ElseIf ( CellX == -9 )
  CoE -9 2
 ElseIf ( CellX == -8 )
  CoE -8 2
 ElseIf ( CellX == -7 )
  CoE -7 2
 ElseIf ( CellX == -6 )
  CoE -6 2
 ElseIf ( CellX == -5 )
  CoE -5 2
 ElseIf ( CellX == -4 )
  CoE -4 2
 ElseIf ( CellX == -3 )
  CoE -3 2
 ElseIf ( CellX == -2 )
  CoE -2 2
 ElseIf ( CellX == -1 )
  CoE -1 2
 ElseIf ( CellX == 0 )
  CoE 0 2
 ElseIf ( CellX == 1 )
  CoE 1 2
 ElseIf ( CellX == 2 )
  CoE 2 2
 ElseIf ( CellX == 3 )
  CoE 3 2
 ElseIf ( CellX == 4 )
  CoE 4 2
 ElseIf ( CellX == 5 )
  CoE 5 2
 ElseIf ( CellX == 6 )
  CoE 6 2
 ElseIf ( CellX == 7 )
  CoE 7 2
 ElseIf ( CellX == 8 )
  CoE 8 2
 ElseIf ( CellX == 9 )
  CoE 9 2
 ElseIf ( CellX == 10 )
  CoE 10 2
 ElseIf ( CellX == 11 )
  CoE 11 2
 ElseIf ( CellX == 12 )
  CoE 12 2
 ElseIf ( CellX == 13 )
  CoE 13 2
 ElseIf ( CellX == 14 )
  CoE 14 2
 ElseIf ( CellX == 15 )
  CoE 15 2
 ElseIf ( CellX == 16 )
  CoE 16 2
 ElseIf ( CellX == 17 )
  CoE 17 2
 ElseIf ( CellX == 18 )
  CoE 18 2
 ElseIf ( CellX == 19 )
  CoE 19 2
 ElseIf ( CellX == 20 )
  CoE 20 2
 ElseIf ( CellX == 21 )
  CoE 21 2
 ElseIf ( CellX == 22 )
  CoE 22 2
 ElseIf ( CellX == 23 )
  CoE 23 2
 EndIf
EndIf

; Range (1,-13) to (1,23)
If ( CellY == 1 )
 If ( CellX == -13 )
  CoE -13 1
 ElseIf ( CellX == -12 )
  CoE -12 1
 ElseIf ( CellX == -11 )
  CoE -11 1
 ElseIf ( CellX == -10 )
  CoE -10 1
 ElseIf ( CellX == -9 )
  CoE -9 1
 ElseIf ( CellX == -8 )
  CoE -8 1
 ElseIf ( CellX == -7 )
  CoE -7 1
 ElseIf ( CellX == -6 )
  CoE -6 1
 ElseIf ( CellX == -5 )
  CoE -5 1
 ElseIf ( CellX == -4 )
  CoE -4 1
 ElseIf ( CellX == -3 )
  CoE -3 1
 ElseIf ( CellX == -2 )
  CoE -2 1
 ElseIf ( CellX == -1 )
  CoE -1 1
 ElseIf ( CellX == 0 )
  CoE 0 1
 ElseIf ( CellX == 1 )
  CoE 1 1
 ElseIf ( CellX == 2 )
  CoE 2 1
 ElseIf ( CellX == 3 )
  CoE 3 1
 ElseIf ( CellX == 4 )
  CoE 4 1
 ElseIf ( CellX == 5 )
  CoE 5 1
 ElseIf ( CellX == 6 )
  CoE 6 1
 ElseIf ( CellX == 7 )
  CoE 7 1
 ElseIf ( CellX == 8 )
  CoE 8 1
 ElseIf ( CellX == 9 )
  CoE 9 1
 ElseIf ( CellX == 10 )
  CoE 10 1
 ElseIf ( CellX == 11 )
  CoE 11 1
 ElseIf ( CellX == 12 )
  CoE 12 1
 ElseIf ( CellX == 13 )
  CoE 13 1
 ElseIf ( CellX == 14 )
  CoE 14 1
 ElseIf ( CellX == 15 )
  CoE 15 1
 ElseIf ( CellX == 16 )
  CoE 16 1
 ElseIf ( CellX == 17 )
  CoE 17 1
 ElseIf ( CellX == 18 )
  CoE 18 1
 ElseIf ( CellX == 19 )
  CoE 19 1
 ElseIf ( CellX == 20 )
  CoE 20 1
 ElseIf ( CellX == 21 )
  CoE 21 1
 ElseIf ( CellX == 22 )
  CoE 22 1
 ElseIf ( CellX == 23 )
  CoE 23 1
 EndIf
EndIf

; standard script: stop it
StopScript "A1_DAT_SRT_CoE_V_Mid"

End