The online racing simulator
Quote from Yisc[NL] :New name can be anything you want but a name is already set in the default script. Make a copy of your original finals into the folder which is configured in your lapper script. Remove the .txt extention and fireup Lapper. Then it will automaticly convert the old files into the new database.

Hi Yisc[NL]
Sorry, but it doesn't seem to work.

Tried calling my old PB.txt files PB and GripPB, but neither seem to convert.


Even when I do time on track, it doesn't seem to capture time - nothing appears when I type !top.
EDIT - !top problem sorted - found I didn't have $PubStatIdk enabled!
Attached images
LFS Database files.JPG
Instead of doing
Quote : CASE "gtg":
CASE "bye":
CASE "cya":
privMsg(langEngine( "%{main_bye}%" ));
BREAK;

to go with
Quote :main_bye= "^2Bye, and thanks for racing with ^1Sin'rs";


Which gives me
Bye, and thanks for racing with
Sin'rs when I type bye, gtg or cya.

Is there a shorter way of writing this rather than put the trigger words on separate lines?

I've tried various ways of putting all on same line separated by colons, semi-colons, lines (e.g. CASE "bye:cya", or CASE "bye":"cya"; or CASE "bye";"cya": etc), but all fail.
Hello,


no other way.

bye

Gai-Luron
hello Gai, could you help me to get speedtraps working on AS3 im new to this i have had alot of help off Andy King but i cannot keep turning to him as he has his own servers thanks i have the latest version of Lapper with the language files in

thanks tur8o
How to convert Lapper v5.7 Register MsgAction to Lapper v5.8 CASE - An Example
Not looking for help here, but maybe trying to help others.

This little write up is for people like me who could do things in Lapper V5.7, but finding it bit harder in V5.8, and although fairly well explained in the write up, still need a little more specific information and/or example.

In v5.7, you had a 'Register MsgAction' event/routine, which when someone typed a particular word, then lapper would automatically reply.
For instance, one of mine was;
Register MsgAction("gtg",MA_bye);
Register MsgAction("bye",MA_bye);
Register MsgAction("cya",MA_bye);
Sub MA_bye()
privMsg( "Bye, and thanks for racing with Sin'rs." );
EndSub

This little routine was called 'MA-bye', and would come into play when someone typed 'gtg', 'bye' or 'cya' (fairly standard and polite way of leaving a server).

In other words, each of the words between the quotes would act as a trigger word for lapper to reply to with my pre-prepared message.

As a polite "thank you", I got lapper to give an automatic reply of;
"Bye, and thanks for racing with Sin'rs".

In v5.8, this has been changed.

Now you would do;

Go to the "SWITCH( $command )" section, then inbetween a "BREAK;" and "CASE" (BREAK is end of routine, CASE start of another), add the following;
CASE "gtg":
CASE "bye":
CASE "cya":
privMsg(langEngine( "%{main_bye}%" ));
BREAK;

This little routine is called 'main_bye'.

You then have to put a little bit of narrative in both the EN(glish) and FR(ench) language parts of lapper at the bottom of the lapper script.

In this instance, I've got;

Lang "EN"
main_bye = "Bye, and thanks for racing with Sin'rs.";

Lang "FR"
main_bye= "Bye et merci pour la course avec Sin'rs.";

