The online racing simulator
Searching in All forums
(966 results)
Scripts database
Gai-Luron
S3 licensed
Hello,

Result of your work in LFSLapper scripting to help user who don't know how to code this script.

All this items are needed
- The script file
- The Howto file explaining the integration of the script in LFSLapper
- the list of other scripts needed

Thank's for your help to LFSLapper users

List of scripts:
Last edited by Gai-Luron, .
Requests
Gai-Luron
S3 licensed
Hello,

If you have a request for LFSLapper improvement put here yours ideas.

Please when you put a request, tell me why you want this. It's more easy to me to find a way to solve the request.


Gai-Luron
Last edited by Gai-Luron, .
Bug Reports
Gai-Luron
S3 licensed
Hello,

You can put here yours bugs reports.

I need:
- Lapper version
- Last errorlog entry
- An explanation on how i can reproduce the bug.
- The script if it's a personnal script who do the error

Thank's for your help

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

I put in first post the link to the V2.0. With all job done on LFSLapper, i forgot to do this. It's a Shame ! Sorry JackCY

i think yamakawa graph.exe must be included in final release. What do you think about this?

Anyway, great job men, i am happy to see new version of LFSStat and graph


Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Ok the Stable version don't have MSHToNum function. Beta version is very very different and yes you must use the beta version

Bye

Gai-Luron
Gai-Luron
S3 licensed
IF( MSHToNum("1.30.00") > MSHToNum("1.40.00") )
THEN
$Level ="Newbie";
ELSE
$Level ="Prau";
ENDIF
WriteLine( $Level );
WriteLine( "1.30.00 -> " . MSHToNum("1.30.00") );
WriteLine( "1.40.00 -> " . MSHToNum("1.40.00") );

I try this and it work. who have the same issue? and how i can reproduce it? Do you use the last version?

Gai-Luron
Gai-Luron
S3 licensed
The only code who send /end is rotation or Votation. Try to disable rotation then Votation to find wich code do that

On the same Computer, each LFSLapper.exe must have own remote port
Ex:3001 or 3002
Gai-Luron
S3 licensed
Quote from Andy King :Hi Gai,
May 11 16:52:40 TRTjavitxu^L left the pits (FXR)
May 11 16:52:40 /msg TRTjavitxu = FXR Class B Licence
May 11 16:52:40 TRTjavitxu = FXR Class B Licence
May 11 16:52:40 /end

Not LFSLapper Trace, Maybe Airio. Anyway Airio can't catch /end command when other application send it.

Quote from Andy King :
I got this by restarting my 4 LFS Servers, Lapper did not reconnect so I had to manually go to each server and type !start. All 4 servers have AutoWork in LFSServers.cfg.

Everytime or only one shoot? This error message happen when LFSLapper try do write on an established connection. A coonnection can be down for a little time can cause this. In this case LFSLapper Reconnect in stand bye mode. If LFSLapper managed to connect in Standby mode is that it is a temporary connection problem.

