The online racing simulator
Release
(228 posts, closed, started )
took me a few seconds to upgrade my script from 5.8.4.6
Quote from Fire_optikz001 :cool u added some of the stuff i needed for my cruise addon

The zone id, i think and the player var idZone. Very strange no? Yes it's only for your dev i have added this feature. I hope you release your cruise script to the community when you finish it . Please use catchevent and catchsub to have a standalone script.

@Yisc[NL]
Not many things are changed, the most important are the userName var passed to all event players, some modification in defaults script to use catchevent and catchsub, improvement of arrayvar and some builtin function can return array.

I modify some internal code too. Not visible for you, but better for me !

Thank's
Quote from Gai-Luron :The zone id, i think and the player var idZone. Very strange no? Yes it's only for your dev i have added this feature. I hope you release your cruise script to the community when you finish it . Please use catchevent and catchsub to have a standalone script.

@Yisc[NL]
Not many things are changed, the most important are the userName var passed to all event players, some modification in defaults script to use catchevent and catchsub, improvement of arrayvar and some builtin function can return array.

I modify some internal code too. Not visible for you, but better for me !

Thank's

yes i will release it there is one more thing i do need ... if possible a thing to count km
Hello,

I have already a count meter for each player ( in meter ). But do you need an event to do a specific action? What do you want to do with this info?

How do you want to use it? in fact i don't know on how work cruise insim ^^

Thank's for your answer

Gai-Luron
well in the end im gonna have to make it count money... i was thinking im not 100% how im gonna get it to store user stats :P

i would need to make it save user stats every x minutes
Why don't you save data on a specific node or zone of the track. When a player finish lap. and then when a player leave server
Hi Gai, can we use.....

RemoveScheduleAction( "myTest1&myTest2&myTest3" );

or

RemoveScheduleAction( "myTest1" );
RemoveScheduleAction( "myTest2" );
RemoveScheduleAction( "myTest3" );

Also is it possible to set Lapper to use the 24 hour clock like hh:mm:ss

YOU HAVEN'T UPDATED LINK STILL SHOWING v5.9.0.3RC
Quote from Gai-Luron :Why don't you save data on a specific node or zone of the track. When a player finish lap. and then when a player leave server

i mean i can make a scedualed event but would need a way go save it to the file
Quote from Fire_optikz001 :i mean i can make a scedualed event but would need a way go save it to the file

Why do you want to save it to file? why don't you use stored value?

Quote :RemoveScheduleAction( "myTest1&myTest2&myTest3" );

not possible! it's very important to have multiple remove event for you? i can do that if you want or if you can't wait create a sub like this


Sub rme( $ids )
$ar_id = SpliToArray( $id$,"&" );
FOREACH( $val IN $ar_id )
RemoveScheduleAction($val["value"]);
ENDFOREACH
EndSub

Gai-Luron
didnt think of that well i think ill start
Release 5.9.0.5 RC available for test purpose.

send me feedback.


+-------------------------------+
|Changes from v5.904 to 5.905 |
+-------------------------------+
1. Fix bug on scheduledAction


Hi Gai,
New version seems fine just filling DOS box with 0's now lol. Can you take a look at DefaultCar please as posabs is still not working. I could not get your SUB to work for removing SchedActions which is a shame as my Race Event Schedule has 56 SchedActions with ID Number_01 > Number_56. Would be so easy if I could have a nice small SUB rather than 56 lines long

Why do we need all those message lines shown in screenshots I posted when sending private messages?

Well done Lapper is so powerfull now to what it was when I first started using it, congratulations.
FOR( $i = 0; $i < 56;$i = $i + 1 )
RemoveScheduleAction( "Number_" . strFormat("{0:00}",$i));
ENDFOR

Fo info strFormat("{0:00}",$i) return 00 if $i = 0, 01 when 1 and so on.

Quote :Why do we need all those message lines shown in screenshots I posted when sending private messages?

You are rigth, i remove this uglys messages

My sub must be work, i write the code this morning at work without test it, perhaps i have make mistake . But the idea is that kind of code


Edit : code corrected

Sub rme( $ids )
$ar_id = SplitToArray( $ids,"&" );
FOREACH( $val IN $ar_id )
RemoveScheduleAction($val["value"]);
ENDFOREACH
EndSub


DosBox is the distance done by player, i removed it in the attached exe file, with privmsg fix. Change only your exe


Gai-Luron
Quote :
Sub rme( $ids )
$ar_id = SplitToArray( $ids,"&" );
FOREACH( $val IN $ar_id )
RemoveScheduleAction($val["value"]);
ENDFOREACH
EndSub

Hi Gai, can you write me the CASE etc and an explanation as I am not getting how this works as I have 54 SchedActions to close....
RegisterScheduleAction("RaceNight_01","00 00 18 * * * *", Schedule_R_01);

RegisterScheduleAction("RaceNight_54","00 22 22 * * * *", Registration_Open );

and they all need closing. Sorry for being a dummy but cannot get my head around it and off to work now.

Thanks in advance
Sub removeMySched()
FOR( $i = 1; $i < 55;$i = $i + 1 )
$id = "RaceNight_" . strFormat("{0:00}",$i);
RemoveScheduleAction( $id );
ENDFOR
EndSub

Release 5.9.0.6 RC available for test purpose.

send me feedback.

GO! GO! GO! with cruise Script, you have everything now


+-------------------------------+
|Changes from v5.904 to 5.906 |
+-------------------------------+
1. Add new player var TotDistMeter that is the distance in meter do by a player
this value is set to 0 when a player connect to the server
You can set this value by SetCurrentPlayerVar( "TotDistMeter" , 10000 );

