TeamSpeak

Open discussion forum. For topics that do not fit anywhere else.

Moderator: POL Developer

Post Reply
boberski
Grandmaster Poster
Posts: 229
Joined: Tue Oct 15, 2013 12:00 pm

TeamSpeak

Post by boberski » Tue Dec 22, 2015 11:48 am

Hi,

I have private TS3 server on my privet VPS is someone intrested in joining, or maybe we just create official POL channel there?

Do not by shy :P

http://ts.hell-yeah.pl/ (all the addresses and ports)
Server password: HellYeah!@#$ (if it do not work please ping me :P)
Cheers!
Boberski (http://pol.uo.hyeah.pl/)

xeon
Forum Regular
Posts: 309
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy
Contact:

Re: TeamSpeak

Post by xeon » Tue Dec 22, 2015 12:51 pm

Would be awesome if someone developed a module to configure Teamspeak channels from POL, for example, 1 ts channel for guild etcetera :cheesy:
Scripter Xeon | Zulu Hotel Italia 7th Age | www.zhi.it
Image

bodom
POL Developer
Posts: 132
Joined: Sat Feb 21, 2015 7:52 pm
Location: Italy

Re: TeamSpeak

Post by bodom » Tue Dec 22, 2015 1:02 pm

xeon wrote:Would be awesome if someone developed a module to configure Teamspeak channels from POL, for example, 1 ts channel for guild etcetera :cheesy:
That's a nice idea, and it seems to be a quite easy feature to script :D
If you'll go on and start working on that package, let me know if you'll need an hand!

boberski
Grandmaster Poster
Posts: 229
Joined: Tue Oct 15, 2013 12:00 pm

Re: TeamSpeak

Post by boberski » Tue Dec 22, 2015 11:46 pm

xeon wrote:1 ts channel for guild etcetera :cheesy:
Just give a name, I will create it. :)
Cheers!
Boberski (http://pol.uo.hyeah.pl/)

boberski
Grandmaster Poster
Posts: 229
Joined: Tue Oct 15, 2013 12:00 pm

Re: TeamSpeak

Post by boberski » Wed Dec 23, 2015 6:37 am

I created cannel for POLServer :)
Cheers!
Boberski (http://pol.uo.hyeah.pl/)

xeon
Forum Regular
Posts: 309
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy
Contact:

Re: TeamSpeak

Post by xeon » Thu Dec 24, 2015 1:54 pm

Well send a patch to POL devs ;)
Scripter Xeon | Zulu Hotel Italia 7th Age | www.zhi.it
Image

boberski
Grandmaster Poster
Posts: 229
Joined: Tue Oct 15, 2013 12:00 pm

Re: TeamSpeak

Post by boberski » Fri Dec 25, 2015 3:30 am

