PDA

View Full Version : This is a Drift Meter to use with LFSLapper (1st post for V5.7; later post for V5.8)


sinanju
6th June 2009, 02:04
This isn’t really in the right forum section, but this is where a lot of people are asking for a meter that records a drift score, so I’m putting it here rather than the LFSLapper forum.

Hopefully this may stop a lot of repeat posts for the same thing.


LFSLapper Version
This drift meter will work with LFSLapper V 5.714 or earlier.

If you make extremely small change to the coding script, you should get it to work with V 5.716 too.

(There was a slight change in LFSLapper 5.716, in that the Personal Best and Drift databases lost the .txt suffix (i.e. V5.714 drift database its $DriftDatabase = "./DriftPB.txt, but in V5.716, it’s $DriftDatabase = "./DriftPB. So if you remove the .txt in the coding you can get it to work).

The coding is in 2 parts.

If you want to know what the majority of the coding actually means, see the attached text file. If you’re au fait with programming Lapper, then you’ll know it by heart anyway. It’s all fairly simple and basic stuff – which is why I could do it!


Anyway, now for the coding…

First part goes in the "Sub OnConnectClose()" section, which starts something like " closePrivButton("welc&pos&clos...."


Code has to be put in after closePrivButton, but before the EndSub at the end of the section.




openGlobalButton( "sinrs_dm_logo",5,98,36,6,4,-1,16,"^1Put your name/team name in this space" ); # Put your name/teamname or server or anything else you want in between the quotes - this text (^1) will be in red (see attached text file if you want to learn how to change the text colour)
openGlobalButton( "sinrs_dm_track",5,113,36,5,5,-1,16,"^3Track: ^2" . $LongTrackName . " ^1[" . $ShortTrackName . "]" );
openGlobalButton( "sinrs_dm_caranddriver",5,118,36,5,8,-1,16,"^6Car: ^2". $Car . "^7 - ^6Driver: " . $Nickname . );
openGlobalButton( "sinrs_dm_criteria",5,146,36,4,4,-1,16,"^4Scoring Criteria: "
. "&^7Minimum Drift Speed: ^330MPH / 48kph"
. "&^7Drift Angles (degrees): ^215^3 min / ^1100 ^3max");
openGlobalButton( "sinrs_dm_back",4,97,38,48,4,-1,32," " ); # Blank backing
openGlobalButton( "sinrs_dm _text",5,105,36,8,4,-1,16,"^0DRIFT MASTER ^1(c)Sin'rs" ); # 'DRIFT MASTER is in Black text
openGlobalButton( "sinrs_dm_driftblank",5,124,36,6,4,-1,80,"This Drift Score: " );
openGlobalButton( "sinrs_dm_comboblank",5,131,36,6,4,-1,80,"Total Combo Score: " );
openGlobalButton( "sinrs_dm_angleblank",5,138,36,6,4,-1,80,"Drift Angle: " );
openPrivButton( "sinrs_dm_score",30,124,11,6,4,-1,128,"- - - " ); # Blank. Score will overlay once you start scoring drift points
openPrivButton( "sinrs_dm_combo",30,131,11,6,4,-1,128,"- - - " ); # Blank
openPrivButton( "sinrs_dm _angle",30,138,11,6,4,-1,128,"> - < " ); # Blank
openGlobalButton( "sinrs_dm_criteriablank",4,145,38,14,3,-1,32," " );
The next section should overwrite your complete ‘Drifting options’ lapper section.

#================#
#Drifting options #
#================#

$DriftDatabase = "./DriftPB.txt"; # This is the filepath for a file containing the collected data.


$MinimumDriftSpeed = 48; # Minimum speed in km/h to maintain. Driving below that speed will reset score (48kmph is approx 30MPH)
$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
$GoodDriftScore = 2000; # Value to be reached to execute action on good drift score
$MinimumDriftScore = 250; # Minimum drift score required

Event OnDriftScore()

IF( $AngleVelocity < 0 )

THEN
$AngleVelocity_reverse=($AngleVelocity)*(-1);

openPrivButton( "sinrs_dm_score",30,124,11,6,4,-1,128," ^7" . $LastDriftScore ); # Gray text with white score
openPrivButton( "sinrs_dm_combo",30,131,11,6,4,-1,128," ^2" . $DriftScore ); # Gray text with green score
openPrivButton( "sinrs_dm_angle",30,138,11,6,4,-1,128," ^7" . $AngleVelocity_reverse . "^2 =>" ); # Gray text with white score and green arrow

ELSE

openPrivButton( "sinrs_dm_score",30,124,11,6,4,-1,128," ^7" . $LastDriftScore ); # Gray text with white score
openPrivButton( "sinrs_dm_combo",30,131,11,6,4,-1,128," ^3" . $DriftScore ); # Gray text with yellow score
openPrivButton( "sinrs_dm_angle",30,138,11,6,4,-1,128," ^1<= ^7" . $AngleVelocity . " " ); # Gray text with white score and red arrow
ENDIF

EndEvent

# Message that will be shown to all on a drivers new personal best drift lap.
Event DriftPBAction()
cmdLFS( "/rcm " . $Nickname . "^3 made new drift PB: ^7" . $DriftScore . " ^3pts!" );
cmdLFS( "/rcm_all" );
EndEvent

# Message that will be shown when total lap drift score is higher or equal to MinimumDriftScore.
Event DriftLapAction()
cmdLFS("/msg " . $Nickname . " ^3drifted to ^7" . $DriftScore . " ^3pts" );
EndEvent

# Message that will be shown to all when driver makes a good drift score
Event GoodDriftAction()
cmdLFS( "/rcm " . $Nickname . " ^3made excellent drift: ^7" . $LastDriftScore ." ^3pts" );
cmdLFS( "/rcm_all" );

EndEvent

# Message that will be shown to all if a driver fails to score a minimum amount
Event DriftTooLowAction()
cmdLFS( "/rcm " . $Nickname . " ^3was absolutely rubbish!" );
cmdLFS( "/rcm_all" );
EndEvent
I've also included the 2 parts of the lapper code in a text file, which i've attached, to make it easier to copy and paste.

Remember to save backup copy of your original lapper file before you go changing it.

I take no responsibility for anything. Ask my kids.

If it all works, then I hope you enjoy. Any problems, then revert back to your saved backup copy.

PS I realise I could have used origL and origD for left and down instead of the long winded way I did it, but my way makes it much easier to reverse engineer (learn).



EDIT
-----
And for those of you who're still struggling, I've added the drift master meter coding into a vanilla LFSLapper.lpr (version 5.714) configuration. (File zipped as can't upload .lpr file).
-----

sharukh
7th June 2009, 20:36
Does it work if i do this on the demo?

MariusMM
7th June 2009, 20:48
Demo or not shouldn't make a difference :)

sinanju
7th June 2009, 22:53
Does it work if i do this on the demo?
If lapper works, then yes.

Danny LFS
9th June 2009, 11:24
Great work dude! *downloads Lapper 5.714 again*

G!NhO
9th June 2009, 11:28
max drift angle: 100 degrees? :really:

Then you are going backwards...

90 Degrees is the max angle you can get.

sinanju
9th June 2009, 13:02
max drift angle: 100 degrees?

Then you are going backwards...

90 Degrees is the max angle you can get.

That's how I drift with keyboard (actually it's a slide, then a crash, then a roll - unfortunately never happens at the end of the lap, so my great drift scores always get reset to zero).

Good thing about the config, is you can reset this angle to be min and max whatever you want, along with speed, and what sort of score gets a fanfare.

As a non-drifter (who only made this scoreboard at someone else's request), what do YOU consider the minimum and angles should be set at to get score, and what sort of minimum speed to be kept up for a whole circuit/lap?

Let me know, please?

Ta.

Sinanju

PS I'm looking for a drift setup for a MRT if you've got one handy?

Bose321
9th June 2009, 13:14
max drift angle: 100 degrees? :really:

Then you are going backwards...

90 Degrees is the max angle you can get.
No, like if you use a FXO, I can get 100 with ease, and still manage to not spin out, so I don't see what's wrong with 100 degrees. :)

G!NhO
9th June 2009, 13:16
With fxo it isnt really drifting, and you will really slow down if you do that.

If you look at it like that, i can get a 180 degree angle with rb4 and not spin out...:shrug:

Bose321
9th June 2009, 13:19
It's slow yeah, and not real drifting, but 100 degrees is still manageable with even a XRT.

JasonJ
9th June 2009, 14:01
Yes I had same argument with people for my drift mod. I made it 100 degrees to.

Thing is, you can get 90 deg and that's fine, but if you happen to step out 1 degree or even 0.01 degree or get a tiny lag then the drift is lost and that's a shame when you're right on the knife's edge. So it's just a buffer so that you can keep at 90 deg safely.

Well that's why I made mine 100 degrees anyway. Just my 2c

sinanju
10th June 2009, 12:59
As there's some debate on 90 or 100 degrees, I might split the difference and make it 95!

Like I've said before, in Lapper, it's a configurable option.

For instance, if you held a competion with heats, you could do certain min/max angles and speed for early qualifying heats, and start narrowing the angles and upping the speed that enable a score for later heats. Or you could just set it once, and see who gets the highest score. That's me out then!

sinanju
21st August 2009, 21:46
This is a Drift Meter to use with LFSLapper

This drift meter will work with LFSLapper V 5.844

Since Gai has now updated his Lapper, I've updated my Drift Meter to suit new version.

And with thanks for a great idea by [DUB]Azzy, and with help of some of his coding, I've added messages that appear both on the meter and at top of screen. These messages change the better (or worse) your drifting gets.

The messages on the meter change depending on your current drift. The messages at top of screen change depending on your overall score for all your drifts during a lap/circuit.

Drop below the minimum speed during a lap, and you lose scores!

See attached graphic for some of the messages that appear.

Not all possible combinations of messages are shown - I'm not good enough to get enough points.

Before the Drift Meter will work, you will need to set 'Drift Option' on !gui to Yes.

To install, open your LFSLapper.lpr script.

The whole of the section that starts

############
#Drifting options#
############

should be replaced with my section that starts

############
#Drifting options#
############

and ends with

#########################
# This is end of Drifting Options Section
#########################


Everything after

# Lang "EN" section

in my script needs to be added into your own script under Lang "EN" section.

Almost all LANG items start with 'main_'

Apologies for French, Italian, German, etc, etc, users, but I've only done an English section.

If you're confident enough with changing some of the simple scripting, some of the scores or messages can be changed.

For instance, I have
> 3150 = awesome (LANG - main_TDSM8 = "^8That was awesome";
> 5100 = insane (LANG - main_TDSM9 = "^1That was insane";

You can always change to:

main_TDSM8 = "^8That was insane";
main_TDSM9 = "^1That was awesome";

Or just change the score numbers.

To the proper Lapper coders out there: I know the coding is a mess and inelegant! But at least I can follow some of it.

There is a LANG item called main_mylogo. You can overwrite what I have put in (Put your individual/team logo here) and add your own team name/clan here.

Caveats: Any mistakes in the coding are purely mine, and I can only apologize in advance if it all goes horribly wrong. For that reason, I would recommend that you backup your current known to work lfslapper.lpr script first before amending! And I will take no responsibility for anything.

Tim NL
21st August 2009, 23:13
Looking very nice :thumb::thumb::thumb:

tm_raven
27th August 2009, 23:11
hmm... ive been working on the drift settings for many hours new, im not used to this insim lapper so i wounder... stuck at figuring where / if i can change the locations of the drift stuff showing on screen?

Tim NL
27th August 2009, 23:36
hmm... ive been working on the drift settings for many hours new, im not used to this insim lapper so i wounder... stuck at figuring where / if i can change the locations of the drift stuff showing on screen?

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

sinanju
28th August 2009, 08:59
In other words - if you see line of code like

CODE:
openPrivButton( "driftcombotext",17,150,9,7,3,-1,0,langEngine( "%{main_driftcombotext}%" , $DriftScore ) );

Then;

button is called driftcombotext (unique name - no other button allowed to be called this)
17 17 (out of 200) from left of screen
150 150 (out of 200) down from top of screen
9 width of button (max size = 200 - button width) you don't want button off screen)
7 this is height of button (can also be height of text within button - can change if multiline message, as each text line is approx this size)
3 defines spacing in multilines and also acts as a gap top and bottom if only 1 line of text
-1 this is how long button is on for in seconds (you can't get a -1 second, so this means don't switch button off (1 would be 1 second, 2 would be 2 seconds....)
0 this is basically colour of button plus placement of text (0 = clear button with text centred, 16 = light grey button/centred text, 32 = darker button/centred text. Other combinations available (3 colours of buttons as described, plus centred text, left justified text or right justified text)
langEngine( "%{main_driftcombotext}%" this basically tells lapper to look for a file within itself in the language (LANG) section called main_driftcombotext, and put this text on the button - in this case it's the drivers driftscore and the colours the score and any text to be in - you are allowed multiple colours for text - same as peoples names)
$DriftScore this is the name of the sub-routine (usually described as backcalled sub). In this case it's a dynamic number (number can change), but could easily be another sub-routine to open another button or set of buttons.

At the very start of the line, it has openPrivButton. This means only the driver sees this button. Could have put openGlobalButton, and everyone would have seen it. As we're trying to measure the drivers score, should be private as only they should see it. If you made it global, everytime any driver made a drift, it would appear on the button - you wouldn't know who had made the drift.

Global buttons are great if you want to broadcast to everyone that someone's got high score or new pb, etc.

Be aware that the commas, semi-colons and other punctuation is vital.

gokartsax8
31st August 2009, 12:35
Looking good Sinanju keep up the good work mate. :thumb:

erfrag
17th September 2009, 22:58
how exactly is the drift score calculated? can the scripting accept mathematical calculations like multipliers?

i.e. if you drift to 200 points on one drift, after that your score will increase at a rate of say 2x? over 1000 then it goes to 3x? or something variable so the longer you hold a drift your score increases faster and faster?

sinanju
17th September 2009, 23:16
how exactly is the drift score calculated? can the scripting accept mathematical calculations like multipliers?

i.e. if you drift to 200 points on one drift, after that your score will increase at a rate of say 2x? over 1000 then it goes to 3x? or something variable so the longer you hold a drift your score increases faster and faster?
Haven't tried it, but maybe something like;

IF( $LastDriftScore > 500 )
THEN
$LastDriftScore=$LastDriftScore*2;
ENDIF

IF( $LastDriftScore > 1000 )
THEN
$LastDriftScore=$LastDriftScore*3;
ENDIFalthough if I was using multipliers, I'd probably use x1.1, x1.2, x1.3, etc.

erfrag
18th September 2009, 00:33
worded it kind of wrong. what i meant was that after so many points, the rate at which your score increases for the current drift will go faster, and faster, but resets when the drift ends, lap ends, or you loose your speed or spin out.


EDIT: ok, i found an example of what i was looking for being used on 420 Driftwars. but IDK if the system they are using is LFS Lapper or not. if it is it has been modified quite a bit. i know how i can do what i want, its just going to take some time and i have to learn the 'button' format so i don't have to guess+check as much and constantly have to look at a reference for formatting.

sinanju
19th September 2009, 18:47
worded it kind of wrong. what i meant was that after so many points, the rate at which your score increases for the current drift will go faster, and faster, but resets when the drift ends, lap ends, or you loose your speed or spin out.
Apart from the multiplier that's exactly what will happen as standard.

One of the settings that you can configure (in Drifting Options section) is the $MinimumDriftSpeed - if the speed of your car falls below this (drifting or not), your score resets to zero (this may not show on the drift meter as it tends just to keep last score up regardless).

During a drift, the score increments as $LastDriftScore - if you want it incrementing faster use the multiplier - if you combine drifts (keep above minimum speed and in between min and max angles allowed), then the overall score is saved as $DriftScore. It's this $DriftScore that is saved at end of lap (or circuit of autocross).

That's why even though you may get some decent drifts during a lap, if you can't keep it all together till you get over the start/finish line, your lap score might be lower that some of the previous scores you got during the same lap.

Button format is easy - any of the lapper.lpr configs will have an explanation built in. For a drift meter, you could make some of it global buttons, but for the scores/angles, these should probably only be private buttons - unless your drivers are doing a layout one driver at a time.

If you look up a couple of posts, you'll see an explanation for who buttons are configured.

erfrag
19th September 2009, 19:08
yes i under stand that. thanks for the info!:thumbsup:

KIMA
28th September 2009, 22:54
Hello everyone, I have a black server, calling on him people are often not a registered member on the LFS and off site so they can not ban the game if such a prog that would ban them?

Bmxtwins
3rd October 2009, 19:35
Any chance of some1 uploading this as an insim? With the drift meter already configured as i have no idea how to compile code. If possible change name to [LLM]Drifting

sinanju
7th October 2009, 20:14
Any chance of some1 uploading this as an insim?The DriftMeter is only small addition to the default LFSLapper.lpr configuration file.

If you follow the instructions in the posts, you should be able to add the Drifting section fairly easily.

Pablo Donoso
22nd October 2009, 16:26
rofl that meter is gonna explode once it gets a few 5 minute / 3 million point drifts xD... aside from 420 Drift Wars and Fat Oil Drifting Ground servers, not many of the others have decent scoring lappers, or maybe they do but I haven't come across it yet. =]

Im gonna look into how the code works and how its injected into the game Bmx, then I can modify it, I've seen a lot of crazy sh*t that I never thought was possible in some of the servers. :D Im sure it can't be too hard. =]

Fire_optikz001
24th October 2009, 04:46
u should come look at mine its nice :)

Pablo Donoso
8th November 2009, 09:09
rofl, this stuff reminds me of JavaScript... xD JS isn't all that hard once you get used to the commands, variables, and whatnot. lawlyz.

Can someone check mine out to see if the syntax is proper, I used Sinanju's version of the LFSLapper V 5.844 script. Hopefully I did it correctly. =]


#### DRIFT METER
#### ==========
#### Version 2

#### For Lapper V5.844

#### by Sinanju / [DUB]Azzy

#### Original Drift Meter and re-coding by Sinanju
#### Messaging idea / some coding by [DUB]Azzy

#### Thanks to Gui-luron, Yisc[NL] and Tim[NL]
#### For Lapper program, coding, patience and perseverance

################################################## ###


##################
#Drifting options#
##################
#
# IMPORTANT
# ==========
# Drift option on !GUI must be set to Yes
#

$DriftDatabase = "./DriftPB";

$MinimumDriftSpeed = 15; # Minimum speed in km/h to maintain. Driving below that speed will reset score (25kmph is approx 16MPH)
$MinimumDriftAngle = 5; # Minimum angel to maintain. When angle is below value, score is reset
$MaximumDriftAngle = 120; # Maximum angel to maintain. When angle is above value, score is reset
$GoodDriftScore = 10000; # Value to be reached to execute action on good drift score
$MinimumDriftScore = 100; # Minimum drift score required

Event OnGoodDrift() # Player event
IF( $GUI_drift == "yes" )

THEN
closePrivButton( "driftcomboboxtexttopmessage0&driftcomboboxtexttopmessage&driftcomboboxtexttopmessage1" );
globalMsg( langEngine( "%{main_ongooddrift}%" ,GetCurrentPlayerVar("Nickname"),GetCurrentPlayerVar("LastDriftScore") ) );
openPrivButton( "driftcomboboxtexttopmessage2",85,19,30,5,3,8,16,langEngine( "%{main_driftcomboboxtexttopmessage2}%") );
ENDIF

EndEvent



Event OnDriftLap() # Actions to do to when total lap drift score is higher or equal to MinimumDriftScore.
IF( $GUI_drift == "yes" )
THEN
globalMsg( langEngine( "%{main_driftlap}%" , GetCurrentPlayerVar("Nickname"), GetCurrentPlayerVar("DriftScore")));

ENDIF

EndEvent

Event OnDriftPB() # Actions to do on new personal best drift lap.
IF( $GUI_drift == "yes" )
THEN
PrivRcm( langEngine( "%{main_newdriftpb}%" , GetCurrentPlayerVar("Nickname"),GetCurrentPlayerVar("DriftScore")));
ENDIF
EndEvent


Event OnDriftScore() # This is the section for displaying the Drift Meter and Drift Messages

$AngleVelocity = GetCurrentPlayerVar( "AngleVelocity" );
$DriftScore = GetCurrentPlayerVar( "DriftScore" );
$LastDriftScore = GetCurrentPlayerVar( "LastDriftScore" );

IF( $GUI_drift == "yes" )

THEN
openPrivButton( "mylogo",5,138,22,3,1,-1,16,langEngine( "%{[LLM] Drift Division}%" ));
openPrivButton( "driftboxback",5,137,22,35,4,-1,32," ");
openPrivButton( "driftanglebox",6,146,10,20,4,-1,32," ");
openPrivButton( "driftcombbox",16,146,10,10,3,-1,32," ");
openPrivButton( "driftscorebox",16,156,10,10,3,-1,32," ");
openPrivButton( "driftangleboxtext",6,146,10,5,3,-1,0,langEngine( "%{main_driftangleboxtext}%" ));
openPrivButton( "driftcomboboxtext",16,146,10,5,3,-1,0,langEngine( "%{main_driftcomboboxtext}%" ));
openPrivButton( "driftscoreboxtext",16,156,10,5,3,-1,0,langEngine( "%{main_driftscoreboxtext}%" ));

openPrivButton( "TDSM",6,140,20,4,2,-1,16,langEngine( "%{main_TDSM}%" ) );

openPrivButton( "driftcomboboxtexttop",85,1,30,7,4,-1,96,langEngine( "%{main_driftcomboboxtexttop}%" , $DriftScore ) );

IF( $AngleVelocity < 0 )

THEN

$AngleVelocity = -$AngleVelocity ;

SetCurrentPlayerVar("Angle_Reverse",$AngleVelocity);

closePrivButton( "driftangle&driftzeroangleboxtext&driftzerocomboboxtext&driftzeroscoreboxtext&driftscoretext&driftcombotext&driftangleboxtextanglerev&driftangleboxtextangle");
openPrivButton( "driftangleboxtextanglerev",9,152,6,5,3,-1,0,langEngine( "%{main_driftangleboxtextangle}%" ));
openPrivButton( "driftanglerev",6,153,10,12,3,-1,64,langEngine( "%{main_driftanglerevbox}%" , GetCurrentPlayerVar( "Angle_Reverse")));
openPrivButton( "driftscoretextrev",16,160,9,5,3,-1,0,langEngine( "%{main_driftscoretext}%" , $LastDriftScore ) );
openPrivButton( "driftcombotextrev",17,150,9,7,3,-1,0,langEngine( "%{main_driftcombotext}%" , $DriftScore ) );

ELSE

closePrivButton( "driftanglerev&driftzeroangleboxtext&driftzerocomboboxtext&driftzeroscoreboxtext&driftscoretextrev&driftcombotextrev&driftangleboxtextanglerev&driftangleboxtextangle");
openPrivButton( "driftangleboxtextangle",11,152,5,5,3,-1,128,langEngine( "%{main_driftangleboxtextangle}%" ));
openPrivButton( "driftangle",6,154,10,12,3,-1,64,langEngine( "%{main_driftanglebox}%" , $AngleVelocity ));
openPrivButton( "driftscoretext",16,160,9,5,3,-1,0,langEngine( "%{main_driftscoretext}%" , $LastDriftScore ) );
openPrivButton( "driftcombotext",17,150,9,7,3,-1,0,langEngine( "%{main_driftcombotext}%" , $DriftScore ) );

ENDIF
ENDIF


############ This section is for the messages and symbols invoked depending on the individual scores you make, and appear on the Drift Meter at bottom of screen

## Scoring totals = message

## < 150 = Terrible!
## > 150 = No0blet
## > 300 = Ro0kie
## > 450 = So-So
## > 750 = Decent
## > 1200 = Good
## > 1950 = Cool
## > 3150 = Niiiice
## > 5100 = Professional

# numbers can be changed if you think too high or too low - NO need to change anything else, unless you want to change the message in the LANG section(s)



IF( $LastDriftScore > 150 )

THEN

closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSLR&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM2",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM2}%" ) );

openPrivButton( "TDS21",6,167,4,4,2,-1,16,langEngine( "%{main_TDS21}%" ) );
openPrivButton( "TDS22",10,167,4,4,2,-1,16,langEngine( "%{main_TDS22}%" ) );
openPrivButton( "TDS23",14,167,4,4,2,-1,16,langEngine( "%{main_TDS23}%" ) );
openPrivButton( "TDS24",18,167,4,4,2,-1,16,langEngine( "%{main_TDS24}%" ) );
openPrivButton( "TDS25",22,167,4,4,2,-1,16,langEngine( "%{main_TDS25}%" ) );

ELSE
ENDIF

IF( $LastDriftScore > 300 )

THEN

closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM3",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM3}%" ) );

