Your Ad Here

Subscribe
 Post #81
 10th October 2009
VoiDeD's Avatar
August 2005
958 Posts
I think SendChatMsg sends to friends only.

As for the enums, the EFriendMsgType is generally the one used in the newest interfaces, and I don't know if the older ones translate EChatEntryType to those, or just handle those themselves.

Edit:

Page 3!
 Post #82
 10th October 2009
qurl's Avatar
June 2009
994 Posts
Is this safe to mess around with? I know it doesn't touch VAC but would valve approve/take action?

Edited:

Not too bothered, just wondering.
 Post #83
 10th October 2009
Gold Member
AzuiSleet's Avatar
September 2007
826 Posts
Valve could change their policy on using leaked and stolen documents and ban your account.
 Post #84
 10th October 2009
Gold Member
Dennab
August 2006
2,742 Posts
Is this safe to mess around with? I know it doesn't touch VAC but would valve approve/take action?

Edited:

Not too bothered, just wondering.
Remember the achievement unlocker and idler?
 Post #85
 10th October 2009
VoiDeD's Avatar
August 2005
958 Posts
Remember the achievement unlocker and idler?
That situation was a specific case. It's impossible to know if the game is editing achievements/stats, or if an outside program is doing so. But it's easy for them to track when people unlocked them. So if they check their databases for players who unlocked the majority of the achievements in a few seconds/minutes, it's a no brainer for them.

The idler was only because Valve changed their policies in regards to using external programs to get items. It's possible that using OSW in this same fashion could get people's items removed, but so far nothing has happened from running my own idler on localhost. Could support the theory that valve only monitored what servers clients connected to.
 Post #86
 11th October 2009
Nisd's Avatar
October 2008
339 Posts
If any one is to lazy to compile it on their own, then i made a build bot just for the fun of it.
http://server1.hiddenservers.org/bui...%20Steamworks/
 Post #87
 11th October 2009
Gold Member
Ortzinator's Avatar
May 2005
7,254 Posts
Valve got pissed because a few users were gaming the system and devaluing the items that other users got legitimately. Like inflation.

This is nothing like that.
 Post #88
 12th October 2009 Last edited by VoiDeD; 12th October 2009 at 07:31PM..
VoiDeD's Avatar
August 2005
958 Posts
Another interesting example of what is possible with OSW:


I'd also mention that this is a C# project, running on top of dotnetworks. All the code for this is available on the SVN.
 Post #89
 12th October 2009
qurl's Avatar
June 2009
994 Posts
more than awesome
 Post #90
 12th October 2009
Gold Member
General1337's Avatar
January 2005
570 Posts
This is pretty cool, I made a winamp name changer thing or w/e.
 Post #91
 12th October 2009
Dennab
September 2009
265 Posts
This is pretty cool, I made a winamp name changer thing or w/e.
ochre owns
 Post #92
 12th October 2009
Dennab
June 2008
13 Posts
This is pretty cool, I made a winamp name changer thing or w/e.
You have a picture of yourself as your BG.
 Post #93
 12th October 2009
efeX's Avatar
April 2009
2,216 Posts
look a fake girl on his steam friends too lolol
 Post #94
 12th October 2009 Last edited by VoiDeD; 12th October 2009 at 11:49PM..
VoiDeD's Avatar
August 2005
958 Posts
Steam update just rolled out: http://store.steampowered.com/news/2931/

One interesting thing to note:
Code:
# Steamworks API fixes
Fixes? Something was broken? Who knows. It's hard to tell what they changed when there are so many possibilities. I'll look into it and see what I can figure out.

Edited:

All current example code located within the SVN is functional.
 Post #95
 13th October 2009 Last edited by General1337; 13th October 2009 at 01:10AM..
