Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.33k stars 911 forks source link

Crafting #57

Closed mango52 closed 11 years ago

mango52 commented 11 years ago

Is crafting a planned feature? I'm pretty sure it's possible, and it would make a great feature to make bots able to craft. Maybe start off with combining/smelting metal, since that's a pretty basic and predictable recipe.

I can't be of much help myself in this situation, as I have no experience with SteamKit.

geel9 commented 11 years ago

Jesse and I know how to do it. As per Voided's request, we will not be sharing this knowledge.

mango52 commented 11 years ago

For what reason?

mango52 commented 11 years ago

Fine, I'll figure it out myself. This may help me: https://github.com/Top-Cat/ScrapBank.tf/blob/master/src/main/java/uk/co/thomasc/scrapbanktf/scrap/AutoScrap.java

teliosdev commented 11 years ago

Interesting... it seems the bot puts itself in-game to craft.

mango52 commented 11 years ago

I noticed that - I'm guessing it's a requirement for the crafting request to be processed. The only problem is that scrapbank.tf's bots use Java. I'll try porting to C# and will share the results.

teliosdev commented 11 years ago

Why was this closed?

mango52 commented 11 years ago

Good question, I'd like to know too.

teliosdev commented 11 years ago

I had free time today so I decided to take a look at SteamKit2. I found these, but I haven't found a class for the request/response yet. The recipe is here, but I'm not sure if it's for TF2. I think if we were to create a request and handle the response, then we'd be able to craft.

cwhelchel commented 11 years ago

@redjazz96 I imagine that as far as the request/response goes it will have to look like this.

That project base seems to have everything needed to do this... just in Java. Maybe @mango52 has an update on what he has found?

tkphoto commented 11 years ago

is there any updates with regards to the crafting .. crafting/smelting of weapons would be useful

waylaidwanderer commented 11 years ago

Seconded. I think we should really try to figure this out.

To start off, we can put the bot in game by adding this function to Bot.cs:

public void LaunchTF()
{
    var clientMsg = new ClientMsgProtobuf<CMsgClientGamesPlayed> (EMsg.ClientGamesPlayedNoDataBlob);
    clientMsg.Body.games_played.Add (new CMsgClientGamesPlayed.GamePlayed
    {
        game_id = 440,
    });
    SteamClient.Send(clientMsg);
}

You will also need to add using SteamKit2.Internal; to your declarations.

If you wanted to call this function within your UserHandler, you could do, for example in OnMessage():

if (message == ".tf2")
{
    Bot.LaunchTF();
}

and then message your bot ".tf2" and it will then appear as if it's playing the game.

gamemaster1494 commented 11 years ago

Wondering if there is a glitch this opens up, which is why it was requested to not share the information.

ghost commented 11 years ago

This only tricks steam into thinking the bot is in game though, right? I mean, I've managed to get in game and connect to a server, although the bot doesn't actually enter any server. Naughty and Nice crates have been removed from the bot's inventory now though, so this is connecting to the item server? Although, I don't get any drops from being connected, so is there something we are missing to allow this to happen?

FlyingDelorian commented 11 years ago

@waylaidwanderer How would one close TF2 then? I just want to connect to TF2 to get items into the bot's backpack.

gamemaster1494 commented 11 years ago

@FlyingDelorian Closing tf2 won't get the items into the backpack. They will still show up as new items. The bot would have to click on the notification that new items are there, and click ok. That puts them into the backpack. Or have the bot sort the backpack by quality or something of the sort.

gamemaster1494 commented 11 years ago

I've been trying to get this to work based on the autoscrap.jar. Slowly converting the pieces, I think. Hopefully it works =3

waylaidwanderer commented 11 years ago

Well done, gamemaster - I would help but unfortunately I haven't learned any Java yet. Also I was certain that just launching TF2 would work to put the items in the backpack...

gamemaster1494 commented 11 years ago

Nah. If you launch TF2 regularly, the items don't go into your backpack until you sort it, or you view new items.

Tetrahedrite commented 11 years ago

ARGGGGGHHHH.. It's very hard..

gamemaster1494 commented 11 years ago

What is very hard?

@waylaidwanderer Java's syntax and C#'s syntax is very similar. I dont know java at all, but i'm still able to use google rather well to see what things do =3