openPrivButton( "TDS31",6,167,4,4,2,-1,16,langEngine( "%{main_TDS31}%" ) );
openPrivButton( "TDS32",10,167,4,4,2,-1,16,langEngine( "%{main_TDS32}%" ) );
openPrivButton( "TDS33",14,167,4,4,2,-1,16,langEngine( "%{main_TDS33}%" ) );
openPrivButton( "TDS34",18,167,4,4,2,-1,16,langEngine( "%{main_TDS34}%" ) );
openPrivButton( "TDS35",22,167,4,4,2,-1,16,langEngine( "%{main_TDS35}%" ) );

ELSE
ENDIF

IF( $LastDriftScore > 450 )

THEN

closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM4",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM4}%" ) );

openPrivButton( "TDS41",6,167,4,4,2,-1,16,langEngine( "%{main_TDS41}%" ) );
openPrivButton( "TDS42",10,167,4,4,2,-1,16,langEngine( "%{main_TDS42}%" ) );
openPrivButton( "TDS43",14,167,4,4,2,-1,16,langEngine( "%{main_TDS43}%" ) );
openPrivButton( "TDS44",18,167,4,4,2,-1,16,langEngine( "%{main_TDS44}%" ) );
openPrivButton( "TDS45",22,167,4,4,2,-1,16,langEngine( "%{main_TDS45}%" ) );

