Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
What do you mean by "master account" in this case? Do you mean just one of the bots that you specified or what? Not "master" user permission in terms of ASF, right? In this case I suggest you to check existing methods of ArchiWebHandler and select the one that suits best for you.
To disconnect bot just stop it with Bot.Actions.Stop.
That's probably the most hard thing to do with plugins. Of course you can re-implement whole farming module, or use commands like "play" to emulate this behaviour, but if first case it may be hard (if even possible, I'm unsure), and in second case - weird. Depends
You have IBotTradeOffer plugin api endpoind for that.
It seems you want to make asf a full fledged steam bot. In most cases it's possible, but it's definitely not the purpose of plugins, plugins are supposed to extend functionality of ASF, not change the existing behaviour. In your case I guess it would be easy to start from scratch, or mabe fork ASF and change it for your needs. But that's just my opinion of course.
And contrary to ryzhe's statement above, I believe ASF plugin is the best place you can pick in order to convert ASF into your own personal bot without much hassle, it only takes a bit of willings and time to explore what ASF offers you in terms of internal API, or alternatively if you decide you're not satisfied with it, you can always re-implement everything you need in your own way, ASF puts no limits on what your plugin can do. Writing a plugin to make ASF do what you want is most certainly much easier than forking the project or rewriting ASF core, especially if you're just starting.
And if you didn't yet, see my example plugin[github.com] which shows a bit of potential usage.
At first it was so overwhelming and I was so confused but now I have an idea of how and where to start.
It may take a very long time to realize what I planned but I have high hopes with my ASF project.
Thanks again Ryzhehvost and of course thanks to the great Archi
For example, here[github.com] is a function that joins a group, which ASF uses for statistics module. You can see that it uses UrlPostWithSession() to achieve the goal, and you have access to the same function. Nothing stops you from sending some other request through the same way. If you dig deeper, you'll see that every functionality that operates on Steam community is using the same thing, with small modifications for appropriate request and data needed.
The difficult part is learning basics of C# language, what ASF API offers and what you need to do in order to achieve something with Steam. Despite of it looking like a lot, I can assure you that it's MUCH less than what you'd need to learn if you wanted to code something like ASF from scratch, because apart from the above which you'd need to master in far higher lever, the amount of knowledge, low-level things, hacks and workarounds that I have in ASF goes far beyond what you need to understand in order to have a nice experience with ASF API as a plugin. It's not worth the time and effort to reinvent the wheel, unless you want to actually learn something in the process, but then again nothing stops you from doing the same AND spending time productively, on something that is actually useful instead of being a copy of something that already works.
I recommend to dig into ASF source code for examples of how I managed to achieve particular things, it's one of the most complex and complete examples of Steam platform integration for bot-like usages, and plugins allow you to make use of everything I've created and further extend it to your liking. Even if you completely disagreed with over 90% of my functions and implementations, you'd still save your time on 10% that you agree with, and you'd need to re-implement remaining 90% anyway, whether in your own standalone program or ASF plugin, except in your own standalone program you'd need to implement far more to make it work in the first place, while as ASF plugin you're saving on all the hassle that you don't need/want to reimplement yourself, and you most likely don't want to write authentication, session logic, redirections and all other stuff I had to write before you.
It's much easier to write a plugin that modifies ASF, rather than modifying ASF source code to do something else. You can still do the second, but you need to put far more effort and have far better understanding for that, and unless you want to write another ASF from scratch, there is next to no reasoning for going this way.
As Ryzhehvost told me I need to use Bot.ArchiWebHandler.SendTradeOffer to create a trade offer, however I cannot access this method. As I see in the source files this method is not public but internal. The only public SendTradeOffer method I found was in Bot.Actions but that's not what I need, right?
How can I use the ArchiWebHandler.SendTradeOffer method without me "forking" the program?
I've opened that method for you, so simply update to latest ASF source tree and you'll be able to make use of it.
I cannot thank you enough Archi.
I knew about the API availability, I was just curious if there is a tricky way that I don't know of to access that method, as I am using the latest release's DLL as reference.
Now my question is even if I (somehow) change the reference from the DLL to the source tree and create the plugin it won't work with the latest ASF release, would it?
Archi quoted wiki for you to tell you that next time, if you need some method, you can just create issue on github with needed API and reasons why you need it, this way Archi will not miss it.
Good luck with your plugin.
Yes, you'll need to wait for the next version with that commit to be released, which is V4.0.3.1. That however doesn't mean you can't work with it immediately, check release cycle wiki entry and my latest appveyor builds if you'd like to have it right away.
So thanks again Archi.
Thank you too Ryzhehvost.
Thank you both for beeing patient with me and my stupid questions.
However I've got a tiny little bit of problem again, that I am not entirely sure it is a plugin related problem because I encountered a similar case before I even thought about plugins.
So the case was: I set up in the bot configuration
"SendOnFarmingFinished": true,
"ShutdownOnFarmingFinished": true,
but one time ASF didn't send the cards after farming, as I thought it disconnected the bot before it being able to create the trade offer. I didn't bother with it and the next time I ran ASF everything worked as intended.
Back to the plugin: I have some tasks in the code including the GetInventory method, for which I use the await operator and that made me change the whole OnBotLoggedOn to an async method. I hope that's not a problem, or is it?
Even so with the ShutdownOnFarmingFinished set to true ASF disconnects the bot before it reaches the end of the plugin's OnBotLoggedOn method. That's as far as I know because there are tasks that take longer time and I saw on the console/log that BOT OnDisconnected() happened before it got to the OnBotLoggedOn() GetInventory failure.
If I set ShutdownOnFarmingFinished to false, then everything works properly but I don't want to run the bot without any purpose.
Is there a way to make ASF wait for the plugin run before it disconnects or there is nothing I can do?
Who knows I may write a plugin to monitor my other plugins. lol
I had my plugins working fine and now that it became necessary and I have a little time, I'm trying to upgrade from netcore2.2 to 3.1. What I first did is that I updated the referenced ArchiSteamFarm.dll to the latest release's and now I have some error on asf methods, fields and whatnot saying:
"The type * is defined in an assembly that is not referenced. You must add a reference to assembly System.Private.CoreLib ...".
What is this? Why is it needed now? What should I do?
I also have some not so important questions:
Is there a public bool or other method to know if the bot is farming right now or started farming?
I'm asking this because I want to pause/stop/terminate the plugin if this happens or if bot disconnects.
Also is there an easy way to terminate the plugin mid-process if needed? I read I can achieve something like this with Actions but I didn't dig deep into it yet.