Git Product home page Git Product logo

Comments (31)

coffman34 avatar coffman34 commented on August 15, 2024

I think I accidently closed the issue. I have confirmed the bug with the scrap.tf bots as well.

from steambot.

teliosdev avatar teliosdev commented on August 15, 2024

The scrap.tf bots were forked from SteamBot early in SteamBot's development, so we really can't say much for scrap.tf.

from steambot.

coffman34 avatar coffman34 commented on August 15, 2024

Well, What I was thinking, since it appears to be in both bots, that's it's a problem with the core code, and not some change that was made, or, not made.

Since you say they were forked from an earlier build, it would seem like this issue would be something that is has been there for a while, but hasn't shown itself since no one has attempted to use other items with it.

from steambot.

teliosdev avatar teliosdev commented on August 15, 2024

I think when it tries to get the item from the item schema, it doesn't exist so it throws that sort of general error (from looking at line 541 of Trade.cs).

from steambot.

coffman34 avatar coffman34 commented on August 15, 2024

I have been looking at the Schema.cs file, and it appears to only call the TF2 item schema. This could be why we are experiencing crashes from the bot. I have adjusted the Game ID in the API call to call from Dota 2 instead. This still throws errors when a Dota item is dropped in the trade window. I am going to start looking at the item structure to see what the difference is.

EDIT: I believe I have found where the error is occuring. Currently in Schema.cs items are returned by a given crafting material. In the return results from the API call to the Dota item schema, there is no property for CraftMaterialType.

Here is a sample of an item returned from the Dota schema.

        {
        "name": "Riki's Dagger",
        "defindex": 0,
        "item_class": "dota_item_wearable",
        "item_type_name": "#DOTA_WearableType_Daggers",
        "item_name": "#DOTA_Item_Rikis_Dagger",
        "proper_name": false,
        "item_quality": 0,
        "image_inventory": null,
        "min_ilevel": 1,
        "max_ilevel": 1,
        "image_url": "",
        "image_url_large": "",
        "capabilities": {
                "can_craft_mark": true,
                "can_be_restored": true,
                "strange_parts": true,
                "paintable_unusual": true
        }
    }

from steambot.

teliosdev avatar teliosdev commented on August 15, 2024

The problem with supporting both TF2 and Dota is the time it would take to request both schemas. Maybe if we have options for each bot, like download/use the TF2, Dota, or both schemas? And if the user adds an item that doesn't exist, gracefully handle it instead of throwing an exception.

from steambot.

coffman34 avatar coffman34 commented on August 15, 2024

I was able to figure out why the errors were throwing. There are 2 calls to the Schema Web API. Once both calls were changed to access the Dota schema, adding items from Dota now works as expected. I am fine with having the owner of the bot set up the script calls for which game they want, until we can figure out a long term solution to using both.

Problem is, the name of the project is SteamBot, not TF2Bot. Therefore we need to make it a goal to work on all steam trading. I will head up the Dota branch. I have been unable to figure out the schema for the Steam Inventory, ie. games, beta invites, etc. So I am not for sure that it is possible yet.

We could add a option in the settings file, that allows the user to place in the ID of the game they wish to use. 440 for TF2, 570 for Dota 2. All it would require is adding of the parameter, then building the new API calls to use the variable instead of a hard coded address.

from steambot.

teliosdev avatar teliosdev commented on August 15, 2024

What I'm thinking is to define a setting in the file that is an array of IDs to use for games. For example:

{
    "SchemaGames": [440, 570],
}

Obviously, "SchemaGames" wouldn't exactly be the key for it, but at least we would be able to support multiple games. And it wouldn't be hard to check up on trading, since we could open a trade in a regular browser and check requests using any tools.

from steambot.

coffman34 avatar coffman34 commented on August 15, 2024

There are a few other places where the GameID comes in to play. Such as in Trade.cs when adding/removing items. The appid has to be set to the correct id to make sure that it doesn't crash and give the error above.

I have been able to get the bot working with Dota 2 items, however, same as when it's set in TF2 mode, it can only trade Dota 2 items.

I am not sure we can get around fetching both schemas. And I'm not for sure how we would deal with defindexes being the same for the 2 different items.

from steambot.

cwhelchel avatar cwhelchel commented on August 15, 2024

The problem with supporting both TF2 and Dota is the time it would take to request both schemas.