ELSE
ENDIF

IF( $LastDriftScore > 750 )

THEN

closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM5",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM5}%" ) );

openPrivButton( "TDS51",6,167,4,4,2,-1,16,langEngine( "%{main_TDS51}%" ) );
openPrivButton( "TDS52",10,167,4,4,2,-1,16,langEngine( "%{main_TDS52}%" ) );
openPrivButton( "TDS53",14,167,4,4,2,-1,16,langEngine( "%{main_TDS53}%" ) );
openPrivButton( "TDS54",18,167,4,4,2,-1,16,langEngine( "%{main_TDS54}%" ) );
openPrivButton( "TDS55",22,167,4,4,2,-1,16,langEngine( "%{main_TDS55}%" ) );

ELSE
ENDIF

IF( $LastDriftScore > 1200 )

THEN

closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM6",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM6}%" ) );

openPrivButton( "TDS61",6,167,4,4,2,-1,16,langEngine( "%{main_TDS61}%" ) );
openPrivButton( "TDS62",10,167,4,4,2,-1,16,langEngine( "%{main_TDS62}%" ) );
openPrivButton( "TDS63",14,167,4,4,2,-1,16,langEngine( "%{main_TDS63}%" ) );
openPrivButton( "TDS64",18,167,4,4,2,-1,16,langEngine( "%{main_TDS64}%" ) );
openPrivButton( "TDS65",22,167,4,4,2,-1,16,langEngine( "%{main_TDS65}%" ) );