Gold Member
General1337's Avatar
January 2005
570 Posts
If anyone is interested in the code for the winamp plugin thing it's right here. It's crap code and made me facepalm when I was done, but I was messing around just to see what you could do. I'll probably make it again in C# since Voided is doing some pretty cool stuff in that.

	int winampticker = 0;
	HSteamPipe hSteamPipe = steamClient->CreateSteamPipe();
	HSteamUser hSteamUser = steamClient->ConnectToGlobalUser(hSteamPipe);
	ISteamFriends002 *steamFriends = (ISteamFriends002 *)steamClient->GetISteamFriends( hSteamUser, hSteamPipe, STEAMFRIENDS_INTERFACE_VERSION_002 );
	const std::string friendsName(steamFriends->GetPersonaName());
	std::string myName = "DefaultName";

	while(winampticker <= 2000)
	{
		if(winampticker == 1000)
		{
			//WINAMP AREA
			HWND hwndWinamp = FindWindow("Winamp v1.x",NULL); //Finding window
			int retainer=SendMessage(hwndWinamp,WM_USER, 0, 104);
			char winamp[2048],*p;
			GetWindowText(hwndWinamp,winamp,sizeof(winamp));
			p = winamp+strlen(winamp)-8;
			while (p >= winamp)
			{

				if (!strnicmp(p,"- Winamp",8)) break;
				p--;

			}
			if (p >= winamp) p--;
			while (p >= winamp && *p == ' ') p--;
			*++p=0;

			if(retainer == 3)
			{
					myName = friendsName;
					myName += " - ";
					myName += "Winamp Paused";
					steamFriends->SetPersonaName(myName.c_str());
					winampticker = 0;
			}
			else if(retainer == 1)
			{
					myName = friendsName;
					myName += " - ";
					myName += winamp;
					steamFriends->SetPersonaName(myName.c_str());
					winampticker = 0;
			}
		}

		Sleep(3);
		winampticker++;
	}
 Post #96
 13th October 2009
efeX's Avatar
April 2009
2,216 Posts
I thought you used the winamp API to get the song, i forgot about GetWindowText :P
 Post #97
 13th October 2009
Gold Member
General1337's Avatar
January 2005
570 Posts
I thought you used the winamp API to get the song, i forgot about GetWindowText :P
You actually don't need to use the "winamp API" at all. I've never messed with winamp before so originally I thought that as well. Voided showed me this thread: http://forums.winamp.com/showthread.php?threadid=180297
It's actually simple as hell to work with, you can just SendMessage() everything. The one I have right now actually allows you to play, pause, etc with chat commands but it's pretty much useless.
That's how I check if winamp is paused or not.
int retainer=SendMessage(hwndWinamp,WM_USER, 0, 104);
That shows if winamp is paused or not, if it's paused it returns "3" if not, it returns "1".
 Post #98
 13th October 2009
Gold Member
Diaklu's Avatar
August 2007
2,311 Posts
This is delicious!
 Post #99
 13th October 2009
Dennab
October 2009
133 Posts
Damn you're updating the SVN faster than a turkey on Thanksgiving.
Wait that didn't really make any sense but you're updating it fucking fast.
 Post #100
 13th October 2009
Kylegar's Avatar
May 2005
607 Posts
There needs to be a 'wut' rating

Also, it's because he is working on the interface, that, and there was a steamworks update yesterday that he is figuring out.
 Post #101
 13th October 2009
VoiDeD's Avatar
August 2005
958 Posts
Keeping this project updated is a priority of mine.

Currently my focus is the dotnetworks project, so there will be breaking changes for a while until the design is finalized.
 Post #102
 13th October 2009
Rowley's Avatar
June 2009
181 Posts
I salute you for being a reverse engineer. A man's job right there.
 Post #103
 14th October 2009
Gold Member
Dennab
November 2006
7,364 Posts
If anyone could make a Python module of Open Steamworks, I would nerdgasm to that

Edited:

Or actually I might just learn C# since Python is a fucking pain to create GUIs for
 Post #104
 14th October 2009
Dennab
September 2009
265 Posts
If anyone could make a Python module of Open Steamworks, I would nerdgasm to that

Edited:

Or actually I might just learn C# since Python is a fucking pain to create GUIs for
why would anyone make a module for such a garbage scripting language?
 Post #105
 14th October 2009
Gold Member
Dennab
November 2006
7,364 Posts
why would anyone make a module for such a garbage scripting language?
Just because you don't like Python, doesn't mean it's garbage.
Nearly all GTK apps are written in Python
 Post #106
 14th October 2009
Dennab
September 2009
265 Posts
Nearly all GTK apps are written in Python
gtk is just as bad, and i'm pretty sure they're not.
 Post #107
 14th October 2009
Gold Member
Dennab
November 2006
7,364 Posts
gtk is just as bad, and i'm pretty sure they're not.
Makes me wonder. Does something exist which you do not hate or you do not want to shit on?
 Post #108
 14th October 2009
Dennab
June 2008
13 Posts
Makes me wonder. Does something exist which you do not hate or you do not want to shit on?
it's not that he hates everything, it's that everyone here seems to like the dumbest shit.
 Post #109
 14th October 2009
Dennab
September 2009
265 Posts
it's not that he hates everything, it's that everyone here seems to like the dumbest shit.
 Post #110
 14th October 2009
Dennab
October 2009
133 Posts
Especially Denzo
 Post #111
 14th October 2009
MiniManz's Avatar
March 2009
890 Posts
What's so bad about Python?

