Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 37

130.105.x.x forum
151.80.x.x news
35.172.x.x forum
35.192.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x download
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
51.38.x.x news
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x top
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x top
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum

Last Seen

»Stefan Wed 17:17
Gagi2 Tue 04:39
tltneon Wed 17:22
Nouton^ Wed 20:07
mrstipfan Wed 10:54

Newest Members

Forums
How to add Jazz Jackrabbit 2 support?
BRUT.me
Tue Nov 22 2016, 04:04PM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
Hello,
I try to add Jazz Jackrabbit 2 support for LGSL. It should be no problem, when i read this jj2 support forum https://www.jazz2online.com/wiki/list_servers I am trying to do it now, but apparently I am too noob to make it work, can someone help me with it?
Website
Wussie
Wed Nov 23 2016, 05:28PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
LOL, I never realized this game had a multiplayer version

I will look into it when I get the chance.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
BRUT.me
Wed Nov 23 2016, 06:13PM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
thank you yes, and it is really funny the multiplayer in original version was poor, lacked a lot of things, but the fanmade Plus patch made it real
Website
BRUT.me
Fri Dec 09 2016, 06:52AM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
Hello, did u checked it? i have found some examples how todisplay server status and listserverstatus, but have problem to integrate it to LGSL, the examples are here http://brut.me/jj2/
Website
Wussie
Fri Dec 09 2016, 08:22AM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Hi Brut
The examples on your site don't show any details when I click on the server names.
If you wanted to share those scripts you should have put them into a zip archive, because php files cannot be downloaded 'as is', try and see what I mean. Or just share the link where you found them in the first place and I will take a look there.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
BRUT.me
Fri Dec 09 2016, 09:11AM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
ahh, i did not realize it, sometimes i make noob mistakes, learn the whole life i zipped them http://brut.me/jj2/scripts.zip
Website
Wussie
Sat Dec 10 2016, 12:21PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
This is more like it, I was now able to get a server response and I only have to find a way for interpreting the result.
Thanks for the help.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
BRUT.me
Sun Dec 11 2016, 03:09AM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
no problem, I am thankful to you, If I can help you more, tell me how, i remember there were some mIRC scripts for jj2 status, if they could be helpful I can dig them out and provide a link
Website
BRUT.me
Wed Dec 28 2016, 08:40AM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
Hi, did u do any progress?

PS:what are these for a bots on this forum? o.O
Website
Wussie
Thu Dec 29 2016, 04:41PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Sorry man, it was just impossible to find the time these days.
It will have to wait till after the holidays

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
Wussie
Tue Jan 03 2017, 06:26PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Ok, got the chance to try the scripts you provided.
Sadly, the file example.php only throws this error when querying any server:
"The server has sent an unexpected response. This situation may have happened because:
a. The server is full;
b. this webserver is banned;
c. the server has its version erroneously listed;
d. other."

I figured out how to get a server response for LGSL, but all I can understand from it is the level name and I need more information on how to translate the rest into a human readable form. Any help there?

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
BRUT.me
Mon Jan 09 2017, 03:28AM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
I am going to ask people who are doing the Plus patch of Jazz Jackrabbit, they should know how to do it
Website
Wussie
Mon Jan 09 2017, 05:32PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Never mind, I figured out how to get the level and player names from the server response.
Now I only have to get the rest of the server info directly from the master server, since the gameserver itself does not seem to provide everything LGSL needs.
I will come back with a final solution these days.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
BRUT.me
Mon Jan 16 2017, 02:20AM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
woohooo, great news, the creators of the plus patch are not very helpful :/
with masterserver u mean one of the listservers?
Website
Wussie
Thu Feb 02 2017, 05:54PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
OK, I came back with a working solution for JJ2 but I have to warn you: it will require a bit more editing than other gametypes.
I split this how-to into two parts: the first part will allow you to switch between UDP and TCP queries dynamically. Follow the instructions in this topic, then come back here for the second part of the tutorial. Do it now!

