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

Guests: 14

35.184.x.x forum
46.161.x.x forum
46.229.x.x dilbertplus
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 dilbertplus
54.92.x.x forum
68.180.x.x forum
68.180.x.x user

Last Seen

Dodgeitorelse Thu 23:15
HotRod Thu 19:59
jollyhersblog Wed 05:05
mmotony Mon 03:03
ESO2017 Wed 01:36

Newest Members

Forums
Richard Perry - GreyCube.com :: Forums :: Live Game Server List
Go to page       >>     
Minecraft
EpicFail
Mon Nov 14 2011, 04:40AM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
LGSL Minecraft
[UPDATE]



In lgsl_protocol.php

After
"kingpin"       => "Kingpin: Life of Crime",

Add
"minecraft"        => "Minecraft",


After
"kingpin"       => "03",

Add
"minecraft"        => "999",


After
"kingpin"       => "qtracker://{IP}:{S_PORT}?game=Kingpin&action=show",

Add
"minecraft"        => "https://minecraft.net/",



Before
function lgsl_query_02(&$server, &$lgsl_need, &$lgsl_fp)

Add

  function lgsl_query_999(&$server, &$lgsl_need, &$lgsl_fp)
  {
    // get challenge
    fwrite($lgsl_fp, "\xFE\xFD\x09\x01\x02\x03\x04");
    $Data         = SubStr(fread($lgsl_fp, 1440),5);
    $Challenge     = Pack( 'N', $Data );
    
    // get data
    fwrite($lgsl_fp, "\xFE\xFD\x00\x01\x02\x03\x04".$Challenge."\x01\x02\x03\x04");
    $buffer     = substr(fread($lgsl_fp, 1440),16);
    $packets       = explode("\x00\x00\x01player_\x00\x00", $buffer );

    // general
    $general                    = explode( "\x00", $packets[0] );
    $server['s']['address']     = $general[17];
    $server['s']['ip']             = $general[19];
    $server['s']['name']         = $general[1];
    $server['s']['gametype']     = $general[3];
    $server['s']['gameid']         = $general[5];
    $server['s']['version']     = $general[7];
    $server['s']['map']         = $general[11];
    $server['s']['players']     = $general[13];
    $server['s']['playersmax']     = $general[15];
    
    // players
    $players                         = substr( $packets[1], 0, -2 );
    $players                         = explode( "\x00", $players );

    foreach ($players as $key => $name)
    {
          $server['p'][$key]['name']  = $players[$key];
          $server['p'][$key]['time']  = "-";
          $server['p'][$key]['ping']  = "-";
          $server['p'][$key]['score'] = "-";
    }
    
    // plugins
    $server['e']['plugins']                = $general[9];
 
      
    return TRUE;
  }



Screenshots








Question and answers
Q: How can i add time and kills?
A: The query do not return time, and there are no kills in minecraft

Q: Can you upload map images?
A: MC have custom maps

Q: Can you upload icon?
A: Use the one from gametracker.com

http://www.gametracker.com/images/game_icons/minecraft.png


My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
Gagi2
Mon Nov 14 2011, 05:58AM
Posts: 20
Joined: Tue Feb 24 2009, 05:02PM
Registered Member #4852
i get an error...
Fatal error: Call to undefined function writedata() in \ilch\include\extras\lgsl\lgsl_files\lgsl_protocol.php on line 595
Website
EpicFail
Mon Nov 14 2011, 06:01AM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
Sorry guys, my bad...
Add this function at the end of lgsl/protocols.php

    function WriteData($socket, $Command, $Append = "" )
    {
        $Signal  = $Command[ 0 ];
        $Command = "\xFE\xFD" . $Command . "\x01\x02\x03\x04" . $Append;
        $Length  = StrLen( $Command );
        
        if( $Length !== FWrite( $socket, $Command, $Length ) )
        {
            return false;
        }
        
        $Data = FRead( $socket, 1440 );
        
        if( StrLen( $Data ) < 5 || $Data[ 0 ] != $Signal )
        {
            return false;
        }
        
        return SubStr( $Data, 5 );
    }


My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
Gagi2
Mon Nov 14 2011, 06:14AM
Posts: 20
Joined: Tue Feb 24 2009, 05:02PM
Registered Member #4852
i have the lgsl serverviewer on the left side of my ilch page..
it shows the server now..
but when i click in the server for details i get this

Fatal error: Cannot redeclare writedata() (previously declared in \ilch\include\extras\lgsl\lgsl_files\lgsl_protocol.php:3691) in\ilch\include\extras\lgsl\lgsl_files\lgsl_protocol.php on line 3710

maybe the problem is that its first called in the sidepanel and called again in the mainframe of the page when you click on details...


Website
EpicFail
Mon Nov 14 2011, 06:17AM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
then create functions.php , write that function there, and include it once in index or whatever and try again...

My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
Gagi2
Mon Nov 14 2011, 06:47AM
Posts: 20
Joined: Tue Feb 24 2009, 05:02PM
Registered Member #4852
i removed the serverviewer in the sidepanel for a test...
now it works also on the details page...
it also works with including an external php with the function...


