Begin A1_DAT_SRT_CoE_V_Hi

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 (28,-26) to (28,-18)
If ( CellY == 28 )
 If ( CellX == -26 )
  CoE -26 28
 ElseIf ( CellX == -25 )
  CoE -25 28
 ElseIf ( CellX == -24 )
  CoE -24 28
 ElseIf ( CellX == -23 )
  CoE -23 28
 ElseIf ( CellX == -22 )
  CoE -22 28
 ElseIf ( CellX == -21 )
  CoE -21 28
 ElseIf ( CellX == -20 )
  CoE -20 28
 ElseIf ( CellX == -19 )
  CoE -19 28
 ElseIf ( CellX == -18 )
  CoE -18 28
 EndIf
EndIf

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

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

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

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

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

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

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

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

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

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

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

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

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

; standard script: stop it
StopScript "A1_DAT_SRT_CoE_V_Hi"

End