Did you do it? OK, now you're ready for the second part: edit your lgsl_protocol.php and find
"jediknight2" => "JediKnight 2: Jedi Outcast",
and BEFORE it insert
"jj2" => "Jazz Jackrabbit 2",

Then choose a spare number for your JJ2 function, For me it's 42. Find
"jediknight2" => "02",
and BEFORE it insert
"jj2" => "42",

Then find
function lgsl_query_feed(...
then BEFORE it insert
function lgsl_query_42(&$server, &$lgsl_need, &$lgsl_fp)
{
if (!isset($server['e']['version'])) {
fwrite($lgsl_fp, "\x07\x14\x05\x00\x01"); // request JJ2 status via UDP
if (strlen($buffer = fread($lgsl_fp, 1024)) < 20) return false;

$buffer = substr($buffer, 7);
if (ord(lgsl_cut_byte($buffer, 1))) $server['e']['spectator mode'] = 'enabled';
$ver = lgsl_cut_byte($buffer, 2);
$server['e']['version'] = '1.'.$ver;
$buffer = substr($buffer, 3);
$server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));

$gamemode = array('Single Player','Coop','Battle','Race','Treasure','CTF');
$mode = ord(lgsl_cut_byte($buffer, 1));
$server['s']['game'] = $mode < 6 ? $gamemode[$mode] : 'unknown';
$server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
if ($server['s']['players'] > $server['s']['playersmax']) $server['s']['players'] = 0;
$server['s']['name'] = str_replace('|', '', lgsl_cut_pascal($buffer, 1));

$buffer = substr($buffer, 2);
if ($buffer != '') {
$server['e']['Plus version'] = 5.5;
if (strlen($buffer) > 11) {
$server['e']['maxscore'] = ord(lgsl_cut_byte($buffer, 5));

for ($i = 0; $i < $server['s']['players']; $i++) {
$server['p'][$i]['name'] = str_replace('|', '', lgsl_cut_string($buffer, 0));
$buffer = substr($buffer, 1);
$flags = ord(lgsl_cut_byte($buffer, 1));
if ($flags >= 4) $server['p'][$i]['team'] = 'spectator';
else $server['p'][$i]['team'] = $flags ? 'red' : 'blue';
}
}
}

fwrite($lgsl_fp, "\x85\x0F\x03\x08\x15\xB4\x05\x00\x32\x34\x20\x20"); // second request via UDP
$buffer = fread($lgsl_fp, 1024);
if (ord(substr($buffer, -1)) >= 160) {
$server['s']['password'] = 1;
if ($lgsl_need['p'] && $server['s']['players']) {
global $comment; // needs password in the server's "Comment" field to return player info
if (!empty($comment)) fwrite($lgsl_fp, "r\x96\x0A\x07{$comment}"); // send password
}
}
$lgsl_need['switch'] = true; // switch to tcp for the next query
}
else {
fwrite($lgsl_fp, "\x09\x0F\x01\x04".substr($server['e']['version'], -2)."\x20\x20\x01"); // request status via TCP
$buffer = fread($lgsl_fp, 1024);
if (strlen($buffer) < 10) return true;
$slot = substr(lgsl_cut_byte($buffer, 4), 2, 1);
$server['s']['map'] = lgsl_cut_pascal($buffer, 1, -4);
if (!$lgsl_need['e'] && !$lgsl_need['p']) return true;

fwrite($lgsl_fp, "\x08\x3F\x20\x03\x05\x00\x05\x00");
$buffer = fread($lgsl_fp, 1024);

$getplr = $lgsl_need['p'] && $server['s']['players'] && !$server['p'] && (!$server['s']['password'] || !empty($comment));
if ($getplr) {
$botname = "LGSL";
fwrite($lgsl_fp, chr(strlen($botname)+17)."\x0E\x01{$slot}\x02\x00\x40\x40\x40\x40\x11{$slot}\x0A\x0D\x00\x00{$botname}\x00");
}

if (strpos($buffer, 'Z') === false) $buffer = fread($lgsl_fp, 1024);
$buffer = substr($buffer, 1);
if ($buffer[0] != "\x12") {
if (($offset = strpos($buffer, 'Z')) === false) return true;
$buffer = substr($buffer, $offset+10);
$i = 0;
while ($buffer = substr($buffer, 5)) {
if (($part = ord(substr($buffer, 1, 1))) < 65 || $part > 122) break;
$server['e']['mutator'.$i] = lgsl_cut_pascal($buffer, 1);
$i++;
}
$buffer = '';
}

if (!$getplr) return true;
if (!$buffer) $buffer = fread($lgsl_fp, 1024);
$char = array('Jazz', 'Spaz', 'Lori', 'Bird', 'Frog');
$i = 0;
do {
while (strlen($buffer) > 15) {
$part = lgsl_cut_string($buffer, 0, "\x0D");
if (!$buffer) break 2;
if (($name = lgsl_cut_string($buffer, 2)) == $botname) continue;
else $server['p'][$i]['name'] = str_replace('|', '', $name);
$server['p'][$i]['char'] = $char[ord(substr($part, -9, 1))];
$server['p'][$i]['team'] = ord(substr($part, -8, 1)) ? 'red': 'blue';
$i++;
}
if ($i >= $server['s']['players']) break;
$buffer = fread($lgsl_fp, 1024);
}
while ($buffer[1] == "\x12");
}
return true;
}
//------------------------------------------------------------------------------------------------------------+
//------------------------------------------------------------------------------------------------------------+