ELSE
ENDIF

IF( $LastDriftScore > 1950 )

THEN
closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM7",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM7}%" ) );

openPrivButton( "TDS71",6,167,4,4,2,-1,16,langEngine( "%{main_TDS71}%" ) );
openPrivButton( "TDS72",10,167,4,4,2,-1,16,langEngine( "%{main_TDS72}%" ) );
openPrivButton( "TDS73",14,167,4,4,2,-1,16,langEngine( "%{main_TDS73}%" ) );
openPrivButton( "TDS74",18,167,4,4,2,-1,16,langEngine( "%{main_TDS74}%" ) );
openPrivButton( "TDS75",22,167,4,4,2,-1,16,langEngine( "%{main_TDS75}%" ) );

ELSE
ENDIF

IF( $LastDriftScore > 3150 )

THEN
closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM8",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM8}%" ) );

openPrivButton( "TDS81",6,167,4,4,2,-1,16,langEngine( "%{main_TDS81}%" ) );
openPrivButton( "TDS82",10,167,4,4,2,-1,16,langEngine( "%{main_TDS82}%" ) );
openPrivButton( "TDS83",14,167,4,4,2,-1,16,langEngine( "%{main_TDS83}%" ) );
openPrivButton( "TDS84",18,167,4,4,2,-1,16,langEngine( "%{main_TDS84}%" ) );
openPrivButton( "TDS85",22,167,4,4,2,-1,16,langEngine( "%{main_TDS85}%" ) );

