Dateien

> > CS2D > Lua Scripts > Get USGN Name
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Get USGN Name >

28 Kommentare1,40 mb, 793 Downloads

alt Get USGN Name

Banaan
User Off Offline

GetUSGNName is a script which extracts a player's USGN name from their profile on Unreal Software. I doubt it's the simplest way to get a USGN name, but it's the only one I could think of.

Because Lua does not support HTTP, this upload also contains an executable (for Windows) and its Python source (for Linux). If you don't trust the executable, you can compile a new one from the source by using the included Py2Exe setup script.


Usage is very simple:
1
player(id, "usgnname")


Just extract the files from the right folder (there are separate folders for Windows and Linux) into your CS2D directory, then add the following line to your script:
1
dofile("sys/lua/usgnname/GetUSGNName.lua")

There's a more detailed readme included if you want more information.



Just to be sure, I ran this file through an online virus checker (I wouldn't want to be responsible for the spread of viruses), it came out clean: http://www.virustotal.com/file-scan/report.html?id=74fa9c4f66458119ce583fb6414095eae01648238ba8e7dda018cbc867eed6fb-1308818490.



Screens aren't really useful for this file since it only provides a helper function. I just took one of the included example uses and took a screen of that.
1× editiert, zuletzt 23.06.11 10:55:55
Zugelassen von GeoB99

Download Download

1,40 mb, 793 Downloads

Kommentare

28 Kommentare
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

Gaios
Reviewer Off Offline

thanks
Ich mag es!

alt

apTyp_ua
User Off Offline

Good Script!!
Ich mag es!

alt

W4RG
User Off Offline

runs on the latest version of CS2D?

alt

Pirtyu
User Off Offline

Very Good!
Ich mag es!

alt

Happy Killer
BANNED Off Offline

this is a good script!
Ich mag es!

alt

SkullzOrig
User Off Offline

Seen this before, and I also seen a script that allowed you to type @whois [id] that shows you the Ip address USGN name and the USGN id.

alt

Suprise
BANNED Off Offline

Maybe too old

alt

Misho
User Off Offline

user Avo who said it!
File: Nice and it's old file btw.
Ich mag es!

alt

Avo
User Off Offline

Epic shit. But useless.
Ich mag es!

alt

-AngelOfDeath-
User Off Offline

Hmm, its useful in many situations, thx
Ich mag es!

alt

Mr_God
User Off Offline

nice
cool awesome 5/5
Ich mag es!

alt

Banaan
User Off Offline

This is not meant for your own usgn information (that would be a bit useless), it's for getting everybody's USGN name.

What you see in the screenshot is just an example of what can be done with it. I personally use it as an addition to the standard playerlist to get the usgn names of other players - a name often tells a lot more than a number.

alt

TheTrollHammer
BANNED Off Offline

well you can open the console and write usgn_info for your own usgn information.. but still i like it. 4/5
Ich mag es!

alt

MikuAuahDark
User Off Offline

Awesome script, i put it at my server. 5/5
Ich mag es!

alt

Banaan
User Off Offline

user dizziness hat geschrieben
Banaan, did this code it exist? If no how you make it
1
player(id, "usgnname")


By making a copy of the player function:
1
2
3
4
5
6
7
8
_player = player
function player(id, what)
	if what == "usgnname" then
		return usgnname[id]
	else
		return _player(id, what)
	end
end

What actually happens here is that I overwrite the player function; if username is requested, it returns the username, else the value of the old player function is returned.


@user Starkkz: Actually, I was having an awful lot of trouble getting LuaSocket to work (on Linux). I made a topic about it here, but never got an answer. (thread cs2d Lua .so extension - undefined symbol). Lee did get LuaSocket working on Windows though.

alt

Starkkz
Moderator Off Offline

It would be simple to use LuaSocket, I was making an engine for Lua based on BlitzMax socket stream. Anyway I'm having trouble with UDP sockets.
Ich mag es!

alt

EvO
User Off Offline

AWESOME!

Vell Done

This Is Nice Script
Ich mag es!

alt

dizziness
User Off Offline

Banaan, did this code it exist? If no how you make it

1
player(id, "usgnname")

alt

loik
User Off Offline

Can't you just ask for there usgn and username???
But whatever 5/5
Ich mag es!

alt

EngiN33R
Moderator Off Offline

Well done! This will prove useful... somehow.
Ich mag es!
1× editiert, zuletzt 15.07.12 21:20:09
Zum Anfang Vorherige 1 2 Nächste Zum Anfang