Offline LAN Mod problem

smokesoul

New Member
I found this thread

Where T[h]E Dis[as]teR said:
You can use this to query LAN servers I've been using it for a long time to play with my friends

https://mega.co.nz/#!ghwSiJZb!WVw2BQK1X19JhhIkQgetWklF_kAq49XqVzpXGWMfbKA
just put it in ".\live\mods\autoexec\" everyone of you should have it so it would be easier for you to host and play together.
note(if you press it before the online servers are shown it would remove the first online server and put the LAN server instead of it and the opposite is possible)
edit: Ops i forgot to tell you what it does, it adds a button to search for LAN servers.

So got this thing going and got the neat little button, but for some reason the 'join server' button disappears and I can't use it connect to any networks(whether LAN or online). The lan query works and I can see local servers on the server list, connecting using the console works but it just takes to long for me and I doubt all the other villagers I know want to go through the effort just to lan the game.

So is there anyone with better mod? or a fix for this one?

Thanks
 

Fixious

Test Lead
You can simply copy/paste this into your LanSetting.cs file, overwriting the old code.

Code:
function LanButtonAdd()
{
    new GuiBitmapButtonCtrl(LanButton) {
        profile = "MenuTextButtonProfile";
        horizSizing = "right";
        vertSizing = "bottom";
        position = "820 678";
        extent = "110 29";
        minExtent = "8 8";
        visible = "1";
        accelerator = "";
        helpTag = "0";
        text = "Query Lan";
        bitmap = "client/gui/images/menus/menuButtons/menuButtonS";
    };
    ServerBrowserGui.add(LanButton);
}

package Lan
{
    function Gui::initialize()
    {
        parent::initialize();
        LanButtonAdd();
    }
    function LanButton::onClick(%this)
    {
        ServerBrowserServerList.clear();
        queryLANServers(
            28001,                  // LAN Port
            0,                      // Flags
            "Legions: Overdrive",  // Game Type
            "any",                  // Mission Type
            0,                      // Minimum Players
            255,                    // Maximum Players
            0,                      // Maximum Bots
            2,                      // Region Mask
            0,                      // Maximum Ping
            255,                    // Minimum Cpu Speed
            0                      // Filter Flags
        );
    }
};
activatepackage(Lan);
 

smokesoul

New Member
Alright, it's working now and the query button looks a lot better too, thanks.

I'd still like to see this as an update sometime
 

Fixious

Test Lead
Alright, it's working now and the query button looks a lot better too, thanks.

I'd still like to see this as an update sometime
I'd expect it to. ;)

If the positioning is off and it really bothers you, feel free to edit LanSetting.cs to your liking. The following line specifically:

Code:
position = "820 678";

The first value (820) is the horizontal position, while 678 is the vertical position.
 
Top