2. Add new config var
$distToDo = 100;
it is the amount of meter that player must do to trigger new player event OnDistDone, see below

3. Add new event triggered when a player do a certain distance
$distToDo = 100;
Event OnDistDone( $userName ) # Player event
writeline( "100m dist done by " . $userName . " - total dist :" . GetCurrentPlayerVar("TotDistMeter") );
EndEvent

Quote from Gai-Luron :Release 5.9.0.6 RC available for test purpose.

send me feedback.

GO! GO! GO! with cruise Script, you have everything now


+-------------------------------+
|Changes from v5.904 to 5.906 |
+-------------------------------+
1. Add new player var TotDistMeter that is the distance in meter do by a player
this value is set to 0 when a player connect to the server
You can set this value by SetCurrentPlayerVar( "TotDistMeter" , 10000 );

2. Add new config var
$distToDo = 100;
it is the amount of meter that player must do to trigger new player event OnDistDone, see below

3. Add new event triggered when a player do a certain distance
$distToDo = 100;
Event OnDistDone( $userName ) # Player event
writeline( "100m dist done by " . $userName . " - total dist :" . GetCurrentPlayerVar("TotDistMeter") );
EndEvent


:P ill start working on it now

also does it say that every 100m?

I also will need this added http://www.lfsforum.net/showthread.php?t=61328

not the savegrouptofile as u already have something like that
-
(MariusMM) DELETED by MariusMM
Quote from MariusMM :Obviously it says whatever you want it to say after how long you want.

$distToDo = [U][B][COLOR=Red]100[/COLOR][/B][/U];
Event OnDistDone( $userName ) # Player event
writeline( "[U][B][COLOR=red]100m[/COLOR][/B][/U] dist done by " . $userName . " - total dist :" . GetCurrentPlayerVar("TotDistMeter") );
EndEvent

The red is where you edit how ever long distance you want the bonus to be at.

If I haven't completely misunderstood LFS lapper ^^. (Never scripted anything with lapper...)

i can see that now

Also is it possible to store the cruise info in its own dbs? like Cruise.dbs? kinda like the drift points and such
Quote from Andy King :Hi Gai,
... please as posabs is still not working. I could not get your SUB to work for ...

Change Posabs to PosAbs. Now all var are case sensitive
Release 5.9.1.0 beta available for test purpose.

send me feedback.

Replace only the LFSLapper.exe in the previous version and add tops.lpr in your include folder


+-------------------------------+
|Changes from v5.906 to 5.910 |
+-------------------------------+

**** CHANGING TO 5.9 BECAUSE OF BIG CHANGE IN GLScript, Very hard coding ****

1. Rewrite a big part of GLScript Parsing and lexer to cache compilation code.
Now very Speed up the execution of the code. Very hard coding
Try !gui one time ( caching at this point ), then type !gui ( very faster )

2. Add new GLScript function
GetListTop( $argv )
$argv is the same meaning arg as !top XRG etc...
$list = GetListTop( $argv );

This command return a 2 dimension arrayVar containing the result of the top
Write a test in your script with dumpVar( $list ) to view all available value
or take a look at tops.lpr the use

3. Create a new script ( to be finished ) for replace builtin command !top with a GLscript command file, you can
modify your top look as you want.
To view this new top type !mytop in chat line
This top is the same as old but only writed in GLScript :-), i remove the builtin code when i finish this
script.


Release 5.9.1.1 beta available for test purpose.

send me feedback.


+-------------------------------+
|Changes from v5.910 to 5.911 |
+-------------------------------+
Change LFSLapper.exe and defPitInfo.lpr from previous version

1. Fix error on retreive value in stored DBS

2. Fix error when no car is selected

3. Fix error in defpit.lpr script

Hi Gai,
Thanks for updates.

I have updated some lpr scripts.

LFSLapper.lpr :
Changed the GetCurrentPlayerVar("Nickname") into GetCurrentPlayerVar("NickName")
I did the same for UserName , PosAbs and some more.
The !reload was not working. Fixed
Text in winnerflag was missing. Added
And some other small things that im forgot.

pitboard.lpr :
Changed the GetCurrentPlayerVar("isBestSectorSplit1") into GetCurrentPlayerVar("IsBestSectorSplit1")
Changed the GetCurrentPlayerVar("Nickname") into GetCurrentPlayerVar("NickName")

In pitboard.lpr the SetCurrentPlayerVar("Information","^2 Best possible lap is: " . NumToMSH(GetCurrentPlayerVar("Tpb")) ); will not work yet.

who.lpr :
Was missing.
I changed the colors a bit. grey letters on light background was difficult to read.

Maybe i forgot or mist somethings.

__
Attached files
LFSLapper.zip - 15.5 KB - 734 views
pitboard.zip - 10.7 KB - 709 views
who.zip - 1.5 KB - 729 views
oooppps thank you very much, now GetPlayerVar and GetCurrentPlayerVar are case sensitive and i forgot some change in scripts.

Strange for Tpb, i take a look for it

Thank you for your help

Gai-Luron

PS: Exact for the who but for waiting you can find it in bin\defaultfiles\workingdir\includes, i fortgot to put it in default folder

PS2: NEW RELEASE WITH YOUR FIX

+-------------------------------+
|Changes from v5.911 to 5.912 |
+-------------------------------+
Change LFSLapper.exe and LFSLapper.lpr, pitBoard.lpr, who.lpr

1. Fix some error on script due to case sensitivity in GetCurrentPlayerVar And GetPlayerVar
Thank you very much Tim NL

2. who.lpr now present in release

Gai to make things easier could u possibly put a link in ur post for the updates?
This thread is closed

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