######################################################################### # Event triggered when lapper start ######################################################################### Event OnLapperStart() PlayerVar $pitboard_pos = "1"; PlayerVar $pitboard_high_lr = "1"; PlayerVar $pitboard_high_tb = "70"; PlayerVar $pitboard_splits = "3"; EndEvent ######################################################################### # Connect messages # ######################################################################### # Message that is shown to players when they connect to the server. #----------------------------------------------------------------- Event OnConnect() openPrivButton( "welcome1a",50,50,100,5,5,-1,32,"^7Welcome at this ^1Absolute-beginners.nl^7 server" ); openPrivButton( "welcome2a",50,55,100,5,5,-1,32,"^7You are on server: " . $HostName ); openPrivButton( "rules1a",50,60,100,5,4,-1,96,"^1The rules:" . "&" . "&^7- Race clean and fair" . "&^7- Don't cut corners" . "&^7- Don't use swearwords and/or an offensive nickname" . "&^7- Respect pitlane exit" . "&^7- Respect ^4BLUE^7 and ^3YELLOW^7 flags" . "&" . "&^2General information:" . "&" . "&^7- Show all Lapper commands by typing: !help" . "&" . "&^7By accepting these rules you are binded to them" . "&" . "&" ); openPrivButton( "close",80,115,20,5,10,-1,16,"^2Accept",OnConnectClose ); openPrivButton( "refuse",100,115,20,5,10,-1,16,"^1Deny",OnConnectCloseKick ); openPrivButton( "info",124,68,25,5,4,-1,32,"Lapper version:" . "&" . "&5.714 - (C) Gai-Luron" ); openPrivButton( "info2",124,84,25,5,4,-1,32,"Server sponsored by:" . "&" . "&^4NXS^8 Internet" . "&http://www.nxs.nl" ); EndEvent Sub OnConnectClose() closePrivButton("welcome1a&welcome2a&rules1a&close&refuse&info&info2"); openPrivButton( "config_bg",50,50,100,56,5,-1,32,"" ); openPrivButton( "config_title",51,51,98,5,5,-1,0,"^3Configure pitboard^8" ); openPrivButton( "config_title_2",51,56,98,5,5,-1,0,"^3V1.32^8" ); openPrivButton( "position_1a",51,61,15,5,5,-1,64,"Position:" ); openPrivButton( "position_1b",67,61,10,5,5,-1,16,"^2Left^8",Pitboard_left ); openPrivButton( "position_1c",78,61,10,5,5,-1,16,"Right",Pitboard_right ); openPrivButton( "position_1d",89,61,10,5,5,-1,16,"Off",Pitboard_off ); openPrivButton( "height_1a",51,67,15,5,5,-1,64,"Height:" ); openPrivButton( "height_1b",67,67,10,5,5,-1,16,"^2High^8",Pitboard_high ); openPrivButton( "height_1c",78,67,10,5,5,-1,16,"Low",Pitboard_low ); openPrivButton( "split_1a",51,73,15,5,5,-1,64,"Splits:" ); openPrivButton( "split_1b",67,73,10,5,5,-1,16,"2",Pitboard_spl2 ); openPrivButton( "split_1c",78,73,10,5,5,-1,16,"^23^8",Pitboard_spl3 ); openPrivButton( "split_1d",89,73,10,5,5,-1,16,"4",Pitboard_spl4 ); openPrivButton( "new",51,83,98,5,5,-1,64,"^3V1.32: Bug corrected in great/good split" ); openPrivButton( "config_close_a",94,100,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&new&config_close_a"); EndSub Sub Pitboard_left() openPrivButton( "position_1b",67,61,10,5,5,-1,16,"^2Left^8",Pitboard_left ); openPrivButton( "position_1c",78,61,10,5,5,-1,16,"Right",Pitboard_right ); openPrivButton( "position_1d",89,61,10,5,5,-1,16,"Off",Pitboard_off ); $pitboard_pos = "1"; $pitboard_high_lr = "1"; $pitboard_high_tb = "70"; EndSub Sub Pitboard_right() openPrivButton( "position_1b",67,61,10,5,5,-1,16,"Left",Pitboard_left ); openPrivButton( "position_1c",78,61,10,5,5,-1,16,"^2Right^8",Pitboard_right ); openPrivButton( "position_1d",89,61,10,5,5,-1,16,"Off",Pitboard_off ); $pitboard_pos = "2"; $pitboard_high_lr = "167"; $pitboard_high_tb = "70"; EndSub Sub Pitboard_off() openPrivButton( "position_1b",67,61,10,5,5,-1,16,"Left",Pitboard_left ); openPrivButton( "position_1c",78,61,10,5,5,-1,16,"Right",Pitboard_right ); openPrivButton( "position_1d",89,61,10,5,5,-1,16,"^2Off^8",Pitboard_off ); $pitboard_pos = "0"; closePrivButton("pitboard_total&pitboard_txt&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"); EndSub Sub Pitboard_high() openPrivButton( "height_1b",67,67,10,5,5,-1,16,"^2High^8",Pitboard_high ); openPrivButton( "height_1c",78,67,10,5,5,-1,16,"Low",Pitboard_low ); IF ($pitboard_pos == "1") THEN $pitboard_high_lr = "1"; ELSE IF ($pitboard_pos == "2") THEN $pitboard_high_lr = "167"; ENDIF ENDIF $pitboard_high_tb = "70"; closePrivButton("pitboard_total&pitboard_txt&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"); EndSub Sub Pitboard_low() openPrivButton( "height_1b",67,67,10,5,5,-1,16,"High",Pitboard_high ); openPrivButton( "height_1c",78,67,10,5,5,-1,16,"^2Low^8",Pitboard_low ); IF ($pitboard_pos == "1") THEN $pitboard_high_lr = "1"; ELSE IF ($pitboard_pos == "2") THEN $pitboard_high_lr = "167"; ENDIF ENDIF $pitboard_high_tb = "125"; closePrivButton("pitboard_total&pitboard_txt&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"); EndSub Sub Pitboard_spl2() openPrivButton( "split_1b",67,73,10,5,5,-1,16,"^22^8",Pitboard_spl2 ); openPrivButton( "split_1c",78,73,10,5,5,-1,16,"3",Pitboard_spl3 ); openPrivButton( "split_1d",89,73,10,5,5,-1,16,"4",Pitboard_spl4 ); $pitboard_splits = "2"; closePrivButton("pitboard_total&pitboard_txt&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"); EndSub Sub Pitboard_spl3() openPrivButton( "split_1b",67,73,10,5,5,-1,16,"2",Pitboard_spl2 ); openPrivButton( "split_1c",78,73,10,5,5,-1,16,"^23^8",Pitboard_spl3 ); openPrivButton( "split_1d",89,73,10,5,5,-1,16,"4",Pitboard_spl4 ); $pitboard_splits = "3"; closePrivButton("pitboard_total&pitboard_txt&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"); EndSub Sub Pitboard_spl4() openPrivButton( "split_1b",67,73,10,5,5,-1,16,"2",Pitboard_spl2 ); openPrivButton( "split_1c",78,73,10,5,5,-1,16,"3",Pitboard_spl3 ); openPrivButton( "split_1d",89,73,10,5,5,-1,16,"^24^8",Pitboard_spl4 ); $pitboard_splits = "4"; closePrivButton("pitboard_total&pitboard_txt&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"); EndSub Sub OnConnectCloseKick() closePrivButton("welcome1a&welcome2a&rules1a&close&refuse&info&info2"); cmdLFS("/kick " . $Username ); EndSub ######################################################################### # Splitting # ######################################################################### Event OnSplit1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos != "0" ) THEN IF ($DiffSectorSplit1 > "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ELSE openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit1 ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit1 == "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ELSE openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplit1 < "-0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "1st_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "1st_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ELSE openPrivButton( "1st_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit1 ); ENDIF ENDIF ENDIF ENDIF EndEvent Event OnSplit2() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos != "0" ) THEN IF ($DiffSectorSplit2 > "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ELSE openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit2 ); ENDIF ENDIF IF ($DiffSectorSplit2 == "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF IF ($DiffSectorSplit2 < "-0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "2nd_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ELSE openPrivButton( "2nd_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit2 ); ENDIF ENDIF ENDIF EndEvent Event OnSplit3() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos != "0" ) THEN IF ($DiffSectorSplit3 > "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ELSE openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplit3 ); ENDIF ENDIF IF ($DiffSectorSplit3 == "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF IF ($DiffSectorSplit3 < "-0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "3rd_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ELSE openPrivButton( "3rd_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplit3 ); ENDIF ENDIF ENDIF EndEvent Event OnLap() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos != "0" ) THEN IF ($DiffSectorSplitLast > "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ELSE openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^1you've lost^8: " . $DiffSectorSplitLast ); ENDIF ENDIF ENDIF IF ($DiffSectorSplitLast == "0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^3you're on your best split" ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^3you're on your best split" ); ELSE openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^3you're on your best split" ); ENDIF ENDIF ENDIF IF ($DiffSectorSplitLast < "-0.00.00") THEN IF ($pitboard_splits == "4" ) THEN openPrivButton( "last_split",$origT+1,$origL+49,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "last_split",$origT+1,$origL+33,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ELSE openPrivButton( "last_split",$origT+1,$origL+41,30,4,4,10,16,"^2you've gained^8: " . $DiffSectorSplitLast ); ENDIF ENDIF ENDIF ENDIF EndEvent ######################################################################### # SPB Splitting # ######################################################################### # Private Messages that are send on spb. # Message on lower split : Message on upper split # Local var #----------------------------------------------------------------- $ShowSplitPB = true; Event OnSpbSplit1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF( $SectorSplit1 < $BestSectorSplit1 ) THEN $color = "^2"; ELSE IF( $SectorSplit1 == $BestSectorSplit1 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF IF ($pitboard_pos == "0" ) THEN privMsg( "^7SP1: " . $SectorSplit1 . " (" . $color . $DiffSectorSplit1 . "^7) =>TPB: " .$Tpb ); 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); 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 openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Best sector 1:" . "&" . $SectorSplit1); IF ($pitboard_splits == "4" ) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($pitboard_splits == "2" ) 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+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ENDIF ENDIF ELSE openPrivButton( "best_s1_txt",$origT+16,$origL+9,15,4,4,-1,16,"Best sector 1:" . "&" . $BestSectorSplit1); IF ($pitboard_splits == "4" ) THEN openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($pitboard_splits == "2" ) 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+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ENDIF ENDIF ENDIF ENDIF EndEvent Event OnSpbSplit2() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF( $SectorSplit2 < $BestSectorSplit2 ) THEN $color = "^2"; ELSE IF( $SectorSplit2 == $BestSectorSplit2 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF IF ($pitboard_pos == "0" ) THEN privMsg( "^7SP2: " . $SectorSplit2 . " (" . $color . $DiffSectorSplit2 . "^7) =>TPB: " .$Tpb ); ELSE openPrivButton( "sec2_txt",$origT+1,$origL+17,15,4,4,-1,16,"Time sector 2:" . "&" . $color . $SectorSplit2); IF ( $SectorSplit2 < $BestSectorSplit2) THEN openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $SectorSplit2); IF ($pitboard_splits == "4" ) 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+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ENDIF ELSE openPrivButton( "best_s2_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $BestSectorSplit2); IF ($pitboard_splits == "4" ) 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+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ENDIF ENDIF ENDIF EndEvent Event OnSpbSplit3() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF( $SectorSplit3 < $BestSectorSplit3 ) THEN $color = "^2"; ELSE IF( $SectorSplit3 == $BestSectorSplit3 ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF IF ($pitboard_pos == "0" ) THEN privMsg( "^7SP3: " . $SectorSplit3 . " (" . $color . $DiffSectorSplit3 . "^7) =>TPB: " .$Tpb ); ELSE openPrivButton( "sec3_txt",$origT+1,$origL+25,15,4,4,-1,16,"Time sector 3:" . "&" . $color . $SectorSplit3); IF ( $SectorSplit3 < $BestSectorSplit3) THEN openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplit3); IF ($pitboard_splits == "4" ) 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+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ENDIF ELSE openPrivButton( "best_s3_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplit3); IF ($pitboard_splits == "4" ) 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+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ENDIF ENDIF ENDIF EndEvent Event OnSpbLast() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF( $SectorSplitLast < $BestSectorSplitLast ) THEN $color = "^2"; ELSE IF( $SectorSplitLast == $BestSectorSplitLast ) THEN $color = "^3"; ELSE $color = "^1"; ENDIF ENDIF IF ($pitboard_pos == "0" ) THEN privMsg( "^7SPL: " . $SectorSplitLast . " (" . $color . $DiffSectorSplitLast . "^7) =>TPB: " . $Tpb . " , AVG: " . $AvgSpeed . " " . $UnitSpeed ); 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 openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best sector 4:" . "&" . $SectorSplitLast); openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $SectorSplitLast); openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $SectorSplitLast); openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $color . $Tpb); ENDIF ENDIF ELSE IF ($pitboard_splits == "4" ) THEN openPrivButton( "best_final_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best sector 4:" . "&" . $BestSectorSplitLast); openPrivButton( "best_lap_txt",$origT+16,$origL+41,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "best_final_txt",$origT+16,$origL+17,15,4,4,-1,16,"Best sector 2:" . "&" . $BestSectorSplitLast); openPrivButton( "best_lap_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); ELSE openPrivButton( "best_final_txt",$origT+16,$origL+25,15,4,4,-1,16,"Best sector 3:" . "&" . $BestSectorSplitLast); openPrivButton( "best_lap_txt",$origT+16,$origL+33,15,4,4,-1,16,"Best poss. lap:" . "&" . $Tpb); 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 ENDIF 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() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Great 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "great_1st_split",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^71st split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "great_1st_split",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^71st split " . $Nickname ); ELSE openPrivButton( "great_1st_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^71st split " . $Nickname ); ENDIF ENDIF ENDIF EndSub Sub TRI_split1_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Good 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "good_1st_split",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^71st split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "good_1st_split",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^71st split " . $Nickname ); ELSE openPrivButton( "good_1st_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^71st split " . $Nickname ); ENDIF ENDIF ENDIF EndSub Sub TRI_split2_0() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Great 2nd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "great_2nd_split",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "great_2nd_split",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); ELSE openPrivButton( "great_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); ENDIF ENDIF ENDIF EndSub Sub TRI_split2_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Good 2nd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "good_2nd_split",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "good_2nd_split",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); ELSE openPrivButton( "good_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); ENDIF ENDIF ENDIF EndSub Sub TRI_split3_0() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Great 3rd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "great_3rd_split",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "great_3rd_split",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); ELSE openPrivButton( "great_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); ENDIF ENDIF ENDIF EndSub Sub TRI_split3_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Good 3rd split (" . $SplitTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "good_3rd_split",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "good_3rd_split",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); ELSE openPrivButton( "good_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); ENDIF ENDIF ENDIF EndSub Sub TRI_lap_0() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Great lap (" . $LapTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "great_lap",$origT+1,$origL+53,30,4,4,10,16,"^2Great ^7lap " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "great_lap",$origT+1,$origL+37,30,4,4,10,16,"^2Great ^7lap " . $Nickname ); ELSE openPrivButton( "great_lap",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^7lap " . $Nickname ); ENDIF ENDIF ENDIF EndSub Sub TRI_lap_1() $origT=$pitboard_high_lr; $origL=$pitboard_high_tb; IF ($pitboard_pos == "0" ) THEN privMsg( "Good lap (" . $LapTime . ") by " . $Nickname . "^8!" ); ELSE closePrivButton("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 openPrivButton( "good_lap",$origT+1,$origL+53,30,4,4,10,16,"^3Good ^7lap " . $Nickname ); ELSE IF ($pitboard_splits == "2" ) THEN openPrivButton( "good_lap",$origT+1,$origL+37,30,4,4,10,16,"^3Good ^7lap " . $Nickname ); ELSE openPrivButton( "good_lap",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^7lap " . $Nickname ); ENDIF ENDIF ENDIF EndSub ######################################################################### # Action # ######################################################################### # Action to do on a special command typed in message line # $allow is optional if you wish to specify users, that are allowed to execute action # You can specify more users if you separated them by ',' # You can use a file to specify users, one user per line (example : $allow = "&./your_file.flt";) # If ! before a name, force nickName authentification if UseUsernameForAuthentication=true # If ! before a name, force userName authentification if UseUsernameForAuthentication=false # You can use regexp expression in userName pattern, type regex=your regular expression # Example : if UseUsernameForAuthentication=true # !regex=^\[COP\].* # Find all user with a nickname that begins with [COP] # regex=^Gai.* # Find all user with a username that begins with Gai # See regular expression on web for more info how it work # Use & sign at end of patterns #------------------------------------------------------------------- Register MsgAction("!config",Config); Sub Config() openPrivButton( "config_bg",50,50,100,56,5,-1,32,"" ); openPrivButton( "config_title",51,51,98,5,5,-1,0,"^3Configure pitboard^8" ); openPrivButton( "config_title_2",51,56,98,5,5,-1,0,"^3V1.32^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( "split_1a",51,73,15,5,5,-1,64,"Splits:" ); IF ($pitboard_splits == "2" ) THEN openPrivButton( "split_1b",67,73,10,5,5,-1,16,"^22^8",Pitboard_spl2 ); ELSE openPrivButton( "split_1b",67,73,10,5,5,-1,16,"2",Pitboard_spl2 ); ENDIF IF ($pitboard_splits == "3" ) THEN openPrivButton( "split_1c",78,73,10,5,5,-1,16,"^23^8",Pitboard_spl3 ); ELSE openPrivButton( "split_1c",78,73,10,5,5,-1,16,"3",Pitboard_spl3 ); ENDIF IF ($pitboard_splits == "4" ) THEN openPrivButton( "split_1d",89,73,10,5,5,-1,16,"^24^8",Pitboard_spl4 ); ELSE openPrivButton( "split_1d",89,73,10,5,5,-1,16,"4",Pitboard_spl4 ); ENDIF openPrivButton( "config_close_a",94,100,10,5,5,-1,16,"CLOSE",Config_close_b ); EndSub