The initial queries are UDP to get the server status, then we switch to TCP for the next queries to get extra server info and players info.
Private servers are also supported, but they will return only limited info unless you put the server password in the "Comment" field in the admin panel.
Both server versions 1.21 and 1.24 are supported.
Some servers will ban any web application trying to query them, they will only return limited info to LGSL until you find a way to remove the ban. Sadly your server BRUT.me is one of them.
All queries are done directly to gameservers, because the so-called list servers turned out to be unreliable.
Please let me know if you find any bugs or servers that don't respond well to this query function. I will come back with updates as needed. Enjoy!

Edit: updated the code to include support for the Plus 5.5 patch.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
BRUT.me
Mon Feb 06 2017, 01:42PM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
Hello and woow you are a genius, yes it is working, thank you very much
What do u mean by limited info? That in the server info, there is only one setting visible and that is version?
Website
Wussie
Mon Feb 06 2017, 05:19PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
No, I mean servers that ban you web application will not report the level name, mutators or player names.
Your server used to ban my LGSL app but now it no longer does, so I guess you found a way to remove the ban and your server gives a full response to the query.
LGSL gets the level name, mutators and player names by simulating the TCP connection of a fake player named LGSL to the server. If the server bans that fake player or it's IP address, then none of that information will be available to LGSL.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
BRUT.me
Tue Feb 07 2017, 12:35PM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
I tried to change some settings in the server config, it seems that it helped, i think it was the one, who disallowed enter as spectator to the game...
i understand, i checked the code, and changed the name to something more sexi
Website
BRUT.me
Tue Jun 06 2017, 04:26AM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
Hello and greetings,
the creators updated the plus patch to a newer version and the extended info is now not showing the connected players, they added some more extra data that the server is sending, are u please able to fix that?
I have asked the authors for more exact info, If i will know more i will write it here

best regards
Website
BRUT.me
Sun Jun 11 2017, 08:03PM
Posts: 15
Joined: Tue Nov 22 2016, 03:53PM
Registered Member #8581
here is more info about the new way of getting serverinfo

https://www.jazz2online.com/jcf/showpost.php?p=491364&postcount=1467

for now i reverted my server to the previous version, but all the other servers should be the new one
Website
Go to page       >>   

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org