ELSE
ENDIF

IF( $LastDriftScore > 5100 )

THEN
closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM9",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM9}%" ) );

openPrivButton( "TDS91",6,167,4,4,2,-1,16,langEngine( "%{main_TDS91}%" ) );
openPrivButton( "TDS92",10,167,4,4,2,-1,16,langEngine( "%{main_TDS92}%" ) );
openPrivButton( "TDS93",14,167,4,4,2,-1,16,langEngine( "%{main_TDS93}%" ) );
openPrivButton( "TDS94",18,167,4,4,2,-1,16,langEngine( "%{main_TDS94}%" ) );
openPrivButton( "TDS95",22,167,4,4,2,-1,16,langEngine( "%{main_TDS95}%" ) );

ELSE
ENDIF

IF( $LastDriftScore < 150 )

THEN
closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM1",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM1}%") );

openPrivButton( "TDS11",6,167,4,4,2,-1,16,langEngine( "%{main_TDS11}%" ) );
openPrivButton( "TDS12",10,167,4,4,2,-1,16,langEngine( "%{main_TDS12}%" ) );
openPrivButton( "TDS13",14,167,4,4,2,-1,16,langEngine( "%{main_TDS13}%" ) );
openPrivButton( "TDS14",18,167,4,4,2,-1,16,langEngine( "%{main_TDS14}%" ) );
openPrivButton( "TDS15",22,167,4,4,2,-1,16,langEngine( "%{main_TDS15}%" ) );

ELSE
ENDIF

IF( $LastDriftScore < 50 )

THEN
closePrivButton( "TDSM0&TDSM&TDSM1&TDSM2&TDSM3&TDSM4&TDSM5&TDSM6&TDSM7&TDSM8&TDSM9" );
closePrivButton( "TDSLL&TDSLL1&TDSLL2&TDSLL3&TDSLL4&TDSLL5&TDSLL6&TDSLL7&TDSLL8&TDSLL9" );
closePrivButton( "TDSRL&TDSLR1&TDSLR2&TDSLR3&TDSLR4&TDSLR5&TDSLR6&TDSLR7&TDSLR8&TDSLR9" );
closePrivButton( "TDS11&TDS12&TDS13&TDS14&TDS15&TDS21&TDS22&TDS23&TDS24&TDS25&TDS31&TDS32&TDS33&TDS34&TDS35" );
closePrivButton( "TDS41&TDS42&TDS43&TDS44&TDS45&TDS51&TDS52&TDS53&TDS54&TDS55&TDS61&TDS62&TDS63&TDS64&TDS65" );
closePrivButton( "TDS71&TDS72&TDS73&TDS74&TDS75&TDS81&TDS82&TDS83&TDS84&TDS85&TDS91&TDS92&TDS93&TDS94&TDS95" );
closePrivButton( "TDS01&TDS02&TDS03&TDS04&TDS05" );

openPrivButton( "TDSM0",6,141,20,4,2,-1,16,langEngine( "%{main_TDSM0}%") );

openPrivButton( "TDS01",6,167,4,4,2,-1,16,langEngine( "%{main_TDS01}%" ) );
openPrivButton( "TDS02",10,167,4,4,2,-1,16,langEngine( "%{main_TDS02}%" ) );
openPrivButton( "TDS03",14,167,4,4,2,-1,16,langEngine( "%{main_TDS03}%" ) );
openPrivButton( "TDS04",18,167,4,4,2,-1,16,langEngine( "%{main_TDS04}%" ) );
openPrivButton( "TDS05",22,167,4,4,2,-1,16,langEngine( "%{main_TDS05}%" ) );

ELSE
ENDIF

############ This section is for the messages invoked depending on the combined lap score you make, and appears at top of screen

## Scoring totals = message

## < 400 = Terrible
## > 400 = No0blet
## > 600 = Not Bad
## > 1250 = Cool
## > 2750 = Niiiice
## > 5750 = Awesome
## > 11750 = Badass Mofo
## > 15000 = Killer Drifting
## > 20000 = King of RWD Swing
## > 30000 = Professional

# numbers can be changed if you think too high or too low - NO need to change anything else, unless you want to change the message in the LANG section(s)

IF( $DriftScore > 400 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift399_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftbarelyadequate}%") );

ELSE
ENDIF

IF( $DriftScore > 600 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift500_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftadequate}%") );

ELSE
ENDIF

IF( $DriftScore > 1250 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift1000_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftgood}%") );

ELSE
ENDIF

IF( $DriftScore > 2750 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift2000_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftsuperb}%") );

ELSE
ENDIF

IF( $DriftScore > 5750 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift5000_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftoutrageous}%") );

ELSE
ENDIF

IF( $DriftScore > 11750 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift10000_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftinsane}%") );

ELSE
ENDIF

IF( $DriftScore > 15000 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift15000_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftroyalty}%") );

ELSE
ENDIF

IF( $DriftScore > 20000 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift20000_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftgod}%") );

ELSE
ENDIF