Edit : I do a modification in LFSLapper for next release. Now it try to reconnect in autowork mode in case of lost connection. In case of Instance crash, go in stand by mode.
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello, try to change config file with :
Quote :
Event OnRotateCar() # Lapper Event
cmdLFS("/msg Car changed, go to pit! Current car = " . getLapperVar( "CurrRotateCar" );
EndEvent

Event OnRotateTrack() # Lapper Event
cmdLFS("/msg Track changed, please wait!" );
cmdLFS("/msg Current Track = " . getLapperVar( "CurrLongRotateTrack" );
EndEvent

Quote :- areas > to closing shortcuts; coordinates, max allowed speed, penalty, race/qual...
- blue flag management > auto spec blockers under blue flag; duration and decrescent distance under blue flag, action to blue flagger
- grid sorting after race > typically by session pb; maybe other eventuality... by lfsw pb, server pb, inverted?
- action for player removing other players from start grid in end of race screen

Not for the Next Release, i need to do a stable version!. I don't add new spec, i try to finish remote admin control for now and debug LFSLapper.

Thank's for the ideas, Probably in future version

Gai-Luron
Gai-Luron
S3 licensed
Quote :The error I had showing was due to an event missing in Authorisation, now sorted so removed the errors as was just taking up space on here

Can you tell me more with example of code to catch this error before crash

Thank's

Gai-Luron
Gai-Luron
S3 licensed
Hello,

Here the last version and i think i'am near Release. No new features Added in next version, just debugging.

Bye

Gai-Luron

Quote :+----------------------------+
|Changes from v5.836 to 5.837|
+----------------------------+

1. Add GLScript command for User Event
setUserStoredValue( key, value )
This function store the value associated with key and username
You can use this to display a topUser
2. Add GLScript command for User Event
getUserStoredValue( key )
This function retreive the value associated with key and current username
You can use this to display a topUser

3. Add GLScript command for User Event.
topUser( title,key,mode,argv );
-> title = Title of the Top displayed
-> key = Key used to retreive corresponding values ( limited to 50 characters )
ex:
key = "Champ1Race1"; // Display top for the specified race
or
key = "Champ1Race%"; // Display top for the specified Champ
find all value and make a sum by player where key begin with Champ
you can also write it with key = "Champ1%";
'%' Replace a part of a string in retreiving values
You can make more complicated structure
key="2009Champ1Race1" // Find result for race one in Champ1 in year 2009
key="2009Champ1Race%" // Find result for all race in Champ1 in year 2009
key="2009Champ%" // Find result for all Champ in year 2009
key="%" // All cumulated result


-> mode = "DESC" or "ASC" Sort sum value descending or ascending
-> argv = same as Top
4. Add GLScript command for User Event.
nearUser( title,key,mode,argv );
Same as topUser but list is positionned on current username

Gai-Luron
S3 licensed
Minor change in 5.836

Quote :+----------------------------+
|Changes from v5.835 to 5.836|
+----------------------------+
1. Fix concurrent access issue on storedvalue DBS

2. Start with 5 sec between 2 instances in autoworkmode to solve putstat access restriction

Gai-Luron
S3 licensed
Hello,

New Beta version, some change in managing instances

bye

Gai-Luron

Quote :+----------------------------+
|Changes from v5.834 to 5.835|
+----------------------------+
1. LFSServers.cfg is scanned every 10 Second to look,if there is a modification
You can Add, remove line when Lapper is started.

2. Start Lapper's instance with the unique ID, not with the line position. No space in ID
d1|gr1|94.23.7.00|30211|./demo|demo_1.ini|autowork
d2|gr1|94.23.7.00|30212|./demo|demo_2.ini
d3|gr1|94.23.7.00|30212|./demo|demo_2.ini

To start the first instance type
>start d1

3. Add new option in LFSServers.cfg
autostart to start lapper's Instance in Stand bye mode
autowork to start lapper's instance in work mode
autonone don't start Lapper's instance

4. Fix wrong user in group when LFSLapper's instance crash

5. All messages or errors messages are redirect in log file ( not yet on the console )
For LFSLapper
./log/LFSLapper-ERR.log
./log/LFSLapper-MSS.log
For Each instance
./workingDir/LFSHostIp-port-ERR.log
./workingDir/LFSHostIp-port-MSS.log

xxx-ERR.log is for error logging
xxx-MSS.log is for infos logging

Each log file have a limit of +/- 2MB

Gai-Luron
S3 licensed
Hello,

New beta version 834

Quote :
+----------------------------+
|Changes from v5.833 to 5.834|
+----------------------------+
1. Fix bug in calculation of average PBtime, where more than one
PB is used for the final average PB time

2. Optimize access of hudge Drift DBS. Tested with 1000 entry for one track and one car

3. Completely rewrite votation system. To bee tested accurately
Event OnVoteQualifyChange($PlayerOnTrack, $Vote , $Need) # New args Vars
Event OnVoteRestartChange($PlayerOnTrack, $Vote , $Need) # New args Vars
Event OnVoteEndChange($PlayerOnTrack, $Vote , $Need) # New args Vars

Quote :Request 2: Can we have a Blue Flag Event now we have Nodes so we can give automatic warnings using the difference between nodes to calculate how severe the warning is.

I don't understand what do you want to do!

Bye

Gai-Luron


EDIT:: Litlle Update dowload 834beta2
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Use the slider at botton of replay screen and go to the end. It LFSSTat crash, do minor step forward


Gai-Luron
Gai-Luron
S3 licensed
Hello,

Use LFSStat, because now with quick forward, you can do Stat more quickly.


Can ADMIN close this thread. I stop the Dev of this application?

Gai-Luron
Gai-Luron
S3 licensed
Hello,

New beta version

Gai-Luron

Quote :
----------------------------+
|Changes from v5.832 to 5.833|
+----------------------------+
1. You can type in console LFS command who are sended to all LFS instance
where LFSLapper is in working mode
example:
>/msg Hello everybody to our server
>/end
>
...
you can use also
>cmdLfs Hello eveybody
>cmdLfs /end

2. Fix Bug on GetHost in C# when the network of the LFS host server
isn't properly configured ( windows 2003 server )
using another C# call

3. Add groupID and autostart option in LFSServers.cfg, to start the specified
instance in stand by mode at LFSLapper start
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autoStart
DEMO 1|Gr1|94.23.7.62|30211|./demo|demo_1.ini|autoStart
DEMO 2|Gr1|94.23.7.62|30212|./demo|demo_2.ini
DEMO 3|Gr2|94.23.7.62|30213|./demo|demo_3.ini
DEMO 1 is automaticaly started

4. Add new GLscript command
groupCmdLfs( cmd );
Same command as cmdLfs but send this LFS command to all server having
the same group id.
DEMO 1|Gr1|94.23.7.62|30211|./demo|demo_1.ini|autoStart
DEMO 2|Gr1|94.23.7.62|30212|./demo|demo_2.ini
DEMO 3|Gr2|94.23.7.62|30213|./demo|demo_3.ini
if you are on server DEMO 1 or DEMO 2
groupCmdLfs("/msg Hello"); display Hello on DEMO 1 and DEMO 2, not on DEMO 3
if you are on server DEMO 3
groupCmdLfs("/msg Hello"); display Hello on DEMO 3 not on DEMO 1 and not on DEMO 2

5. Add !groupCmdLfs in LFSLapper.lpr default file to call
groupCmdLfs if you are admin. This add the ability to send command to
all instance having the same groupID using the LFS chat.


Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
if argv contain username

CASE "!Show_Points":
$argv = toLower( $argv );
$DriverName = (GetStoredValue($argv . "NickName"));
$Lap_Show = (GetStoredValue($argv . "_Points_Laps"));
$Race_Show = (GetStoredValue($argv . "_Points_Race"));
$Champ_Show = (GetStoredValue($argv . "_Points_Champ"));
BREAK;

Edit : it's not a forum, it's a chat !!!

Edit 2: you have a lot of function in Lapper
another example
split
in previous post a guy want to have multiple data in argv.
example:
!myFunction arg1 arg2 arg3

in your function $argv contain "arg1 arg2 arg3"
you can retreive arg1 with
$arg1 = split( $argv," ",0 );
$arg2 = split( $argv," ",1 );
$arg3 = split( $argv," ",2 );

Take a look at reference doc, all function are present
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

Use tolower function to avoid this issue in the portion of code you need to lowerize your argv. This function exist for this.

argv = tolower( argv );

Gai-Luron
Gai-Luron
S3 licensed
It's for that you have in previous version problem with $posabs, !stats, etc... In fact you can unlock your LFS with andy king or ANDY KING or AnDY KinG or another combination of upper and lowercase. But the player for LFS is the same. The username LFSLapper retreive from LFS is that you have entered to the unlock process and this can cause disfunction in Lapper because userName is case sensitive in sqlite.
it's better to lowerise all because with that you can't have this kind of issue. Now in GetCurrentPlayerVar("UserName");is in lowercase = andy king. With previous version you cvan have multiple entry in stored values for the same player due to the unlock process, not very good!


Edit : For msn, i can't, i am at work
Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Quote from Andy King :
Maybe you could allow |start at the end of each server line in LFSServers.cfg like we had AutoStart in previous release. Then starting the LFSLapper.exe would then start each server in LFSServer.cfg into StandBy Mode which then enables me to type !start into chat box on each LFS Server to get Lapper running.

It's on todo list...

Quote from Andy King :
Update 1: I have downloaded the databases from v5.8.3.1 to my local machine to run with v5.8.3.2 but there seems to be an issue with capitalised letters in Username for Stored Values...

Yes it's for this thas $PosAbs don't work sometimes in previous Release.

You can update your stored value wiith this SQL STATEMENT in storedvalue.dbs
UPDATE fi_stored SET key = LOWER(key)

if fail, try to remove duplicate values and retry


Quote from Andy King :
Update 2: Would it be possible to add !msa and !rca so we can send Admin Messages..

it's already on todo list, but i have to do some update to specify group of server in LFSServer.cfg to avoid send command to not owned server, but only on server who have the same group.

Quote from Andy King :
Update 3: Got the same problem I had in previous version, I cannot connect a locally running Lapper to my Servers on my host. I tried $TCPmode = false/true but neither will connect.

Does your host have a firewal for external incoming packet? Try to ask to an 500Servers Admin
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

Small update in Release, index update

load the LFSLapper5.832beta2.zip

Bye

PS: and a little improvement you can type in console LFS command. This command are sended to all LFS connected
example
/msg hello boys
/cars all

etc..
Gai-Luron
S3 licensed
Hello,

To open Database, you can also use sqlite manager for Firefox

https://addons.mozilla.org/fr/firefox/addon/5817


New beta version : 5.832

Quote :+----------------------------+
|Changes from v5.830 to 5.832|
+----------------------------+
This new version is a test version with managing change to facilitate Lapper installation for
hosting provider like 500Servers.com. The philosophy is one LFSLapper for one or more LFS. Each LFS can have
a working directory containing configuration file and database file. If you want synchronize your's lapper, you need to have
only one Lapper working dir for different LFS server. In this case you use the same database.

1. Change LFSServers.cfg file
Now you have to specify the working dir used by LFSLapper for the managed lfs server
and the ini file used.
one dir can be used for one or more server
example:
# Configuration of LFSServer to be Managed with LFSLapper
# One line per server
#Unique ID|Ip|Port|WorkDir|IniFile
DEMO 1|94.23.7.62|30211|./demo|demo_1.ini
DEMO 2|94.23.7.62|30212|./demo|demo_2.ini

2. Added ini file containing information needed by LFSLapper to
manage one LFS server. this is the content of this file

$password = "yourpass"; # Password of the managed LFS server
$configFile = "LFSLapper.lpr"; # Config file used in this server, without password
$superUsersFile = "superusers.txt"; # File containing user who can stop or start Lapper in LFS, one entry per line

This ini file must be in working directory.

When you start Lapper, you need to start an instance of Lapper for a specified LFS server like the previous version
But now this instance is in stand by mode. Waiting command in LFS chat to start Lapper working mode
To put Lapper in working mode. Go into LFS and type !start in LFS chat.
To put lapper in stand by mode when it is in working mode. type !stop in LFS chat

Each !start reload config file.

3. new command
!status -> Give the Lapper Status
stand bye mode
working mode
!start -> To put Lapper in working mode
!reload -> To reload config file and restart instance
!stop -> To put Lapper in stand bye mode

4. When LFS stop, Now Lapper don't crash and try every minute to reconnect to the server in stand by mode

5. Add config var in LFSServers.cfg
Fix the issue when you start more than one Lapper on same computer

Remote port is the port used to manage LFSLapper remotely, future extension
One remote port per LFSLapper on one machine
Example :
remotePort=3000;

6. Fix some error when username is not in lowercase -> in top, stats, posabs, etc..

7. Add new GLScript command
PrivDelayedCommand( second, callbackfunction );
Backcall command is executed after second for the current Player ( to use only in player event )

8. New arg for events
Event OnRaceStart( $NumP ) # Lapper event
Event OnQualStart( $NumP ) # Lapper event

$NumP = Number of player at the beginning of the race

9. LFSLapper test is the connection pass is wrong and display message on console box

10 - Add new GLScript command
RegisterNodeAction( trackname, node, callbackfunction );
Backcall command is executed when a node is reached by a player
Example
RegisterNodeAction( "BL1" , 140 , DisplaySpeed );
On track BL1, When Node 140 is Reached the Sub DisplaySpped is executed. To have the node of a specified portion of track.
Go to this place and type !node ( if you are admin ))

Gai-Luron
S3 licensed
Hello,

this is a beta version an only one Lapper can be run on one computer ( Due to the socket error ).
The reason is because the console admin use a socket and tcp to manage LFSLapper. On Beta this is harcoded to a specified port ( not yet finished ).
In fact actually, there is a server and a client in LFSLapper for the admin like insim even if you don't see it.

i hope you understand what i say!

Gai-Luron

PS: I have some problem and i don't dev this past days but i continue to read yours feed back.
Gai-Luron
S3 licensed
Hello,

Most AddOn exist better is! Continue your good Job

Gai-Luron
FGED GREDG RDFGDR GSFDG