@redjazz96 If we could cache the schemas (#103) this would be less of a hindrance.

from steambot.

teliosdev avatar teliosdev commented on August 15, 2024

@cwhelchel yeah, that might work

from steambot.

StormReaper avatar StormReaper commented on August 15, 2024

I'm just curious where does one find the data that steam provides with the trade? Does it not include the information on what item belongs to which game? Because as i see it right now even if you cache both schemas you will only be able to use one or the other because they have overlapping defindexes? Also can the bot be fooled into trading the wrong item at the moment? i.e dota2 and tf2 items with same defindex?

from steambot.

Philipp15b avatar Philipp15b commented on August 15, 2024

@StormReaper For every event that you get from tradestatus, there is an appid sent with it.

from steambot.

94m3k1n9 avatar 94m3k1n9 commented on August 15, 2024

@StormReaper the problem isn't that there are overlapping defindexes, the problem is that there are no defindexes at all.

from steambot.

StormReaper avatar StormReaper commented on August 15, 2024

So i've been digging around to see if there might be a way around this, there are allready methods in place for fetching the tf2 inventory community feed which return some data, the defindex is not present but a different one is there which can be used as a unique id for a schema.

There are also other community feeds for other games and gifts, the biggest problem though is that there is no schemas for all this data.

The bot would need some sort of an external schema to be built for handling these items, tf2 and other valve games could have the schemas matched by some variables such as name, or picture not ideal but I believe it could work. Steam must have its own shema for the steam inventory but its unclear if or when they would release this info. Sorry if this sounds slightly confusing i'll try to clarify as best I can later and hopefully code this in soon.

from steambot.

StormReaper avatar StormReaper commented on August 15, 2024

A small update on my last comment, I've made some new and interesting discoveries most importantly of which is that we should be able to get the bot working with private backpack/inventories. There are two methods (foreigninventory) and (inventory) on the community website that can be used while inside a trade to fetch the inventory of the other user and the bot. I've found these methods while observing a steam trade with fiddler and one is executed when the trade is loaded to fetch the users backpack, and the other is executed once the other user adds an item.

Both of these methods return a list of data about each inventory item including a classid which is unique and is used to identify items in a schema. For valve games the classid can be further used in ISteamEconomy/GetAssetPrices and ISteamEconomy/GetAssetPrices SteamWebAPI calls to get more data, the GetAssetPrices also includes defindex to classid mapping so we can use that to map with the currently used GetSchema methods and other schemas for dota2 and portal2? haven't checked yet but most likely.

For non valve games such Spiral Knights, SMNC and Crimecraft gangwars there are currently no schemas that can be fetched. But each inventory item still comes with enough data to identify the items.

I've already mapped a few classes and webapi calls, but could use some help especially interested in the web methods used for the trade and the way cookies are currently handled.

from steambot.

awillinger avatar awillinger commented on August 15, 2024

Any Updates with this?

from steambot.

StormReaper avatar StormReaper commented on August 15, 2024

I kinda stopped working on it, although what i said is possible, the asset prices only contain the defindex definitions for items that can be sold through the store, so quite a number of items are missing i.e crates, promos etc. Also it's quite a lot harder to find certain information like item attributes, because they are stored differently for easy use in the steam trade window.

It would require significant work to be done to fetch all the item attributes if you want them. Although probably the best single example of this working in action is the the tf2 warehouse bot. As it doesn't rely on the tf2 web api to fetch the backpacks. I'm currently busy with other work so i'm not going to be doing any other work with this for now, but perhaps in the future.

from steambot.

awillinger avatar awillinger commented on August 15, 2024

Is there atleast a way to the the other User's Steam Gifts Inventory?

There is a sorta-of public API:

http://steamcommunity.com/id/%profilename%/inventory/json/753/

from steambot.

StormReaper avatar StormReaper commented on August 15, 2024

Yes, its pretty similar to the one you posted have a look at GetForeignInventory method on this https://github.com/StormReaper/SteamBot/blob/steam/SteamTrade/TradeSession.cs

from steambot.

teliosdev avatar teliosdev commented on August 15, 2024

Is this still an issue?

from steambot.

waylaidwanderer avatar waylaidwanderer commented on August 15, 2024

Looks like an interesting discussion. If we could get SteamBot to work with multiple games that would be pretty great.

from steambot.

ausey00 avatar ausey00 commented on August 15, 2024

+1 for multiple game support, or the support of steam inventory items, such as trading cards.

from steambot.

TheAnthonyNL avatar TheAnthonyNL commented on August 15, 2024

Would like to see an update on this too.

from steambot.

enthdegree avatar enthdegree commented on August 15, 2024

Where is the exception thrown? Bot.cs?

It looks like whatever exception it causes is caught and thrown away because during debug I added a non-TF2 item and the window closed without ever entering my OnAddItem() routine.

from steambot.

remco138 avatar remco138 commented on August 15, 2024

Would love to see support for steam inventory, my main reason of interest for this project

from steambot.

Lagg avatar Lagg commented on August 15, 2024

If someone is actually wanting to look into this you may be able to glean some useful information from steamodd's sim module.

from steambot.

glen-84 avatar glen-84 commented on August 15, 2024

In OnTradeAddItem(), when adding a Dota 2 item, schemaItem is NULL and inventoryItem contains no useful information – does this mean that SteamBot does not support Dota 2 trading?

from steambot.

coffman34 avatar coffman34 commented on August 15, 2024

No, Steambot supports Dota 2 trading. However, there are some changes that
need to be made to some of the code to make it work. I would suggest
reading through some of the past posts. Your answer is in there.

On Mon, Apr 7, 2014 at 7:24 AM, glen-84 [email protected] wrote:

In OnTradeAddItem(), when adding a Dota 2 item, schemaItem is NULL and
inventoryItem contains no useful information - does this mean that SteamBot
does not support Dota 2 trading?

Reply to this email directly or view it on GitHubhttps://github.com//issues/105#issuecomment-39719093
.

from steambot.

zuiahve avatar zuiahve commented on August 15, 2024

"No, Steambot supports Dota 2 trading. However, there are some changes that need to be made to some of the code to make it work. I would suggest reading through some of the past posts. Your answer is in there."

I just trade with one user who use steam bot for dota2.. he trade rares, keys..

from steambot.

coffman34 avatar coffman34 commented on August 15, 2024

What are you talking about? I didn't say it couldn't be done. I said it can
be done, but you have to read the past posts on how to get Steambot setup
correctly to do it.

On Sun, Jun 29, 2014 at 3:48 AM, zuiahve [email protected] wrote:

"No, Steambot supports Dota 2 trading. However, there are some changes
that need to be made to some of the code to make it work. I would suggest
reading through some of the past posts. Your answer is in there."

I just trade with one user who use steam bot for dota2.. he trade rares,
keys..


Reply to this email directly or view it on GitHub
#105 (comment).

from steambot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.