@xeon - I created channel on my TS3 server to this community :) Maybe I create POL module for that in the future. :)
Cheers!
Boberski (http://pol.uo.hyeah.pl/)

User avatar
CWO
POL Expert
Posts: 1120
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA
Contact:

Re: TeamSpeak

Post by CWO » Fri Dec 25, 2015 12:19 pm

You can probably pull this off by scripting a Teamspeak bot and use the POL AUX interface. I used to have an mIRC bot that you could do quite a few things on like create accounts, get info on players and server statistics.

xeon
Forum Regular
Posts: 309
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy
Contact:

Re: TeamSpeak

Post by xeon » Fri Dec 25, 2015 1:28 pm

Yes, I just don't know from an aux package how to pilot a Teamspeak server. I saw, when I looked into it, some kind of libraries to integrate with, so an external program maybe should be written to achieve that.
Scripter Xeon | Zulu Hotel Italia 7th Age | www.zhi.it
Image

User avatar
CWO
POL Expert
Posts: 1120
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA
Contact:

Re: TeamSpeak

Post by CWO » Sun Dec 27, 2015 1:13 am

Well, the teamspeak bot needs to initiate the connection to POL through the configured AUX port (auxsvc.cfg). From there, the POL script is fired. The POL script could send strings to the teamspeak bot that the bot will process as commands, it can also receive commands from the teamspeak bot if needed. What you do is make the AUX script an event based script, set the PID to a global prop, then send events that will forward as commands to the teamspeak bot.

Here's an example of the POL AUX script that I made for IRC

in IRC, if players would type !online, the IRC bot sends "sonline" to POL (important: remember the 's' for string, 'i' for integer). It then ran the function and transmitted back the number of online players, typically i## like 'i25' for 25 players online.

An example of a POL script sending an event to the script which gets passed to the bot would be the Pages() function. The string would be constructed in the AUX script and transmitted to the bot.

Code: Select all

// AccountBot connection script by CWO
// This script handles various communications both AccountBot-Server and Server-AccountBot.

use uo;
use os;

program AccountBot(con)
	Print("AccountBot has connected to POL");
	SetGlobalProperty("accountbot", getpid());			// This needs to be set so that other scripts can send events to it. Ex: Paging.
	while(con)									// While the connection is active
		var ev := wait_for_event(120);				// Wait up to 120 seconds for anything to happen.
		if (!ev)
			continue;							// If nothing has come in, re-loop
		endif
		Print("AccountBot communication: " + CStr(ev.value));
		var thevalue := SplitWords(ev.value);
		case(thevalue[1])
				"p"		: con.transmit("p");					// AccountBot ping/pong.
				"online"	: con.transmit("online:" + Online());		// Number of players online.
				"player"	: PlayerInfo(con, ev.value);			// Specific player info.
		 		"stats"	: ServerStats(con);					// Server Stats.
		  		"page"	: Pages(con, ev);					// Page transmission to IRC.
		endcase
	endwhile
	Print("AccountBot disconnected");
endprogram

function Online()
	var count := 0;
	foreach player in EnumerateOnlineCharacters()
		if (!player.cmdlevel)
			count := count + 1;
		endif
	endforeach
	return count;						// Number of non-staff online.
endfunction

function PlayerInfo(con, value)
	value["player "] := "";
	foreach player in EnumerateOnlineCharacters()
		if (lower(value) == lower(player.name) && !player.cmdlevel)
			con.transmit("player:" +player.name + ":" + CStr(GetObjProperty(player, "Fame") + ":" + GetObjProperty(player, "Karma") + ":" + GetObjProperty(player, "onlinetimer")/60));		//Player is online. Send info.
			return;
		endif
	endforeach
    con.transmit("player:x");					//Player is offline.
endfunction

function ServerStats(con)
	con.transmit("stats:" + CStr(polcore().itemcount + ":" + polcore().mobilecount + ":" + polcore().sysload + ":" + polcore().sysload_severity + ":" + polcore().uptime + ":" + Online() + ":" + polcore().instr_per_min));
endfunction

function Pages(con, ev)
	if (ev.pagername)									//If POL is sending a new page out
		con.transmit("page:" + ev.pagername + ":" + ev.page);
	else												//Else a staff member sent the !pages command from IRC
		var status;
		var people := EnumerateOnlineCharacters();
		foreach page in GetGlobalProperty("Pagelist")
			if (SystemFindObjectBySerial(page.chrserial) in people)	//Pager is online
				status := "onln";
			else
				foreach player in people
					if (player.acctname == page.acctname)		//Pager is online but on another character
						status := "acct";
					endif
				endforeach
				if (status != "acct")							//Pager is offline
					status := "ofln";
				endif
			endif
			con.transmit("pagecmd:" + status + ":" + page.name + ":" + page.text);   // Send individual page
		endforeach
		if (!status)
			con.transmit("pagecmd:nopages");					// There are no pages currently
		endif
	endif
endfunction
So this is an example of what the POL side could look like. I couldn't help you from the teamspeak side.

xeon
Forum Regular
Posts: 309
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy
Contact:

Re: TeamSpeak

Post by xeon » Thu Dec 31, 2015 5:04 am

Thanks for sharing CWO
I just don't know any "bot" out there able to pilot a Teamspeak server.
If you have any link to share!

EDIT
I just found out a bot based on .NET
I think I'll see what I can produce ... :D
Scripter Xeon | Zulu Hotel Italia 7th Age | www.zhi.it
Image

boberski
Grandmaster Poster
Posts: 229
Joined: Tue Oct 15, 2013 12:00 pm

Re: TeamSpeak

Post by boberski » Fri May 26, 2017 12:29 pm

One more time :)
If some of you want to voice chat please do not hesitate and join https://ts.hyeah.pl/. There is a channel called Penultima OnLine especially for people from this forum.

Teamspeak server address is ts.hyeah.pl I think I do not have to explain how to connect to TS3 server :P
Cheers!
Boberski (http://pol.uo.hyeah.pl/)

DevGIB
Grandmaster Poster
Posts: 108
Joined: Mon Feb 06, 2006 6:12 am

Re: TeamSpeak

Post by DevGIB » Sat May 27, 2017 5:32 am

Channel maxfamily reached :(

boberski
Grandmaster Poster
Posts: 229
Joined: Tue Oct 15, 2013 12:00 pm

Re: TeamSpeak

Post by boberski » Sat May 27, 2017 12:00 pm

What do you mean by that?

EDIT:
Check now to see if you get this error :)
Cheers!
Boberski (http://pol.uo.hyeah.pl/)

DevGIB
Grandmaster Poster
Posts: 108
Joined: Mon Feb 06, 2006 6:12 am

Re: TeamSpeak

Post by DevGIB » Sun May 28, 2017 4:33 am

Yep working now.
Sure is quite in here :P

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest