The online racing simulator
Release
(228 posts, closed, started )
Release



Special thank's

The original program was written by MonkOnHotTinRoof. I had his permission to maintain and develop it because it stopped the development. Thank's a lot Monkter for your initial prog Wink

Dev Team
Gai-Luron : Official Coder
Bass-Driver: Support & Coder
LakynVonLegendaus: Support & Coder
Yisc[NL] : Support & Script Coder
Sinanju: Support

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

LFSLapper Development Subforum : Help, Request, Bugs, Scripts
http://www.lfsforum.net/forumdisplay.php?f=262

Download
Version 7.0.9.1

LFSLapper's Manual (Work in progress)
Tutorials

LFSLapper will work for both Demo and Licensed hosts and can be used also for single player games.
Will also work on dedicated servers and Linux OS (Mono required).

Specifications:
  • Runs on Windows using .NET, or on Linux with Mono
  • Written in Microsoft C#.
  • Source is available under GNU license.
  • Multi-threaded: A single LFS Lapper instance can manage multiple LFS servers.
  • Able to reload the configuration without leaving LFS.
  • Connection to LFS server using UDP or TCP.
  • Uses the SQLite 3 database for easy data management
  • Complete scripting language (GLScript) to develop your own scripts and events
    • Management of events triggered by LFS
    • Event Timer for Delayed Effects
    • Logic tests (IF/ELSE, CASE/SWITCH)
    • Loops (WHILE, FOR, FOREACH)
    • Global or local variable scope
    • Able to call internal LFSLapper functions
    • Call script sub-functions
    • Easy to use LFS buttons. Multiple buttons on the screen. Fully configurable
    • Buttons can auto-close on Timer and generate actions
    • Blinking Buttons
  • Easy to include other custom modules or scripts
  • Automatic detection of program crashes
  • Automatic restart
  • Notification by e-mail on crash.
  • Complete management of log files for easy debugging of your scripts.
Features:
  • Create qualification user groups using external files or configuration file
  • Hotlaps or drift mode
  • Store lap PBs in Grip (Hotlap) or drift mode
  • Can calculate PB by an average of 1 to 10 laps
  • Calculate and store points in drift mode.
  • Top PBs display in LFS.
  • Display charts in LFSH (Hottlaps, Drift)
  • Event-specific scripts
  • View driver PBs from LFS World
  • View driver statistics (fuel, km, ...) from LFS World
  • Export files via FTP to use or display on websites.
  • Call personalized web pages and run the code returned by these pages
  • Allows setting the date format for regional support.
  • Management of node events (enter/exit custom track locations)
  • GLScript allows function calls on Timer.
  • Setting permissions on the server according to criteria of lap times by car and circuit.
  • Manage lists of swear words
  • Manage driver and car handicapping (Car, Car/track, Driver)
  • Manage use of driving aids in LFS
  • Full vote management of LFS to End Race, Restart Race, Restart Qualification
  • Sort race grid relative to PB or WR
  • Automatic Car/Track rotation
  • Display leading or following times separating the driver from other racers
  • Personalized messages on record (WR)
  • List qualifying drivers on the server
  • Events called on Lapper start, new driver connections, disconnections, leaving pits, split times, enter pits, etc. ...
  • Define custom commands to be executed via LFS chat.
  • Message flood detection
  • Set the maximum number of laps allowed by a racer during a session
  • Detects loss of car control (customisable)
  • Detects drivers that are too slow
  • Detects drivers that are parked on the track
  • Displays speed or distance values depending on the unit chosen by the drivers: km / h, km or mph, mp
  • Calculates acceleration time
  • Configurable pit windows
  • Penalty management: Speeding in pit lane. Jumping the start before the green light
  • Add/remove autoX objects
  • Carcollision detection
  • Object collision detection
  • Actions buttons
  • ... And much more
Quick start
  1. Make sure you have .NET Framework installed (Mono will work, too).
  2. Extract archive to arbitrary directory.
  3. please read doc/readme.txt.
Utility
Trackinfo maker
Trackinfo maker is an utility who generate a trackInfo.cfg with splitting of wr with your own coefs. I generate the default trackInfo.cfg with this utility
http://cgtavc.monespace.net/la ... wnload/l...ackinfo1.4.zip

Clean SPB
CleanSPB.exe is an utility who clean all spb on PB file
http://cgtavc.monespace.net/la ... nload/lapper/CleanSPB.rar


PBLFSLapperPHPViewer By Gai-Luron
http://cgtavc.monespace.net/la ... wnload/l...PViewer1.0.rar


All prog by Gai-Luron
LFSRelax :http://www.lfsforum.net/showthread.php?t=27913
LFSLapper :http://www.lfsforum.net/showthread.php?t=25756
LFSStat : http://www.lfsforum.net/showthread.php?t=24933
Hello,