FlyingDelorian commented 11 years ago

Is this using a version of Steambot I'm not aware of? There are methods I haven't seen before.

FlyingDelorian commented 11 years ago

@waylaidwanderer Can it be converted to use the currency version on github?

FlyingDelorian commented 11 years ago

Yes. Sorry. Autocorrect and I don't always get along when I don't proof read.

geel9 commented 11 years ago

God dammit.

geel9 commented 11 years ago

It's a bad idea to release crafting like this to the public.

geel9 commented 11 years ago

For one thing, obviously, it presents more competition for scrap.tf

Aside from that, it could lead to programs that present unfair advantages to players. Valve doesn't like that. They could take action against those who proliferated this.

geel9 commented 11 years ago

I'm just saying be careful with what you release. The entire project is technically against Steam's ToS anyways.

geel9 commented 11 years ago

I'm not going to police the repo.

geel9 commented 11 years ago

It's irrelevant. The repo you found the code on is public anyways.

geel9 commented 11 years ago

My main concern is simply competition.

Tetrahedrite commented 11 years ago

I didn't learn C# or java. I know programming language very little. (some function, if, else, public int, about function....)

Tetrahedrite commented 11 years ago

Hard To me..

lazy1 commented 11 years ago

What about the bot leaving the game? Anybody found appropriate way to do it?

waylaidwanderer commented 11 years ago

This seems to work:

public void QuitTF2()
{
    var clientMsg = new ClientMsgProtobuf<CMsgClientGamesPlayed>(EMsg.ClientGamesPlayedNoDataBlob);
    clientMsg.Body.games_played.Clear();
    SteamClient.Send(clientMsg);
}

As an addendum to my previous comment explaining how to get the bot to launch TF2, you also need to declare using SteamKit2.Internal; and add a protobuf reference to SteamBot.

geel9 commented 11 years ago

To make them stop playing a game you just send the AppID as 0

On Wed, Mar 13, 2013 at 1:08 AM, waylaidwanderer notifications@github.comwrote:

This seems to work:

public void QuitTF2() { var clientMsg = new ClientMsgProtobuf(EMsg.ClientGamesPlayedNoDataBlob); clientMsg.Body.games_played.Clear(); SteamClient.Send(clientMsg); }

As an addendum to my previous comment explaining how to get the bot to launch TF2, you also need to declare `using SteamKit2.Internal;" and add a protobuf reference to SteamBot.

— Reply to this email directly or view it on GitHubhttps://github.com/Jessecar96/SteamBot/issues/57#issuecomment-14824764 .

waylaidwanderer commented 11 years ago

Is that better than my method? I tried that too after I posted my last comment, but it seems to have the same result

geel9 notifications@github.com wrote:

To make them stop playing a game you just send the AppID as 0

On Wed, Mar 13, 2013 at 1:08 AM, waylaidwanderer notifications@github.comwrote:

This seems to work:

public void QuitTF2() { var clientMsg = new ClientMsgProtobuf(EMsg.ClientGamesPlayedNoDataBlob); clientMsg.Body.games_played.Clear(); SteamClient.Send(clientMsg); }

As an addendum to my previous comment explaining how to get the bot to launch TF2, you also need to declare `using SteamKit2.Internal;" and add a protobuf reference to SteamBot.

— Reply to this email directly or view it on GitHubhttps://github.com/Jessecar96/SteamBot/issues/57#issuecomment-14824764 .


Reply to this email directly or view it on GitHub: https://github.com/Jessecar96/SteamBot/issues/57#issuecomment-14850225

Tetrahedrite commented 11 years ago

Can't use "SteamKit2.Internal.CMsgGamesPlayed" to "BodyType"

????

lazy1 commented 11 years ago

@waylaidwanderer, @geel9 Thanks for information!

gamemaster1494 commented 11 years ago

@geel9, Then release it privately. I would love to find out how. otherwise, it will end up being released publicly as someone else will figure it out... Also, how is it against steam's ToS? Steam knows perfectly well about tf2wh, as well as a ton of other bot trading systems. And you, of all people, are conserned with competition? You have 100k members + and growing so fast bots can't keep up...

teliosdev commented 11 years ago

