Code : Tout sélectionner
Func _Ordre($initiative1,$initiative2,$initiative3,$initiative4,$initiative5,$initiative6,$initiative7,$initiative8,$initiative9,$initiative10,$ordre1,$ordre2,$ordre3,$ordre4,$ordre5,$ordre6,$ordre7,$ordre8,$ordre9,$ordre10)
Local $init[10] = [$initiative1,$initiative2,$initiative3,$initiative4,$initiative5,$initiative6,$initiative7,$initiative8,$initiative9,$initiative10]
_ArraySort($init,1)
If $init[0] = $initiative1 Then
$ordre1 = 1
ElseIf $init[1] = $initiative1 Then
$ordre1 = 2
ElseIf $init[2] = $initiative1 Then
$ordre1 = 3
ElseIf $init[3] = $initiative1 Then
$ordre1 = 4
ElseIf $init[4] = $initiative1 Then
$ordre1 = 5
ElseIf $init[5] = $initiative1 Then
$ordre1 = 6
ElseIf $init[6] = $initiative1 Then
$ordre1 = 7
ElseIf $init[7] = $initiative1 Then
$ordre1 = 8
ElseIf $init[8] = $initiative1 Then
$ordre1 = 9
ElseIf $init[9] = $initiative1 Then
$ordre1 = 10
EndIf
; 2
If $init[0] = $initiative2 Then
$ordre2 = 1
ElseIf $init[1] = $initiative2 Then
$ordre2 = 2
ElseIf $init[2] = $initiative2 Then
$ordre2 = 3
ElseIf $init[3] = $initiative2 Then
$ordre2 = 4
ElseIf $init[4] = $initiative2 Then
$ordre2 = 5
ElseIf $init[5] = $initiative2 Then
$ordre2 = 6
ElseIf $init[6] = $initiative2 Then
$ordre2 = 7
ElseIf $init[7] = $initiative2 Then
$ordre2 = 8
ElseIf $init[8] = $initiative2 Then
$ordre2 = 9
ElseIf $init[9] = $initiative2 Then
$ordre2 = 10
EndIf
; 3
If $init[0] = $initiative3 Then
$ordre3 = 1
ElseIf $init[1] = $initiative3 Then
$ordre3 = 2
ElseIf $init[2] = $initiative3 Then
$ordre3 = 3
ElseIf $init[3] = $initiative3 Then
$ordre3 = 4
ElseIf $init[4] = $initiative3 Then
$ordre3 = 5
ElseIf $init[5] = $initiative3 Then
$ordre3 = 6
ElseIf $init[6] = $initiative3 Then
$ordre3 = 7
ElseIf $init[7] = $initiative3 Then
$ordre3 = 8
ElseIf $init[8] = $initiative3 Then
$ordre3 = 9
ElseIf $init[9] = $initiative3 Then
$ordre3 = 10
EndIf
; 4
If $init[0] = $initiative4 Then
$ordre4 = 1
ElseIf $init[1] = $initiative4 Then
$ordre4 = 2
ElseIf $init[2] = $initiative4 Then
$ordre4 = 3
ElseIf $init[3] = $initiative4 Then
$ordre4 = 4
ElseIf $init[4] = $initiative4 Then
$ordre4 = 5
ElseIf $init[5] = $initiative4 Then
$ordre4 = 6
ElseIf $init[6] = $initiative4 Then
$ordre4 = 7
ElseIf $init[7] = $initiative4 Then
$ordre4 = 8
ElseIf $init[8] = $initiative4 Then
$ordre4 = 9
ElseIf $init[9] = $initiative4 Then
$ordre4 = 10
EndIf
; 5
If $init[0] = $initiative5 Then
$ordre5 = 1
ElseIf $init[1] = $initiative5 Then
$ordre5 = 2
ElseIf $init[2] = $initiative5 Then
$ordre5 = 3
ElseIf $init[3] = $initiative5 Then
$ordre5 = 4
ElseIf $init[4] = $initiative5 Then
$ordre5 = 5
ElseIf $init[5] = $initiative5 Then
$ordre5 = 6
ElseIf $init[6] = $initiative5 Then
$ordre5 = 7
ElseIf $init[7] = $initiative5 Then
$ordre5 = 8
ElseIf $init[8] = $initiative5 Then
$ordre5 = 9
ElseIf $init[9] = $initiative5 Then
$ordre5 = 10
EndIf
; 6
If $init[0] = $initiative6 Then
$ordre6 = 1
ElseIf $init[1] = $initiative6 Then
$ordre6 = 2
ElseIf $init[2] = $initiative6 Then
$ordre6 = 3
ElseIf $init[3] = $initiative6 Then
$ordre6 = 4
ElseIf $init[4] = $initiative6 Then
$ordre6 = 5
ElseIf $init[5] = $initiative6 Then
$ordre6 = 6
ElseIf $init[6] = $initiative6 Then
$ordre6 = 7
ElseIf $init[7] = $initiative6 Then
$ordre6 = 8
ElseIf $init[8] = $initiative6 Then
$ordre6 = 9
ElseIf $init[9] = $initiative6 Then
$ordre6 = 10
EndIf
; 7
If $init[0] = $initiative7 Then
$ordre7 = 1
ElseIf $init[1] = $initiative7 Then
$ordre7 = 2
ElseIf $init[2] = $initiative7 Then
$ordre7 = 3
ElseIf $init[3] = $initiative7 Then
$ordre7 = 4
ElseIf $init[4] = $initiative7 Then
$ordre7 = 5
ElseIf $init[5] = $initiative7 Then
$ordre7 = 6
ElseIf $init[6] = $initiative7 Then
$ordre7 = 7
ElseIf $init[7] = $initiative7 Then
$ordre7 = 8
ElseIf $init[8] = $initiative7 Then
$ordre7 = 9
ElseIf $init[9] = $initiative7 Then
$ordre7 = 10
EndIf
; 8
If $init[0] = $initiative8 Then
$ordre8 = 1
ElseIf $init[1] = $initiative8 Then
$ordre8 = 2
ElseIf $init[2] = $initiative8 Then
$ordre8 = 3
ElseIf $init[3] = $initiative8 Then
$ordre8 = 4
ElseIf $init[4] = $initiative8 Then
$ordre8 = 5
ElseIf $init[5] = $initiative8 Then
$ordre8 = 6
ElseIf $init[6] = $initiative8 Then
$ordre8 = 7
ElseIf $init[7] = $initiative8 Then
$ordre8 = 8
ElseIf $init[8] = $initiative8 Then
$ordre8 = 9
ElseIf $init[9] = $initiative8 Then
$ordre8 = 10
EndIf
; 9
If $init[0] = $initiative9 Then
$ordre9 = 1
ElseIf $init[1] = $initiative9 Then
$ordre9 = 2
ElseIf $init[2] = $initiative9 Then
$ordre9 = 3
ElseIf $init[3] = $initiative9 Then
$ordre9 = 4
ElseIf $init[4] = $initiative9 Then
$ordre9 = 5
ElseIf $init[5] = $initiative9 Then
$ordre9 = 6
ElseIf $init[6] = $initiative9 Then
$ordre9 = 7
ElseIf $init[7] = $initiative9 Then
$ordre9 = 8
ElseIf $init[8] = $initiative9 Then
$ordre9 = 9
ElseIf $init[9] = $initiative9 Then
$ordre9 = 10
EndIf
; 10
If $init[0] = $initiative10 Then
$ordre10 = 1
ElseIf $init[1] = $initiative10 Then
$ordre10 = 2
ElseIf $init[2] = $initiative10 Then
$ordre10 = 3
ElseIf $init[3] = $initiative10 Then
$ordre10 = 4
ElseIf $init[4] = $initiative10 Then
$ordre10 = 5
ElseIf $init[5] = $initiative10 Then
$ordre10 = 6
ElseIf $init[6] = $initiative10 Then
$ordre10 = 7
ElseIf $init[7] = $initiative10 Then
$ordre10 = 8
ElseIf $init[8] = $initiative10 Then
$ordre10 = 9
ElseIf $init[9] = $initiative10 Then
$ordre10 = 10
EndIf
EndFunc