New Release: 5.8.4.2

Support multi-language

Gai-Luron


+-------------------------------+
|Changes from v5.841RC to 5.842 |
+-------------------------------+
1. Add new GLScript function
strFormat( formatStr,arg1,..,argn );
example:
strFormat( "The player {0}, there is actually {1} players on track", GetCurrentPlayerVar("nickName"), GetLapperVar( "nbPlayersOnTrack" ) )

This function is a very powerfull fonction to format text
The following table lists format controls supported by the C# String.Format() method together with examples of each control:
Control Type Description Example
C Currency
Displays number prefixed with the currency simple appropriate to the current locale
{0:C} of 432.00 outputs $432.00
D Decimal
Displays number in decimal form with optional padding
{0:D4} of 432 outputs 00432
E Exponential
Displays number in scientific form with optional value for fractional part
{0:E5} of 432.32 outputs 4.32320E+002
E Fixed
Displays the number including the specified number of decimal digits
{0:F3} of 432.324343 outputs 432.324
N Number
Converts a number to a human friendly format by inserting commas and rounding to the nearest 100th
{0:N} of 123432.324343 outputs 123,432.32
X Hexadecimal
Converts a number to hexadecimal
{0:X} of 432 outputs 1B0
0:0... Zero Padding
Adds zeros to pad argument
{0:0000.00} of 43.1 outputs 0043.10
0:0#... Space Padding
Adds spaces to pad argument
{0:####.##} of 43.1 outputs 43.1
% Percentage
Multiplies the argument by 100 and appends a percentage sign
{0:00.00%} of .432 outputs 43.20%

2 - Add new GLScript command
myConfig();
This show the Lapper config panel for the player

3 - Remove shift + I command.

4 - Add !myconfig in default LFSLapper.lpr file to call the player config panel

5 - Add language bloc translation in config file
Syntax :
Lang idLang
...
EndLang
You can create many block you want. Many block as you want for Lang "EN".
idMessage = Message;

idMessage is an idenditification of the message.
Message is the message displayed on the screen. You can put in it {0} ... {n} parameter. Look at strFormat

Example:
Lang "EN"
main_welc1 = "^7Welcome {0} ^7to ^1LFSLapper ^7powered server !&^2Type ^7!help ^2after leaving garage to see commands.";
main_welc2 = "^7Your actual friendly Position (all visitors) : ^7{0}&^2Your actual League prequalify Position : {1}^6Estimate Pool : {2}&Don't use swearwords on this server&respect other player&otherwise you can be banned";
main_accept = "Accept";
EndLang
Lang "EN"
main_deny = "Deny";
essai = "My test value 1 = {0}, value 2 = {1}";
EndLang
Lang "FR"
main_welc1 = "^7Bienvenue {0} ^7sur ce serveur Géré par ^1LFSLapper^7!&^2Tapez ^7!help ^2 pour voir les commandes après avoir quitté le garage";
main_welc2 = "^7Votre position absolue (Tous les visiteurs) : ^7{0}&^2Votre position de préqualification : {1}^6Estimation de poule : {2}&Ne pas employer de mots grossiers sur ce serveur&Respecter les autres joueurs&sinon vous risquez d'être banni";
main_accept = "Accepter";
main_deny = "Refuser";
essai = "Mon essai valeur 1 = {0}, valeur 2 = {1}";
EndLang

6 - Add new GLScript command
GlobalMsg( "Message" );
if same as cmdLFS("/msg Message"), but GlobalMsg support automatic translation ( see below )

7 - Add new GLScript command
GlobalRcm( "Message" );
if same as cmdLFS("/rcm Message") and cmdLFS("/rcm_all"), but GlobalRcm support automatic translation ( see below )

8 - Add new GLScript command
PrivRcm( "Message" );
if same as cmdLFS("/rcm Message") but for the current player, privRcm support automatic translation ( see below )

9 - Add new GLScript command
langEngine("%{idMessage}%", param,...,param )
but this function don't return the translated message, but set the translate
engine for the global messaging. This function must be used everywhere in message function

example:
langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual )
main_welc2 is defined in language block for the different language
the value is english is :
"^7Your actual friendly Position (all visitors) : ^7{0}&^2Your actual League prequalify Position : {1}^6Estimate Pool : {2}&Don't use swearwords on this server&respect other player&otherwise you can be banned"
in main_welc2 message
{0} is replaced by value of $Posabs
{1} is replaced by value of $Posqual
{2} is replaced by value of $Groupqual

10 - Add new GLScript command
langTranslate("%{idMessage}%", param,...,param ) same as langTranslate
but this function return the translated message.
idMessage , same id who is defined in block message
param1,..,paramn , parameter to fusion with message. look at strformat

11 - Add the choice of the lang in the !myconfig command.

12 - Fix minor bug in info when an error occur un script

