The online racing simulator
Searching in All forums
(132 results)
A.Fedorov
No longer welcome
i use LFS Z (not test patch)
A.Fedorov
No longer welcome
what u use? (confug, version of app)
A.Fedorov
No longer welcome
Last edited by A.Fedorov, .
A.Fedorov
No longer welcome
Quote :sweet. you make it?

yes

Quote :Are you driving that car?

No
Quote :Because I want that skin. Please show some pics of it. Nice insim by the way. What track is that?

If u want i try get this skin. Which track i don't know

Quote :how did you drive RB4 with you dont have S1/S2?

it's not me. i have friends who have license. i only coding this (using luaLFS)
Concept for cruise server or safety car
A.Fedorov
No longer welcome
it determine winners automaticly?

ps. sorry for bad english
A.Fedorov
No longer welcome
Quote from Shadowww :Mr. repeat?


Quote from Shadowww :I think you must know that all network data is fakeable... you faked network data in a lot of your not-so-legal projects.
Cracked clientP executable is good option for cheaters, too.
And, noone will download and run .exe from cruise server website.

Y i know. I not fake network data. I realize alternative as ICQ (QIP, Miranda, R&Q and so on). About this not in this area.

i not see another path how to block save layouts. only extarnal program
A.Fedorov
No longer welcome
sometimes i try complete my Project2 alfa(PATHCER) it have 2 modules serverP and clientP. This tool may check and fix (if not correct) byte in memory every 1 sec; read from memory and send to serverP or once write to memory byte
- off map
- off SHIFT_N
- off text info on screen SHIFT_F
- change filename signal5 to siren (siren.wav must be in folder of sounds) and send press SHIFT_W for restore sounds.

this tool i make for our cruise server. if client not connected to serverP this not access to cruise server

all data in memory of game you can read and operate with this as you want

i think only with like this tool can block save layout
A.Fedorov
No longer welcome
Quote from Gai-Luron :Hello Racer,
Major modification is the use of sqlite, real SQL database in place of txt file. this can offer much power for the future extensions.

sqlite:
be careful with operator LIKE (SELECT ... WHERE ... LIKE ...)
it have specified symbols _ and %

_ mean any one symbol
% mean any symbols

LIKE operator in my project i use for query without case sensitive

ps. sorry for my ugly english
A.Fedorov
No longer welcome
suggestion: add option for blocking AI. now a can type /ai and ai controls car
A.Fedorov
No longer welcome
It's not BUG of LFS. Try with other game
A.Fedorov
No longer welcome
in old version i make
_data_config.php
/*************START SERVER 1*****************/
$hostpath[0] = "d:\\LFS_Y\\";
$lfsport[0] = "63333";
/*******************************************/

/*************START SERVER 2*****************/
//$hostpath[1] = "d:\\LFS\\";
//$lfsport[1] = "63392";
/*******************************************/

server.php
$serverCount = count($hostpath);
$c = 0;
while($c < $serverCount)
{
include setLanguage($showLanguage);
$filepath[$c] = $hostpath[$c] . "host" . $lfsport[$c] . ".txt";

A.Fedorov
No longer welcome
Quote from Yisc[NL] :I had a quick look at your questions and I think the first one isn't possible. You can start a server from a batch file but after that it keeps waiting for LFS to end and then runs the next command.

use command into batch:
start LFSLapper.exe cfg1
start LFSLapper.exe cfg2
start LFSLapper.exe cfg3
A.Fedorov
No longer welcome
no normal method, but if use proxy (server<->proxy<->internet) for server we may use some filter (if message from user going to server and from server to other users)
A.Fedorov
No longer welcome
Quote from Starbert :I think this is a good idea! Please remove the max. of 12 racers in the demo-content. Make it unlimited. It solves a lot of problems with demo-racers showing up or not showing up, full servers, or a second demo-league with almost no racers because the first server is full.

+1
set limit for demo. if server set limit 40 racers then only 12 racers may be on this server with demo account
A.Fedorov
No longer welcome
oldMCI = A(2,1) //x=2, y=1
newMCI = B(6,4)
|AB| = sqrt( (6-2)^2 + (4-1)^2) ) = sqrt(25) = 5 //length of AB

with this method we may make button-counter of real kilometers for cruise server
Last edited by A.Fedorov, .
A.Fedorov
No longer welcome
if ((MCI.Info[0].X >= 46176313) && (MCI.Info[0].Y >= 15915129))

I think you know that this method is wrong. You set undefined area (from this coordinate to infinity). You need use the box area.

(logical code)
function inArea(x,y, x_,y_)
{
if ((x >= x_-0.5*65536) && (x <= x_+0.5*65536) && (y >= y_-0.5*65536) && (y <= y_+0.5*65536)) { return true;}
else { return false;}
}

x_ticket = 46176313;
y_ticket = 15915129;

if ( inArea(MCI.Info[0].X, MCI.Info[0].Y, x_ticket, y_ticket) )
{

}

A.Fedorov
No longer welcome
use some trigger like
ticked_found = false

