Files

> > CS2D > Lua Scripts > Get USGN Name
Files overviewCS2D overviewLua Scripts overview

English Get USGN Name >

28 comments1.40 mb, 830 Downloads

old 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.
edited 1×, last 23.06.11 10:55:55 am
Approved by GeoB99

Download Download

1.40 mb, 830 Downloads

Comments

28 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Gaios
Reviewer Off Offline

thanks
I like it!

old

apTyp_ua
User Off Offline

Good Script!!
I like it!

old

W4RG
User Off Offline

runs on the latest version of CS2D?

old

Pirtyu
User Off Offline

Very Good!
I like it!

old

Happy Killer
BANNED Off Offline

this is a good script!
I like it!

old

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.

old

Suprise
BANNED Off Offline

Maybe too old

old

Misho
User Off Offline

user Avo who said it!
File: Nice and it's old file btw.
I like it!

old

Avo
User Off Offline

Epic shit. But useless.
I like it!

old

-AngelOfDeath-
User Off Offline

Hmm, its useful in many situations, thx
I like it!

old

Mr_God
User Off Offline

nice
cool awesome 5/5
I like it!

old

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.

old

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
I like it!

old

MikuAuahDark
User Off Offline

Awesome script, i put it at my server. 5/5
I like it!

old

Banaan
User Off Offline

user dizziness has written
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.

old

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.
I like it!

old

EvO
User Off Offline

AWESOME!

Vell Done

This Is Nice Script
I like it!

old

dizziness
User Off Offline

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

1
player(id, "usgnname")

old

loik
User Off Offline

Can't you just ask for there usgn and username???
But whatever 5/5
I like it!

old

EngiN33R
Moderator Off Offline

Well done! This will prove useful... somehow.
I like it!
edited 1×, last 15.07.12 09:20:09 pm
To the start Previous 1 2 Next To the start