13 - Fix bug in releasing button when type shift+I

14 - Language pack for EN ( English ) and FR ( French )


Release 5.8.4.2b

Default language is English and not french. Mistake by me ^^


Gai-Luron
New release

Quote :+-------------------------------+
|Changes from v5.842 to 5.843 |
+-------------------------------+
1. Fix crash when password is to big in config file. Now send an error message

2. working dir autocreation when a new entry is present in LFSServers.cfg.

3. Add a new directory "defaultfiles" containing default file for autocreation

4. Fix bug in driftdbs when player have a \0 ( zero ) in nickname

Hello,

Release 5.8.4.4 avaiable

Quote :+-------------------------------+
|Changes from v5.843 to 5.844 |
+-------------------------------+
1. Add Krayy car reset code in LFSLapper
new events
Event OnMaxCarResets() : triggered when MaxCarResets is reached by a player
Event OnCarReset() : triggered when player do a car reset

New param var
MaxCarResets = #;
# number of allowed car reset before triggering OnMaxCarResets

2 Add 3 lapperVar var
RaceLaps = number or laps for a race
QalMins = number or minute in a qual
racelapsleft = Race lap left before end of race

getLapperVar( "RaceLaps" );
or
getLapperVar( "QalMins" );

3 Add updated GUI script From Tim

Hello,

Release 5.8.4.5 avaiable
Quote :
+-------------------------------+
|Changes from v5.844 to 5.845 |
+-------------------------------+
Add Krayy code

1 Add 1 lapperVar var
raceMins = Race in minute pour timed races
numConns = Number of player connected
numPlayers = Number of player on track

getLapperVar( "raceMins" );

2 Add 1 player var
pitStops = Number of pitstop do by a player

GetCurrentPlayerVar("pitStops");
or
GetPlayerVar("nickane","pitStops");

3 Add new GLScritp file "who.lpr". it work with connected.lpr and add
a new command for player
!who -> display player connected

4 Add new GLScritp file "handicapper.lpr". it work with connected.lpr
Allow an admin to assign, save and load handicaps in-race
a new command for player and admin
!hc -> display player connected

SVN repositary updated
Hello,

Release 5.8.4.6 avaiable

Quote :
+-------------------------------+
|Changes from v5.845 to 5.846 |
+-------------------------------+

1 ( Krayy ) Fix bug Reset some Var when race start

2 ( Krayy ) add new GLScript function
UserIsAdmin($userName);
Return 1 if true and 0 if false. Use admin.txt file to get admin
name and add UCID = 0 as admin ( console )
lpr file modified in accordance to the new function

3 Add $AdminFile in LFSLapper.lpr file to specify what file is used
for UserIsAdmin function



Hello,

Release 5.8.4.7 beta available for test purpose.

send me feedback for reorder feature.

Quote :
+-------------------------------+
|Changes from v5.846 to 5.847 |
+-------------------------------+

1 Add $AutoRestartOnFirstFinished = false; config var to determine if the time used
for the AutoRestartRaceSec value

2 Add new glscript command to force rotation to next track
forceRotation();

3 Fix bug on result Race

4 Remove array var $ConfVar[idOfVar] replaced by getConfigVar( idOfVar )

5 Add new command setConfigVar( idOfVar, value )
You can set some config var in event, list of config var that can be modified

adminfile,adminemail,smtpserver,loginmail,passmail,messagetime,showplayercontrol,defaulttopcar,
swearwordslist,swearwordsmax,handicapusers,swapside,autogears,shifter,helpbrake,axisclutch,autoclutch,
mouse,kbnohelp,kbstabilised,customview,votelifesec,voterestart,votequalify,voteend,autorestartracesec,
autorestartonfirstfinished,rotateeverynbraces,enablerotation,rotatetracks,rotatecars,showsplitpb,refreshqualusers,
qualusers,maxfloodlines,maxfloodlinestime,maxsessionlaps,minanglevelocity,maxnbinstunt,maxallowedlaptime1,
maxallowedlaptime2,onidletimeout1,idleexclude,onidletimeout2,gooddriftscore,minimumdriftscore,minimumdriftspeed,
minimumdriftangle,maximumdriftangle,accelerationstartspeed,accelerationendspeed,accelerationstartspeedmph,
accelerationendspeedmph,accelerationprivatemaxtime, maxfastdriveonpit,pitwindowstart,pitwindowstop,
maxcarresets,reordergrid

6 Add new config Var
$ReorderGrid
Set the automatic reoder, value can be
"WR" reorder relative to World Record
"PB" reorder relative to Server Record
"LFS" LFS config file reorder

you can modify it in setConfigVar


Hello,

Release 5.8.4.8 beta available for test purpose.

send me feedback.

Quote :
+-------------------------------+
|Changes from v5.847 to 5.848 |
+-------------------------------+

