#################################### #Event triggered when Lapper starts# ###################################$ Event OnLapperStart() PlayerVar $pitboard_pos = "1"; PlayerVar $pitboard_high_lr = "1"; PlayerVar $pitboard_high_tb = "70"; PlayerVar $pitboard_splits = ""; PlayerVar $pitboard_compare = "0"; GlobalVar $number_of_stops; $number_of_stops=""; GlobalVar $pitwindow_1; $pitwindow_1=""; GlobalVar $pitwindow_2; $pitwindow_2=""; GlobalVar $pitstop_value; $pitstop_value=""; PlayerVar $penalty_check="false"; GlobalVar $safetycar; $safetycar="false"; GlobalVar $safetycar_status; $safetycar_status=""; GlobalVar $safetycar_status_b; $safetycar_status_b=""; GlobalVar $sc_status; $sc_status="3"; GlobalVar $nextlap; $nextlap="1"; GlobalVar $leader_split1; $leader_split1=""; GlobalVar $leader_split2; $leader_split2=""; GlobalVar $leader_split3; $leader_split3=""; GlobalVar $leader_split4; $leader_split4=""; GlobalVar $leader_laptime; $leader_laptime=""; GlobalVar $leader_name; $leader_name=""; GlobalVar $DiffLeaderSplit1; $DiffLeaderSplit1=""; GlobalVar $DiffLeaderSplit2; $DiffLeaderSplit2=""; GlobalVar $DiffLeaderSplit3; $DiffLeaderSplit3=""; GlobalVar $DiffLeaderSplit4; $DiffLeaderSplit4=""; GlobalVar $player_1_pitstops; GlobalVar $player_2_pitstops; GlobalVar $player_3_pitstops; GlobalVar $player_4_pitstops; GlobalVar $player_5_pitstops; GlobalVar $player_6_pitstops; GlobalVar $player_7_pitstops; GlobalVar $player_8_pitstops; GlobalVar $player_9_pitstops; GlobalVar $player_10_pitstops; GlobalVar $player_11_pitstops; GlobalVar $player_12_pitstops; GlobalVar $player_13_pitstops; GlobalVar $player_14_pitstops; GlobalVar $player_15_pitstops; GlobalVar $player_16_pitstops; GlobalVar $player_17_pitstops; GlobalVar $player_18_pitstops; GlobalVar $player_19_pitstops; GlobalVar $player_20_pitstops; GlobalVar $player_21_pitstops; GlobalVar $player_22_pitstops; GlobalVar $player_23_pitstops; GlobalVar $player_24_pitstops; GlobalVar $player_25_pitstops; GlobalVar $player_26_pitstops; GlobalVar $player_27_pitstops; GlobalVar $player_28_pitstops; GlobalVar $player_29_pitstops; GlobalVar $player_30_pitstops; GlobalVar $player_31_pitstops; GlobalVar $player_32_pitstops; $player_1_pitstops=""; $player_2_pitstops=""; $player_3_pitstops=""; $player_4_pitstops=""; $player_5_pitstops=""; $player_6_pitstops=""; $player_7_pitstops=""; $player_8_pitstops=""; $player_9_pitstops=""; $player_10_pitstops=""; $player_11_pitstops=""; $player_12_pitstops=""; $player_13_pitstops=""; $player_14_pitstops=""; $player_15_pitstops=""; $player_16_pitstops=""; $player_17_pitstops=""; $player_18_pitstops=""; $player_19_pitstops=""; $player_20_pitstops=""; $player_21_pitstops=""; $player_22_pitstops=""; $player_23_pitstops=""; $player_24_pitstops=""; $player_25_pitstops=""; $player_26_pitstops=""; $player_27_pitstops=""; $player_28_pitstops=""; $player_29_pitstops=""; $player_30_pitstops=""; $player_31_pitstops=""; $player_32_pitstops=""; GlobalVar $player_1; GlobalVar $player_2; GlobalVar $player_3; GlobalVar $player_4; GlobalVar $player_5; GlobalVar $player_6; GlobalVar $player_7; GlobalVar $player_8; GlobalVar $player_9; GlobalVar $player_10; GlobalVar $player_11; GlobalVar $player_12; GlobalVar $player_13; GlobalVar $player_14; GlobalVar $player_15; GlobalVar $player_16; GlobalVar $player_17; GlobalVar $player_18; GlobalVar $player_19; GlobalVar $player_20; GlobalVar $player_21; GlobalVar $player_22; GlobalVar $player_23; GlobalVar $player_24; GlobalVar $player_25; GlobalVar $player_26; GlobalVar $player_27; GlobalVar $player_28; GlobalVar $player_29; GlobalVar $player_30; GlobalVar $player_31; GlobalVar $player_32; $player_1=""; $player_2=""; $player_3=""; $player_4=""; $player_5=""; $player_6=""; $player_7=""; $player_8=""; $player_9=""; $player_10=""; $player_11=""; $player_12=""; $player_13=""; $player_14=""; $player_15=""; $player_16=""; $player_17=""; $player_18=""; $player_19=""; $player_20=""; $player_21=""; $player_22=""; $player_23=""; $player_24=""; $player_25=""; $player_26=""; $player_27=""; $player_28=""; $player_29=""; $player_30=""; $player_31=""; $player_32=""; GlobalVar $player_1_username; GlobalVar $player_2_username; GlobalVar $player_3_username; GlobalVar $player_4_username; GlobalVar $player_5_username; GlobalVar $player_6_username; GlobalVar $player_7_username; GlobalVar $player_8_username; GlobalVar $player_9_username; GlobalVar $player_10_username; GlobalVar $player_11_username; GlobalVar $player_12_username; GlobalVar $player_13_username; GlobalVar $player_14_username; GlobalVar $player_15_username; GlobalVar $player_16_username; GlobalVar $player_17_username; GlobalVar $player_18_username; GlobalVar $player_19_username; GlobalVar $player_20_username; GlobalVar $player_21_username; GlobalVar $player_22_username; GlobalVar $player_23_username; GlobalVar $player_24_username; GlobalVar $player_25_username; GlobalVar $player_26_username; GlobalVar $player_27_username; GlobalVar $player_28_username; GlobalVar $player_29_username; GlobalVar $player_30_username; GlobalVar $player_31_username; GlobalVar $player_32_username; $player_1_username=""; $player_2_username=""; $player_3_username=""; $player_4_username=""; $player_5_username=""; $player_6_username=""; $player_7_username=""; $player_8_username=""; $player_9_username=""; $player_10_username=""; $player_11_username=""; $player_12_username=""; $player_13_username=""; $player_14_username=""; $player_15_username=""; $player_16_username=""; $player_17_username=""; $player_18_username=""; $player_19_username=""; $player_20_username=""; $player_21_username=""; $player_22_username=""; $player_23_username=""; $player_24_username=""; $player_25_username=""; $player_26_username=""; $player_27_username=""; $player_28_username=""; $player_29_username=""; $player_30_username=""; $player_31_username=""; $player_32_username=""; EndEvent ################################################# #Connect messages when a player joins the server# ################################################# Sub OnConnectClose() Config(); IF ($player_1 == "") THEN $player_1=$Nickname; $player_1_username=$Username; $player_1_pitstops=$number_of_stops; ELSE IF ($player_2 == "") THEN $player_2=$Nickname; $player_2_username=$Username; $player_2_pitstops=$number_of_stops; ELSE IF ($player_3 == "") THEN $player_3=$Nickname; $player_3_username=$Username; $player_3_pitstops=$number_of_stops; ELSE IF ($player_4 == "") THEN $player_4=$Nickname; $player_4_username=$Username; $player_4_pitstops=$number_of_stops; ELSE IF ($player_5 == "") THEN $player_5=$Nickname; $player_5_username=$Username; $player_5_pitstops=$number_of_stops; ELSE IF ($player_6 == "") THEN $player_6=$Nickname; $player_6_username=$Username; $player_6_pitstops=$number_of_stops; ELSE IF ($player_7 == "") THEN $player_7=$Nickname; $player_7_username=$Username; $player_7_pitstops=$number_of_stops; ELSE IF ($player_8 == "") THEN $player_8=$Nickname; $player_8_username=$Username; $player_8_pitstops=$number_of_stops; ELSE IF ($player_9 == "") THEN $player_9=$Nickname; $player_9_username=$Username; $player_9_pitstops=$number_of_stops; ELSE IF ($player_10 == "") THEN $player_10=$Nickname; $player_10_username=$Username; $player_10_pitstops=$number_of_stops; ELSE IF ($player_11 == "") THEN $player_11=$Nickname; $player_11_username=$Username; $player_11_pitstops=$number_of_stops; ELSE IF ($player_12 == "") THEN $player_12=$Nickname; $player_12_username=$Username; $player_12_pitstops=$number_of_stops; ELSE IF ($player_13 == "") THEN $player_13=$Nickname; $player_13_username=$Username; $player_13_pitstops=$number_of_stops; ELSE IF ($player_14 == "") THEN $player_14=$Nickname; $player_14_username=$Username; $player_14_pitstops=$number_of_stops; ELSE IF ($player_15 == "") THEN $player_15=$Nickname; $player_15_username=$Username; $player_15_pitstops=$number_of_stops; ELSE IF ($player_16 == "") THEN $player_16=$Nickname; $player_16_username=$Username; $player_16_pitstops=$number_of_stops; ELSE IF ($player_17 == "") THEN $player_17=$Nickname; $player_17_username=$Username; $player_17_pitstops=$number_of_stops; ELSE IF ($player_18 == "") THEN $player_18=$Nickname; $player_18_username=$Username; $player_18_pitstops=$number_of_stops; ELSE IF ($player_19 == "") THEN $player_19=$Nickname; $player_19_username=$Username; $player_19_pitstops=$number_of_stops; ELSE IF ($player_20 == "") THEN $player_20=$Nickname; $player_20_username=$Username; $player_20_pitstops=$number_of_stops; ELSE IF ($player_21 == "") THEN $player_21=$Nickname; $player_21_username=$Username; $player_21_pitstops=$number_of_stops; ELSE IF ($player_22 == "") THEN $player_22=$Nickname; $player_22_username=$Username; $player_22_pitstops=$number_of_stops; ELSE IF ($player_23 == "") THEN $player_23=$Nickname; $player_23_username=$Username; $player_23_pitstops=$number_of_stops; ELSE IF ($player_24 == "") THEN $player_24=$Nickname; $player_24_username=$Username; $player_24_pitstops=$number_of_stops; ELSE IF ($player_25 == "") THEN $player_25=$Nickname; $player_25_username=$Username; $player_25_pitstops=$number_of_stops; ELSE IF ($player_26 == "") THEN $player_26=$Nickname; $player_26_username=$Username; $player_26_pitstops=$number_of_stops; ELSE IF ($player_27 == "") THEN $player_27=$Nickname; $player_27_username=$Username; $player_27_pitstops=$number_of_stops; ELSE IF ($player_28 == "") THEN $player_28=$Nickname; $player_28_username=$Username; $player_28_pitstops=$number_of_stops; ELSE IF ($player_29 == "") THEN $player_29=$Nickname; $player_29_username=$Username; $player_29_pitstops=$number_of_stops; ELSE IF ($player_30 == "") THEN $player_30=$Nickname; $player_30_username=$Username; $player_30_pitstops=$number_of_stops; ELSE IF ($player_31 == "") THEN $player_31=$Nickname; $player_31_username=$Username; $player_31_pitstops=$number_of_stops; ELSE IF ($player_32 == "") THEN $player_32=$Nickname; $player_32_username=$Username; $player_32_pitstops=$number_of_stops; ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF EndSub ##################################################### #DisConnect messages when a player leaves the server# ##################################################### Event OnDisConnect() IF ($Username == $player_1_username) THEN $player_1=""; $player_1_username=""; $player_1_pitstops=""; ELSE IF ($Username == $player_2_username) THEN $player_2=""; $player_2_username=""; $player_2_pitstops=""; ELSE IF ($Username == $player_3_username) THEN $player_3=""; $player_3_username=""; $player_3_pitstops=""; ELSE IF ($Username == $player_4_username) THEN $player_4=""; $player_4_username=""; $player_4_pitstops=""; ELSE IF ($Username == $player_5_username) THEN $player_5=""; $player_5_username=""; $player_5_pitstops=""; ELSE IF ($Username == $player_6_username) THEN $player_6=""; $player_6_username=""; $player_6_pitstops=""; ELSE IF ($Username == $player_7_username) THEN $player_7=""; $player_7_username=""; $player_7_pitstops=""; ELSE IF ($Username == $player_8_username) THEN $player_8=""; $player_8_username=""; $player_8_pitstops=""; ELSE IF ($Username == $player_9_username) THEN $player_9=""; $player_9_username=""; $player_9_pitstops=""; ELSE IF ($Username == $player_10_username) THEN $player_10=""; $player_10_username=""; $player_10_pitstops=""; ELSE IF ($Username == $player_11_username) THEN $player_11=""; $player_11_username=""; $player_11_pitstops=""; ELSE IF ($Username == $player_12_username) THEN $player_12=""; $player_12_username=""; $player_12_pitstops=""; ELSE IF ($Username == $player_13_username) THEN $player_13=""; $player_13_username=""; $player_13_pitstops=""; ELSE IF ($Username == $player_14_username) THEN $player_14=""; $player_14_username=""; $player_14_pitstops=""; ELSE IF ($Username == $player_15_username) THEN $player_15=""; $player_15_username=""; $player_15_pitstops=""; ELSE IF ($Username == $player_16_username) THEN $player_16=""; $player_16_username=""; $player_16_pitstops=""; ELSE IF ($Username == $player_17_username) THEN $player_17=""; $player_17_username=""; $player_17_pitstops=""; ELSE IF ($Username == $player_18_username) THEN $player_18=""; $player_18_username=""; $player_18_pitstops=""; ELSE IF ($Username == $player_19_username) THEN $player_19=""; $player_19_username=""; $player_19_pitstops=""; ELSE IF ($Username == $player_20_username) THEN $player_20=""; $player_20_username=""; $player_20_pitstops=""; ELSE IF ($Username == $player_21_username) THEN $player_21=""; $player_21_username=""; $player_21_pitstops=""; ELSE IF ($Username == $player_22_username) THEN $player_22=""; $player_22_username=""; $player_22_pitstops=""; ELSE IF ($Username == $player_23_username) THEN $player_23=""; $player_23_username=""; $player_23_pitstops=""; ELSE IF ($Username == $player_24_username) THEN $player_24=""; $player_24_username=""; $player_24_pitstops=""; ELSE IF ($Username == $player_25_username) THEN $player_25=""; $player_25_username=""; $player_25_pitstops=""; ELSE IF ($Username == $player_26_username) THEN $player_26=""; $player_26_username=""; $player_26_pitstops=""; ELSE IF ($Username == $player_27_username) THEN $player_27=""; $player_27_username=""; $player_27_pitstops=""; ELSE IF ($Username == $player_28_username) THEN $player_28=""; $player_28_username=""; $player_28_pitstops=""; ELSE IF ($Username == $player_29_username) THEN $player_29=""; $player_29_username=""; $player_29_pitstops=""; ELSE IF ($Username == $player_30_username) THEN $player_30=""; $player_30_username=""; $player_30_pitstops=""; ELSE IF ($Username == $player_31_username) THEN $player_31=""; $player_31_username=""; $player_31_pitstops=""; ELSE IF ($Username == $player_32_username) THEN $player_32=""; $player_32_username=""; $player_32_pitstops=""; ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF EndEvent #############################################$# #Splitting (general action when passing split)# ############################################### Event OnSplit1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; $DiffLeaderSplit1=$SectorSplit1-$leader_split1; IF ($safetycar != "true") THEN closePrivButton("SC"); IF ($pitboard_pos != "0" ) THEN IF ($pitboard_compare == "0") THEN IF ($DiffSectorSplit1 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit1 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit1 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit1 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit1 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ENDIF ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF ($DiffSectorSplit1 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit1 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit1 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit1 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit1 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ELSE IF ($DiffSectorSplit1 < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ENDIF ENDIF ENDIF ELSE IF ($DiffLeaderSplit1 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit1 ); ELSE IF ($DiffLeaderSplit1 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit1 ); ELSE IF ($DiffLeaderSplit1 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit1 ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit1 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit1 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit1 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^3you've on the same split^8" ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit1 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit1 ); ELSE IF ($DiffLeaderSplit1 < "-0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit1 ); ELSE IF ($DiffLeaderSplit1 < "-0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit1 ); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_pos != "0" ) THEN IF ($pitboard_splits == "4") THEN openPrivButton( "SC",$origT+1,$origL+49,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "3") THEN openPrivButton( "SC",$origT+1,$origL+41,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "2") THEN openPrivButton( "SC",$origT+1,$origL+33,30,8,4,-1,16,$safetycar_status ); ENDIF ENDIF ENDIF ELSE privMsg( $safetycar_status_b ); ENDIF ENDIF EndEvent Event OnSplit2() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; $DiffLeaderSplit2=$SectorSplit2-$leader_split2; IF ($safetycar != "true") THEN closePrivButton("SC"); IF ($pitboard_pos != "0" ) THEN IF ($pitboard_compare == "0") THEN IF ($DiffSectorSplit2 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit2 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit2 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit2 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit2 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ENDIF ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF ($DiffSectorSplit2 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit2 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit2 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit2 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit2 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ELSE IF ($DiffSectorSplit2 < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ENDIF ENDIF ENDIF ELSE IF ($DiffLeaderSplit2 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit2 ); ELSE IF ($DiffLeaderSplit2 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit2 ); ELSE IF ($DiffLeaderSplit2 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit2 ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit2 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit2 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit2 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^3you've on the same split^8" ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit2 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit2 ); ELSE IF ($DiffLeaderSplit2 < "-0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit2 ); ELSE IF ($DiffLeaderSplit2 < "-0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "2nd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit2 ); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_pos != "0" ) THEN IF ($pitboard_splits == "4") THEN openPrivButton( "SC",$origT+1,$origL+49,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "3") THEN openPrivButton( "SC",$origT+1,$origL+41,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "2") THEN openPrivButton( "SC",$origT+1,$origL+33,30,8,4,-1,16,$safetycar_status ); ENDIF ENDIF ENDIF ELSE privMsg( $safetycar_status_b ); ENDIF ENDIF EndEvent Event OnSplit3() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; $DiffLeaderSplit3=$SectorSplit3-$leader_split3; IF ($safetycar != "true") THEN closePrivButton("SC"); IF ($pitboard_pos != "0" ) THEN IF ($pitboard_compare == "0") THEN IF ($DiffSectorSplit3 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit3 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit3 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit3 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit3 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ENDIF ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF ($DiffSectorSplit3 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit3 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit3 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplit3 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit3 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ELSE IF ($DiffSectorSplit3 < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ENDIF ENDIF ENDIF ELSE IF ($DiffLeaderSplit3 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit3 ); ELSE IF ($DiffLeaderSplit3 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit3 ); ELSE IF ($DiffLeaderSplit3 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit3 ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit3 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit3 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit3 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^3you've on the same split^8" ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit3 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit3 ); ELSE IF ($DiffLeaderSplit3 < "-0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit3 ); ELSE IF ($DiffLeaderSplit3 < "-0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "3rd_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit3 ); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_pos != "0" ) THEN IF ($pitboard_splits == "4") THEN openPrivButton( "SC",$origT+1,$origL+49,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "3") THEN openPrivButton( "SC",$origT+1,$origL+41,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "2") THEN openPrivButton( "SC",$origT+1,$origL+33,30,8,4,-1,16,$safetycar_status ); ENDIF ENDIF ENDIF ELSE privMsg( $safetycar_status_b ); ENDIF ENDIF EndEvent Event OnLap() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; $DiffLeaderSplit4=$SectorSplitLast-$leader_split4; IF ($safetycar != "true") THEN closePrivButton("SC"); IF ($pitboard_pos != "0" ) THEN IF ($pitboard_compare == "0") THEN IF ($DiffSectorSplitLast > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ENDIF ENDIF ENDIF IF ($DiffSectorSplitLast == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplitLast == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplitLast == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplitLast < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ENDIF ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF ($DiffSectorSplitLast > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ENDIF ENDIF ENDIF IF ($DiffSectorSplitLast == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplitLast == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($DiffSectorSplitLast == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplitLast < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast < "-0.00.00" && $pitboard_splits == "3" ) THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ELSE IF ($DiffSectorSplitLast < "-0.00.00" && $pitboard_splits == "2" ) THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ENDIF ENDIF ENDIF ELSE IF ($DiffLeaderSplit3 > "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit4 ); ELSE IF ($DiffLeaderSplit3 > "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit4 ); ELSE IF ($DiffLeaderSplit3 > "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit4 ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit3 == "0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit3 == "0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^3you've on the same split^8" ); ELSE IF ($DiffLeaderSplit3 == "0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^3you've on the same split^8" ); ENDIF ENDIF ENDIF IF ($DiffLeaderSplit3 < "-0.00.00" && $pitboard_splits == "4") THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit4 ); ELSE IF ($DiffLeaderSplit3 < "-0.00.00" && $pitboard_splits == "3") THEN openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit4 ); ELSE IF ($DiffLeaderSplit3 < "-0.00.00" && $pitboard_splits == "2") THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffLeaderSplit4 ); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_pos != "0" ) THEN IF ($pitboard_splits == "4") THEN openPrivButton( "SC",$origT+1,$origL+49,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "3") THEN openPrivButton( "SC",$origT+1,$origL+41,30,8,4,-1,16,$safetycar_status ); ELSE IF ($pitboard_splits == "2") THEN openPrivButton( "SC",$origT+1,$origL+33,30,8,4,-1,16,$safetycar_status ); ENDIF ENDIF ENDIF ELSE privMsg( $safetycar_status_b ); ENDIF ENDIF EndEvent ####################################################### #Splitting (compare player split to best player split)# ####################################################### $ShowSplitPB = true; # Set to false if you don't want to see messages about splits Event OnSpbSplit1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_compare == "0") THEN IF( $SectorSplit1 < $BestSectorSplit1 ) THEN $color = "^2"; ELSE IF( $SectorSplit1 == $BestSectorSplit1 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF( $SectorSplit1 < $BestSectorSplit1 ) THEN $color = "^2"; ELSE IF( $SectorSplit1 == $BestSectorSplit1 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF( $SectorSplit1 < $leader_split1 ) THEN $color = "^2"; ELSE IF( $SectorSplit1 == $leader_split1 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ENDIF ENDIF IF ($Username == $player_1_username) THEN $pitstop_value=$player_1_pitstops; ENDIF IF ($Username == $player_2_username) THEN $pitstop_value=$player_2_pitstops; ENDIF IF ($Username == $player_3_username) THEN $pitstop_value=$player_3_pitstops; ENDIF IF ($Username == $player_4_username) THEN $pitstop_value=$player_4_pitstops; ENDIF IF ($Username == $player_5_username) THEN $pitstop_value=$player_5_pitstops; ENDIF IF ($Username == $player_6_username) THEN $pitstop_value=$player_6_pitstops; ENDIF IF ($Username == $player_7_username) THEN $pitstop_value=$player_7_pitstops; ENDIF IF ($Username == $player_8_username) THEN $pitstop_value=$player_8_pitstops; ENDIF IF ($Username == $player_9_username) THEN $pitstop_value=$player_9_pitstops; ENDIF IF ($Username == $player_10_username) THEN $pitstop_value=$player_10_pitstops; ENDIF IF ($Username == $player_11_username) THEN $pitstop_value=$player_11_pitstops; ENDIF IF ($Username == $player_12_username) THEN $pitstop_value=$player_12_pitstops; ENDIF IF ($Username == $player_13_username) THEN $pitstop_value=$player_13_pitstops; ENDIF IF ($Username == $player_14_username) THEN $pitstop_value=$player_14_pitstops; ENDIF IF ($Username == $player_15_username) THEN $pitstop_value=$player_15_pitstops; ENDIF IF ($Username == $player_16_username) THEN $pitstop_value=$player_16_pitstops; ENDIF IF ($Username == $player_17_username) THEN $pitstop_value=$player_17_pitstops; ENDIF IF ($Username == $player_18_username) THEN $pitstop_value=$player_18_pitstops; ENDIF IF ($Username == $player_19_username) THEN $pitstop_value=$player_19_pitstops; ENDIF IF ($Username == $player_20_username) THEN $pitstop_value=$player_20_pitstops; ENDIF IF ($Username == $player_21_username) THEN $pitstop_value=$player_21_pitstops; ENDIF IF ($Username == $player_22_username) THEN $pitstop_value=$player_22_pitstops; ENDIF IF ($Username == $player_23_username) THEN $pitstop_value=$player_23_pitstops; ENDIF IF ($Username == $player_24_username) THEN $pitstop_value=$player_24_pitstops; ENDIF IF ($Username == $player_25_username) THEN $pitstop_value=$player_25_pitstops; ENDIF IF ($Username == $player_26_username) THEN $pitstop_value=$player_26_pitstops; ENDIF IF ($Username == $player_27_username) THEN $pitstop_value=$player_27_pitstops; ENDIF IF ($Username == $player_28_username) THEN $pitstop_value=$player_28_pitstops; ENDIF IF ($Username == $player_29_username) THEN $pitstop_value=$player_29_pitstops; ENDIF IF ($Username == $player_30_username) THEN $pitstop_value=$player_30_pitstops; ENDIF IF ($Username == $player_31_username) THEN $pitstop_value=$player_31_pitstops; ENDIF IF ($Username == $player_32_username) THEN $pitstop_value=$player_32_pitstops; ENDIF IF ($LapsDone == 0) THEN IF ($leader_name == "") THEN $leader_name=$Username; $leader_split1=$SectorSplit1; ENDIF ELSE IF ($Username == $leader_name) THEN $leader_split1=$SectorSplit1; ENDIF ENDIF IF ($pitboard_pos == "0" ) THEN IF ($pitboard_compare == "0") THEN privMsg( "^7SP1: " . $SectorSplit1 . " (" . $color . $DiffSectorSplit1 . "^7) =>TPB: " .$Tpb ); ELSE IF ($Username == $leader_name) THEN privMsg( "^7SP1: " . $SectorSplit1 . " (" . $color . $DiffSectorSplit1 . "^7) =>TPB: " .$Tpb ); ELSE privMsg( "^7SP1: " . $SectorSplit1 . " (" . $color . $leader_split1 . "^7) =>TPB: " .$Tpb ); ENDIF ENDIF IF ($number_of_stops == "") THEN IF ($LapsDone == 0) THEN privMsg( "^7Pitlane: ^2OPEN^7 , Stops: -"); $penalty_check="false"; ENDIF ELSE IF ($LapsDone == 0) THEN privMsg( "^7Pitlane: ^1CLOSED^8, ^7Stops: ^1" . $pitstop_value); $penalty_check="false"; ENDIF ENDIF ELSE IF ($pitboard_splits == "4" ) THEN openPrivButton( "pitboard_total",$origT,$origL,32,58,5,-1,32,""); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "pitboard_total",$origT,$origL,32,42,5,-1,32,""); ELSE openPrivButton( "pitboard_total",$origT,$origL,32,50,5,-1,32,""); ENDIF ENDIF openPrivButton( "pitboard_txt",$origT+1,$origL+1,30,4,4,-1,32,"Pitboard " . $Nickname); openPrivButton( "pitboard_stops",$origT+1,$origL+5,10,4,4,-1,80,"Pitstops:"); openPrivButton( "pitboard_pit_status",$origT+16,$origL+5,6,4,4,-1,16,"Pit:"); IF ($number_of_stops == "") THEN IF ($LapsDone == 0) THEN openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^2" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^2OPEN^8"); $penalty_check="false"; ENDIF ELSE IF ($LapsDone == 0) THEN openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^1" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^1CLOSED^8"); $penalty_check="false"; ENDIF ENDIF closePrivButton("sec2_txt&sec3_txt&final_txt"); openPrivButton( "sec1_txt",$origT+1,$origL+9,15,4,4,-1,16,"Time sector 1:" . "&" . $color . $SectorSplit1); IF ( $SectorSplit1 < $BestSectorSplit1) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Best sector 1:" . "&" . $SectorSplit1); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Best sector 1:" . "&" . $SectorSplit1); ELSE openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Leader sector 1:" . "&" . $leader_split1); ENDIF ENDIF IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Best sector 1:" . "&" . $BestSectorSplit1); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Best sector 1:" . "&" . $BestSectorSplit1); ELSE openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Leader sector 1:" . "&" . $leader_split1); ENDIF ENDIF IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF EndEvent Event OnSpbSplit2() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_compare == "0") THEN IF( $SectorSplit2 < $BestSectorSplit2 ) THEN $color = "^2"; ELSE IF( $SectorSplit2 == $BestSectorSplit2 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF( $SectorSplit2 < $BestSectorSplit2 ) THEN $color = "^2"; ELSE IF( $SectorSplit2 == $BestSectorSplit2 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF( $SectorSplit2 < $leader_split2 ) THEN $color = "^2"; ELSE IF( $SectorSplit2 == $leader_split2 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ENDIF ENDIF IF ($Username == $leader_name) THEN $leader_split2=$SectorSplit2; ENDIF IF ($pitboard_pos == "0" ) THEN IF ($pitboard_compare == "0") THEN privMsg( "^7SP2: " . $SectorSplit2 . " (" . $color . $DiffSectorSplit2 . "^7) =>TPB: " .$Tpb ); ELSE IF ($Username == $leader_name) THEN privMsg( "^7SP2: " . $SectorSplit2 . " (" . $color . $DiffSectorSplit2 . "^7) =>TPB: " .$Tpb ); ELSE privMsg( "^7SP2: " . $SectorSplit2 . " (" . $color . $leader_split2 . "^7) =>TPB: " .$Tpb ); ENDIF ENDIF ELSE openPrivButton( "sec2_txt",$origT+1,$origL+17,15,4,4,-1,16,"Time sector 2:" . "&" . $color . $SectorSplit2); IF ( $SectorSplit2 < $BestSectorSplit2) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $SectorSplit2); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $SectorSplit2); ELSE openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Leader sector 2:" . "&" . $leader_split2); ENDIF ENDIF IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $BestSectorSplit2); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $BestSectorSplit2); ELSE openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Leader sector 2:" . "&" . $leader_split2); ENDIF ENDIF IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF EndEvent Event OnSpbSplit3() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_compare == "0") THEN IF( $SectorSplit3 < $BestSectorSplit3 ) THEN $color = "^2"; ELSE IF( $SectorSplit3 == $BestSectorSplit3 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF( $SectorSplit3 < $BestSectorSplit3 ) THEN $color = "^2"; ELSE IF( $SectorSplit3 == $BestSectorSplit3 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF( $SectorSplit3 < $leader_split3 ) THEN $color = "^2"; ELSE IF( $SectorSplit3 == $leader_split3 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ENDIF ENDIF IF ($Username == $leader_name) THEN $leader_split3=$SectorSplit3; ENDIF IF ($pitboard_pos == "0" ) THEN IF ($pitboard_compare == "0") THEN privMsg( "^7SP3: " . $SectorSplit3 . " (" . $color . $DiffSectorSplit3 . "^7) =>TPB: " .$Tpb ); ELSE IF ($Username == $leader_name) THEN privMsg( "^7SP3: " . $SectorSplit3 . " (" . $color . $DiffSectorSplit3 . "^7) =>TPB: " .$Tpb ); ELSE privMsg( "^7SP3: " . $SectorSplit3 . " (" . $color . $SectorSplit3 . "^7) =>TPB: " .$Tpb ); ENDIF ENDIF ELSE openPrivButton( "sec3_txt",$origT+1,$origL+25,15,4,4,-1,16,"Time sector 3:" . "&" . $color . $SectorSplit3); IF ( $SectorSplit3 < $BestSectorSplit3) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplit3); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplit3); ELSE openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader sector 3:" . "&" . $leader_split3); ENDIF ENDIF IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplit3); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplit3); ELSE openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader sector 3:" . "&" . $leader_split3); ENDIF ENDIF IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF EndEvent Event OnSpbLast() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_compare == "0") THEN IF( $SectorSplitLast < $BestSectorSplitLast ) THEN $color = "^2"; ELSE IF( $SectorSplitLast == $BestSectorSplitLast ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF ($Username == $leader_name) THEN IF( $SectorSplitLast < $BestSectorSplitLast ) THEN $color = "^2"; ELSE IF( $SectorSplitLast == $BestSectorSplitLast ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ELSE IF( $SectorSplitLast < $leader_split4 ) THEN $color = "^2"; ELSE IF( $SectorSplitLast == $leader_split4 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF ENDIF ENDIF IF ($Username == $player_1_username) THEN $pitstop_value=$player_1_pitstops; ENDIF IF ($Username == $player_2_username) THEN $pitstop_value=$player_2_pitstops; ENDIF IF ($Username == $player_3_username) THEN $pitstop_value=$player_3_pitstops; ENDIF IF ($Username == $player_4_username) THEN $pitstop_value=$player_4_pitstops; ENDIF IF ($Username == $player_5_username) THEN $pitstop_value=$player_5_pitstops; ENDIF IF ($Username == $player_6_username) THEN $pitstop_value=$player_6_pitstops; ENDIF IF ($Username == $player_7_username) THEN $pitstop_value=$player_7_pitstops; ENDIF IF ($Username == $player_8_username) THEN $pitstop_value=$player_8_pitstops; ENDIF IF ($Username == $player_9_username) THEN $pitstop_value=$player_9_pitstops; ENDIF IF ($Username == $player_10_username) THEN $pitstop_value=$player_10_pitstops; ENDIF IF ($Username == $player_11_username) THEN $pitstop_value=$player_11_pitstops; ENDIF IF ($Username == $player_12_username) THEN $pitstop_value=$player_12_pitstops; ENDIF IF ($Username == $player_13_username) THEN $pitstop_value=$player_13_pitstops; ENDIF IF ($Username == $player_14_username) THEN $pitstop_value=$player_14_pitstops; ENDIF IF ($Username == $player_15_username) THEN $pitstop_value=$player_15_pitstops; ENDIF IF ($Username == $player_16_username) THEN $pitstop_value=$player_16_pitstops; ENDIF IF ($Username == $player_17_username) THEN $pitstop_value=$player_17_pitstops; ENDIF IF ($Username == $player_18_username) THEN $pitstop_value=$player_18_pitstops; ENDIF IF ($Username == $player_19_username) THEN $pitstop_value=$player_19_pitstops; ENDIF IF ($Username == $player_20_username) THEN $pitstop_value=$player_20_pitstops; ENDIF IF ($Username == $player_21_username) THEN $pitstop_value=$player_21_pitstops; ENDIF IF ($Username == $player_22_username) THEN $pitstop_value=$player_22_pitstops; ENDIF IF ($Username == $player_23_username) THEN $pitstop_value=$player_23_pitstops; ENDIF IF ($Username == $player_24_username) THEN $pitstop_value=$player_24_pitstops; ENDIF IF ($Username == $player_25_username) THEN $pitstop_value=$player_25_pitstops; ENDIF IF ($Username == $player_26_username) THEN $pitstop_value=$player_26_pitstops; ENDIF IF ($Username == $player_27_username) THEN $pitstop_value=$player_27_pitstops; ENDIF IF ($Username == $player_28_username) THEN $pitstop_value=$player_28_pitstops; ENDIF IF ($Username == $player_29_username) THEN $pitstop_value=$player_29_pitstops; ENDIF IF ($Username == $player_30_username) THEN $pitstop_value=$player_30_pitstops; ENDIF IF ($Username == $player_31_username) THEN $pitstop_value=$player_31_pitstops; ENDIF IF ($Username == $player_32_username) THEN $pitstop_value=$player_32_pitstops; ENDIF IF ($LapsDone == $nextlap) THEN $nextlap=$nextlap+1; $leader_name=$Username; $leader_split4=$SectorSplitLast; $leader_laptime=$LapTime; ENDIF IF ($pitboard_pos == "0" ) THEN IF ($pitboard_compare == "0") THEN privMsg( "^7SPL: " . $SectorSplitLast . " (" . $color . $DiffSectorSplitLast . "^7) =>TPB: " . $Tpb . " , AVG: " . $AvgSpeed . " " . $UnitSpeed ); ELSE IF ($Username == $leader_name) THEN privMsg( "^7SPL: " . $SectorSplitLast . " (" . $color . $DiffSectorSplitLast . "^7) =>TPB: " . $Tpb . " , AVG: " . $AvgSpeed . " " . $UnitSpeed ); ELSE privMsg( "^7SPL: " . $SectorSplitLast . " (" . $color . $leader_split4 . "^7) =>TPB: " . $Tpb . " , AVG: " . $AvgSpeed . " " . $UnitSpeed ); ENDIF ENDIF IF ($number_of_stops == "") THEN privMsg( "^7Pitlane: ^2OPEN^7 , Stops: -"); ELSE IF ($LapsDone < $pitwindow_1) THEN privMsg( "^7Pitlane: ^1CLOSED^7 , Stops: ^1" . $pitstop_value); ELSE IF ($LapsDone == $pitwindow_1) THEN privMsg( "^7Pitlane: ^2OPEN^7 , Stops: ^1" . $pitstop_value); ELSE IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($pitstop_value == 0) THEN privMsg( "^7Pitlane: ^2OPEN^7 , Stops: ^2" . $pitstop_value); ELSE privMsg( "^7Pitlane: ^2OPEN^7 , Stops: ^1" . $pitstop_value); ENDIF ELSE IF ($LapsDone >= $pitwindow_2) THEN IF ($pitstop_value == 0) THEN privMsg( "^7Pitlane: ^1CLOSED^7 , Stops: ^2" . $pitstop_value); ELSE privMsg( "^7Pitlane: ^1CLOSED^7 , Stops: ^1" . $pitstop_value); Penalty_not_pitted_within_window(); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_splits == "4" ) THEN openPrivButton( "final_txt",$origT+1,$origL+33,15,4,4,-1,16,"Time sector 4:" . "&" . $color . $SectorSplitLast); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "final_txt",$origT+1,$origL+17,15,4,4,-1,16,"Time sector 2:" . "&" . $color . $SectorSplitLast); ELSE openPrivButton( "final_txt",$origT+1,$origL+25,15,4,4,-1,16,"Time sector 3:" . "&" . $color . $SectorSplitLast); ENDIF ENDIF IF ( $SectorSplitLast < $BestSectorSplitLast) THEN IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best sector 4:" . "&" . $SectorSplitLast); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best sector 4:" . "&" . $SectorSplitLast); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader sector 4:" . "&" . $leader_split4); ENDIF ENDIF IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $SectorSplitLast); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $SectorSplitLast); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Leader sector 2:" . "&" . $leader_split4); ENDIF ENDIF IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplitLast); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplitLast); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader sector 3:" . "&" . $leader_split4); ENDIF ENDIF IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ELSE IF ($pitboard_splits == "4" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best sector 4:" . "&" . $BestSectorSplitLast); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best sector 4:" . "&" . $BestSectorSplitLast); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader sector 4:" . "&" . $leader_split4); ENDIF ENDIF IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_splits == "2" ) THEN IF ($pitboard_compare == "0") THEN openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $BestSectorSplitLast); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $BestSectorSplitLast); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Leader sector 2:" . "&" . $leader_split4); ENDIF ENDIF IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ELSE IF ($pitboard_compare == "0") THEN openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplitLast); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplitLast); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Leader sector 3:" . "&" . $leader_split4); ENDIF ENDIF IF ($pitboard_compare == "0") THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($Username == $leader_name) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Leader lap:" . "&" . $leader_laptime); ENDIF ENDIF ENDIF ENDIF ENDIF IF ($pitboard_splits == "4" ) THEN openPrivButton( "last_lap_txt",$origT+1,$origL+41,15,4,4,-1,16,"Last lap:" . "&" . $LapTime); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "last_lap_txt",$origT+1,$origL+25,15,4,4,-1,16,"Last lap:" . "&" . $LapTime); ELSE openPrivButton( "last_lap_txt",$origT+1,$origL+33,15,4,4,-1,16,"Last lap:" . "&" . $LapTime); ENDIF ENDIF IF ($number_of_stops == "") THEN openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^2" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^2OPEN^8"); ELSE IF ($LapsDone < $pitwindow_1) THEN openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^1" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^1CLOSED^8"); ELSE IF ($LapsDone == $pitwindow_1) THEN IF ($pitstop_value == 0) THEN openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^2" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^2OPEN^8"); ELSE openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^1" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^2OPEN^8"); ENDIF ELSE IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($pitstop_value == 0) THEN openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^2" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^2OPEN^8"); ELSE openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^1" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^2OPEN^8"); ENDIF ELSE IF ($LapsDone >= $pitwindow_2) THEN IF ($pitstop_value == 0) THEN openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^2" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^1CLOSED^8"); ELSE openPrivButton( "pitboard_stops_b",$origT+11,$origL+5,5,4,4,-1,16,"^1" . $pitstop_value); openPrivButton( "pitboard_pit_status_b",$origT+22,$origL+5,9,4,4,-1,16,"^1CLOSED^8"); Penalty_not_pitted_within_window(); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF EndEvent #################################################### #Actions to do on splits relative to trackinfo.cfg# #################################################### #Local variable: {SplitTime} - Split time #------------------------------------------------------------------- Sub TRI_split1_0() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Great 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "great_1st_split",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^71st split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "great_1st_split",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^71st split " . $Nickname ); ELSE openGlobalButton( "great_1st_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^71st split " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub Sub TRI_split1_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Good 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "good_1st_split",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^71st split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "good_1st_split",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^71st split " . $Nickname ); ELSE openGlobalButton( "good_1st_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^71st split " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub Sub TRI_split2_0() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Great 2nd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "great_2nd_split",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "great_2nd_split",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); ELSE openGlobalButton( "great_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub Sub TRI_split2_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Good 2nd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "good_2nd_split",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "good_2nd_split",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); ELSE openGlobalButton( "good_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub Sub TRI_split3_0() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Great 3rd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "great_3rd_split",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "great_3rd_split",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); ELSE openGlobalButton( "great_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub Sub TRI_split3_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Good 3rd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "good_3rd_split",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "good_3rd_split",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); ELSE openGlobalButton( "good_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub Sub TRI_lap_0() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Great lap (" . $LapTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "great_lap",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^7lap " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "great_lap",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^7lap " . $Nickname ); ELSE openGlobalButton( "great_lap",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^7lap " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub Sub TRI_lap_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($safetycar != "true") THEN IF ($pitboard_pos == "0" ) THEN privMsg( "Good lap (" . $LapTime . ") by " . $Nickname . "^8!" ); ELSE closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); IF ($pitboard_splits == "4" ) THEN openGlobalButton( "good_lap",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^7lap " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openGlobalButton( "good_lap",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^7lap " . $Nickname ); ELSE openGlobalButton( "good_lap",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^7lap " . $Nickname ); ENDIF ENDIF ENDIF ENDIF EndSub ################# #Command actions# ################# Register MsgAction("!config",Config); Sub Config() IF ($ShortTrackName == "FE4" || $ShortTrackName == "FE4R" || $ShortTrackName == "AS6" || $ShortTrackName == "AS6R" || $ShortTrackName == "AS7" || $ShortTrackName == "AS7R") THEN $pitboard_splits = "4"; ELSE IF ($ShortTrackName == "BL1" || $ShortTrackName == "BL1R" || $ShortTrackName == "BL1" || $ShortTrackName == "SO4" || $ShortTrackName == "SO4R" || $ShortTrackName == "SO5" || $ShortTrackName == "SO5R" || $ShortTrackName == "FE2" || $ShortTrackName == "FE2R" || $ShortTrackName == "FE3" || $ShortTrackName == "FE3R" || $ShortTrackName == "KY2" || $ShortTrackName == "KY2R" || $ShortTrackName == "KY3" || $ShortTrackName == "KY3R" || $ShortTrackName == "WE1" || $ShortTrackName == "WE1R" || $ShortTrackName == "AS4" || $ShortTrackName == "AS4R" || $ShortTrackName == "AS5" || $ShortTrackName == "AS5R") THEN $pitboard_splits = "3"; ELSE IF ($ShortTrackName == "BL2" || $ShortTrackName == "BL2R" || $ShortTrackName == "SO1" || $ShortTrackName == "SO1R" || $ShortTrackName == "SO2" || $ShortTrackName == "SO2R" || $ShortTrackName == "SO3" || $ShortTrackName == "SO3R" || $ShortTrackName == "SO6" || $ShortTrackName == "SO6R" || $ShortTrackName == "FE1" || $ShortTrackName == "FE1R" || $ShortTrackName == "FE5" || $ShortTrackName == "FE5R" || $ShortTrackName == "FE6" || $ShortTrackName == "FE6R" || $ShortTrackName == "KY1" || $ShortTrackName == "KY1R" || $ShortTrackName == "AS1" || $ShortTrackName == "AS1R" || $ShortTrackName == "AS2" || $ShortTrackName == "AS2R" || $ShortTrackName == "AS3" || $ShortTrackName == "AS3R") THEN $pitboard_splits = "2"; ENDIF ENDIF ENDIF openPrivButton( "config_bg",49,49,102,73,5,-1,32,"" ); openPrivButton( "config_title",50,50,50,5,5,-1,0,"^3Configure pitboard^8" ); openPrivButton( "config_title_2",50,55,50,5,5,-1,0,"^3V1.42b^8" ); openPrivButton( "position_1a",51,61,15,5,5,-1,64,"Position:" ); IF ($pitboard_pos == "1" ) THEN openPrivButton( "position_1b",67,61,10,5,5,-1,16,"^2Left^8",Pitboard_left ); ELSE openPrivButton( "position_1b",67,61,10,5,5,-1,16,"Left",Pitboard_left ); ENDIF IF ($pitboard_pos == "2" ) THEN openPrivButton( "position_1c",78,61,10,5,5,-1,16,"^2Right^8",Pitboard_right ); ELSE openPrivButton( "position_1c",78,61,10,5,5,-1,16,"Right",Pitboard_right ); ENDIF IF ($pitboard_pos == "0" ) THEN openPrivButton( "position_1d",89,61,10,5,5,-1,16,"^2Off^8",Pitboard_off ); ELSE openPrivButton( "position_1d",89,61,10,5,5,-1,16,"Off",Pitboard_off ); ENDIF openPrivButton( "height_1a",51,67,15,5,5,-1,64,"Height:" ); IF ($pitboard_high_tb == "70" ) THEN openPrivButton( "height_1b",67,67,10,5,5,-1,16,"^2High^8",Pitboard_high ); ELSE openPrivButton( "height_1b",67,67,10,5,5,-1,16,"High",Pitboard_high ); ENDIF IF ($pitboard_high_tb == "125" ) THEN openPrivButton( "height_1c",78,67,10,5,5,-1,16,"^2Low^8",Pitboard_low ); ELSE openPrivButton( "height_1c",78,67,10,5,5,-1,16,"Low",Pitboard_low ); ENDIF openPrivButton( "compare_1a",51,73,15,5,5,-1,64,"Compare:" ); IF ($pitboard_compare == "0" ) THEN openPrivButton( "compare_1b",67,73,10,5,5,-1,16,"^2Self^8",Pitboard_compare_self ); ELSE openPrivButton( "compare_1b",67,73,10,5,5,-1,16,"Self",Pitboard_compare_self ); ENDIF IF ($pitboard_compare == "1" ) THEN openPrivButton( "compare_1c",78,73,10,5,5,-1,16,"^2Leader^8",Pitboard_compare_leader ); ELSE openPrivButton( "compare_1c",78,73,10,5,5,-1,16,"Leader",Pitboard_compare_leader ); ENDIF openPrivButton( "new",100,51,50,5,5,-1,80,"^7News:" . "&" . "&^7- 1.41 / 1.41b:" . "&^3- Added safetycar options" . "&^3- Cleaned up code" . "&" . "&^7- 1.42:" . "&^3- Added option to compare times to leader" . "&^3- Number of splits is auto configured" . "&" . "&^7- 1.42b:" . "&^3- Added RCM for SC deployed / SC in" . "&^3- Added command to clear pitwindow"); openPrivButton( "config_close_a",71,115,10,5,5,-1,16,"CLOSE",Config_close_b ); EndSub Sub Config_close_b() closePrivButton("config_bg&config_title&config_title_2&position_1a&position_1b&position_1c&position_1d&height_1a&height_1b&height_1c&split_1a&split_1b&split_1c&split_1d&compare_1a&compare_1b&compare_1c&new&config_close_a"); EndSub Sub Pitboard_left() $pitboard_pos = "1"; $pitboard_high_lr = "1"; Config(); EndSub Sub Pitboard_right() $pitboard_pos = "2"; $pitboard_high_lr = "167"; Config(); EndSub Sub Pitboard_off() $pitboard_pos = "0"; closePrivButton("pitboard_total&pitboard_txt&pitboard_stops&pitboard_stops_b&pitboard_pit_status&pitboard_pit_status_b&sec1_txt&best_s1_txt&sec2_txt&best_s2_txt&sec3_txt&best_s3_txt&final_txt&best_final_txt&last_lap_txt&best_lap_txt&SC"); Config(); EndSub Sub Pitboard_high() $pitboard_high_tb = "70"; closePrivButton("pitboard_total&pitboard_txt&pitboard_stops&pitboard_stops_b&pitboard_pit_status&pitboard_pit_status_b&sec1_txt&best_s1_txt&sec2_txt&best_s2_txt&sec3_txt&best_s3_txt&final_txt&best_final_txt&last_lap_txt&best_lap_txt&SC"); Config(); EndSub Sub Pitboard_low() $pitboard_high_tb = "125"; closePrivButton("pitboard_total&pitboard_txt&pitboard_stops&pitboard_stops_b&pitboard_pit_status&pitboard_pit_status_b&sec1_txt&best_s1_txt&sec2_txt&best_s2_txt&sec3_txt&best_s3_txt&final_txt&best_final_txt&last_lap_txt&best_lap_txt&SC"); Config(); EndSub Sub Pitboard_compare_self() $pitboard_compare="0"; closePrivButton("pitboard_total&pitboard_txt&pitboard_stops&pitboard_stops_b&pitboard_pit_status&pitboard_pit_status_b&sec1_txt&best_s1_txt&sec2_txt&best_s2_txt&sec3_txt&best_s3_txt&final_txt&best_final_txt&last_lap_txt&best_lap_txt&SC"); Config(); EndSub Sub Pitboard_compare_leader() $pitboard_compare="1"; closePrivButton("pitboard_total&pitboard_txt&pitboard_stops&pitboard_stops_b&pitboard_pit_status&pitboard_pit_status_b&sec1_txt&best_s1_txt&sec2_txt&best_s2_txt&sec3_txt&best_s3_txt&final_txt&best_final_txt&last_lap_txt&best_lap_txt&SC"); Config(); EndSub Register MsgAction("!stops",Stops); Sub Stops() $allow = "Yisc[NL]"; $number_of_stops= $argv; # cmdLFS ("/msg Number of mandatory pitstops is set to: " . $number_of_stops); $player_1_pitstops=$number_of_stops; $player_2_pitstops=$number_of_stops; $player_3_pitstops=$number_of_stops; $player_4_pitstops=$number_of_stops; $player_5_pitstops=$number_of_stops; $player_6_pitstops=$number_of_stops; $player_7_pitstops=$number_of_stops; $player_8_pitstops=$number_of_stops; $player_9_pitstops=$number_of_stops; $player_10_pitstops=$number_of_stops; $player_11_pitstops=$number_of_stops; $player_12_pitstops=$number_of_stops; $player_13_pitstops=$number_of_stops; $player_14_pitstops=$number_of_stops; $player_15_pitstops=$number_of_stops; $player_16_pitstops=$number_of_stops; $player_17_pitstops=$number_of_stops; $player_18_pitstops=$number_of_stops; $player_19_pitstops=$number_of_stops; $player_20_pitstops=$number_of_stops; $player_21_pitstops=$number_of_stops; $player_22_pitstops=$number_of_stops; $player_23_pitstops=$number_of_stops; $player_24_pitstops=$number_of_stops; $player_25_pitstops=$number_of_stops; $player_26_pitstops=$number_of_stops; $player_27_pitstops=$number_of_stops; $player_28_pitstops=$number_of_stops; $player_29_pitstops=$number_of_stops; $player_30_pitstops=$number_of_stops; $player_31_pitstops=$number_of_stops; $player_32_pitstops=$number_of_stops; EndSub Register MsgAction("!pitwindowstart",Pitwindowstart); Sub Pitwindowstart() $allow = "Yisc[NL]"; $pitwindow_1=$argv+0; EndSub Register MsgAction("!pitwindowstop",Pitwindowstop); Sub Pitwindowstop() $allow = "Yisc[NL]"; $pitwindow_2=$argv+0; # cmdLFS ("/msg Pitwindow is set to: " . $pitwindow_1 . " - " . $pitwindow_2); $pitwindow_1=$pitwindow_1-1; # Verminderen met 1 omdat de ronden waar je in zit ook goed is om te pitten EndSub Register MsgAction("!pitwindowclear",Pitwindowclear); Sub Pitwindowclear() $allow = "Yisc[NL]"; $number_of_stops=""; $player_1_pitstops=$number_of_stops; $player_2_pitstops=$number_of_stops; $player_3_pitstops=$number_of_stops; $player_4_pitstops=$number_of_stops; $player_5_pitstops=$number_of_stops; $player_6_pitstops=$number_of_stops; $player_7_pitstops=$number_of_stops; $player_8_pitstops=$number_of_stops; $player_9_pitstops=$number_of_stops; $player_10_pitstops=$number_of_stops; $player_11_pitstops=$number_of_stops; $player_12_pitstops=$number_of_stops; $player_13_pitstops=$number_of_stops; $player_14_pitstops=$number_of_stops; $player_15_pitstops=$number_of_stops; $player_16_pitstops=$number_of_stops; $player_17_pitstops=$number_of_stops; $player_18_pitstops=$number_of_stops; $player_19_pitstops=$number_of_stops; $player_20_pitstops=$number_of_stops; $player_21_pitstops=$number_of_stops; $player_22_pitstops=$number_of_stops; $player_23_pitstops=$number_of_stops; $player_24_pitstops=$number_of_stops; $player_25_pitstops=$number_of_stops; $player_26_pitstops=$number_of_stops; $player_27_pitstops=$number_of_stops; $player_28_pitstops=$number_of_stops; $player_29_pitstops=$number_of_stops; $player_30_pitstops=$number_of_stops; $player_31_pitstops=$number_of_stops; $player_32_pitstops=$number_of_stops; $pitwindow_1=""; $pitwindow_2=""; EndSub Register MsgAction("!pitwindow",Pitwindow); Sub Pitwindow() IF ($pitwindow_1 == "") THEN cmdLFS ("/msg ^7No pitwindow is set^8"); ELSE cmdLFS ("/msg ^7Pitwindow is set to: " . $pitwindow_1+1 . " - " . $pitwindow_2); ENDIF EndSub Register MsgAction("!pen",Penalty_not_pitted_within_window); Sub Penalty_not_pitted_within_window() IF ($Username == $player_1_username) THEN IF ($player_1_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_1_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_2_username) THEN IF ($player_2_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_2_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_3_username) THEN IF ($player_3_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_3_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_4_username) THEN IF ($player_4_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_4_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_5_username) THEN IF ($player_5_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_5_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_6_username) THEN IF ($player_6_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_6_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_7_username) THEN IF ($player_7_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_7_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_8_username) THEN IF ($player_8_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_8_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_9_username) THEN IF ($player_9_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_9_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_10_username) THEN IF ($player_10_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_10_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_11_username) THEN IF ($player_11_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_11_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_12_username) THEN IF ($player_12_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_12_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_13_username) THEN IF ($player_13_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_13_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_14_username) THEN IF ($player_14_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_14_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_15_username) THEN IF ($player_15_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_15_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_16_username) THEN IF ($player_16_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_16_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_17_username) THEN IF ($player_17_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_17_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_18_username) THEN IF ($player_18_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_18_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_19_username) THEN IF ($player_19_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_19_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_20_username) THEN IF ($player_20_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_20_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_21_username) THEN IF ($player_21_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_21_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_22_username) THEN IF ($player_22_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_22_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_23_username) THEN IF ($player_23_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_23_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_24_username) THEN IF ($player_24_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_24_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_25_username) THEN IF ($player_25_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_25_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_26_username) THEN IF ($player_26_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_26_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_27_username) THEN IF ($player_27_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_27_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_28_username) THEN IF ($player_28_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_28_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_29_username) THEN IF ($player_29_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_29_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_30_username) THEN IF ($player_30_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_30_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_31_username) THEN IF ($player_31_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_31_username); $penalty_check="true"; ENDIF ENDIF ENDIF IF ($Username == $player_32_username) THEN IF ($player_32_pitstops > 0) THEN IF ($penalty_check == "false") THEN cmdLFS ("/p_45 " . $player_32_username); $penalty_check="true"; ENDIF ENDIF ENDIF EndSub Register MsgAction("!sc",SC); Sub SC() $allow = "Yisc[NL]"; openPrivButton( "sc_bg",79,0,42,7,5,-1,32,""); IF ($sc_status == "1") THEN openPrivButton( "sc_out",80,1,10,5,5,-1,16,"^2SC OUT",SC_OUT); ELSE openPrivButton( "sc_out",80,1,10,5,5,-1,16,"^3SC OUT",SC_OUT); ENDIF IF ($sc_status == "2") THEN openPrivButton( "sc_in",90,1,10,5,5,-1,16,"^2SC IN",SC_IN); ELSE openPrivButton( "sc_in",90,1,10,5,5,-1,16,"^3SC IN",SC_IN); ENDIF IF ($sc_status == "3") THEN openPrivButton( "sc_off",100,1,10,5,5,-1,16,"^2SC OFF",SC_OFF); ELSE openPrivButton( "sc_off",100,1,10,5,5,-1,16,"^3SC OFF",SC_OFF); ENDIF openPrivButton( "close_sc",110,1,10,5,5,-1,16,"^7Close",Close_SC); EndSub Sub SC_OUT() $safetycar="true"; $safetycar_status="^3! SC DEPLOYED !^8"; $safetycar_status_b="^3!!! SAFETYCAR DEPLOYED !!!^8"; $sc_status="1"; cmdLFS ("/rcm ^3Safety car deployed, NO overtaking^8"); cmdLFS ("/rcm_all"); cmdLFS ("/press 9"); SC(); EndSub Sub SC_IN() $safetycar_status="^3SC IN THIS LAP^8"; $safetycar_status_b="^3SAFETYCAR IN THIS LAP^8"; $sc_status="2"; cmdLFS ("/rcm ^3Safety car in this lap"); cmdLFS ("/rcm_all"); cmdLFS ("/press 0"); SC(); EndSub Sub SC_OFF() $safetycar="false"; $sc_status="3"; SC(); EndSub Sub Close_SC() closePrivButton( "sc_bg&sc_out&sc_in&sc_off&close_sc"); EndSub ##################################### #Action on teleport to pit (Shift+P)# ##################################### Event EnterPitAction() IF ($Username == $player_1_username) THEN $player_1_pitstops=$number_of_stops; ENDIF IF ($Username == $player_2_username) THEN $player_2_pitstops=$number_of_stops; ENDIF IF ($Username == $player_3_username) THEN $player_3_pitstops=$number_of_stops; ENDIF IF ($Username == $player_4_username) THEN $player_4_pitstops=$number_of_stops; ENDIF IF ($Username == $player_5_username) THEN $player_5_pitstops=$number_of_stops; ENDIF IF ($Username == $player_6_username) THEN $player_6_pitstops=$number_of_stops; ENDIF IF ($Username == $player_7_username) THEN $player_7_pitstops=$number_of_stops; ENDIF IF ($Username == $player_8_username) THEN $player_8_pitstops=$number_of_stops; ENDIF IF ($Username == $player_9_username) THEN $player_9_pitstops=$number_of_stops; ENDIF IF ($Username == $player_10_username) THEN $player_10_pitstops=$number_of_stops; ENDIF IF ($Username == $player_11_username) THEN $player_11_pitstops=$number_of_stops; ENDIF IF ($Username == $player_12_username) THEN $player_12_pitstops=$number_of_stops; ENDIF IF ($Username == $player_13_username) THEN $player_13_pitstops=$number_of_stops; ENDIF IF ($Username == $player_14_username) THEN $player_14_pitstops=$number_of_stops; ENDIF IF ($Username == $player_15_username) THEN $player_15_pitstops=$number_of_stops; ENDIF IF ($Username == $player_16_username) THEN $player_16_pitstops=$number_of_stops; ENDIF IF ($Username == $player_17_username) THEN $player_17_pitstops=$number_of_stops; ENDIF IF ($Username == $player_18_username) THEN $player_18_pitstops=$number_of_stops; ENDIF IF ($Username == $player_19_username) THEN $player_19_pitstops=$number_of_stops; ENDIF IF ($Username == $player_20_username) THEN $player_20_pitstops=$number_of_stops; ENDIF IF ($Username == $player_21_username) THEN $player_21_pitstops=$number_of_stops; ENDIF IF ($Username == $player_22_username) THEN $player_22_pitstops=$number_of_stops; ENDIF IF ($Username == $player_23_username) THEN $player_23_pitstops=$number_of_stops; ENDIF IF ($Username == $player_24_username) THEN $player_24_pitstops=$number_of_stops; ENDIF IF ($Username == $player_25_username) THEN $player_25_pitstops=$number_of_stops; ENDIF IF ($Username == $player_26_username) THEN $player_26_pitstops=$number_of_stops; ENDIF IF ($Username == $player_27_username) THEN $player_27_pitstops=$number_of_stops; ENDIF IF ($Username == $player_28_username) THEN $player_28_pitstops=$number_of_stops; ENDIF IF ($Username == $player_29_username) THEN $player_29_pitstops=$number_of_stops; ENDIF IF ($Username == $player_30_username) THEN $player_30_pitstops=$number_of_stops; ENDIF IF ($Username == $player_31_username) THEN $player_31_pitstops=$number_of_stops; ENDIF IF ($Username == $player_32_username) THEN $player_32_pitstops=$number_of_stops; ENDIF EndEvent ###################### #Action on race start# ###################### Event RaceStartAction() IF ($pitwindow_1 == "") THEN cmdLFS( "/rcm ^3Clean racing and have fun :-)" ); ELSE cmdLFS( "/rcm ^7Pitwindow is set to: ^2" . $pitwindow_1+1 . " ^7- ^1" . $pitwindow_2 ); ENDIF cmdLFS( "/rcm_all" ); $nextlap="1"; $leader_name=""; $leader_split1=""; $leader_split2=""; $leader_split3=""; $leader_split4=""; $leader_laptime=""; $player_1_pitstops=$number_of_stops; $player_2_pitstops=$number_of_stops; $player_3_pitstops=$number_of_stops; $player_4_pitstops=$number_of_stops; $player_5_pitstops=$number_of_stops; $player_6_pitstops=$number_of_stops; $player_7_pitstops=$number_of_stops; $player_8_pitstops=$number_of_stops; $player_9_pitstops=$number_of_stops; $player_10_pitstops=$number_of_stops; $player_11_pitstops=$number_of_stops; $player_12_pitstops=$number_of_stops; $player_13_pitstops=$number_of_stops; $player_14_pitstops=$number_of_stops; $player_15_pitstops=$number_of_stops; $player_16_pitstops=$number_of_stops; $player_17_pitstops=$number_of_stops; $player_18_pitstops=$number_of_stops; $player_19_pitstops=$number_of_stops; $player_20_pitstops=$number_of_stops; $player_21_pitstops=$number_of_stops; $player_22_pitstops=$number_of_stops; $player_23_pitstops=$number_of_stops; $player_24_pitstops=$number_of_stops; $player_25_pitstops=$number_of_stops; $player_26_pitstops=$number_of_stops; $player_27_pitstops=$number_of_stops; $player_28_pitstops=$number_of_stops; $player_29_pitstops=$number_of_stops; $player_30_pitstops=$number_of_stops; $player_31_pitstops=$number_of_stops; $player_32_pitstops=$number_of_stops; EndEvent ###################### #Actions for pit stop# ###################### Event OnEndPit() IF ($Username == $player_1_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_1_pitstops > 0) THEN $player_1_pitstops=$player_1_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_2_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_2_pitstops > 0) THEN $player_2_pitstops=$player_2_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_3_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_3_pitstops > 0) THEN $player_3_pitstops=$player_3_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_4_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_4_pitstops > 0) THEN $player_4_pitstops=$player_4_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_5_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_5_pitstops > 0) THEN $player_5_pitstops=$player_5_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_6_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_6_pitstops > 0) THEN $player_6_pitstops=$player_6_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_7_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_7_pitstops > 0) THEN $player_7_pitstops=$player_7_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_8_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_8_pitstops > 0) THEN $player_8_pitstops=$player_8_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_9_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_9_pitstops > 0) THEN $player_9_pitstops=$player_9_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_10_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_10_pitstops > 0) THEN $player_10_pitstops=$player_10_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_11_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_11_pitstops > 0) THEN $player_11_pitstops=$player_11_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_12_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_12_pitstops > 0) THEN $player_12_pitstops=$player_12_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_13_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_13_pitstops > 0) THEN $player_13_pitstops=$player_13_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_14_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_14_pitstops > 0) THEN $player_14_pitstops=$player_14_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_15_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_15_pitstops > 0) THEN $player_15_pitstops=$player_15_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_16_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_16_pitstops > 0) THEN $player_16_pitstops=$player_16_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_17_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_17_pitstops > 0) THEN $player_17_pitstops=$player_17_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_18_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_18_pitstops > 0) THEN $player_18_pitstops=$player_18_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_19_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_19_pitstops > 0) THEN $player_19_pitstops=$player_19_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_20_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_20_pitstops > 0) THEN $player_20_pitstops=$player_20_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_21_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_21_pitstops > 0) THEN $player_21_pitstops=$player_21_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_22_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_22_pitstops > 0) THEN $player_22_pitstops=$player_22_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_23_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_23_pitstops > 0) THEN $player_23_pitstops=$player_23_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_24_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_24_pitstops > 0) THEN $player_24_pitstops=$player_24_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_25_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_25_pitstops > 0) THEN $player_25_pitstops=$player_25_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_26_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_26_pitstops > 0) THEN $player_26_pitstops=$player_26_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_27_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_27_pitstops > 0) THEN $player_27_pitstops=$player_27_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_28_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_28_pitstops > 0) THEN $player_28_pitstops=$player_28_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_29_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_29_pitstops > 0) THEN $player_29_pitstops=$player_29_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_30_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_40_pitstops > 0) THEN $player_30_pitstops=$player_30_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_31_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_31_pitstops > 0) THEN $player_31_pitstops=$player_31_pitstops-1; ENDIF ENDIF ENDIF IF ($Username == $player_32_username) THEN IF ($LapsDone >= $pitwindow_1 && $LapsDone < $pitwindow_2) THEN IF ($player_32_pitstops > 0) THEN $player_32_pitstops=$player_32_pitstops-1; ENDIF ENDIF ENDIF EndEvent