/* List of All variable that can be used in player events $Nickname -> Nickname $Username -> UserName $Laps -> Total number of laps done on the current track and with the current car $SessLaps -> Total number of laps done this session on current track and with the current car $TotalPitTime -> Totaltime used for a pitstop $Car -> Current car of the player $Posabs -> Current absolute position $Posqual -> Current qualification position $Groupqual -> Current group qualification $SwearWordsRem -> Remaining number of swearwords to be used before SwearWordsAction2 is triggered $H_Mass -> User mass required on this server $H_TRes -> User intake restriction required on this server $P_Mass -> Current player Mass $P_TRes -> Current player restriction $SplitTime -> Last Split time done by player $Split1 -> Last First Split, updated when doing new Split1 $Split2 -> Last First Split, erased when doing Split1 $Split3 -> Last First Split, erased when doing Split1 $LapTime -> Current Lap Time, erased when doing New LapTime $PBLapTime -> Current PB on current Combo $diffLapTimeToPB -> Laptime - PBLTime, Last PBLTime is new realised $SectorSplit1 -> Last First sector Split, updated when doing new Split1 $SectorSplit2 -> Last second sector Split, erased when doing Split1 $SectorSplit3 -> Last third sector Split, erased when doing Split1 $SectorSplitLast -> Last Last sector Split, erased when doing Split1 $BestSectorSplit1 -> Best Split duration for the sector 1 $BestSectorSplit2 -> Best Split duration for the sector 2 $BestSectorSplit3 -> Best Split duration for the sector 3 $BestSectorSplitLast -> BestSplit duration for the last sector $DiffSectorSplit1 -> $SectorSplit1 - $BestSectorSplit1 $DiffSectorSplit2 -> $SectorSplit2 - $BestSectorSplit2 $DiffSectorSplit3 -> $SectorSplit3 - $BestSectorSplit3 $DiffSectorSplitLast -> $SectorSplitLast - $BestSectorSplitLast $isBestSectorSplit1 -> 1 if this sector split is best than previous Best, otherwise 0 $isBestSectorSplit2 -> 1 if this sector split is best than previous Best, otherwise 0 $isBestSectorSplit3 -> 1 if this sector split is best than previous Best, otherwise 0 $isBestSectorSplitLast -> 1 if this sector split is best than previous Best, otherwise 0 $BestSpeed -> Best Speed done on this combo by player $UnitSpeed -> Speedunit of the current player $AvgSpeed -> Avg Speed on last Lap Time $Tpb -> Theoretical PB $DriftScore -> Drift score $typ -> {typ} - = "Sess" if split PB for Session "PB" if split PB for PB file; $AngleVelocity -> Last Angle velocity in degrees $LastDriftScore -> Last drift score $AccelerationStartSpeed -> Starting speed $AccelerationEndSpeed -> Ending speed $AccelerationTime -> Acceleration time achieved from start to end speed $MaxAllowedLapTime1 -> Max Allowed Time before trigger Event OnMaxAllowedLapTime1 $MaxAllowedLapTime2 -> Max Allowed Time before trigger Event OnMaxAllowedLapTime2 $Dist -> Distance done on current combo/track by player $SessDist -> Distance done on current combo/track by player this session $RotateIn -> Race remain before Rotation List of all variables that can be used in all events $HostName -> Current host Name $ShortTrackName -> Track Name in Short format : SO6 $LongTrackName -> Track Name in long format : South City Chicane $ShortTime -> Server Time in short format $LongTime -> Server Time in long format $ShortDate -> Date in short format $LongDate -> Date in long format $CurrRotateCar -> Current rotated Car $CurrRotateTrack -> Current rotated Track $CurrLongRotateTrack -> Current rotated Track $NextRotateCar -> Next rotated Car $NextRotateTrack -> Next rotated Track $NextLongRotateTrack -> Next rotated Track Additionnal variable that can be used in OnBeginPit. $Work -> Work do on current car player after Pit Additionnal variables that can be used in votation. $Vote -> Number of player that have voted to restart, qualify or end $Players -> Number of player that can vote ( player on track ) $Remain -> Number of votes remaining after votation conclude $Need -> Number of votes to do action (qualify, restart, end) Additionnal variables that can be used in OnNotMatchFlags. $RequiredFlags -> Flag(s) required on this server $PlayerFlags -> Flag(s) for the current player Additionnal variable that can be used in OnFastDriveOnPitL1 or OnFastDriveOnPitL2. $RemainFDIP -> Number of remaining penalties for fast driving in pits Additionnal variable that can be used in OnAuthReached. $auth -> Authorization reached */ /* Command block to run when a LFS Special event is triggered Event EventId() ... EndEvent Command block used by backcall command like button or scheduled action or when received a command by player Sub SubId() ... EndSub Register MsgAction("!test",MA_test); You can register a subfunction to call when a player typed a special text Firts arg = text typed in Second arg = Sub to call when a player typed this text Register ScheduleAction( "0 0 0 * * *", SA_mid ); You can register a subfunction to call when a time is reached Firts arg = cron format ss mm hh dd MM YYYY Second arg = Sub to call when player type this text Command allowed on Event and Sub cmdLFS("Command_text"); Send a command to Lapper, see command.txt in LFS Doc privMsg( "Message_text"); Send a private message to the player that has triggered the event openPrivButton( "help",25,28,150,10,5,-1,0,"^2Commands list" ); openPrivButton( "help",25,28,150,10,5,-1,0,"^2Commands list", backcall ); Open a button for the current player 1 - Unique id for this button 2 - Left coordinate for this button ( 0-200 ) $origL = (value between 0-200); - when this value is used, every next value can be made relative to this one (example: $origL + 5;) 3 - Top coordinate for this button ( 0-200 ) $origT = (value between 0-200); - when this value is used, every next value can be made relative to this one (example: $origT + 5;) 4 - Width of the button ( 0-200 ) 5 - Heigth of the button ( 0-200 ) 6 - Space between line in multiline button 7 - Duration in seconds for the button to be displayed (use -1 if you don't want an automatic close) 8 - Format of the button, look at insim.txt for values 9 - Button caption, for multiline, separate each line with & 10 - Option name of the backcalled sub closePrivButton("welc&pos&clos&ref"); Close one or more button(s), you specify ID of the button to close, multiple ID's have to be separated by a & openGlobalButton( "bargr1",60,1,10,6,6,30,96,"Restart:" ); Same as openPrivButton, but open button for all players connected closeGlobalButton("welc&pos&clos&ref"); Same as closePrivButton, but close button for all players connected console( "My test"); To display message on the Lapper console There are another functions, look in config file Codes that can be used on button format: 0 - transparent button 16 - light button 32 - dark button 64 - align text to left 128 - align text to right If you want to make a light colored button with text aligned to the left, combine the codes to one new code, for example 16+64 = 80 */ /* To create colored text, use the following codes in front of the text you want to color: ^0 - black ^1 - red ^2 - green ^3 - yellow ^4 - blue ^5 - violet ^6 - cyan ^7 - white ^8 - no color Other variables that could be used on expressions && -> and || -> or + -> plus - -> minus / -> devide * -> multiply ^ -> pow == -> equal to != -> not equal to > -> bigger then < -> smaller then <= -> smaller then and equal to >= -> bigger then and equal to */ ################# #General options# ################# $Host = 127.0.0.1; # Host IP. When more network interfaces are present, set it to IP of your host. $Port = ; # Insim UDP port. Open this port after starting LFS Server by typing /insim=29999 in chat or include it in config-file LFS Server $Password = ""; # Put in the admin password used on the LFS Server $TrackInfoFile = "trackInfo.cfg"; # Path to the TrackInfoFile used to compare splits $TCPmode = true; # Connection to LFS in UDP mode or TCP mode $EnableRegisterWeb = true; # When set to "true" your LFS Server is displayed on the FRH Team website $DateFormat = "dd/MM/yyyy"; # Date format used for the PB files # Look at C#-format for date/time, little help # HH = Hour in 0-23 format # hh = Hour in 0-12 format # mm = Minute # tt = PM or AM # dd = Day # MM = Month # yyyy = year with 4 digits $TimeFormat = "HH:mm"; # Time format used for the PB files $MessageTime = 5000; # Time in milliseconds for a racecontrol message (started by: rcm_all) to be displayed on screen #$PubStatIdk = ""; # Indentification code for a connection to PubStat. # To obtain a PubStatId go to www.lfsworld.net , select My LFSW Setting, tab Pubstat Access # Remove # before PubStatIdK to activate this option $ShowPlayerControl = False; # Set option to "true" if you want to show the control configuration of players when leaving the pits. ############## #FTP transfer# ############## # Results files can also be transferred to an FTP server # Define the following parameters to use this feature # Remove # before line to activate it # ------------------------------------------------------------------- #$FtpServer = "your ftp server"; # Name/IP-address of your FTP server #$FtpLogin = "your login"; # Loginname for your FTP server #$FtpPasswd = "your password"; # Password for your FTP server #$FtpRemotePath = "your remote dir"; # Directorname ############################## #Synchronise Lapper databases# ############################## #$SyncID="frh01"; # Unique ID for this instance of Lapper #$SyncDir="synchro"; # Name of synchronisation directory. Every Lapper should have this directory name in order to synchronise #$SyncIDsToSync="frh02|frh03"; # Lapper ID's to synchronise with # Seperate ID's with | # You can't use current SyncID here ############# #Default Car# ############# # Default car to show, when no car is specified in command !top or !drf and when a player haven't used a car on this server # You can combine several cars by using + (example: "XFG+XRG";) # ------------------------------------------------------------------- #$DefaultTopCar = "UF1"; #$DefaultTopCar = "XFG"; #$DefaultTopCar = "XRG"; #$DefaultTopCar = "XRT"; #$DefaultTopCar = "RB4"; #$DefaultTopCar = "FXO"; #$DefaultTopCar = "LX4"; #$DefaultTopCar = "LX6"; #$DefaultTopCar = "RAC"; #$DefaultTopCar = "FZ5"; #$DefaultTopCar = "MRT"; #$DefaultTopCar = "XFR"; #$DefaultTopCar = "UFR"; #$DefaultTopCar = "FOX"; #$DefaultTopCar = "FO8"; #$DefaultTopCar = "FXR"; #$DefaultTopCar = "XRR"; #$DefaultTopCar = "FZR"; #$DefaultTopCar = "BF1"; $DefaultTopCar = "FBM+UF1+XFG+XRG+XRT+RB4+FXO+LX4+LX6+RAC+FZ5+MRT+XFR+UFR+FOX+FO8+FXR+XRR+FZR+BF1"; ################################### #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 ################################### #Authorization Options ( license )# ################################### #Authorization Options # #$Auth1 $Auth2 ... $Auth10 variable #Syntax : $AuthX = "Carname:Trackname:MinimumTime&Carname:Trackname:MinimumTime&...| Carname:Trackname:MinimumTime&Carname:Trackname:MinimumTime&... | ..."; #& -> And condition #| -> Or condition # #$AuthAllowPlayer="Auth1|...|AuthX|@username1,username2,...,usernameN"; #or #$AuthAllowPlayer="All"; #------------------------------------------------------------------- #$Auth1 = "XFG:BL1:1.30.10 | XRT:SO4:1.20.20"; #$Auth2 = "XFG:BL1:1.10.10 | XRT:SO4:1.20.20"; #$Auth3 = "XFG:BL1:1.05.10"; $AuthAllowPlayer = "All"; $AuthMinPlayer = 0; # Minimum number of players on the server to auto enable authorization # If number of players is below value, alle players are allowed # If number of players is above value, only AuthAllowPlayer are allowed Event OnAuthAllowed() cmdLFS( "/msg " . $Nickname . "^3 allowed on this server" ); Endevent Event OnAuthNotAllowed() cmdLFS("/spec " . $Nickname . "^3 allowed on this server"); cmdLFS("/msg " . $Nickname . "^3 not allowed on this server"); Endevent # Local viariable that can be used # $auth -> Authorization reached Event OnAuthReached() privMsg("^3You have got level" . $auth ); EndEvent ################## #Swearword filter# ################## #Specify a list of swearwords seperated by , #Specify a file with swearwords, one word per line #------------------------------------------------------------------- $SwearWordsList = "fuck,asholes,bastard,idiot"; #$SwearWordsList = "&./swear.txt"; $SwearWordsMax = 2; # Maximum number of allowed swearwords per session Event SwearWordsAction1() privMsg( "^1Don't use this words on this server" ); privMsg( "You will be spectated in ^2" . $SwearWordsRem . " ^1 more attempt(s)" ); EndEvent Event SwearWordsAction2() privMsg( "Too many swearwords, spectated" ); cmdLFS( "/spec " . $Nickname ); EndEvent ########### #Handicaps# ########### #You can specify 3 levels of handicap : for car, for car and track, for user #Priority Level low to hight : HandicapCars, HandicapCarsTracks, HandicapUser #------------------------------------------------------------------- #Handicap cars # #Syntax : # #$HandicapCars = "car:mass:irest,car:mass:irest,...,car:mass:irest"; # #car : LFS short car name #mass : mass handicap in kg #irest : Air intake restriction in percent #------------------------------------------------------------------- #Handicap cars/tracks # #Syntax : # #$HandicapCarsTracks = "car/track:mass:irest,car/track:mass:irest,...,car/track:mass:irest"; # #car : LFS short car name #track : LFS short track name #mass : mass handicap in kg #irest : Air intake restriction in percent #------------------------------------------------------------------- #$HandicapUser # a list of players and their handicap # # if you prefix with & , You can indicate a file name that contains a list of racers, one racer per line # # if you prefix with @, You can list username separated with , # #Syntax : # #$HandicapUsers = "&./your_file"; #$HandicapUsers = "@userName:mass:irest,userName:mass:irest,...userName:mass:irest"; # #$RefreshHandicapUsers # allow Lapper to refresh HandicapUsers on each player leaving pits # Usefull if HandicapUsers is a file and is updated frequently by an external program #------------------------------------------------------------------- #$HandicapCars = "XFG:100:10,XRT:50:10"; #$HandicapCarsTracks = "XFG/BL1:100:10,XRT/AS1:50:10"; #$RefreshHandicapUsers = true; #$HandicapUsers = "&./your_hand.flt"; #$HandicapUsers = "@Gai-Luron:100:20,gwendoline:100:30,_-ALUCARD-_,lagamel:50:10,lister88,c-quad,shimanofr,bruno7529,boby5,kevinb,edgar,berlioz,la tortue,neron59,eur-can,stff,2psbob,oliv76000"; # Actions to execute, when the handicap of a player is below specified HandicapUsers # Possible variables to use: # #$Nickname - Nickname of driver #$Username - Username of driver #$H_Mass - User mass required #$H_TRes - User Intake restriction required Event OnToLowHandicap() cmdLFS("/spec " . $Nickname ); cmdLFS("/msg " . $Nickname . "^3 spectated for to low handicap" ); cmdLFS("/msg ^3need " . $H_Mass . "kg and " . $H_TRes . "% of intake restriction!"); EndEvent ################# #Control Allowed# ################# # Racer flags # "Y" = Yes # "N" = No # "*"" = Yes or No # Local variable # $PlayerFlags = The current Player flags # $RequiredFlags = The current Required flags #------------------------------------------------------------------- $SwapSide = "*"; $AutoGears = "*"; $Shifter = "*"; $HelpBrake = "*"; $AxisClutch = "*"; $AutoClutch = "*"; $Mouse = "*"; $KbNoHelp = "*"; $KbStabilised = "*"; $CustomView = "*"; Event OnNotMatchFlags() privMsg( "Flags not match required flags" ); privMsg("Yours flags -> " . $PlayerFlags ); privMsg("Required flags -> " . $RequiredFlags ); privMsg("Spectated" ); cmdLFS("/spec " . $Username ); EndEvent ############## #Race Control# ############## #Voting: # #$InRaceLapsVoteMinMax = Laps in between where votes are allowed in race #$InRaceLapsVoteMinMax = 0-0 Votes are never allowed #$InRaceLapsVoteMinMax = -5 Votes are allowed between lap 1 and 5 #$InRaceLapsVoteMinMax = 2- Votes are allowed between laps 2 and the end of the race #$InRaceLapsVoteMinMax = - Votes are always allowed # #$VoteRestart = percentage of players that have to vote to restart a race. To let LFS admin this function, set it to -1 #onVoteRestartChange = Command to do when player votes to restart #onVoteRestartReach = Command to execute when VoteRestart is reached #onVoteRestartZero = Command to execute when no nb of player reach zero #$VoteQualify = percentage of players that have to vote to start a qualification. To let LFS admin this function, set it to -1 #onVoteQualifyChange = same as restart but for qualify #onVoteQualifyReach = same as restart but for qualify #onVoteQualifyZero = same as restart but for qualify # #$VoteEnd = percentage of players that have to vote to end a race. To let LFS admin this function, set it to -1 #onVoteEndChange = same as restart but for endrace #onVoteEndReach = same as restart but for endrace #onVoteEndyZero = same as restart but for endrace #------------------------------------------------------------------- #Local variable: # #$Vote - Number of players that have voted #$Remain - Number of players remaining to vote #$Need - Number of players needed for an action #$VoteLifeSec = Number of seconds to keep the vote alive after voting #------------------------------------------------------------------- #Auto restart: # #$AutoRestartRaceMn = Minutes between the end of a race (last player finished) and an automatic restart #$AutoRestartRaceMn = 0; No restart # #Rotation only work if AutoRestartRaceMn is set #EnableRotation = Allow or disallow rotation for track and/or car # Values : true or false #$RotateTracks = "tracks to rotate"; separated by ',' #$RotateCars = "cars to rotate"; separated by ',' Use LFS definition for car, if not set, no car rotation #$RotateEveryNbRaces = Number of races to do before rotation; #------------------------------------------------------------------- $InRaceLapsVoteMinMax = "-"; $VoteRestart = -1; Event onVoteRestartChange() openGlobalButton( "bargr1",60,1,10,6,6,30,96,"Restart:" ); openGlobalButton( "bargr2",70,1,20,6,6,30,96,"(" . $Vote ."/" . $Players . ") Need " . $Need ); EndEvent Event onVoteRestartReach() closeGlobalButton( "bargr1&bargr2" ); cmdLFS("/restart"); EndEvent Event onVoteRestartZero() closeGlobalButton( "bargr1&bargr2" ); EndEvent $VoteQualify = -1; Event onVoteQualifyChange() openGlobalButton( "bargq1",90,1,10,6,6,30,96,"Qualify" ); openGlobalButton( "bargq2",100,1,20,6,6,30,96,"(" . $Vote . "/" . $Players . ") Need " . $Need ); EndEvent Event onVoteQualifyReach() closeGlobalButton("bargq1&bargq2" ); cmdLFS("/qualify" ); EndEvent Event onVoteQualifyZero() closeGlobalButton("bargq1&bargq2" ); EndEvent $VoteEnd = -1; Event onVoteEndChange() openGlobalButton( "barge1",120,1,10,6,6,30,96,"End:" ); openGlobalButton( "barge2",130,1,20,6,6,30,96,"(" . $Vote . "/" . $Players . ") Need " . $Need ); EndEvent Event onVoteEndReach() closeGlobalButton( "barge1&barge2" ); cmdLFS("/end"); EndEvent Event onVoteEndZero() closeGlobalButton( "barge1&barge2" ); EndEvent $VoteLifeSec = 30; $AutoRestartRaceMn = 0; $EnableRotation = false; $RotateTracks = "SO6R,BL1,FE3"; $RotateEveryNbRaces = 4; $RotateCars = "XFG+UF1,TBO,XFR+UFR"; Event OnRotateCar() cmdLFS("/msg Car changed, go to pit! Current car = " . $CurrRotateCar); EndEvent Event OnRotateTrack() cmdLFS("/msg Track changed, please wait!" ); cmdLFS("/msg Current Track = " . $CurrLongRotateTrack); EndEvent ################################################# #Connect messages when a player joins the server# ################################################# Event OnConnect() openPrivButton( "welc",25,50,150,15,12,-1,0,"^7Welcome " . $Nickname . " ^7to ^1LFSLapper ^7powered server !&^2Type ^7!help ^2after leaving garage to see commands." ); openPrivButton( "pos",25,80,150,10,8,-1,0,"^7Your actual friendly Position (all visitors) : ^7" . $Posabs . "&^2Your actual League prequalify Position : " . $Posqual . " ^6Estimate Pool : " . $Groupqual . "&Don't use swearwords on this server" . "&respect other player" . "&otherwise you can be banned " ); openPrivButton( "clos",78,120,20,10,10,-1,32,"Accept",OnConnectClose ); openPrivButton( "ref",103,120,20,10,10,-1,32,"Deny",OnConnectCloseKick ); http("http://www.frh-team.net/reglapper/getserver2.php" ); EndEvent Sub OnConnectClose() closePrivButton("welc&pos&clos&ref"); 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.31^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.31: Small bug corrected" ); 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"); openGlobalButton( "logo",20,0,20,4,4,-1,0,"^1Sim^0Racing.lt Race" ); 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 ##################################################### #DisConnect messages when a player leaves the server# ##################################################### Event OnDisConnect() cmdLFS( "/msg " . $Nickname . " left the server" ); EndEvent #############################################$# #Splitting (general action when passing split)# ############################################### 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 ####################################################### #Splitting (compare player split to best player split)# ####################################################### $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# #################################################### #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 openPrivButton( "great_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); 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 openPrivButton( "good_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); 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 openPrivButton( "great_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); 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 openPrivButton( "good_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); 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 ######################### #List of user qualifying# ######################### #RefreshQualUsers : allow Lapper to refresh QualUsers on each outgoing pits, Usefull if QualUsers is a file and this is changed frequently by an external program #QualUser : is a list of racers that participed in the qualification, required for function !nearqual !topqual and !statsqual #if you prefix with & , You can indicate a file name that contains a list of racers, one racer per line (example : QualUsers = ./userfile.txt;) #if you prefix with @, You can list usernames separated with ',' (example : QualUsers = @Gai-Luron,gwendoline,_-ALUCARD-_,lagamel;) #You can specify which car is used by a user adding car after username separated by ':' (example : Gai-Luron:XFR,lagamel:UFR) #You can specify the scheme of group of this qualification using a special username called DefGroup #Defgroup Take 3 argument separated with ':' #1 - Is the number Max of Group for this qualification #2 - Is the number max of user per group #3 - Is the minimum of user in the last group, recalc previous group as possible if number is low #If you ommit scheme of groups, the group of qualification do not appear #------------------------------------------------------------------- $RefreshQualUsers = true; #$QualUsers = "&./your_file.flt"; $QualUsers = "@DefGroup:5:5:2,Sil3nc3r-,SlyRS,OlliHannover,FastHammer,Zephyroth,SoulbladeGT,Furryappleseed"; ################### #Scheduled actions# ################### #Syntax: ss mm hh dd MM YYYY #------------------------------------------------------------------- Register ScheduleAction( "0 0 0 * * *", SA_mid ); Sub SA_mid() cmdLFS("/rcm Midnight warning to all working men!"); cmdLFS("/rcm_all"); EndSub Register ScheduleAction( "0 0 0 1 1 *", SA_newyear ); Sub SA_newyear() cmdLFS("/rcm Happy New Year!"); cmdLFS("/rcm_all"); EndSub ################# #Command actions# ################# #$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 #------------------------------------------------------------------- $UseUsernameForAuthentication = true; Register MsgAction("!test",MA_test); Sub MA_test() $allow = "Gai-Luron,lagamel"; cmdLFS("/rcm " . $Nickname . " is testing..."); cmdLFS("/rcm_ply " . $Nickname ); EndSub Register MsgAction("!license",MA_license); Sub MA_license() $allow = "Gai-Luron,lagamel"; setLicense( $argv ); EndSub Register MsgAction("!ban",MA_ban); Sub MA_ban() $allow = "Gai-Luron"; cmdLFS( "/ban " . $argv . " 1" ); EndSub Register MsgAction("!kick",MA_kick); Sub MA_kick() $allow = "Gai-Luron"; cmdLFS( "/kick " . $argv ); EndSub Register MsgAction("!powered",MA_powered); Sub MA_powered() http("http://www.frh-team.net/reglapper/getserver2.php"); EndSub Register MsgAction("!pos",MA_pos); Sub MA_pos() privMsg( "Your friendly position is " . $Posabs ); EndSub Register MsgAction("!posqual",MA_posqual); Sub MA_posqual() privMsg( "Your qualification position is " . $Posqual ); EndSub Register MsgAction("!groupqual",MA_groupqual); Sub MA_groupqual() privMsg( "Your groupqual is " . $Groupqual ); EndSub Register MsgAction("!ver",MA_ver); Sub MA_ver() http("http://www.frh-team.net/reglapper/getserver2.php"); lapperVersion(); EndSub Register MsgAction("!auth",MA_auth); Sub MA_auth() authLevel(); EndSub Register MsgAction("!cleanspb",MA_cleanspb); Register MsgAction("!razspb",MA_cleanspb); Sub MA_cleanspb() cleanSpb(); EndSub Register MsgAction("!spb",MA_spb); Sub MA_spb() showSpb(); EndSub Register MsgAction("!hand",MA_hand); Sub MA_hand() showHand( $argv ); EndSub Register MsgAction("!statsqual",MA_statsqual); Sub MA_statsqual() statsQual( $argv ); EndSub Register MsgAction("!dstats",MA_dstats); Sub MA_dstats() dStats( $argv ); EndSub Register MsgAction("!stats",MA_stats); Sub MA_stats() stats( $argv ); EndSub Register MsgAction("!nearqual",MA_nearqual); Sub MA_nearqual() nearQual( $argv ); EndSub Register MsgAction("!near",MA_near); Sub MA_near() near( $argv ); EndSub Register MsgAction("!topqual",MA_topqual); Sub MA_topqual() topQual( $argv ); EndSub Register MsgAction("!top",MA_top); Sub MA_top() top( $argv ); EndSub Register MsgAction("!drf",MA_drf); Sub MA_drf() drf( $argv ); EndSub Register MsgAction("!distance",MA_distance); Sub MA_distance() privMsg("Distance done on " . $Car . "/" . $ShortTrackName . " = " . $Dist . ", session = " . $SessDist ); EndSub Register MsgAction("!laps",MA_laps); Sub MA_laps() privMsg( "Laps done on " . $Car . "/" . $ShortTrackName ." = " . $Laps . ", session = " . $SessLaps ); EndSub Register MsgAction("!pit",MA_pit); Sub MA_pit() privMsg( "Time in pitting " . $TotalPitTime ); EndSub Register MsgAction("!track",MA_track); Sub MA_track() privMsg( "Track in use :" . $ShortTrackName . " = " . $LongTrackName ); EndSub Register MsgAction("!time",MA_time); Sub MA_time() privMsg( "Server time clock reference : " . $LongTime ); EndSub Register MsgAction("!help",MA_help); Sub MA_help() openPrivButton( "help",25,28,150,10,5,-1,0,"^2Commands list" ); openPrivButton( "help2",25,38,150,6,5,-1,96,"^2General commands" . "&^3!top ^8[table offset] [3-letter car name] ['filter' pattern]" . "&^3!drf ^8[table offset] [3-letter car name] ['filter' pattern]" . "&^3!stats ^8[playername pattern]" . "&^3!dstats ^8[playername pattern]" . "&^3!near ^8Gap with 14 pilots near you on the ranking" . "&^3!spb ^8Split times and TPB (Theoretical PB)" . "&^3!razspb ^8Start new spb session (eg when changing car)" . "&^3!track ^8Name of actual track" . "&^3!time ^8Server time (to leagues mettings)" . "&^3!ver ^8Version of LFSLapper" . "&" . "&^2Special league commands" . "&^3!topqual ^8Rank to pilots specified on *.flt file" . "&^3!statsqual ^8Actual Position on prequalify session" . "&" . "&^2New functions" . "&^3!laps ^8Total laps number + session laps number" . "&^3!hand ^8Handicap by pilot ordered by league-host admin" . "&^3!pit ^8Total pit stop time" . "&^3Shft+i ^8Configure your display messages" ); openPrivButton( "close",90,145,20,10,8,-1,32,Ok,MA_closeHelp ); EndSub Sub MA_closeHelp() closePrivButton("help&help2&close"); EndSub 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.31^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 ##################################### #Action on teleport to pit (Shift+P)# ##################################### /* Event EnterPitAction() privMsg( $Nickname . "^8 teleported to pits!" ); EndEvent */ # Actions to execute when player spectates or disconnects (leaves race). /* Event LeaveRaceAction() privMsg( $Nickname . "^8 left the race!"; EndEvent */ ############################### #Action a player flooding chat# ############################### Event FloodAction() privMsg( $Nickname . "^3 kicked for flooding" ); cmdLFS( "/kick " . $Username ); EndEvent $MaxFloodLines = 4; # Maximum number of consecutive lines allowed $MaxFloodLinesTime = 5000; # Maximum time between two consecutive lines in milliseconds to count as flooding ###################### #Action on race start# ###################### Event RaceStartAction() cmdLFS( "/rcm ^3Do not try to win the Race in the first corner!" ); cmdLFS( "/rcm_all" ); EndEvent ######################### #Action to do on session# ######################### /* $MaxSessionLaps = 2; Event OnMaxSessionLaps() privMsg( "Max session laps reacheds" ); EndEvent */ ############################### #Options on spinning detection# ############################### $MinAngleVelocity = 250; # Minimum angle velocity to trigger action. Possible values: 0 - 720 # Action to execute when angle velocity is higher than MinAngleVelocity. /* Event cmdLFS( "/spec " . $Nickname ); cmdLFS( "/msg " . $Nickname . " ^3 removed from track for wrecking" ); EndEvent */ Event AngleVelocityAction() cmdLFS( "/msg ^1Danger! ^8" . $Nickname . " ^2had some CTDD-Action!" ); EndEvent $MaxNbInStunt = 20; #MaxNbInStunt is max time (in 100 ms) allowed in stunt mode before MaxNbInStuntAction is executed. If -1 No MaxNbInStuntAction are activated Event MaxNbInStuntAction() cmdLFS( "/spec " . $Nickname ); EndEvent ################################# #Actions when player is too slow# ################################# #$MaxAllowedLapTime1 = 100; # % Max allowed time to complete a lap relative to MaxLapTime in trackInfo.cfg /* Event OnMaxAllowedLapTime1() privMsg( "you are too slow! Max : " . $MaxAllowedLapTime1 ); privMsg( "kick on " . $MaxAllowedLapTime2 ); EndEvent */ #$MaxAllowedLapTime2 = 150; # % Max allowed time to complete a lap relative to MaxLapTime in trackInfo.cfg /* Event OnMaxAllowedLapTime2() privMsg( "You are very slow, spectated!" ); cmdLFS( "/msg " . $Nickname . " is too slow, spectated!" ); cmdLFS( "/spec " . $Username ); EndEvent */ ################################## #Options for idle player on track# ################################## #$IdleExclude = "Sil3nc3r-"; # Usernames excluded for idle check $OnIdleTimeout1 = 20; # Idle timeout for OnIdleAction1 in seconds Event OnIdleAction1() privMsg( "^3You are idle and will be spectated in 10 seconds" ); EndEvent $OnIdleTimeout2 = 30; # Idle timeout for OnIdleAction2 in seconds Event OnIdleAction2() cmdLFS( "/spec " . $Nickname ); privMsg( "^3You are spectated for non-activity" ); EndEvent ################## #Drifting options# ################## # This is the filepath for a file containing the collected data. # This file will be created if it doesnt exist yet. # You must ensure read/write access to this path. #------------------------------------------------------------------- $DriftDatabase = "./DriftPB.txt"; # Actions to do on new personal best drift lap. /* Event DriftPBAction() cmdLFS( "/rcm " . $Nickname . "^3 made new PB: ^7" . $DriftScore . " ^3pts!" ); cmdLFS( "/rcm_all" ); EndEvent Event DriftPBAction() cmdLFS( "/msg " . $Nickname . "^3 made new PB: ^7" . $DriftScore . " ^3pts!" ); EndEvent */ # Actions to do to when total lap drift score is higher or equal to MinimumDriftScore. /* Event DriftLapAction() cmdLFS("/msg " . $Nickname . " ^3drifted to ^7" . $DriftScore . " ^3pts" ); EndEvent */ # Message to get on end of each drift. # Possible variables to use: /* Event OnDriftScore() privMsg( "Score: ^7" . $DriftScore . " ^3" . $LastDriftScore ); EndEvent */ $GoodDriftScore = 4000; # Value to be reached to execute action on good drift score /* Event GoodDriftAction() privMsg( $Nickname . " ^3made excellent drift: ^7" . $LastDriftScore ." ^3pts" ); EndEvent */ $MinimumDriftScore = 10; # Minimum drift score required # Actions to do at end of lap if MinimumDriftScore is not achieved. /* Event DriftTooLowAction() privMsg( $Nickname . "^3 disqualified" ); cmdLFS( "/spec " . $Nickname }; EndEvent */ $MinimumDriftSpeed = 50; # Minimum speed in km/h to maintain. Driving below that speed will reset score $MinimumDriftAngle = 15; # Minimum angel to maintain. When angle is below value, score is reset $MaximumDriftAngle = 100; # Maximum angel to maintain. When angle is above value, score is reset ################################ #Options for hotlapping options# ################################ $Database = "./PB.txt"; # This is the filepath of a file containing the collected data # This file will be created if it doesnt exist yet # You must ensure read/write access to this path # Action to do on new personal best lap. # PBQualAction for the racer who make qualif ( in QualUser ) # PBAction the other racer /* Event PBAction() cmdLFS( "New PB by " . $Nickname . "^8 (" . $Car . "): " . $LapTime; EndEvent */ Event PBAction() cmdLFS("/msg New PB by " . $Nickname . "^8 (" . $Car . "): " . $LapTime ); cmdLFS("/msg Friendly rank : " . $Posabs ); cmdLFS("/msg Session laps done = " . $SessLaps ); cmdLFS("/msg Total laps done (server) = " . $Laps ); cmdLFS("/msg Average speed: " . $AvgSpeed . " " . $UnitSpeed ); cmdLFS("/rcm Friendly " . $Car . " rank: ^7" . $Posabs ); cmdLFS("/rcm_ply " . $Username ); EndEvent Event PBQualAction() cmdLFS("/msg League - New QT by " . $Nickname . "^8:" . $LapTime ); cmdLFS("/msg Friendly rank (all visitors): ^7" . $Posabs ); cmdLFS("/msg ^2Qualify pos.: " . $Posqual ); cmdLFS("/msg ^6Actual Pool: " . $Groupqual ); cmdLFS("/msg Average speed: " . $AvgSpeed . " " . $UnitSpeed ); cmdLFS("/rcm " . $Nickname . " ^2Pos:" . $Posqual . " - Pool:" . $Groupqual ); cmdLFS("/rcm_All"); EndEvent ########################## #Options for acceleration# ########################## $AccelerationStartSpeed = 1; # At which speed to start measuring time. In km/h $AccelerationEndSpeed = 100; # At which speed to stop measuring time. In km/h $AccelerationStartSpeedMph = 1; # At which speed to start measuring time. In Mph $AccelerationEndSpeedMph = 60; # At which speed to stop measuring time. In Mph $AccelerationPrivateMaxTime = 10; # Maximum acceleration time in seconds to show message #Message to show to players. #Possible variables to use: #{AccelerationStartSpeed} - Starting speed #{AccelerationEndSpeed} - Ending speed #{AccelerationTime} - Acceleration time achieved from start to end speed #{UnitSpeed} Unit of the Speed of the player connected Event OnAcceleration() privMsg( "^8Accelerated in ^3" . $AccelerationTime . "^8 seconds to " . $AccelerationEndSpeed . " " . $UnitSpeed ."!" ); EndEvent ###################### #Actions for pit stop# ###################### #Local variable tou can use #$Work - Work on pit (only for OnBeginPit) #------------------------------------------------------------------- Event OnBeginPit() cmdLFS( "/msg " . $Nickname . "^8 makes a pit stop" ); privMsg( "Pit begin! Work:" . $Work ); EndEvent Event OnEndPit() cmdLFS( "/msg " . $Nickname . "^8 left pits in " . $PitTime ); privMsg( "Pit stop finished in " . $PitTime ." - Total Pit: " . $TotalPitTime ); EndEvent ###################### #Actions on penalties# ###################### #Possible variables to use: # #OnFastDriveOnPitL1 = Actions on 30 Sec Penalty or drive-through #OnFastDriveOnPitL2 = Actions on 45 Sec Penalty or Stop&Go #MaxFastDriveOnPit = Max Fast Drive on Pit allowed per race #OnMaxFastDriveOnPit = Actions on Max Fast Drive on Pit allowed #OnFalseStartL1 = 30 Sec Penalty or drive-through #OnFalseStartL2 = 45 Sec Penalty or Stop&Go # #Local Variable can be used: # #{RemainFDIP} = Remain count for fast drive in pit #------------------------------------------------------------------- Event OnFastDriveOnPitL1() cmdLFS( "/msg " . $Nickname . "^1 Warning for fast driving in pit" ); privMsg( "^1WARNING-KICK POSSIBLE" ); EndEvent Event OnFastDriveOnPitL2() cmdLFS( "/msg " . $Nickname . "^1 Spectated for fast driving in pit" ); privMsg( "^1KICK IN " . $RemainFDIP . " TRY" ); cmdLFS( "/spec " . $Username ); EndEvent Event OnMaxFastDriveOnPit() cmdLFS( "/msg " . $Nickname . "^1 kicked for fast driving in pit" ); cmdLFS( "/rcm ^1YOU ARE KICKED" ); cmdLFS( "/rcm_ply " . $Username ); cmdLFS( "/kick " . $Username ); EndEvent $MaxFastDriveOnPit = 2; Event OnFalseStartL1() EndEvent Event OnFalseStartL2() EndEvent #################### #Overriding options# #################### ######################################################################### # 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 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.3^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.3: Pitboard can now be set to the rightside of the screen" ); 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 ######################################################################### # 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( $isBestSectorSplit1 == 1 ) THEN $color = "^2"; ELSE $color = "^1"; 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( $isBestSectorSplit2 == 1 ) THEN $color = "^2"; ELSE $color = "^1"; 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( $isBestSectorSplit3 == 1 ) THEN $color = "^2"; ELSE $color = "^1"; 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( $isBestSectorSplitLast == 1 ) THEN $color = "^2"; ELSE $color = "^1"; 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 openPrivButton( "great_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^72nd split " . $Nickname ); 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 openPrivButton( "good_2nd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^72nd split " . $Nickname ); 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 openPrivButton( "great_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^2Great ^73rd split " . $Nickname ); 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 openPrivButton( "good_3rd_split",$origT+1,$origL+45,30,4,4,10,16,"^3Good ^73rd split " . $Nickname ); 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 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.3^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