1 Add new Event : OnEnterPitLane( $fact )
Player Event trigerred when player enter in pit Lane
fact can be:
ENTER // entered pit lane
NO_PURPOSE // entered for no purpose
DT // entered for drive-through
SG // entered for stop-go


2 Add new Event : OnExitPitLane()
Player Event trigerred when player exit pit Lane


3 Add a Global Variable $ListOfPlayers[index] containing the list of all the players connectect to the server
when you reach the end of this list, return ""
Example:
$i=0;
WHILE( $ListOfPlayers[$i] != "" )
WriteLine( "> " . $i . " - " . $ListOfPlayers[$i] . "<");
$i = $i+1;
ENDWHILE
*******************************************************************************
PLEASE UPDATE YOUR SCRIPT TO USE THIS FEATURE INSTEAD OF $ar_user FROM PITBOARD
*******************************************************************************

4 Add new player var : wr
Return the World Record for the current track/Car for the player

5 Fix bugs in !who script and add the use of the ListOfPlayers
*******************************************************************************
PLEASE UPDATE YOUR SCRIPT TO USE THIS FEATURE INSTEAD OF $ar_user FROM PITBOARD
*******************************************************************************
6 Fix bugs in reorder



-
Problem (KIMA) DELETED by Gai-Luron
Hello,

Release 5.8.4.9 beta available for test purpose.

send me feedback.

Quote :
+-------------------------------+
|Changes from v5.848 to 5.849 |
+-------------------------------+
1 Add new player var : ontrack
getCurrentPlayerVar( "onTrack") equal 1 if player is on track and 0 of not

2 Add Winner flag on OnResult using new LFS char, limited button

3 Add new GLScript function to save a group to a file
UserGroupToFile( group, file );
Example:
UserGroupToFile( "admin", "./admin.txt" );

CAUTION:
In a future release ( not released for now ) i create new Lapper function to remove some not good designed functions
Function created:
openPrivBtn in replacement of OpenPrivateButton, this new function need UserName
closePrivBtn in replacement of ClosePrivateButton, this new function need UserName
privMsg need username in this future release
privRcm need userName in this future release
privDelayedCmd in replacement of privDelayedCommand , this new function need UserName

Function removed after a while, please update you script as soon i release this modified version, because in next month i remove definitively this function
openPrivButton
closePrivButton
getCurrentPlayerVar
privDelayedCommand


Each player event receive in this future version in argument the userName who triggered this event to have the ability to use the new function

Sorry for the inconvenience, but it's better for future language extension
Hello,

Release 5.8.5.0 beta available for test purpose.

send me feedback.

This version must be tested accurately because of change in script module to have the ability for a builtin function to return an Array.

Quote :
+-------------------------------+
|Changes from v5.849 to 5.850 |
+-------------------------------+
1 Removed hardcoded Global Variable $ListOfPlayers[index] replaced, see below

2 Add new GLScrip Function GetListOfPlayers(), return an array containing list of players connected
Example
$i=0;
$ListOfPlayers = GetListOfPlayers();
WHILE( $ListOfPlayers[$i] != "" )
... Do What you Want ...
$i = $i +1;
ENDWHILE

3 Add new GLScrip Function GetListOfUsersGroup(), return an array containing list of user sorted in a specified group
Example
$i=0;
$ListOfUsers = GetListOfUsersGroup();
WHILE( $ListOfUsers[$i] != "" )
... Do What you Want ...
$i = $i +1;
ENDWHILE

Slow down!!

haven't had time to send through some suggestions before a new update is out!

PS: Huge thanks for putting arrays into GLScript...that'll make life a lot easier.
Hello,

I slow down but the last features GetListOfUsersGroup,GetListOfPlayers returning an array var change how the scripts must be writed in future and i want to release it quickly. Next features are less important on how write a script ( except GLScript command explained before, but the suppression of the obsolete command it's not for tomorrow , don't worry ).

Gai-Luron
-
(Krayy) DELETED by Krayy
Release 5.8.5.1 beta available for test purpose.

Here are the commands that I never had the time nor the courage to do. I hope they are useful for you

send me feedback.

NB: $CurrPly = GetPlayerInfo( $userName );
$CurrPly is a special array who continusly updated with correct player values
but you can't assign it to another var array using $newVar = $CurrPly;


+-------------------------------+
|Changes from v5.850 to 5.851 |
+-------------------------------+
1. Add new struct control in GLSCRIPT
FOREACH( var IN arrayVar )
....
ENDFOREACH

Whith this struct you can parse an array without knowing index
put on each iteration one element of the array arrayVar in var
var is an array containing only index "key", "value"
"key" is the key in the array
"value" is the value

Example:
Script Code

