Now Playing (tm)

Now Playing (tm)

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Now Playing (tm)

Post by Auswaschbar »

preliminary note: needs development version of spring to work

On game start, prints a nice message of type
[15:53:06] * Auswaschbar2 is now playing a 1v1 of Balanced Annihilation V7.13 on Severnaya_Industrial_v96
in one (or more) lobby channel(s) of your choice.

terminatory note: you can only be logged in in lobby once, so it will fail if you give your account and are still logged in with the lobby
Attachments
now_playing.lua
(1.27 KiB) Downloaded 139 times
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Now Playing (tm)

Post by zwzsg »

As if we hadn't enough spam from bots, scripts, and autohosts.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Now Playing (tm)

Post by aegis »

how does this work at a lower level?
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Now Playing (tm)

Post by Satirik »

Auswaschbar wrote:preliminary note: needs development version of spring to work

On game start, prints a nice message of type
[15:53:06] * Auswaschbar2 is now playing a 1v1 of Balanced Annihilation V7.13 on Severnaya_Industrial_v96
in one (or more) lobby channel(s) of your choice.

terminatory note: you can only be logged in in lobby once, so it will fail if you give your account and are still logged in with the lobby
i guess it is given as an example of what can be done
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Now Playing (tm)

Post by aegis »

oh, checked the source. C++? I wanted luasockets :(

guess I can use my uberserver stub to fake it anywho :D
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Now Playing (tm)

Post by JohannesH »

Which do you consider more fun, spamming #main with bots or in person?
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Now Playing (tm)

Post by Tribulex »

bots are fun. you can flood epically :D then get banned but make a new bot!
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Now Playing (tm)

Post by zwzsg »

So widgets can now send messages to lobby. But how do they receive messages from lobby channels? Then anyway, while I had to wrote a mini single player skirmish generator, I'm not sure I really want to write a multiplayer lobby.

Code: Select all

con:JoinChannel("sy")
No #? How will we join battlerooms if channels names are autoprefixed by #?
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Now Playing (tm)

Post by aegis »

channels aren't prefixed by #, the actual protocol to join sy sent by the lobby is "JOIN sy"

and battlerooms are a completely different command, "JOINBATTLE battleNumber"
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Now Playing (tm)

Post by zwzsg »

Ah ok, got confused with bibim IRC bridge, thanks for the clarification.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Now Playing (tm)

Post by Auswaschbar »

For receiving messages, you first need to join a channel, and have at least one of the following functions implemented:

Code: Select all

function LuaLobby:SaidEx(channel, user, message)
	Echo("["..channel.."] "..user.." " .. message);
end

Code: Select all

function LuaLobby:Said(channel, user, message)
	Echo("["..channel.."]<"..user..">: " .. message);
end

Code: Select all

function LuaLobby:SaidPrivate(user, message)
	Echo("<"..user..">: " .. message);
end
SaidEx is the "/me" style IRC command btw.
Attachments
ingame_lobby.lua
Ingame lobby chat, join a channel and talk to people.
(1.7 KiB) Downloaded 120 times
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Now Playing (tm)

Post by Tribulex »

cool now we never even need to close spring! We can make a lobby client in lua, and just restart spring for each game!
Post Reply

Return to “Lua Scripts”