AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [TF2] backpack.tf Price Check (https://forums.alliedmods.net/showthread.php?t=194852)

Dr. McKay 08-31-2012 22:24

[TF2] backpack.tf Price Check
 
[TF2] backpack.tf Price Check

v2.11.1

This is abandoned and probably doesn't work. You might find some success using this version instead.

Description:
Downloads the latest price list from backpack.tf every hour and provides a !pc command that allows users to quickly look up the prices of items. The item name can be partial, for instance !pc napper's will present prices for Napper's Respite. Displays prices for all qualities, including unusual. !pc without any item name will present a list of all items.

The price list is updated every hour automatically. When a price list update is loaded, a notification is displayed to all users, followed by a list of all prices that have changed in the past hour. Example:
  • Price list updated.
  • Type !pc for a price check.
  • Demoman's Fro: Up from 1.33-1.44 refined to 1.55-1.66 refined
  • Orbiting Fire Handyman's Handle: Down from 1.5 buds to 1.3-1.5 buds

This plugin also provides !backpack and !bp commands that use backpack.tf. Set backpack_tf_bp_command to 0 if you have a separate backpack viewing plugin.



Servers running this plugin will be listed at http://backpack.tf/servers

Commands:
sm_pc [item name] - price checks an item
sm_pricecheck [item name] - same as above
sm_bp [username] - opens a player's backpack (or displays a list of clients if no match is found)
sm_backpack [username] - same as above
sm_updateprices - forces the price list to update (updates every hour automatically)

Cvars:
backpack_tf_version - plugin version
backpack_tf_bp_command - enables the !bp command (defaults to 1)
backpack_tf_display_update_notification - enables the HUD + sound update notification and price update ticker (defaults to 1)
backpack_tf_display_changed_prices - if backpack_tf_display_update_notification is enabled, displays all prices that have changed since the last update as a ticker (defaults to 1)
backpack_tf_update_notification_x_pos - X-position for HUD text (defaults to -1.0)
backpack_tf_update_notification_y_pos - Y-position for HUD text (defaults to 0.1)
backpack_tf_update_notification_red - Red value of HUD text (defaults to 0)
backpack_tf_update_notification_green - Green value of HUD text (defaults to 255)
backpack_tf_update_notification_blue - Blue value of HUD text (defaults to 0)
backpack_tf_update_notification_message_time - Seconds to keep each HUD message on the screen (defaults to 5)
backpack_tf_menu_open_time - Seconds to keep the price check menu open, 0 for forever (defaults to 0)
backpack_tf_api_key - API key obtained from http://backpack.tf/api/register/
backpack_tf_add_tag - Adds the "backpack.tf" tag to sv_tags, which is required for the server to be listed at http://backpack.tf/servers (defaults to 1)
backpack_tf_auto_update - enables automatic updating of the plugin (has no effect if Updater is not installed) (defaults to 1)

Plugin generates and loads cfg/sourcemod/plugin.backpack-tf.cfg.

Requirements:
Requires the SteamTools extension.

Installation:
Install SteamTools, extract backpack-tf.zip, upload its contents to your /addons/sourcemod directory, and reboot your server or type "sm plugins load backpack-tf" into your console or rcon. Once loaded, the plugin will generate a configuration file under cfg/sourcemod. Get a backpack.tf API key and fill it into the appropriate cvar in the configuration file, then reload it (sm plugins reload backpack-tf).

Auto Update:
Install Updater. The plugin will be autoupdated according to your Updater settings. It'll work without Updater.

Changelog:[list][*]v2.11.0 (1/26/15)
  • Added Halloween 2014 taunt unusual effects
  • v2.10.0 (12/9/14)
    • Added EOTL unusual effects
  • v2.9.0 (11/24/14)
    • Added Halloween 2014 unusual effects
  • v2.8.0 (9/16/14)
    • Added new taunt effects
  • v2.7.0 (1/1/14)
    • Added support for Collector's
    • Added graceful MOTD failure messages
  • v2.6.0 (11/2/13)
    • Added support for Vintage Uncraftable
    • Added new Halloween Unusual effects
  • v2.5.0 (10/23/13)
    • Added Russian translation
  • v2.4.0 (9/23/13)
    • Added support for Strange Uncraftable
    • Added Spanish and German translations
  • v2.3.0 (7/21/13)
    • Added more verbose error logging
  • v2.2.0 (6/26/13)
    • Added new Unusual effects
  • v2.1.0 (5/19/13)
    • Added new robot Unusual effects
  • v2.0.0 (3/8/13)
    • Updated plugin to use v3 of the backpack.tf IGetPrices API
    • Plugin now requires a backpack.tf API key which can be obtained at http://backpack.tf/api/register/ and should be set in backpack_tf_api_key
    • Added backpack_tf_update_notification_red, backpack_tf_update_notification_green, and backpack_tf_update_notification_blue cvars to control HUD text color
    • Added backpack_tf_update_notification_message_time cvar to control HUD message duration
    • Added backpack_tf_add_tag cvar which allows you to disable automatic sv_tags appending
    • Plugin now generates a config file under cfg/sourcemod/plugin.backpack-tf.cfg
    • Added translation file under sourcemod/translations/backpack-tf.phrases.txt
    • Added price ranges
    • Improved HUD notifications
    • Removed dependency on doctormckay.com web server
    • Various other improvements
  • v1.7.0 (2/11/13)
    • Added backpack.tf tag to sv_tags
  • v1.6.0 (1/10/13)
    • Fixed some rounding inaccuracy
    • Items that have prices that are 1+ buds will now display their key prices in parenthesis
    • Keys no longer display their prices as '1.00 Keys'
    • Buds no longer display their prices as '1.00 Buds'
  • v1.5.0 (11/5/12)
    • Added new Halloween Unusual effects
    • Improved Updater integration
  • v1.4.0 (9/23/12)
    • Added backpack_tf_menu_open_time cvar
    • When multiple items are matched, a menu of results will now be presented
    • Changed update URL to SVN repository
  • v1.3.0 (9/11/12)
    • Added support for uncraftable prices
  • v1.2.0 (9/9/12)
    • Fixed the plugin not automatically updating prices
  • v1.1.0 (9/5/12)
    • Added backpack_tf_display_changed_prices cvar
    • Added backpack_tf_update_notification_x_pos and backpack_tf_update_notification_y_pos cvars
    • Fixed potential bug if SteamTools takes a while to load
  • v1.0.0 (8/31/12)
    • Initial release

Download Plugin (backpack-tf.zip)

.zip file includes compiled binary, source, and translations
Translate this plugin


Requires updater.inc, mckayupdater.sp, advanced_motd.inc, and steamtools.inc to compile.

ReFlexPoison 08-31-2012 22:35

Re: [TF2] backpack.tf Price Check
 
I was going to attempt something like this before with the spreadsheet, didn't know how to set up the database and the the search bar doesn't effect the url of the web site. Good plugin though *-*

Dr. McKay 08-31-2012 22:36

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by ReFlexPoison (Post 1788277)
I was going to attempt something like this before with the spreadsheet, didn't know how to set up the database and the the search bar doesn't effect the url of the web site. Good plugin though *-*

I recommend backpack.tf prices over spreadsheet prices because the spreadsheet owner has been proven to be untrustworthy, and also backpack.tf prices are based on community voting.

Horsedick 08-31-2012 22:36

Re: [TF2] backpack.tf Price Check
 
Looks ok but it conflicts with my other !bp plugin which I prefer for for TF2items with a larger MOTD window... I'd have to edit it out. I'll have to test this out with that edited out to see if its better to use than me linking !price command to open up tf2trends.com in the MOTD.

Dr. McKay 08-31-2012 22:37

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Horsedick (Post 1788280)
Looks ok but it conflicts with my other !bp plugin which I prefer for for TF2items with a larger MOTD window... I'd have to edit it out. I'll have to test this out with that edited out to see if its better to use than me linking !price command to open up tf2trends.com in the MOTD.

backpack_tf_bp_command 0

Horsedick 08-31-2012 22:37

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Dr. McKay (Post 1788279)
I recommend backpack.tf prices over spreadsheet prices because the spreadsheet owner has been proven to be untrustworthy, and also backpack.tf prices are based on community voting.

yep for those that do not know about this:
http://forums.steamrep.com/threads/7...-updated.9825/


edit: aww ok about the "0" , excuse me as I've not looked at the source yet.
edit#2: the video doesn't come up for me either

Dr. McKay 08-31-2012 22:41

Re: [TF2] backpack.tf Price Check
 
Video is still uploading and will be live in about a half hour. FRAPS is a huge disk hog; 745 MB for a 42 second video.

Horsedick 08-31-2012 23:32

Re: [TF2] backpack.tf Price Check
 
Ok I tested this with just a change of the !backpack cvar and I'm getting unknown command when attempting something like !pricecheck key or !pc key or just !pc/!pricecheck in general - the !updateprices seems to be working which I seem to have to do right after the server restarts.

Perhaps make it so it auto checks for that right after a map/server restart but the other issue I have no clue. I made sure that steamtools ext was also updated.

Dr. McKay 08-31-2012 23:33

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Horsedick (Post 1788309)
Ok I tested this with just a change of the !backpack cvar and I'm getting unknown command when attempting something like !pricecheck key or !pc key or just !pc/!pricecheck in general - the !updateprices seems to be working which I seem to have to do right after the server restarts.

Perhaps make it so it auto checks for that right after a map/server restart but the other issue I have no clue. I made sure that steamtools ext was also updated.

Yeah, I just installed it and am testing it, and it appears that doing a query in OnPluginStart doesn't work. Update coming soon.

Mr. Man 08-31-2012 23:49

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Dr. McKay (Post 1788310)
Yeah, I just installed it and am testing it, and it appears that doing a query in OnPluginStart doesn't work. Update coming soon.

Also, you might want to format display output like so: <Item name>: <price>.

The - threw me off at first.

Dr. McKay 08-31-2012 23:51

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Mr. Man (Post 1788316)
Also, you might want to format display output like so: <Item name>: <price>.

The - threw me off at first.

That's already how it works...

By the way, 1.0.1 is live and fixes the having to type sm_updateprices issue when the server starts.

Mr. Man 08-31-2012 23:54

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Dr. McKay (Post 1788318)
That's already how it works...

By the way, 1.0.1 is live and fixes the having to type sm_updateprices issue when the server starts.

So you can't change it?

Dr. McKay 08-31-2012 23:56

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Mr. Man (Post 1788319)
So you can't change it?

I don't understand what you're asking.

When you request a pricecheck, the menu appears. It lists out each quality and its price.

This is what it looks like:

Price Check: Item Name
Prices are estimates only
Prices courtesy of backpack.tf

1. Unique: xx Ref
2. Genuine: xx Ref

0. Exit

BBG_Theory 09-01-2012 00:09

Re: [TF2] backpack.tf Price Check
 
so is this good to go now?

Dr. McKay 09-01-2012 00:33

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by BBG_Theory (Post 1788324)
so is this good to go now?

Yes.

Mr. Man 09-01-2012 01:29

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Dr. McKay (Post 1788320)
I don't understand what you're asking.

When you request a pricecheck, the menu appears. It lists out each quality and its price.

This is what it looks like:

Price Check: Item Name
Prices are estimates only
Prices courtesy of backpack.tf

1. Unique: xx Ref
2. Genuine: xx Ref

0. Exit

Ah, I should have been more specific with the inquiry. I had been referring to the video demo in the first post where there's a green text on the top left corner displaying item prices when pulled. Instead of a colon, there was a dash. My first question was whether it would be possible to change that dash into a colon instead to avoid confusion where people would mistake it for negative values.

Dr. McKay 09-01-2012 03:58

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Mr. Man (Post 1788357)
Ah, I should have been more specific with the inquiry. I had been referring to the video demo in the first post where there's a green text on the top left corner displaying item prices when pulled. Instead of a colon, there was a dash. My first question was whether it would be possible to change that dash into a colon instead to avoid confusion where people would mistake it for negative values.

It does mean a negative value. It's a plus (+) if the price increased, and a minus (-) if it decreased.

Mr. Man 09-01-2012 04:01

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Dr. McKay (Post 1788400)
It does mean a negative value. It's a plus (+) if the price increased, and a minus (-) if it decreased.

That makes more sense. I thought that display prompt was for the item price at the moment.

BBG_Theory 09-01-2012 09:24

Re: [TF2] backpack.tf Price Check
 
very nice work! thanks! Dr. McKay, any chance you are interested in Freak Fortress 2? We really need a super smart coder help there! :) thanks for this, its brilliant!

Munra 09-01-2012 09:29

Re: [TF2] backpack.tf Price Check
 
would it help if I just add backpack.tf to the motd backpack plugin? Then there is no conflicts and you can just remove that code?

Horsedick 09-01-2012 09:46

Re: [TF2] backpack.tf Price Check
 
1.0.0 is still downloading from that 1st post link.

Dr. McKay 09-01-2012 10:23

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by BBG_Theory (Post 1788578)
very nice work! thanks! Dr. McKay, any chance you are interested in Freak Fortress 2? We really need a super smart coder help there! :) thanks for this, its brilliant!

Sorry, not interested.
Quote:

Originally Posted by Munra (Post 1788584)
would it help if I just add backpack.tf to the motd backpack plugin? Then there is no conflicts and you can just remove that code?

I don't really see why that would be necessary. I included a bp command for the sake of convenience. Switching the cvar off will completely disable the bp command in this plugin so the original MOTD backpack plugin can be used.
Quote:

Originally Posted by Horsedick (Post 1788598)
1.0.0 is still downloading from that 1st post link.

Updater or downloading manually? I've had issues where it appears Updater is downloading a cached version or not overwriting it or something. Try downloading it manually.

Emaster 09-01-2012 12:15

Re: [TF2] backpack.tf Price Check
 
This is a sweet plugin. Nice one, McKay!

Horsedick 09-01-2012 14:14

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Dr. McKay (Post 1788637)

Updater or downloading manually? I've had issues where it appears Updater is downloading a cached version or not overwriting it or something. Try downloading it manually.

It was the Manual download - I don't use updater cause I like to test things first and do manual changes as needed.

The manual link is now showing 1.0.2 so you must have updated it between that last post and now...I'll test later after I finish a few games I'm watching thx :)

Skyrider 09-02-2012 12:23

Re: [TF2] backpack.tf Price Check
 
I do have to admit though that using the backpack function of your website really lags through the motd. I prefer a backpack viewer of which is more lite. And I assume the price check doesn't include the difference in prices of clean & dirty?

Dr. McKay 09-02-2012 14:35

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Skyrider (Post 1789677)
I do have to admit though that using the backpack function of your website really lags through the motd. I prefer a backpack viewer of which is more lite. And I assume the price check doesn't include the difference in prices of clean & dirty?

Well, it's not my website, I'm just scraping data from it. But yeah, I did notice the lag present when it loads. I could perhaps put a redirect page on my own website that just says "Loading..." while the backpack.tf page is loading.

The price check doesn't include clean/dirty, no.

Dr. McKay 09-05-2012 23:27

Re: [TF2] backpack.tf Price Check
 
Updated to v1.1.0. Changes:
  • Added backpack_tf_display_changed_prices cvar
  • Added backpack_tf_update_notification_x_pos and backpack_tf_update_notification_y_pos cvars
  • Fixed potential bug if SteamTools takes a while to load

Horsedick 09-05-2012 23:43

Re: [TF2] backpack.tf Price Check
 
also like these additions - I can now move the notification down some cause it was overlaying with one of my advertisements at times...thanks

backpack_tf_update_notification_x_pos - X-position for HUD text (defaults to 0.01)
backpack_tf_update_notification_y_pos - Y-position for HUD text (defaults to 0.01)

Dr. McKay 09-06-2012 00:02

Re: [TF2] backpack.tf Price Check
 
1 Attachment(s)
Here's a simple plugin to help you determine HUD text position.

sm_hudtest <x> <y>

Example: sm_hudtest 0.01 0.01

Dr. McKay 09-09-2012 01:15

Re: [TF2] backpack.tf Price Check
 
Plugin updated to v1.2.0. Fixed the plugin not automatically updating prices.

This update is highly recommended for all servers running this plugin.

salsav91 09-09-2012 21:37

Re: [TF2] backpack.tf Price Check
 
I absolutely love this plugin. I cant be on my server 24/7, so I like the idea that I am giving some power to new or unsure traders when I leave. Their is one problem that I think would be great if you could implement a possible fix in a future update. Sometimes I dont remember the entire name of my item so I will put in a partial and it sends me the information of another item. Case in point if I type in Bill's it will take me to something other than my intended target "Bill''s Hat". Now it would be great if rather than taking me straight to a item, if more names match the one I am searching for it will bring up a small secondary list showing available results and allowing me to choose the correct one.