Anyway I had an idea for something. Some module that changes your steam avatar randomly or every X minutes from a picture in a specified folder.
 Post #112
 14th October 2009
VoiDeD's Avatar
August 2005
958 Posts
Anyway I had an idea for something. Some module that changes your steam avatar randomly or every X minutes from a picture in a specified folder.
An intriguing idea, but unfortunately isn't possible with OSW. Uploading avatars and related features are handled by the community website.
 Post #113
 15th October 2009
Dennab
October 2009
133 Posts
What's so bad about Python?

Anyway I had an idea for something. Some module that changes your steam avatar randomly or every X minutes from a picture in a specified folder.
You (I) could probably make a standalone PHP script for that :D good idea
 Post #114
 15th October 2009
MiniManz's Avatar
March 2009
890 Posts
What about a random name changer? Have it pick a name from a list of names, maybe from a text file and have it change your name at a set interval.
 Post #115
 15th October 2009
Gold Member
General1337's Avatar
January 2005
570 Posts
What about a random name changer? Have it pick a name from a list of names, maybe from a text file and have it change your name at a set interval.
you can write that in like 5 seconds, just use SetPersonaName from steamFriends interface and have it change names.
I've actually ran into some problems with setting the name, if it sets the name too fast it will crash steam and you'll have to replace all your dlls with a backup or just reinstall steam so be careful when spamming name changes.
 Post #116
 15th October 2009
VoiDeD's Avatar
August 2005
958 Posts
What about a random name changer? Have it pick a name from a list of names, maybe from a text file and have it change your name at a set interval.
#include "SteamAPI.h"
#include <string>
#include <ctime>

// or link in your project settings
#pragma comment(lib, "..\\steamclient")

// 20 seconds
#define TIMESPAN 20

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
std::string names[] = 
{
	"This is a witty name",
	"Another hilarious name",
	"Whatever name"
};

int main()
{
	int error;
	ISteamClient008 *steamClient = (ISteamClient008 *)CreateInterface(STEAMCLIENT_INTERFACE_VERSION_008, &error);
	HSteamPipe pipe = steamClient->CreateSteamPipe();
	HSteamUser user = steamClient->ConnectToGlobalUser(pipe);
	ISteamFriends005 *steamFriends = (ISteamFriends005 *)steamClient->GetISteamFriends(user, pipe, STEAMFRIENDS_INTERFACE_VERSION_005);

	time_t lastChange = time(NULL);
	uint32 nameIndex = 0;
	uint32 maxNames = ARRAY_SIZE(names);
	while (true)
	{
		time_t timeNow = time(NULL);

		if ((timeNow - lastChange) > TIMESPAN)
		{
			std::string nameChange = names[nameIndex];
			std::cout << "Changing name to: " << nameChange << std::endl;

			steamFriends->SetPersonaName(nameChange.c_str());

			nameIndex++;
			if (nameIndex > (maxNames - 1))
				nameIndex = 0;

			lastChange = timeNow;
		}
	}
}

Of course this is lacking any proper error checking. You should always check your interfaces and pipe/user to make sure you actually got them.

Edited:

In combination with http://altpluzf4.is1337.net/colorname.html, it could be pretty interesting.
 Post #117
 15th October 2009
qurl's Avatar
June 2009
994 Posts
except for the in-game spam of "YOU HAVE CHANGE YOUR NAME" which would probably kick you from most servers
 Post #118
 16th October 2009
X-Neon's Avatar
September 2006
1,593 Posts
Just wondering, is it possible to compile this under Code::Blocks (MinGW). I can compile it fine under Visual Studio but under Code::Blocks I get lots of errors. Most of them are things like "pasting X does not give a valid preprocessing token" and "wrong number of arguments specified for 'depreciated' attribute".
 Post #119
 16th October 2009
Dennab
October 2009
133 Posts
Just wondering, is it possible to compile this under Code::Blocks (MinGW). I can compile it fine under Visual Studio but under Code::Blocks I get lots of errors. Most of them are things like "pasting X does not give a valid preprocessing token" and "wrong number of arguments specified for 'depreciated' attribute".
Noxn what are you doing
 Post #120
 16th October 2009 Last edited by slayer3032; 16th October 2009 at 11:45PM.. (wtf fail phrase)
Gold Member
slayer3032's Avatar
November 2007
3,186 Posts
This is pretty cool, I made a winamp name changer thing or w/e.
Hate to say it but if your name is forced to something longer than the normal limit only you will see the name.
Reply

All times are GMT. The time now is 10:04AM.

Facepunch Studios 2010 - Server 'MARGE'