IF( $DriftScore > 30000 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift30000_1",85,9,30,5,3,-1,32,langEngine( "%{main_driftnotworthy}%") );

ELSE
ENDIF

IF( $DriftScore < 400 )

THEN

closePrivButton( "driftcomboboxtexttopmessage&driftcomboboxtexttopmessage0&drift399_1&drift400_1&drift500_1&drift1000_1&drift2000_1&drift5000_1&drift10000_1&drift15000_1&drift20000_1&drift30000_1" );

openPrivButton( "drift400_1",85,9,30,5,3,-1,0,langEngine( "%{main_drifttolow}%") );

ELSE
ENDIF

EndEvent


################################

Lang "EN"

main_TDS01 = "^8?";
main_TDS02 = "^8?";
main_TDS03 = "^8?";
main_TDS04 = "^8?";
main_TDS05 = "^8?";

main_TDS11 = "^0:(";
main_TDS12 = "^0:(";
main_TDS13 = "^0:(";
main_TDS14 = "^0:(";
main_TDS15 = "^0:(";

main_TDS21 = "^2+";
main_TDS22 = "^2+";
main_TDS23 = "^2+";
main_TDS24 = "^2+";
main_TDS25 = "^2+";

main_TDS31 = "^3++";
main_TDS32 = "^3++";
main_TDS33 = "^3++";
main_TDS34 = "^3++";
main_TDS35 = "^3++";

main_TDS41 = "^4*";
main_TDS42 = "^4*";
main_TDS43 = "^4*";
main_TDS44 = "^4*";
main_TDS45 = "^4*";

main_TDS51 = "^5**";
main_TDS52 = "^5**";
main_TDS53 = "^5**";
main_TDS54 = "^5**";
main_TDS55 = "^5**";

main_TDS61 = "^6:)";
main_TDS62 = "^6*";
main_TDS63 = "^6:)";
main_TDS64 = "^6*";
main_TDS65 = "^6:)";

main_TDS71 = "^7!";
main_TDS72 = "^7!";
main_TDS73 = "^7!";
main_TDS74 = "^7!";
main_TDS75 = "^7!";

main_TDS81 = "^8!!";
main_TDS82 = "^8!!";
main_TDS83 = "^8!!";
main_TDS84 = "^8!!";
main_TDS85 = "^8!!";

main_TDS91 = "^1:)";
main_TDS92 = "^1:)";
main_TDS93 = "^1:)";
main_TDS94 = "^1:)";
main_TDS95 = "^1:)";

main_TDSM = "^7How's my drifting?";
main_TDSM0 = "^8How's my drifting?";
main_TDSM1 = "^0Terrible, just terrible.";
main_TDSM2 = "^2That was crappy driving.";
main_TDSM3 = "^3Not too shabby.";
main_TDSM4 = "^4Decent driving.";
main_TDSM5 = "^5Good lap, Keep it up.";
main_TDSM6 = "^6Coool, great job.";
main_TDSM7 = "^7You're killing it, hi5.";
main_TDSM8 = "^8Awesome display of skill.";
main_TDSM9 = "^1Professional Status.";

main_driftbarelyadequate = "^3Barely any drifting skills";
main_driftadequate = "^3Adequate drifting skills";
main_driftgood = "^4Some good drifting skills";
main_driftsuperb = "^5Some superb drifting skills!";
main_driftoutrageous = "^6Outrageous drifting skills!";
main_driftinsane = "^7Insane drifting!";

main_driftroyalty = "^0DRIFT ROYALTY!";
main_driftgod = "^1You are officially a&^1! DRIFTING GOD !";
main_driftnotworthy = "^0We are ^1NOT ^0worthy!";

main_mylogo = "^1[LLM] Drift Division"; # Change message between quote marks to suit

main_driftanglebox = "^3< ^7{0}";
main_driftangleboxtext = "^8Slip Angle:";
main_driftangleboxtextangle = "^1o";
main_driftanglerevbox = "^7{0} ^2>";
main_driftcomboboxtext = "^8Combo score:";
main_driftcomboboxtexttop = "^2Total points scored ^3this lap: ^7{0}";
main_driftcomboboxtexttopmessage = "^3That was really&^1CRAPPY ^3drifting";
main_driftcomboboxtexttopmessage2 = "^3Niiiice drifting.";
main_driftscoretext = "^1+ ^7{0}";
main_driftscoreboxtext = "^8This Score:";
main_driftscoretext = "^1+ ^7{0}";



Thanks if anyone can test it out, or even take a look through it to see if there's any errors. It's greatly appreciated guys. =]

drew555
19th December 2009, 09:03
I'm starting to think I'm a moron.

Right... I've got Lapper working - but I can't seem to get this to work.

I've copied the code (from DRIFTING OPTIONS to LANG) into lfslapper.lpr over the top of the otriginal DRIFTING OPTIONS - and that stops the drift scoring from working.

If I add the LANG section to lfslapper.lpr very little seems to work (including !gui).

Am I putting the LANG section in the wrong place? because I can't find an original LANG section in my original lfslapper.lpr file.

Oh - and how do I get the drifting option set to 'yes' by default instead of having to set it in !gui every time?

Thank you :)

drew555
19th December 2009, 15:34
I've tacked the whole 'Lang' section on at the end of the file... like this...

Lang "EN"
main_TDS01 = "^8?";
main_TDS02 = "^8?";


EndLang

And copied the Drift section over the top of the original.

Still nothing.

Has it got anything to do with the !gui needing to have the drift set as default to on instead of using !gui after the Lapper has loaded?

Also.. this appears to be the same script that came with the downloaded Lapper in driftmeter.lpr- and I really don't know which is the best set of instructions to follow and neither seem to work :(

Am I better off editing the LFSLapper.lpr with all the driftmeter info or telling lfslapper.lpr to look for it with pitboard etc.?

Or both?

Or neither? :grumpy:

sinanju
19th December 2009, 16:30
Am I putting the LANG section in the wrong place? because I can't find an original LANG section in my original lfslapper.lpr file.What version of lapper are you using?

LANG(uage) section only started from version 5.8xx, so if using v5.7xx you won't have this section.

If you have v5.8 and later, the English language section starts Lang "EN", and you need to put some code in here (insert code - don't overwrite what's already there!).

Oh - and how do I get the drifting option set to 'yes' by default instead of having to set it in !gui every time?If you look in the guiconfig.lpr file (can be found under ..Bin/default/includes/guiconfig.lpr) you'll see a line that has

$GUI_drift = "no" ; #Drift option yes or no ( see the part at end of this script)

Change the no to yes.

$GUI_drift = "yes" ; #Drift option yes or no ( see the part at end of this script)

drew555
20th December 2009, 11:08
I'm using Lapper 5.8.4.1

If you look in the guiconfig.lpr file (can be found under ..Bin/default/includes/guiconfig.lpr) you'll see a line that has

$GUI_drift = "no" ; #Drift option yes or no ( see the part at end of this script)

Change the no to yes.

$GUI_drift = "yes" ; #Drift option yes or no ( see the part at end of this script)

Sorted :thumb:

How can I attach my lfslapper file here without killing the forum?

