Jessecar96 / SteamBot

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

Making the trade with someone on friend add? #237

Closed mtcamesao closed 11 years ago

mtcamesao commented 11 years ago

Title really says it all. I am using the SimpleUserHandler and what I want it to do is when a player adds the bot it will message them asking for a code. Then when the player types in the code it will trade them. After the trade is complete I want it to remove them from there friends list..

The main issue is I just dont know where to place the code. I haven't wrote in C# since highschool :/

DrProfAxesome commented 11 years ago

Put the trade code inside the OnFriendAdd function, and the remove code inside the OnTradeAccept inside the if successful

mtcamesao commented 11 years ago

Okay but dont I need to get the players steam id somehow?

DrProfAxesome commented 11 years ago

It is already gotten with the variable OtherSID

mtcamesao commented 11 years ago

Okay I got everything else working but actually getting it to start the trade.

DrProfAxesome commented 11 years ago

You mean you don't know the command for opening a trade or that the command didn't work for you?

mtcamesao commented 11 years ago

I dont know the command. I've been looking for it with no luck. i wish there was a Wiki :/

DrProfAxesome commented 11 years ago

Bot.OpenTrade(ID)

mtcamesao commented 11 years ago

Thank you! :] One more thing, is there a place where i can go to see all the commands and what not?

DrProfAxesome commented 11 years ago

Don't believe so. If you are using Visual Studio, it should prompt you with options while you are typing