$toto[0,1,0] = "Zero,Un";
$toto[1,1,0] = "Un,Un";
$toto[1,2,0] = "Un,Deux";
$toto[2,2,0] = "Deux,Deux";
$toto[3,1,0] = "Trois,Un";
$toto[4,0,0] = "Quatre,zero";

FOREACH( $myVar IN $tata )
writeLine( "Key = " . $myVar["key" ] . " Value = " . $myVar["value" ] );
ENDFOREACH
Result on screen
Key = toto,4,0,0 Value = Quatre,zero
Key = toto,0,1,0 Value = Zero,Un
Key = toto,1,1,0 Value = Un,Un
Key = toto,1,2,0 Value = Un,Deux
Key = toto,2,2,0 Value = Deux,Deux
Key = toto,3,1,0 Value = Trois,Un

2. Add new GLScrip Function dumpVar(), to dump the content of a var to screen, debug purpose
Example
In script
$toto[0,1,0] = "Zero,Un";
$toto[1,1,0] = "Un,Un";
$toto[1,2,0] = "Un,Deux";
$toto[2,2,0] = "Deux,Deux";
$toto[3,1,0] = "Trois,Un";
$toto[4,0,0] = "Quatre,zero";
dumpVar( $toto );

print on screen:
$toto[4,0,0] = "Quatre,zero"
$toto[0,1,0] = "Zero,Un"
$toto[1,1,0] = "Un,Un"
$toto[1,2,0] = "Un,Deux"
$toto[2,2,0] = "Deux,Deux"
$toto[3,1,0] = "Trois,Un"

3. Completely rewriting array management in GLScript, now you can assign an array to a new var or array,
partially or entirely.
Example
In Script
$toto[0,1,0] = "Zero,Un";
$toto[1,1,0] = "Un,Un";
$toto[1,2,0] = "Un,Deux";
$toto[2,2,0] = "Deux,Deux";
$toto[3,1,0] = "Trois,Un";
$toto[4,0,0] = "Quatre,zero";

$tata = $toto;
$part = $toto[1];
$var = $toto[4,0,0];
$inArray[1] = $toto[1];

Result in Vars:
$toto[0,1,0] = "Zero,Un";
$toto[1,1,0] = "Un,Un";
$toto[1,2,0] = "Un,Deux";
$toto[2,2,0] = "Deux,Deux";
$toto[3,1,0] = "Trois,Un";
$toto[4,0,0] = "Quatre,zero";

$tata[0,1,0] = "Zero,Un"
$tata[1,1,0] = "Un,Un"
$tata[1,2,0] = "Un,Deux"
$tata[2,2,0] = "Deux,Deux"
$tata[3,1,0] = "Trois,Un"
$tata[4,0,0] = "Quatre,zero"

$part[1,0] = "Un,Un"
$part[2,0] = "Un,Deux"

$var = "Quatre,zero"

$inArray[1,1,0] = "Un,Un"
$inArray[1,2,0] = "Un,Deux"

4. New GLScript command getPlayerInfo( userName ), this function return an array containing all player var.
!!!!!!!SORRY!!!!!!! but this is the future command who kill the next command list in the future
Command killed in the future :-)
GetCurrentPlayerVar
GetPlayerVar
SetCurrentPlayerVar
SetPlayerVar

Set a Var with getPlayerInfo and then use it like an Array Var to retreive player var or to set player var
funny isn't it?

Example:
Event OnConnect( $userName ) # Player event
$CurrPly = GetPlayerInfo( $userName ); # Set A var for the player infos
IF( $CurrPly["userName"] != "" ) THEN # Kip Host
WriteLine( $CurrPly["userName"] ); # Retreive a player Var
WriteLine( $CurrPly["nickName"] ); # Retreive a player Var
$CurrPly["ess"] = 12; # Set a player Var
WriteLine( $CurrPly["ess"] );
ENDIF
EndEvent

Next Stage it's send to all parameter event the userName

5. New GLScript command to have the size of an array
arrayCount( array );

Example:
$toto[ 1 ] = "Un";
$toto[ 2 ] = "Deux";
WriteLine( $toto );
Result on Screen
2



Quote from Gai-Luron :Release 5.8.5.1 beta available for test purpose.

Hi Gai-Luron,
I wanted to test the new version but there is no lapper.exe in version 5.8.5.1 .

And when i use ver5.849 then topUser and nearUser with a database storedvalue.dbs from ver.5.844 it gives a error
CASE "!point":
topUser( "^1[^7NLR^4] ^7Points System","ps_points_total","DESC",argv );
BREAK;
CASE "!rank":
nearUser( "^1[^7NLR^4] ^7Points System","ps_points_total","DESC",argv );
BREAK;

The following error apear when i type !point in lapper ver 5.849 with storedvalue.dbs from lapper ver. 5.844
-----------------------------------------------------------------------------
11/8/2009 4:59:59 PM

Lapper Instance 127.0.0.1/29991 abort!