@gamemaster1494

F. Restrictions.

You may not use the Software for any purpose other than the permitted access to Steam and your Subscriptions, or as otherwise permitted by the applicable Subscription Terms. Except as otherwise permitted under Section 2(C) (Mods and Derivative Works), or as expressly permitted under this Agreement (including any Subscription Terms or Rules of Use), or under applicable law notwithstanding these restrictions, you may not, in whole or in part, copy, photocopy, reproduce, publish, distribute, translate, reverse engineer, derive source code from, modify, disassemble, decompile, create derivative works based on, or remove any proprietary notices or labels from the Software or any software accessed via Steam without the prior consent, in writing, of Valve.

http://store.steampowered.com/subscriber_agreement/

  • It's already been released publicly.
  • Any competition could hurt scrap.tf, but then there's also the debate that competition is good for business...
gamemaster1494 commented 11 years ago

I'm guessing it violates reverse engineer?

teliosdev commented 11 years ago

@gamemaster1494 the whole thing is really a quagmire, since I'm assuming that SteamKit2 contacted valve asking about the legal implications of what I posted and obtained consent for reverse engineering. SteamBot has done no such thing to my knowledge, so we may or may not be breaking the rules laid down in the ToS depending on the argument given.

Basically, if you're planning on using this for anything other than recreation, I'd suggest contacting valve.

ghost commented 11 years ago

I already contacted them and I'm just awaiting a reply!

On Mon, Mar 18, 2013 at 3:14 AM, Jeremy Rodi notifications@github.comwrote:

@gamemaster1494 https://github.com/gamemaster1494 the whole thing is really a quagmire, since I'm assuming that SteamKit2 contacted valve asking about the legal implications of what I posted and obtained consent for reverse engineering. SteamBot has done no such thing to my knowledge, so we may or may not be breaking the rules laid down in the ToS depending on the argument given.

Basically, if you're planning on using this for anything other than recreation, I'd suggest contacting valve.

— Reply to this email directly or view it on GitHubhttps://github.com/Jessecar96/SteamBot/issues/57#issuecomment-15041820 .

gamemaster1494 commented 11 years ago

@14942744 Any reply?

ghost commented 11 years ago

Yeah they said "we have no stance on this right now" so I think we are good to go!

Sent from my Verizon Wireless BlackBerry

-----Original Message----- From: gamemaster1494 notifications@github.com Date: Sun, 24 Mar 2013 04:50:37 To: Jessecar96/SteamBotSteamBot@noreply.github.com Reply-To: Jessecar96/SteamBot reply@reply.github.com Cc: 14942744z14942744@gmail.com Subject: Re: [SteamBot] Crafting (#57)

@14942744 Any reply?


Reply to this email directly or view it on GitHub: https://github.com/Jessecar96/SteamBot/issues/57#issuecomment-15355200

cwhelchel commented 11 years ago

No offense, but could you post a proof screen shot including what you sent them?

ghost commented 11 years ago

Yes I can but I'm outta town on break without wifi, responding via 3G on a blackberry. I'll post pics as soon as I can

Sent from my Verizon Wireless BlackBerry

-----Original Message----- From: Cainan Whelchel notifications@github.com Date: Sun, 24 Mar 2013 09:37:42 To: Jessecar96/SteamBotSteamBot@noreply.github.com Reply-To: Jessecar96/SteamBot reply@reply.github.com Cc: 14942744z14942744@gmail.com Subject: Re: [SteamBot] Crafting (#57)

No offense, but could you post a proof screen shot including what you sent them?


Reply to this email directly or view it on GitHub: https://github.com/Jessecar96/SteamBot/issues/57#issuecomment-15362204

elipsitz commented 11 years ago

Similar question to this, is there a way to use Paints and Description Tags (and Name tags, I suppose)?

waylaidwanderer commented 11 years ago

Yep.

ThePickleMan notifications@github.com wrote:

Similar question to this, is there a way to use Paints and Description Tags (and Name tags, I suppose)?


Reply to this email directly or view it on GitHub: https://github.com/Jessecar96/SteamBot/issues/57#issuecomment-15492106

elipsitz commented 11 years ago

Uh, how? Do we know yet, or is it the same issue as crafting?