Is there a spoiler tag or something?

drew555
20th December 2009, 11:14
Meh @ adding file contents here.

I'll attach it :)

(the password is temporary :) )

sinanju
20th December 2009, 12:19
Had a quick look at your lpr file, and few comments.



I'd recommend you get yourself a PubStat - I've had problems when I've forgot to add to my lapper file.




You're "halp" button - you need a sub-routine to go with this (i.e. what happens when you click the Help button?)

To show what a sub-routine does, look at the "clos" button, which has openPrivButton("clos",78,120,20,10,10,-1,32,"^7CONTINUE",OnConnectClose );
The sub-routine for this is OnConnectClose

I'd suggest you look at Krayy's very useful replacement !Help function, and maybe try use and amend this to suit yourself.

See http://www.lfsforum.net/showthread.php?t=60201



Looking in your Drifting section, you've left the # character in front of a lot of the coding lines you would need - this character tells lapper to ignore anything on the line after this (the /* and */ tells lapper to ignore everything in between - as per the lapper script, the first part gives an explanation on some of the coding, which lapper ignores until it gets to the General options section).

drew555
20th December 2009, 12:43
I'd recommend you get yourself a PubStat - I've had problems when I've forgot to add to my lapper file.

With this being only for a LAN party is that necessary? if so, I'll sort it. I only left it out because I had no intentions of taking this online.

You're "halp" button - you need a sub-routine to go with this (i.e. what happens when you click the Help button?)To show what a sub-routine does, look at the "clos" button, which has openPrivButton("clos",78,120,20,10,10,-1,32,"^7CONTINUE",OnConnectClose );
The sub-routine for this is OnConnectCloseThat was an experiment, lol - but now you've told me how to work it, I might continue with it.

I'd suggest you look at Krayy's very useful replacement !Help function, and maybe try use and amend this to suit yourself.

See http://www.lfsforum.net/showthread.php?t=60201

Looking and reading now ;)



Looking in your Drifting section, you've left the # character in front of a lot of the coding lines you would need - this character tells lapper to ignore anything on the line after this (the /* and */ tells lapper to ignore everything in between - as per the lapper script, the first part gives an explanation on some of the coding, which lapper ignores until it gets to the General options section).



I'll have a look through it now and see if I can make a better job of it :)

drew555
20th December 2009, 12:50
So... the help section is the bit that starts (in command actions):

CASE "!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]"

etc... etc...Right?

So that means that when you type in !help, you get the actions afterwards - openPrivButton and put the text that follows on the button?

Is this the part that needs changing for Krayy's version?

And I still can't find the lang section :(

drew555
20th December 2009, 13:11
The #s that are in my drift section are...

In front of comments like this (which I assume are OK):

$MinimumDriftScore = 5000; # Minimum drift score required

Event OnGoodDrift() # Player event

I left this one in:

#cmdLFS( "/spec " . GetCurrentPlayerVar("Nickname") };

