thanks
$VoteLifeSec = 30;
$AutoRestartRaceSec = 90;
$AutoRestartOnFirstFinished = true;
$EnableRotation = true;
$RotateTracks = "AU1_Woodford,AU1_yokesville,AU1_Humpton,AU1_Bakerstown";
$RotateEveryNbRaces = 1;
$RotateCars = "XFG,XRG,XRT,FXO,LX4,LX6,XRR";
CASE "!idle":
SetConfigVar( OnIdleTimeout1, 10);
SetConfigVar( OnIdleTimeout2, 20);
privMsg( "(DEBUG) OnIdleTimeout1: " . GetConfigVar ("OnIdleTimeout1"));
privMsg( "(DEBUG) OnIdleTimeout2: " . GetConfigVar("OnIdleTimeout2"));
BREAK;
Event OnLapperStart()
GlobalVar $driftmeter_on_off; # For turning driftmeter on and off
$driftmeter_on_off = "on"; # driftmeter option turned on, unless driver wants to switch off
EndEvent
CASE "!drift":
OnClickDriftQuery(0,0);
BREAK;
Sub OnClickDriftQuery( $KeyFlags,$id )
openPrivButton( "dq_instruct",65,66,70,9,9,-1,32,"^6Do you wish to use the Drift Meter?" );
openPrivButton( "dq_instruct1",65,75,70,6,6,-1,32,"^8(Drifting Scoreboard Facility)" );
openPrivButton( "dq_driftyes",80,85,18,10,10,-1,32," Yes ",OnClickYesDrift );
openPrivButton( "dq_driftno",102,85,18,10,10,-1,32," No ",OnClickCloseDM );
EndSub
Sub OnClickCloseDM( $KeyFlags,$id )
SetCurrentPlayerVar( "drift_on_off","off" ); # Set drift "off"
closeButtonRegex (GetCurrentPlayerVar("UserName"), "dq_*"); # close drift query buttons
closeButtonRegex (GetCurrentPlayerVar("UserName"), "drift_*"); # closedriftboard
EndSub
Sub OnClickYesDrift( $KeyFlags,$id )
SetCurrentPlayerVar( "drift_on_off","on" ); # Set drift "on"
closeButtonRegex (GetCurrentPlayerVar("UserName"), "dq_*"); # close drift query buttons
EndSub
Event OnDriftScore( $userName ) # This is the section for displaying the Drift Meter
IF ( GetCurrentPlayerVar( "drift_on_off") == "on" )
THEN
> blah, deblah, deblah
ENDIF
EndEvent
Event OnGoodDrift( $userName ) # Player event
IF ( GetCurrentPlayerVar( "drift_on_off") == "on" )
THEN
> blah
ENDIF
EndEvent
Event OnDriftTooLow( $userName ) # Player event
IF ( GetCurrentPlayerVar( "drift_on_off") == "on" )
THEN
> blah
ENDIF
EndEvent
Event OnLapperStart()
GlobalVar $countdown_hours;
GlobalVar $countdown_minutes;
$countdown_hours=24;
$countdown_minutes=0;
RegisterScheduleAction( "0 * * * * * *", Count_down );
EndEvent
Sub Count_down()
$countdown_minutes=$countdown_minutes-1;
IF ($countdown_minutes == -1)
THEN
$countdown_hours=$countdown_hours-1;
$countdown_minutes=59;
ENDIF
IF ($countdown_hours < 10)
THEN
$countdown_hours_display="0".$countdown_hours;
ELSE
$countdown_hours_display=$countdown_hours;
ENDIF
IF ($countdown_minutes < 10)
THEN
$countdown_minutes_display="0".$countdown_minutes;
ELSE
$countdown_minutes_display=$countdown_minutes;
ENDIF
cmdlfs ("/msg ^7Timer: " . $countdown_hours_display . ":" . $countdown_minutes_display);
EndSub
Event OnMSO( $userName, $text ) # Player event
$idxOfFirtsSpace = indexOf( $text, " ");
# $LOF = getListOfPlayers();
# dumpVar( $LOF );
IF( $idxOfFirtsSpace == -1 ) THEN
$command = $text;
$argv = "";
ELSE
$command = subStr( $text,0,$idxOfFirtsSpace );
$argv = trim( subStr( $text,$idxOfFirtsSpace ) );
ENDIF
SWITCH( $command )
CASE "!don":
SetCurrentPlayerVar( "Driftmeter","ON" );
BREAK;
CASE "!doff":
SetCurrentPlayerVar( "Driftmeter","OFF" );
closePrivButton("DriftScore"); #Close button that shows your driftscore
BREAK;
EndSwitch
EndEvent
Event OnDriftScore($userName) # Player event
IF(GetCurrentPlayerVar( "Driftmeter" ) == "ON"))THEN
openPrivButton( "DriftScore",2,160,12,6,4,-1,16,"^7" . GetCurrentPlayerVar("DriftScore") );
ENDIF
EndEvent
Event OnLapperStart()
Globalvar $Seconds;
Globalvar $Minutes;
$Seconds = 0;
$Minutes = 0;
EndEvent
CASE "!time":
IF($argv != "")THEN
CalcTime($argv);
ENDIF
BREAK;
Sub CalcTime($argv)
########Calculating Seconds in Minutes/Seconds########
$Minutes = round(($argv/60),0);
$Time = (round(($argv/60),2)-$Minutes);
$Seconds = round(($Time*60),0);
IF($Seconds < 0)THEN # When seconds are negative
$Minutes = $Minutes-1;
$Seconds = 60 + $Seconds;
ENDIF
CountDownTimer($Minutes,$Seconds);#Goto Countdown
EndSub
Sub CountDownTimer($Minutes,$Seconds)
IF($Minutes >= 0)THEN
openGlobalButton( "timer",80,0,40,6,1,$Seconds,32,"^7".$Minutes."^7 Minutes : %cpt% ^7Seconds",CountDownTimer);
$Seconds = 59;
$Minutes=$Minutes-1;
ELSE
cmdLFS("/msg Countdown Finished");
ENDIF
EndSub
Sub DoSomething($KeyFlags,$id )
blah
EndSub
Sub DoSomething()
Sub DoSomething( $userName )
Sub DoSomething( $KeyFlags )
Sub DoSomething( $KeyFlags,$id )
Sub DoSomething( $id, $argv )
Sub DoSomething( $KeyFlags,$userName )
Sub DoSomething( $KeyFlags,$argv )
Sub DoSomething( $KeyFlags,$status )