Column does not exist.
Mono.Data.SqliteClient
at Mono.Data.SqliteClient.SqliteDataReader.GetOrdinal(String name)
at LFSDbs.storedDbs.GetTable(String key, Int32 from, String relativeToUserName, Int32 nbRead, String Filter, Boolean flagDesc) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\Dbs\storeddbs.cs:line 436
at LFSLapper.LFSClient.TopStoredUser(Int32 UCID, String title, String key, String pusername, String pnickname, String pcmd, Boolean flagNear, Boolean flagDesc) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\cmdLapper.cs:line 880
at LFSLapper.LFSClient.execCmd(unionVal val, ArrayList args, infoPlayer currInfoPlayer) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\parseEvent.cs:line 1110
at LFSLapper.LFSClient.myFunctions(unionVal val, ArrayList args) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\parseEvent.cs:line 806
at GLScript.GLApp.parseBackcall(SetOfVars GVAR, SetOfVars LVAR, unionVal val, ArrayList args) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 1031
at GLScript.Parseur.getval(SetOfVars GVAR, SetOfVars LVAR, executeParsedFunction BC) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\ParseExpr.cs:line 465
at GLScript.GLApp.retrieveEvalVar(String funcName, TokenParse tkparse, TokenBuffer currTokenBuffer, SetOfVars GVAR, SetOfVars LVAR, Boolean breakFunc, Char& breakCar) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 840
at GLScript.GLApp.privExecuteTokensPart(Int32 level, String funcName, SetOfVars GCAR, SetOfVars LVAR, Boolean breakable, Boolean inSwitchCase, Int32 start, Int32 end) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 225
at GLScript.GLApp.privExecuteTokensPart(Int32 level, String funcName, SetOfVars GCAR, SetOfVars LVAR, Boolean breakable, Boolean inSwitchCase, Int32 start, Int32 end) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 355
at GLScript.GLApp.executeTokensPart(String funcName, SetOfVars GVAR, SetOfVars LVAR, Int32 start, Int32 end) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 156
at GLScript.GLApp.privExecuteFunction(String funcName, String[] argsVals) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 151
at GLScript.GLApp.executeFunction(String funcName, String[] argsVals) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 121
at Configurator.lexConfigurator.executeFunction(String funcName, infoPlayer pcurrInfoPlayer, String[] par) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\cfgParser\readCfg.cs:line 333
at LFSLapper.LFSClient.managePacket(MSO mso) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\managePacket.cs:line 664
at LFSLapper.LFSClient.Loop(Connect insimConnection) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\loop.cs:line 1036
at LFSLapper.LFSClient.doloop() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\lfsclient.cs:line 552
at LFSLapper.LFSListen.Listen.goWorkMode() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSListen\Listen.cs:line 85
at LFSLapper.LFSListen.Listen.start() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSListen\Listen.cs:line 126
Int32 GetOrdinal(System.String)
Closing Instance...
-----------------------------------------------------------------------------

Quote from Tim NL :Hi Gai-Luron,
I wanted to test the new version but there is no lapper.exe in version 5.8.5.1 .

just create a new one
compile the LFSLapper.csproj and put it in the BIN folder
- Error sorted
- Exe available on new release, sorry

Release 5.8.5.2 beta available for test purpose.

send me feedback.


+-------------------------------+
|Changes from v5.851 to 5.852 |
+-------------------------------+
1. Add new player event : OnNameChange (krayy)

2. Update SuperUser checks to include UCID 0 (dedicated server or LFS host) (krayy)

3. Update finishedpos event to return a valid number at any time as currently
it does return a number if the racer has not passed the finish line (krayy)

4. privMsg now can take 1 or 2 Arg (krayy)
1 arg, send message to current player;
example : privMsg( "myMessage");
2 arg, Send a message to a specified user
example : privMsg( "gai-luron","myMessage");

5. Fix error on SetUserStoredValue, now accept string for storing

6. Improve array performance and use of specific player array getted with GetplayerInfo
if you copy an GetplayerInfo array in another array, you get a sbapshot or a carboncopy of the original array
and not a full featured GetPlayerInfo Array.


-
(Krayy) DELETED by Krayy : Moved to Requests
Release 5.9.0.1 beta available for test purpose.

There is a major change in configuration script to allow more flexibility in scripting. Update your main lpr file with new one. All modification to this main file is not a good thing, instead use myInc.lpr to overlap sub or event and catchevent, catchsub to add your feature to an existing main lpr file event or sub in you include files.

Now a script can be added without modify main lpr file
  • All release's include script are modified by myself to use new catch feature, take a look in it to modify you own include script and send me the result if you want include new script in main release
  • Script that are used are now in addonsused.lpr, modify this file to activate or deactivate a script. that's all
  • Add driftmeter.lpr in default release. To activate it go in addonsused.lpr and remove # before the include
  • In the future I only include script that don't modify main lpr file
  • All player event now receive the userName who triggered the event, your old LFSLapper.lpr file is obsolete, modify it or take a freshen version