To not spectate people who go wrong way (we're animals).

And I've now removed these ones:

#$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

Did you see anything else obvious in there that I've mashed up?

sinanju
20th December 2009, 13:49
Hi

I dug out old copy of v5.841 and I see it doesn't have a Language section - that must have come slightly later. This means you have to put the text with the rest of the button config (so anything you've seen with langEngine( "%{main_ somewhere on button line is no good for you).

Also noticed that in the drifting section, instead of the # being used most, there's a lot of /* and */ used - such as

/*
Event OnDriftScore() # Player event
privMsg( "Score: ^7" . GetCurrentPlayerVar("DriftScore") . " ^3" . GetCurrentPlayerVar("LastDriftScore") );
EndEvent
*/If you remove the/* and */ at start and end of that code, the code will start working.

ie
Event OnDriftScore() # Player event
privMsg( "Score: ^7" . GetCurrentPlayerVar("DriftScore") . " ^3" . GetCurrentPlayerVar("LastDriftScore") );
EndEvent

The coding you removed needs to be re-instated, except lose the # character at start of line - instead of

#$MaximumDriftAngle = 100; # Maximum angel to maintain. When angle is above value, score is reset

it would read$MaximumDriftAngle = 100; # Maximum angel to maintain. When angle is above value, score is reset



Your $MinimumDriftScore = 5000; # Minimum drift score required

This is quite a high score (at least for me it is) - to make sure it's working ok, try dropping it way down (50?) to see if things start working, then when you find it is working, raise it up to where you think things should start happening (because I want all messages to show, I have mine set at 1!)

In fact, my drift config criteria are as follows;

$MinimumDriftSpeed = 25; # Minimum speed in km/h to maintain. Driving below that speed will reset score (25kmph is approx 16MPH)
$MinimumDriftAngle = 5; # Minimum angel to maintain. When angle is below value, score is reset
$MaximumDriftAngle = 75; # Maximum angel to maintain. When angle is above value, score is reset
$GoodDriftScore = 3000; # Value to be reached to execute action on good drift score
$MinimumDriftScore = 1; # Minimum drift score required

These are come by after a lot of dialogue with drifters that have been on my servers, and based on my (non-existant) drifting abilities.

For instance, personally I can only just control the car with small drift (less than 15 degrees, which is what serious drifters would prefer to be minimum), otherwise I spin.

The serious drifters think that anything more than 75 degrees max angle is not realistic.

Pick what you think would be realistic criteria.

The good drift score is like that, as I have one of my servers permanently on a layout track, where you can only do short single lap.

drew555
20th December 2009, 13:57
Wow!

What an answer, thank you!

I'll answer these as I implement them :)

I'm now replacing my entire Drift Options section with yours, exactly as is, the entire Driftmeter 2-1.txt file will replace my Drifting options.

I'm also going to leave the LANG part on the end, exactly as it is in your Driftmeter 2-1.txt file.

We'll see if that helps.

sinanju
20th December 2009, 15:24
Think you might be better using the code from version 5.7, otherwise your lapper might trip up as it may not be able to look for the language section.

Gai-Luron
20th December 2009, 15:49
In last version driftmeter is by default in LFSLapper ( with catchevent ). Remove # into addonsused.lpr before driftmeter line to have this feature , that's all

all code is in driftmeter.lpr

no modification to do in default config file

Why do you continue to use obsolete LFSlapper version? :)

sinanju
20th December 2009, 16:14
Hi Gai

I'm using old version as both my server hosts still using old versions of lapper.

One using version 5.7, and other 5.8.

Also, in truth, I'm more au-fait with these two than the newer version 5.9.

Prior to 5.9, it was mainly about opening and closing buttons; v5.9 is more for programmers, which is where I get lost (for instance, I have no idea what an array is, or why you would want to use one, or what you would use it for).

Quite happy with this; I'll leave you, Yisc, Tim, Krayy and the other talented programming people to do the complicated stuff, which I don't want to get into (maths was never my strong subject).

Gai-Luron
20th December 2009, 16:22
Hello,

Array are also present in your 5.8 version :razz:. in last version i optimize array, no add

All feature of the 5.9 version are the same than the older, except catchevent and catchsub.

When you use a catchEvent is like using the event.

example

LFSLapper.lpr
Event OnGoodDrift( $userName ) # This is present in main lpr file LFSLapper.lpr
....
CatchEvent

driftMeter.lpr
CatchEvent OnGoodDrift( $userName ) # This can be present in your script
closePrivButton( "driftcomboboxtexttopmessage0&driftcomboboxtexttopmessage&driftcomboboxtexttopmessage1" );
globalMsg( langEngine( "%{main_ongooddrift}%" ,GetCurrentPlayerVar("NickName"),GetCurrentPlayerVar("LastDriftScore") ) );
openPrivButton( "driftcomboboxtexttopmessage2",85,19,30,5,3,8,16,langEngine( "%{driftmeter_driftcomboboxtexttopmessage2}%") );

EndCatchEvent

anotherfile.lpr
CatchEvent OnGoodDrift( $userName ) # This can be present in other script
....
EndCatchEvent


First LFSLapper do the Event OnGoodDrift and then execute all catchEvent with the name OnGoodDrift

With that you haven't to modify LFSLapper.lpr to add your code, just add a catchEvent on the event that driftmeter need. In fact you release only one .lpr file. User include your script file using include in addonsused.lpr file and your script is added and work. No modification complicated need in main lpr file

Example in addonsused.lpr

#### Include for drifting infos ####
#include( "./driftdef.lpr");
# OR
#include( "./driftmeter.lpr");
#####################################

just remove # before include( "./driftmeter.lpr"); to have your driftmeter working
or remove # before include( "./driftdef.lpr"); to have default drift feature, no need to remove /* or */ arround code in LFSLapper.lpr

The big difference in the 5.9 is username passed to all player event and optimization ( more speed ) for the GLScript.

Take a look at your updated driftmeter script and you understand how work catchevent. ( very easy )

Gai-Luron

drew555
20th December 2009, 16:32
Thank you both for your amazing help.

Sinanju - am I being cheeky to ask if I can use/ modify some of your coding for my own Driftmeter? Since I've been ploughing some time into Lapper, I've come to want to kind of make my own - as I learn.

I've not got the Sinanju or Lappper driftmeter working - and Gai, I wish I'd have known it was that simple! - but in my investgations I have found that I am enjoying working out ths new, alien language as I create my own.

Many thanks to you all.

sinanju
20th December 2009, 19:55
Sinanju - am I being cheeky to ask if I can use/ modify some of your coding for my own Driftmeter?

I've made code public so you can do whatever you want :).

Just remember to keep back-up of your previous working lapper config file!

If it works, you can always publish it - maybe people would prefer to use your drift meter.

Good luck on the coding :thumb:

sinanju
20th December 2009, 19:59
Hello,

Take a look at your updated driftmeter script and you understand how work catchevent. ( very easy )

Gai-Luron
If either of my server hosts ever upgrade to version 5.9 I might give it a go. :nod:

gazastrike
28th January 2010, 22:33
hi ive got lfs lapper v 5.923 and how do i set it up
on my server

sinanju
29th January 2010, 00:19
I'm assuming you mean the driftmeter part?

If so, look in the .\bin\default\includes folders, you will see a file called addonused.lpr.

You need to open this up (Notepad will do), and you will see a line #include( "./driftmeter.lpr");

Remove the # (hash) sign from front of line, then save. Restart lapper again and the drift part should now be working.

MadMagMad
10th May 2010, 12:48
I have a problem with the drift meter. The problem is that only the first person who joins the server get to se the Drift Meter Graphic, the rest will only get the drift, drift combo and angle numbers. Another question: has anyone tried the drift meter with Lapper 6 beta?

MadMag
10th May 2010, 13:36
Im sorry.. I didn't see the post about that the driftmeter is now inside the lapper as default. One problem I have: I can't se the drift score when I type !dstats username

tam3535
12th September 2010, 14:53
Would you please help out Everything Okay Rating Official, including but not Drift Indicator Pls add msn Hasseekthere@hotmail.com

sinanju
13th September 2010, 12:31
Would you please help out Everything Okay Rating Official, including but not Drift Indicator Pls add msn Hasseekthere@hotmail.com
Hi, sorry but I don't understand what the problem is.

Do you mean the driftmeter isn't showing?

If so

look in the .\bin\default\includes folders, you will see a file called addonused.lpr.

You need to open this up (Notepad will do), and you will see a line #include( "./driftmeter.lpr");

Remove the # (hash) sign from front of line, then save. Restart lapper again and the drift part should now be working.

tam3535
13th September 2010, 15:16
Hi sinanju drift drift settings so bad when gas is cut off in scoring a bad picture of me I want to be like in sura http://www.lfsforum.net/attachment.php?attachmentid=108193&d=1282425189 Are the roads for this config?

Do this until all of the roads? please

tam3535
13th September 2010, 17:02
How do I set the ranking according to drift, I'll do anything?
Thank you very much :)

sinanju
13th September 2010, 19:19
Hi sinanju drift drift settings so bad when gas is cut off in scoring a bad picture of me I want to be like in sura http://www.lfsforum.net/attachment.php?attachmentid=108193&d=1282425189 Are the roads for this config?

Do this until all of the roads? please
If I understand you correctly, your score is resetting when you go slow?

If so, then you could reset some of the criteria for the scores-

Open driftmeter.lpr and look for the following;

$MinimumDriftSpeed = 5; # Minimum speed in km/h to maintain. Driving below that speed will reset score - this is very low speed, but as long as you're still moving you should keep your score
$MinimumDriftAngle = 5; # Minimum angel to maintain. When angle is below value, score is reset - wouldn't go much below this
$MaximumDriftAngle = 75; # Maximum angel to maintain. When angle is above value, score is reset - you could go higher, but to me, anything much above this is a slide!
$MinimumDriftScore = 1; # Minimum drift score required for text messages to work.

sinanju
13th September 2010, 19:21
How do I set the ranking according to drift
To get the top drift list, just type !drf

To get from a particular number say 21st ->, then type !drf 21.

tam3535
13th September 2010, 21:15
oh thnx :):):) Lfs TR Yan Yan come my server

tam3535
14th September 2010, 21:10
can you fix me? driftmeter.lpr file is not in the lapper 5.716 version. I'll do what?

tam3535
15th September 2010, 17:49
Please help. I just wanted to come cornering drift score. drift is plain to everyone and get many points. Would you make it to your config?

sinanju
15th September 2010, 19:13
Please help. I just wanted to come cornering drift score. drift is plain to everyone and get many points. Would you make it to your config?
The easiest thing would be to upgrade to newer version of lapper.

sinanju
16th September 2010, 12:25
Think this is what you're looking for -> http://www.lfsforum.net/showthread.php?t=68863 (this is Fat-Oil's version of lapper with grass cutting config).

tam3535
16th September 2010, 14:03
many thanks. You've been very helpful sinanju