Other than that this plugin is just great and I feel confident in keeping it on my server for a very long time. I know I am new here but I just want to say how awesome this plugin is.

Dr. McKay 09-09-2012 21:47

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by salsav91 (Post 1795703)
I absolutely love this plugin. I cant be on my server 24/7, so I like the idea that I am giving some power to new or unsure traders when I leave. Their is one problem that I think would be great if you could implement a possible fix in a future update. Sometimes I dont remember the entire name of my item so I will put in a partial and it sends me the information of another item. Case in point if I type in Bill's it will take me to something other than my intended target "Bill''s Hat". Now it would be great if rather than taking me straight to a item, if more names match the one I am searching for it will bring up a small secondary list showing available results and allowing me to choose the correct one.

Other than that this plugin is just great and I feel confident in keeping it on my server for a very long time. I know I am new here but I just want to say how awesome this plugin is.

On the slate for a future release. :)

I'm thinking something like check for ambiguity, and if there's more than one match, pop up a menu.

More than one item matched your request.
1. Baseball Bill's Sports Shine
2. Bill's Hat

0. Exit

Although if more than 9 items match, it won't display a menu. Prevents someone from typing !pc a and getting a menu with every single item that contains the character "a".

Horsedick 09-09-2012 21:57

Re: [TF2] backpack.tf Price Check
 
this was the same issue for the Anger but people figure out to type "The Anger" as apposed to just Anger.

Dr. McKay 09-09-2012 22:13

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by Horsedick (Post 1795716)
this was the same issue for the Anger but people figure out to type "The Anger" as apposed to just Anger.

Yeah, as it is currently, it'll grab the first result in the schema. L'Etranger is higher in the schema than The Anger is.

This issue is most noticed with crates/keys. Keys are higher in the schema than crates are. Therefore, !pc mann co. supply crate returns keys always. This can be overcome using !pc "mann co. supply crate", as quotes force an exact match (case-insensitive).

This will be easier when I implement a menu when multiple items match.

BBG_Theory 09-10-2012 00:35

Re: [TF2] backpack.tf Price Check
 
Dr. McKay, sometimes when the items are being updated, it says 600 before the item (top left of screen). Have you noticed that?

thoughts?

Again thanks so much for this plugin, folks love it and it is a huge help on the trade server!

Dr. McKay 09-10-2012 00:36

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by BBG_Theory (Post 1795777)
Dr. McKay, sometimes when the items are being updated, it says 600 before the item (top left of screen). Have you noticed that?

thoughts?

Again thanks so much for this plugin, folks love it and it is a huge help on the trade server!

I haven't noticed anything like this. Can you get a screenshot next time it happens?

BBG_Theory 09-10-2012 06:44

Re: [TF2] backpack.tf Price Check
 
sure, and I will reserve this spot to edit and post the SS

Edited http://steamcommunity.com/sharedfile...s/?id=95392840

Dr. McKay 09-11-2012 00:03

Re: [TF2] backpack.tf Price Check
 
Quote:

Originally Posted by BBG_Theory (Post 1795888)
sure, and I will reserve this spot to edit and post the SS

Edited http://steamcommunity.com/sharedfile...s/?id=95392840

It looks like a few days ago, the backpack.tf API was updated to include uncraftable prices, this is where the 600 is coming from. I'll update the plugin shortly.

Dr. McKay 09-11-2012 00:15

Re: [TF2] backpack.tf Price Check
 
Plugin updated to v1.3.0. Added support for uncraftable prices.

Roundcat 09-11-2012 09:13

Re: [TF2] backpack.tf Price Check
 
This is proving a big draw for players to my server - thanks for coming up with a simple to use plugin that's is super useful!


All times are GMT -4. The time now is 01:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.