######################################################################### # Splitting # ######################################################################### Event OnSplit1() IF ($DiffSectorSplit1 > "0.00.50") THEN openPrivButton( "1st_split",2,111,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ENDIF IF ($DiffSectorSplit1 < "-0.00.00") THEN openPrivButton( "1st_split",2,111,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ENDIF /*openPrivButton( "1st_split_b",2,131,30,4,4,10,16,"Dif: " . $DiffSectorSplit1 );*/ EndEvent Event OnSplit2() IF ($DiffSectorSplit2 > "0.00.50") THEN openPrivButton( "2nd_split",2,111,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ENDIF IF ($DiffSectorSplit2 < "-0.00.00") THEN openPrivButton( "2nd_split",2,111,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ENDIF /*openPrivButton( "2nd_split_b",2,131,30,4,4,10,16,"Dif: " . $DiffSectorSplit2 );*/ EndEvent Event OnSplit3() IF ($DiffSectorSplit3 > "0.00.50") THEN openPrivButton( "3rd_split",2,111,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ENDIF IF ($DiffSectorSplit3 < "-0.00.00") THEN openPrivButton( "3rd_split",2,111,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ENDIF /*openPrivButton( "3rd_split_b",2,131,30,4,4,10,16,"Dif: " . $DiffSectorSplit3 );*/ EndEvent Event OnLap() IF ($DiffSectorSplitLast > "0.00.50") THEN openPrivButton( "last_split",2,111,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ENDIF IF ($DiffSectorSplitLast < "-0.00.00") THEN openPrivButton( "last_split",2,111,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ENDIF /*openPrivButton( "last_split_b",2,131,30,4,4,10,16,"Dif: " . $DiffSectorSplitLast );*/ EndEvent ######################################################################### # SPB Splitting # ######################################################################### # Private Messages that are send on spb. # Message on lower split : Message on upper split # Local var #----------------------------------------------------------------- $ShowSplitPB = true; Event OnSpbSplit1() IF( $isBestSectorSplit1 == 1 ) THEN $color = "^2"; ELSE $color = "^1"; ENDIF openPrivButton( "pitboard_total",1,70,32,50,5,-1,32,""); openPrivButton( "pitboard_txt",2,71,30,4,4,-1,32,"Pitboard" . "&" . $Nickname); closePrivButton("sec2_txt&sec3_txt&final_txt"); openPrivButton( "sec1_txt",2,79,15,4,4,-1,16,"Time sector 1:" . "&" . $color . $SectorSplit1); IF ( $SectorSplit1 < $BestSectorSplit1) THEN openPrivButton( "best_s1_txt",17,79,15,4,4,-1,16,"Best sector 1:" . "&" . $SectorSplit1); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_s1_txt",17,79,15,4,4,-1,16,"Best sector 1:" . "&" . $BestSectorSplit1); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ENDIF EndEvent Event OnSpbSplit2() IF( $isBestSectorSplit2 == 1 ) THEN $color = "^2"; ELSE $color = "^1"; ENDIF openPrivButton( "sec2_txt",2,87,15,4,4,-1,16,"Time sector 2:" . "&" . $color . $SectorSplit2); IF ( $SectorSplit2 < $BestSectorSplit2) THEN openPrivButton( "best_s2_txt",17,87,15,4,4,-1,16,"Best sector 2:" . "&" . $SectorSplit2); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_s2_txt",17,87,15,4,4,-1,16,"Best sector 2:" . "&" . $BestSectorSplit2); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ENDIF EndEvent Event OnSpbSplit3() IF( $isBestSectorSplit3 == 1 ) THEN $color = "^2"; ELSE $color = "^1"; ENDIF openPrivButton( "sec3_txt",2,95,15,4,4,-1,16,"Time sector 3:" . "&" . $color . $SectorSplit3); IF ( $SectorSplit3 < $BestSectorSplit3) THEN openPrivButton( "best_s3_txt",17,95,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplit3); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_s3_txt",17,95,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplit3); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ENDIF EndEvent Event OnSpbLast() IF( $isBestSectorSplitLast == 1 ) THEN $color = "^2"; ELSE $color = "^1"; ENDIF openPrivButton( "final_txt",2,95,15,4,4,-1,16,"Time sector 3:" . "&" . $color . $SectorSplitLast); IF ( $SectorSplitLast < $BestSectorSplitLast) THEN openPrivButton( "best_final_txt",17,95,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplitLast); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_final_txt",17,95,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplitLast); openPrivButton( "best_lap_txt",17,103,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ENDIF openPrivButton( "last_lap_txt",2,103,15,4,4,-1,16,"Last lap:" . "&" . $LapTime); EndEvent ################################################################# # Actions to do on splits relative to trackinfo.cfg. You can override this in the track/car section # If more actions, separate them with ':'. If different action by split time, separate them with ':' ################################################################# # Local variable # {SplitTime} - Split time ################################################################# Sub TRI_split1_0() /*cmdLFS( "/msg Great 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "great_1st_split",2,115,30,4,4,10,16,"^2Great ^71st split " . $Nickname ); EndSub Sub TRI_split1_1() /*cmdLFS( "/msg Good 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "good_1st_split",2,115,30,4,4,10,16,"^3Good ^71st split " . $Nickname ); EndSub Sub TRI_split2_0() /*cmdLFS( "/msg Great 2nd split (" . $SplitTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "great_2nd_split",2,115,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); EndSub Sub TRI_split2_1() /*cmdLFS( "/msg Good 2nd split (" . $SplitTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "good_2nd_split",2,115,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); EndSub Sub TRI_split3_0() /*cmdLFS( "/msg Great 3rd split (" . $SplitTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "great_3rd_split",2,115,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); EndSub Sub TRI_split3_1() /*cmdLFS( "/msg Good 3rd split (" . $SplitTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "good_3rd_split",2,115,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); EndSub Sub TRI_lap_0() /*cmdLFS( "/msg Great lap (" . $LapTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "great_lap",2,115,30,4,4,10,16,"^2Great ^7lap " . $Nickname ); EndSub Sub TRI_lap_1() /*cmdLFS( "/msg Great lap (" . $LapTime . ") by " . $Nickname . "^8!" );*/ closeGlobalButton("great_1st_split&good_1st_split&great_2nd_split&good_2nd_split&great_3rd_split&good_3rd_split&great_lap&good_lap"); openGlobalButton( "good_lap",2,115,30,4,4,10,16,"^3Good ^7lap " . $Nickname ); EndSub