Sorry for this important modifications, but it's for improve LFSLapper scripting

send me feedback.


+-------------------------------+
|Changes from v5.852 to 5.901 |
+-------------------------------+
1. GetListOfPlayer accept an optional argument to sort the list og player
Example:
$list = GetListOfPlayers("U"); # List sorted by userName
Or
$list = GetListOfPlayers("N"); # List sorted by nickName

2. Fix groupCmdLfs( cmd ); order in other serv

3. Add GLScript command reload() to stop lapper and reload config

4. CatchEvent eventName structure
Add new structure feature, it's offer the ability to define code in this struct
and catch an existing event located in the main lpr file. LFSLapper execute code located
in event then jump to code located in one or more catchEvent. it's very usefull for creating
script without modify the original lpr file.
To add a new functionality to lapper just add include(newScript) at the end
of lpr file and to remove put a # before the include.
newScript must use this CatchEvent.

CatchEvent eventName
...
EndCatchEvent

Example:
CatchEvent OnConnect( $userName )
WriteLine( "OnConnect appended");
EndCatchEvent

Before Event OnConnect( $userName ) is executed then execute code
located into one or more CatchEvent OnConnect( $userName )

5. CatchSub subName --> Same as CatchEvent but for sub
Add new structure feature, it's offer the ability to define code in this struct
and catch an existing sub located in the main lpr file. LFSLapper execute code located
in sub then jump to code located in one or more catchSub. it's very usefull for creating
script without modify the original lpr file.
To add a new functionality to lapper just add include(newScript) at the end
of lpr file and to remove put a # before the include.
newScript must use this CatchSub.

CatchSub mySub
...
EndCatchSub

Example:
CatchSub MySub( )
WriteLine( "MySub appended");
EndCatchSub

Before Sub MySub( ) is executed then execute code
located into one or more CatchSub MySub( )

6. Add userName in args passed to event player
OnMSO,OnAuthAllowed,OnAuthNotAllowed,OnAuthReached,OnSwearWords1
OnSwearWords2,OnToLowHandicap,OnNotMatchFlags,OnConnect,OnDisConnect
OnSplit1,OnSplit2,OnSplit3,OnLap,OnSpbSplit1,OnSpbSplit2,OnSpbSplit3
OnSpbLast,OnFlood,OnMaxSessionLaps,OnAngleVelocity,OnMaxNbInStunt
OnMaxAllowedLapTime1,OnMaxAllowedLapTime2,OnIdle1,OnIdle2,OnDriftPB
OnDriftLap,OnDriftScore,OnPB,OnPBQual,OnAcceleration,OnBeginPit
OnEndPit,OnPit,OnNotPitWindow,OnBeginPitWindow,OnEndPitWindow
OnFastDriveOnPitL1,OnFastDriveOnPitL2,OnMaxFastDriveOnPit,OnFalseStartL1
OnFalseStartL2,OnLeaveRace,OnDriftTooLow,OnGoodDrift,OnNewGapPlayerBehind
OnNewGapPlayerBefore,OnNewPlayerJoin,OnChangeTyres,OnFinish,OnResult
OnCarReset,OnMaxCarResets,OnExitPitLane,OnEnterPitLane,OnNameChange

7. Patch to allow storing data as another user. I.e: ( krayy )

SetUserStoredValue( "hmass", GetPlayerVar($uName,"h_mass"));
OR
SetUserStoredValue( $uName, "hmass", GetPlayerVar($uName,"h_mass"));

GetUserStoredValue( "hmass" );
OR
GetUserStoredValue( $uName, "hmass" );