if ((MCI.Info[0].X >= 442) && (MCI.Info[0].Y >= 442) && !ticket_found)
{
ticket_found = true;
InSim.Send_MST_Message("/msg ^7You have found your daily lottery ticket!");
}

if start new lotto then reset ticket_found to FALSE
A.Fedorov
No longer welcome
when I tested their own program too noticed that in 2 seconds scene draw
A.Fedorov
No longer welcome
You may calculate distance from MCI packet. Use old coordinates and new coordinates for get length of vector
A.Fedorov
No longer welcome
Keep in mind all functions in php have an order of input parameters
A.Fedorov
No longer welcome
use this toy http://www.lfsforum.net/showthread.php?p=516752#post516752
and this script if you one on track.

function drag_init(imsg)
racer = {}
luaLFS:small(0, SMALL_NLI, 50)
luaLFS:tiny(1, TINY_NPL)
end
evt_bind(EVT_CONNECTED, drag_init)

function test(imsg)
local mci = luaLFS:mci(imsg)
luaLFS:bfn(0, 255, 50, 0)
luaLFS:bfn(0, 255, 51, 0)
luaLFS:btn(50, 255, 50, 0, 32, 0, 172, 25, 28, 10, "X1="..mci.compcar[plid].x)
luaLFS:btn(51, 255, 51, 0, 32, 0, 172, 35, 28, 10, "Y1="..mci.compcar[plid].y)
end
evt_bind(ISP_MCI, test)

function npl_loc(imsg)
local npl = luaLFS:npl(imsg)
plid = npl.plid
end
evt_bind(ISP_NPL, npl_loc)

A.Fedorov
No longer welcome

-- x1,y1, x2,y2 - start and end points of line (edge of area)
-- xa,ya - coordinate of car
function across(x1,y1,x2,y2,xa,ya)
local ymax,ymin
if (y1 < y2) then
ymax = y2
ymin = y1
else
ymax = y1
ymin = y2
end

local y = (xa-x1)*(y2-y1)/(x2-x1) + y1

if ((xa == x1) and (ya == y1)) or ((xa == x2) and (ya == y2)) then
return 2
elseif ((x1 == x2) and (xa == x1) and (ya >= ymin) and (ya <= ymax)) then
return 2
elseif ((x1 < x2) and (xa >= x1) and (xa <= x2)) or ((x1 > x2) and (xa <= x1) and (xa >= x2)) then

if (ya >= y) and (ymin <= y) then
return 1
end
end
return 0
end

function in_area(points,x,y)
local trig = 0
local temp

-- #points - number of points
for i=2,#points/2 do
temp = across(points[i*2-3],points[i*2-2],points[i*2-1],points[i*2-0],x,y)
if (temp == 2) then
return true
elseif (temp == 1) then
trig = 1 - trig
end
end
temp = across(points[#points-1],points[#points-0],points[1],points[2],x,y)
if (temp == 2) then
return true
elseif (temp == 1) then
trig = 1 - trig
end
if (trig == 1) then return true else return false end
end


local area = {18379340,2221338, 17468965,1976709, 17309117,2608274, 18208925,2855925}
local into_area = in_area(area, mci.compcar[DRAG.PLIDS[i]].x,mci.compcar[DRAG.PLIDS[i]].y)
if (into_area) then
...
end

A.Fedorov
No longer welcome
Greetings, to me were possible to be connected to IRC and even to receive all messages with ISP_MSO. But works not as it would be desirable. Subroutine start (coroutine) is carried out by means of ISP_MCI. And if sit in spectator their messages will not get in IRC.

proc1 = coroutine.create(function ()
socket = require("socket")
client = socket.tcp()
client:settimeout(0)
res,err = client:connect("192.168.6.14", 6667)
print("connect",res,err)

function send(txt)
...
end

function recv()
...
end

function future()
...
end

-- Identify yourself
send("NICK Luabot")
send("USER Luabot 0 * :I am from the moon")

timer = future()
timer.register(5,function() send("JOIN #bot-tests") end)

repeat

res, err, timeout = recv()

if not err and not timeout then

if string.sub(res,1,4) == "PING" then
-- ping request
send(string.gsub(res,"PING","PONG",1))
elseif string.sub(res,1,1) ~= ":" then
...
end
end
timer.check()

coroutine.yield()
until err

client:close()
end)

function send_to_irc(imsg)
local t = luaLFS:mso(imsg)
local p = luaLFS:stripctrlchars(t.msg)
timer.register(1,function() send("PRIVMSG #bot-tests :"..string.char(3).."2From LFS: "..string.char(3)..p) end)
end
evt_bind(ISP_MSO, send_to_irc)

function tr()
coroutine.resume(proc1)
end
evt_bind(ISP_MCI, tr)

if use instead function tr()
while 1 do
coroutine.resume(proc1)
end

events never start
A.Fedorov
No longer welcome
Quote from Woz :You need to work out the bounding rectangle of the garage block and make sure the car is currently in there unless there is an "in garage" message from insim.

I have this realisation in luaLFS. Set any points (x,y) of area i may know car into this area or not
FGED GREDG RDFGDR GSFDG