ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 12-May-11 19:53:57

chimbo
Member
From: Belgium
Registered: 16-Aug-10
Posts: 13
Website

connect to a server with one simple commant

Hey there,

sorry that im not very active here since my last post.

But i have a request to make. For the servers of H2o.

We have 3 public servers running and we would like to have 3 cmds for each server to connect to. Each has been given a color.

  • red server (N!tmod)

  • orange server (Jaymod)

  • blue server (Noquarter)

so the following commands would be

  • red

  • orange

  • blue

I tried to figure out how to do it with the lua mod wiki. But all i know is i should start with this

function et_InitGame(levelTime,randomSeed,restart)
    et.RegisterModname("connecter")
end

USE_RED = 1
USE_ORANGE = 1
USE_BLUE = 1


function et_ClientCommand(clientNum, command)
    command = string.lower(command)

Also a function where you can see custom cmds with /chelp (custom help)

Cheers,

Chim

Offline

#2 14-May-11 13:34:36

Nico$
N!tmod Developer
From: France
Registered: 30-Mar-10
Posts: 80
Website

Re: connect to a server with one simple commant

why not using custom commands with shrubbot ?

[command]
command = red
exec = connect ip:port
desc = connect to red server
levels = 0 1 2 3 4 5 6 7 8 9 ...

use : !red


Nico$

Offline

#3 14-May-11 13:39:39

chimbo
Member
From: Belgium
Registered: 16-Aug-10
Posts: 13
Website

Re: connect to a server with one simple commant

I tried that, it didn't work.

I thought, let's try something else

[command]
command = reconnect
exec = reconnect
desc = reconnect
levels = 0 1 2 3 4 5 6 7 8 9 ...

It works, but not as it should, it reconnects the server instead of the client....

I think the same goes for the connect thing. Well it just wont work for all i understand.

Thats why i want to go for a lua_module

Offline

#4 14-May-11 13:48:17

Nico$
N!tmod Developer
From: France
Registered: 30-Mar-10
Posts: 80
Website

Re: connect to a server with one simple commant

Yes sorry i forgot this was the server which execute the command
But i cannot help you with lua i didn't make any...


Nico$

Offline

#5 14-May-11 15:11:40

chimbo
Member
From: Belgium
Registered: 16-Aug-10
Posts: 13
Website

Re: connect to a server with one simple commant

Well, still thanks for your reply.

Now, this is offtopic but. I downloaded your map. And i wanted to try it. But i got an error, i fixed it.

So ill just tell you where it is smile


eak_beta3.script

forwardflag {
    spawn {
        accum 0 set 0            // Spawn owner: 0-Axis, 1-Allied
    }

Its at line 70, which ET told me.

Just change it to this and it will be fine.

forwardflag 
{
    spawn
        {
        accum 0 set 0            // Spawn owner: 0-Axis, 1-Allied
    }

Offline

#6 16-May-11 19:38:03

Nico$
N!tmod Developer
From: France
Registered: 30-Mar-10
Posts: 80
Website

Re: connect to a server with one simple commant

Thanks to testing my map , I will modify this error : )

For your problem, it is impossible to do it with lua because lua API is only on server side.
But you can modify the game menu to do it...


Nico$

Offline

Board footer

Powered by FluxBB