but it shows me this on the serverdetail page above the serverinfo
Warning: wordwrap() expects parameter 1 to be string, array given in \ilch\include\extras\lgsl\lgsl_files\lgsl_class.php on line 739

EDIT: ok on my other webspace it doesnt show me the warning...
but the info line with "plugins" is empty

can you tell me which query plugin you are using?
Website
xMin
Mon Nov 14 2011, 09:59AM
Posts: 86
Joined: Fri Mar 04 2011, 08:41AM
Registered Member #6619
@EpicFail

Thanks for this! But I have one problem.. My problem is that I can see only player names in Online Players list and they are all in one line.. how to correct this?

1. grass eidej TjDj mor30 Klemens21 Sebcio tomalek Esperanto10 kubacraft1 asdawdasdaw Alberton 12ola12pl madzia juhu2001 sonido lodo WOJfilip1 Diax709 laion Filips123

This is how I see Players list.. all other games shows players list correctly.

Edit: Can you upload map images and icon for minecraft? Thanks!!!
EpicFail
Mon Nov 14 2011, 10:41AM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
Try to replace in my query
$server['p']['players'] = $data['players'];

with
$server['p'] = $data['players'];


Sorry guys but i have bad connection, internet throught my smartphone, can't check any server right now... I'll arrive home in 5-6 hours...

That data is returned like that 'cause is an array.
You are so lazy and you cannot search on google for a mc icon? )
And about maps, every server use custom maps, i mean is not like cstrike or other games... Use a minecraft logo or something right there )

My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
xMin
Mon Nov 14 2011, 10:58AM
Posts: 86
Joined: Fri Mar 04 2011, 08:41AM
Registered Member #6619
Now I don't see any player name..

Question: how to add score and/or time to list and can you upload map and icon images?
Gagi2
Mon Nov 14 2011, 11:03AM
Posts: 20
Joined: Tue Feb 24 2009, 05:02PM
Registered Member #4852
as minecraft icon i use the one from gametracker
http://www.gametracker.com/images/game_icons/minecraft.png

and for the map (the map on every server differs... but can have the same name)
i have used a minecraft wallpaper like this one
for world_world_nether.jpg
http://marchingcubes.com/minecraft_sauer_blender_256.jpg
or this one
http://wallpaper.hdesktop.com/wallpapers/wallpapers-19/f45b95642362999c09936c40859d4709/miscellaneous-187067.jpeg

enjoy =)
Website
xMin
Mon Nov 14 2011, 11:53AM
Posts: 86
Joined: Fri Mar 04 2011, 08:41AM
Registered Member #6619
Thanks for all help! I did corrected the problem with player list but still I have question how to add player time and kills to list?
Gagi2
Mon Nov 14 2011, 12:11PM
Posts: 20
Joined: Tue Feb 24 2009, 05:02PM
Registered Member #4852
and can you tell us HOW you corrected the playerlist problem?
Website
EpicFail
Mon Nov 14 2011, 12:25PM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
guys please have some patience while i will arive home... now i am on my phone... i am using some other files to show data on my pages... in about 4 hours i'll fix that code for original lgsl...

My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
xMin
Mon Nov 14 2011, 01:32PM
Posts: 86
Joined: Fri Mar 04 2011, 08:41AM
Registered Member #6619
@EpicFail Thanks! I will wait for your reply!

@Gagi2 I did joined 2 protocols in one.. but that is not good idea because still I don't see player time and score.. Best is to wait EpicFail on his fix for this!
EpicFail
Tue Nov 15 2011, 05:16AM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
First Post Updated...

My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
xMin
Tue Nov 15 2011, 05:37AM
Posts: 86
Joined: Fri Mar 04 2011, 08:41AM
Registered Member #6619
lgsl_class.php => lgsl_protocol.php ???
EpicFail
Tue Nov 15 2011, 05:38AM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
i'm working with standlone lgsl... don't know about other releases...

My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
xMin
Tue Nov 15 2011, 05:52AM
Posts: 86
Joined: Fri Mar 04 2011, 08:41AM
Registered Member #6619
Please look at your first post again.. RED lines..

Add in lgsl_files/lgsl_class.php you need to change to Add in lgsl_files/lgsl_protocol.php

Please correct me if I am in wrong but all your steps you need to do in lgsl_protocol.php not in lgsl_class.php ..

EpicFail
Tue Nov 15 2011, 06:07AM

Posts: 39
Joined: Wed Aug 03 2011, 08:21AM
Registered Member #6858
my bad... again... thanks... done...

My contributions to LGSL

Add teamspeak to LGSL
Add teamspeak3 to LGSL
Add ventrilo to LGSL
Add minecraft to LGSL
xMin
Tue Nov 15 2011, 06:14AM
Posts: 86
Joined: Fri Mar 04 2011, 08:41AM
Registered Member #6619
NP I just corrected you because of others.. didn't mean anything bad!

And thanks, it works!!! I will try to get players playing time.. if I get this I will post my result here! If anybody else do this than please share! Thanks!
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