8. Fix SQL error when userName have a single-quote (') in it in PB, Drift and stored

9. Add new GLScript function SplitToArray, this function allow splitting a string by a split char and put result into array

Example:
$tosplited = "Un,Deux,Trois,Quatre";
$splites = SplitToArray( $tosplited,"," );
WriteLine( "The result for pos 2 is " . splites[1] );
FOREACH( $val IN $splites)
WriteLine( "Val = " . $val["value"]);
ENDFOREACH

Result on Screen
The result for pos 2 is Deux
Val = Un
Val = Deux
Val = Trois
Val = Quatre

Might I make a suggestion that 5.853 be renamed as 5.901 and divorced from the 5.8* line, as it (to my mind anyway) represents a HUGE change in the scripting language that will require rewrites of pretty much every Lapper file out there. It might be better to leave those be and start the new fork so people dont get confused (or p**ded off)
Hello!

You are right, i add one or two feature that turn in my mind in GLScripting and do this fork.

Gai-Luron
-
(Andy King) DELETED by Andy King : Wrong Forum
Release 5.9.0.2 beta available for test purpose.

send me feedback.


+-------------------------------+
|Changes from v5.901 to 5.902 |
+-------------------------------+
1. new command const, you can put it in sub/event or outside sub to define const
Const are preproced when reading config file, not on execution

const MY_CONST 12; # it's global const
const MY_CONST2 1 + 23; # it's global const
Sub mySub()
const LOCAL_CONST 13; # it's local const const only available in sub
const MY_CONST2 2 + 89; # This override the global const only in this sub;

$i = 12 + MY_CONST + LOCAL_CONST + MY_CONST2; # This is replaced by $i = 12 + 12 + 13 + 2 + 89;

EndSub

2. Fix Bug when setting a local var with global var and global var with localvar


Release 5.9.0.3 RC available for test purpose.

send me feedback.


+-------------------------------+
|Changes from v5.902 to 5.903 |
+-------------------------------+
1. Improve number of simultaneus button allowed on screen to 240 ( LFS limit ) instead 170.

2. Add a timeout feature in script to stop infinite loop. Default is 2000ms
you can set your own value in LFSServers.cfg

timeOutScript=2000; # Time out in ms

3. Add player var retreiveid from Pubstat
PSDistance, // online statistics of one racer - distance in metres
PSFuel, // online statistics of one racer - fuel burnt in cl
PSLaps, // online statistics of one racer - laps
PSHostsJoined, // online statistics of one racer - hosts joined
PSWins, // online statistics of one racer - Wins
PSSecond, // online statistics of one racer - Second
PSThird, // online statistics of one racer - third
PSFinished, // online statistics of one racer - finished
PSQuals, // online statistics of one racer - quals
PSPole, // online statistics of one racer - pole
PSDrags, // online statistics of one racer - drags
PSDragWins, // online statistics of one racer - drag wins
PSCountry, // online statistics of one racer - country

4. Add a Sub fonction in LFSLapper.lpr script PstInfo, this function display the pubstat info for one player

5. Add new chat command !ps to display your pubstat info or !ps username to display the pubstat info for
a player present on server

6. Add new .lpr file consts.lpr, containing some const usefull to write script


Release 5.9.0.4 RC available for test purpose.

send me feedback.


+-------------------------------+
|Changes from v5.903 to 5.904 |
+-------------------------------+
1. Add blinking button feature on button, value is 8 or use ISB_BLINK const
Example:
openPrivButton( "clos",78,120,20,10,10,-1,ISB_DARK | ISB_BLINK,langEngine("%{main_accept}%"),OnConnectClose );
or
openPrivButton( "clos",78,120,20,10,10,-1,32 + 8,langEngine("%{main_accept}%"),OnConnectClose );

Better use const for more lisibility

2. new arg in functions
RegisterScheduleAction
RegisterScheduleAction
RegisterZoneAction
DelayedCommand
PrivDelayedCommand
accept a newArg that is an unique id for this Action.
this id is usefull when you want remove a RegisterScheduleAction, RegisterScheduleAction, RegisterZoneAction,DelayedCommand,PrivDelayedCommand
You can also still continue use this function without this arg

Example:
RegisterScheduleAction( "myTest","* * * * * * *", SA_test );
RegisterNodeAction( "MyNode", "SO6" , 337 , SA_Test2 );
RegisterZoneAction( "MyZone", "SO6" , 337 , SA_Test3 );
DelayedCommand( "MyCommand", SA_Test3 );
PrivDelayedCommand( "MyCommand", SA_Test3 );


3. new functions
RemoveScheduleAction( idSched );
RemoveNodeAction( idSched, track );
RemoveZoneAction( idSched, track );
RemoveDelayedCommand( idSched );
RemovePrivDelayedCommand( idSched );

this functions allow to remove a previous registered action
Example:
RemoveScheduleAction( "myTest" );
RemoveNodeAction("MyNode","SO6");
RemoveZoneAction("MyZone","SO6");
RemoveDelayedCommand( "MyCommand" );
RemovePrivDelayedCommand( "MyCommand" );

4. Add a new player Var to know in witch zone the player is
if not in zone value is "NONE" else it's the id of the zone event, identifi you zoneaction now.
usefull when you want command available only in specific zone
Example
CASE "!buyfood":
IF( GetCurrentPlayerVar( "idZone") == "MyZone" ) THEN
... do what you want ...
ELSE
privmsg( "Command not available here");
ENDIF



cool u added some of the stuff i needed for my cruise addon
What a wonderful job you are doing mate.
So many changes since the last time I took a look at the code.
It's confusing me highly at the moment so I won't bother upgrading for a while, until I have enough time to sit down and have a real good look at all the things that have changed.
Anyway, great work and highly appreciated by many people.
This thread is closed

Release
(228 posts, closed, started )
FGED GREDG RDFGDR GSFDG