(Many apologies if my French isn't correct).

This means that, as before, if someone types the word 'bye', lapper replies with "Bye, and thanks for racing with Sin'rs".

As with all messages, you can colour text with ^ and numbers.

In my slightly complicated example above, I've shown what happens when one of multiple words are chosen. You can do same with single word (only 1 line with CASE) or even more (multiple lines of CASE, such as all the colours in the rainbow, stars in the heavens, F1 driver names, old girlfriends, etc).

At the moment, all the sections are contained within the same lapper config file. I would expect (hint!), that in future releases, there may be separate files for each language.
How to convert Lapper v5.7 RegisterScheduleAction for Lapper v5.8 - An Example
Not looking for help here, but maybe trying to help others.

This little write up is for people like me who could do things in Lapper V5.7, but finding it bit harder in V5.8, and although fairly well explained in the write up, still need a little more specific information and/or example.

In 5.7, you had a 'Register ScheduleAction' event/routine, which at specific times, lapper would put a message up on the display.
Usually, this was for telling you the team name, or server name, or web address, or email, or serious message like don't drink and drive.

For instance, one of mine was;
Register ScheduleAction( "8 5 * * * *", SA_keyboard );
Sub SA_keyboard()
cmdLFS("/rcm Sinanju uses keyboard so can't respond quickly");
cmdLFS("/rcm_all");
EndSub

This little sub-routine is called SA_keyboard.

This meant that at a specific interval after the hour, you would get large gray message on your screen, shouting "Sinanju uses keyboard so can't respond quickly".

In v5.8, this little sub-routine has been changed. With sub-routine split up bit more.

Under the 'Event OnLapperStart()' section, you need to place your RegisterScheduleAction (in the default script, there is one for SA_mid that you can search for).

In this case it would be
RegisterScheduleAction( "8 5 * * * * *", SA_keyboard );

This little sub-routine is called SA_keyboard. Same as before.

However, at end of same section, you will see 'Sub SA_mid() # Lapper Event'.

You'll need to add your own little sub-routine here too.

In my case, I've got
Sub SA_keyboard() # A Sinanju Event
globalRcm( langEngine( "%{main_keyboard}%" ) );
EndSub

(I've differentiated it from normal '# Lapper event').

You then have to put a little bit of narrative in both the EN(glish) and FR(ench) language parts of lapper at the bottom of the lapper script.

In this instance, I've got;
Lang "EN"
main_keyboard = "Sinanju uses keyboard so can't respond quickly";
Lang "FR"
main_keyboard = "Sinanju utilise le clavier afin de ne pas pouvoir répondre rapidement";

(Many apologies if my French isn't correct - and I'm not sure if my message will fit, or will truncate).

As with all lapper messages, you can colour text with ^ and numbers.
Good french

Better is
main_keyboard = "Sinanju utilise le clavier et ne peux répondre rapidement";

You can have many language section as you want: Italian, Deutch, etc...


sinanju you are good in GLScript and translation feature. Maybe, you can write a little howto for GLScript

Gai-Luron
Hi Gai cand you tell me this problem i dont quite understand whats wrong i edit something this comes up the i get the .dbs files pop up i delete them from the FTP i !start it starts but when i try to !reload i get this come up again please guide me in the way of correctness

this is the error message
LFSLapper.LFSClient.managePacket(NCN newConnection) in D:\Dev\DevInsim\lapper\LFSLapper5.842\LFSLapper\src\LFSClient\managePacket.cs:line 51
at LFSLapper.LFSClient.Loop(Connect insimConnection) in D:\Dev\DevInsim\lapper\LFSLapper5.842\LFSLapper\src\LFSClient\loop.cs:line 889
at LFSLapper.LFSClient.doloop() in D:\Dev\DevInsim\lapper\LFSLapper5.842\LFSLapper\src\LFSClient\lfsclient.cs:line 625
at LFSLapper.LFSListen.Listen.goWorkMode() in D:\Dev\DevInsim\lapper\LFSLapper5.842\LFSLapper\src\LFSListen\Listen.cs:line 85
at LFSLapper.LFSListen.Listen.startStbMode() in D:\Dev\DevInsim\lapper\LFSLapper5.842\LFSLapper\src\LFSListen\Listen.cs:line 270

Error message is incomplete. need the few line before. Maybe default top car not set
Hi,

How can i add 2 strings together?
When i make something like this it gives on var $b1 the value 0 in case of Hello world.
I use lapper version 5.841.


CASE "!hello":
GlobalVar $a1 ;
$a1 = "hello " ;
GlobalVar $a2 ;
$a2 = "world" ;
privMsg( . $a1 . " + " .$a2 );
$b1 = $a1 + $a2;
privMsg( . $b1 . " this a1+A2" );
BREAK;

Quote from Gai-Luron :Error message is incomplete. need the few line before. Maybe default top car not set

default top car is set :/ i have looked at everyline it says and there is nothing wrong with it
Quote from Tim NL :Hi,

How can i add 2 strings together?
When i make something like this it gives on var $b1 the value 0 in case of Hello world.
I use lapper version 5.841.


CASE "!hello":
GlobalVar $a1 ;
$a1 = "hello " ;
GlobalVar $a2 ;
$a2 = "world" ;
privMsg( . $a1 . " + " .$a2 );
$b1 = $a1 + $a2;
privMsg( . $b1 . " this a1+A2" );
BREAK;


is it you pat a "THEN" after your message for example..
IF ( $enable_pitboard == "true" )
THEN
OnConnect_Pitboard();
ENDIF
EndEvent

Concatenation is done with .

$b1 = $a1 . $a2;
Been trying to update my Drift Meter for newer version of Lapper - without success.

As TIM[NL] version is smaller and neater, thought I would try update his - again no success.

I have


Event OnDriftScore()
$AngleVelocity = GetCurrentPlayerVar( "AngleVelocity" );
IF( $GUI_drift == "yes" )
THEN
openPrivButton( "drf0",99,1,22,10,4,-1,16," " );
IF( $AngleVelocity < 0 )
THEN
$Angle_drift=($AngleVelocity)*(-1);
openPrivButton( "drf1",100,2,20,4,4,-1,32,langEngine( "%{main_ondriftscore}%" , GetCurrentPlayerVar("DriftScore"), GetCurrentPlayerVar("LastDriftScore") ) );
openPrivButton( "drf2",100,6,20,4,4,-1,32,langEngine( "%{main_driftangle}%" , GetCurrentPlayerVar("$Angle_drift") ) );
ELSE
openPrivButton( "drf1",100,2,20,4,4,-1,32,langEngine( "%{main_ondriftscorerev}%" , GetCurrentPlayerVar("DriftScore"), GetCurrentPlayerVar("LastDriftScore") ) );
openPrivButton( "drf2",100,6,20,4,4,-1,32,langEngine( "%{main_driftanglerev}%" , GetCurrentPlayerVar("$AngleVelocity") ) );
ENDIF
ENDIF
EndEvent

along with the following language files

main_ondriftscore = "Score: ^7{0} ^3{1}";
main_driftangle = "Drift Angle: ^7{0} ^2>";
main_ondriftscorerev = "Score: ^7{0} ^2{1}";
main_driftanglerev = "Drift Angle: ^2< ^7{0}";

However, when I switch on the Drift option via Tim's GUI, then as soon as I drift, Lapper goes into Standby state.
Tim[NL] Drift Meter

Finally figured it out.

Should be:


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

IF( $GUI_drift == "yes" )
THEN
openPrivButton( "drf0",99,1,22,10,4,-1,16," " );
IF( $AngleVelocity < 0 )
THEN
$Angle_drift=($AngleVelocity)*(-1);
openPrivButton( "drf1",100,2,20,4,4,-1,32,langEngine( "%{main_ondriftscore}%" , $DriftScore, $LastDriftScore ) );
openPrivButton( "drf2",100,6,20,4,4,-1,32,langEngine( "%{main_driftangle}%" , GetCurrentPlayerVar("$Angle_drift") ) );
ELSE
openPrivButton( "drf1",100,2,20,4,4,-1,32,langEngine( "%{main_ondriftscorerev}%" , $DriftScore, $LastDriftScore ) );
openPrivButton( "drf2",100,6,20,4,4,-1,32,langEngine( "%{main_driftanglerev}%" , $AngleVelocity ) );
ENDIF
ENDIF
EndEvent

With language part as follows:

main_ondriftscore = "Score: ^7{0} ^3{1}";
main_driftangle = "Drift Angle: ^7{0} ^2>";
main_ondriftscorerev = "Score: ^7{0} ^2{1}";
main_driftanglerev = "Drift Angle: ^2< ^7{0}";

i cannot get my idle exclude to work could some one help please
Work only with username, no nickname
Drifting causes Lapper to go into Standby State
Seems I've been a bit premature with saying the drift meter coding works.

It does work - but only for very short while, and when not too big a drift.

Otherwise, Lapper turns off with "LFSLapper in Stand By State".

Anyone any ideas why this happens?
Attached images
small drift meter.JPG
Standby State.JPG
In order to see find the error(s) you have to take a look at the log-file.
There's a main log-file in the folder 'logs' which is in the bin-folder and there's a log-file in the folder in which you have the LPR file.
That last log file has the following name: 127.0.0.1-29995-ERR.log (29995 is the insim portnumber you use for lapper, so this will be a value you have used)
Open the log-file to see why Lapper has gone to standby.
Hi Yisc{NL]

I emptied the large log file, and re-run with drift on. Did this a few times.

Log file attached.

It says error on line #2262

My Lapper.lpr file has no line spaces in it, so using PSPad, line #2262 is:

main_split1 = "^7SP1: {0} {1}({2})&^7TPB:{3}";

However, that line is not much different to next 2 lines:

main_split2 = "^7SP2: {0} {1}({2})&^7TPB:{3}";
main_split3 = "^7SP3: {0} {1}({2})&^7TPB:{3}";


Doesn't make much sense, unless line numbering is wrong somewhere.
Attached files
127.0.0.1-17564-ERR.txt - 2.3 KB - 352 views
Quote from Gai-Luron :Work only with username, no nickname

#$IdleExclude = "Tur8o,5ini5t3r,Andy King,Blaine"; # Usernames excluded for idle check
$IdleExclude = "&./idleexempt.txt";
$OnIdleTimeout1 = 40; # Idle timeout for OnIdleAction1 in seconds
Event OnIdle1() # Player event
privMsg( langEngine( "%{main_idle1}%" ) );
EndEvent
$OnIdleTimeout2 = 50; # Idle timeout for OnIdleAction2 in seconds
Event OnIdle2() # Player event
cmdLFS( "/spec " . GetCurrentPlayerVar("Nickname") );
privMsg( langEngine( "%{main_idle2}%" ) );
EndEvent

i comment the first one out because it didnt work so andy suggested i make a separate folder and put the names in there but still no success Andy hasnt been here for a while so i cant ask him this it the file aswell
it has the usernames andy said something about after the

$IdleExclude = "&./idleexempt.txt";

to put something like a "ELSE" i think but i was trying to keep up but no success again so please Gai could you help me on this one?
Attached files
idleexempt.txt - 48 B - 318 views
Quote from sinanju :Hi Yisc{NL]

I emptied the large log file, and re-run with drift on. Did this a few times.

Log file attached.

It says error on line #2262

My Lapper.lpr file has no line spaces in it, so using PSPad, line #2262 is:

main_split1 = "^7SP1: {0} {1}({2})&^7TPB:{3}";

However, that line is not much different to next 2 lines:

main_split2 = "^7SP2: {0} {1}({2})&^7TPB:{3}";
main_split3 = "^7SP3: {0} {1}({2})&^7TPB:{3}";

Doesn't make much sense, unless line numbering is wrong somewhere.

what i did was cut out the Lang_En and put it into a separate lpr file then in the override options i put
include( "./includes/Lang_En.lpr");
include( "./includes/Lang_Fr.lpr");

and that is for both of them En & Fr i havent had a prob with them since
Quote from sinanju :Hi Yisc{NL]

I emptied the large log file, and re-run with drift on. Did this a few times.

Log file attached.

It says error on line #2262

My Lapper.lpr file has no line spaces in it, so using PSPad, line #2262 is:

main_split1 = "^7SP1: {0} {1}({2})&^7TPB:{3}";

However, that line is not much different to next 2 lines:

main_split2 = "^7SP2: {0} {1}({2})&^7TPB:{3}";
main_split3 = "^7SP3: {0} {1}({2})&^7TPB:{3}";


Doesn't make much sense, unless line numbering is wrong somewhere.

Wich version of LFSLapper? i correct some thing in error numbering. If it's the last please send me your lpr file

thank's



for Tur8o, i take a look on iddle exclude, try to put all username in lowercase

Gai-Luron
Using Version=5.8.4.4

I've cut down my Lapper.lpr file a bit to make it smaller, and emptied the error log file.

Then put Drift option on via !gui command. This caused same Stand By State problem.

Lapper and Error files attached.

No problems with lapper file if Drift option not enabled.

And error log still pointing to same line of text as being the problem.
Attached files
LFSLapper.txt - 74.5 KB - 348 views
127.0.0.1-17564-ERR.txt - 3.3 KB - 346 views
This thread is closed

Config help
(1112 posts, closed, started )
FGED GREDG RDFGDR GSFDG