Jump to content

Script for tf2outpost.com


klenium

Recommended Posts

  • 2 weeks later...

Couldn't update the prices, because:

SyntaxError: Unexpected token u

 

I guess the new bp.tf update broke something?

 

Maybe generating a new token doesnt work not sure what it is.

 

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

I wrote an userscript for myself about a half year ago. I updated it in last month, and I can publish it now. A lot of other userscripts are outdated, don't support the v4 API, and this plugin works only in chrome (I'm using Firefox).

 

 

My script's features is at Github.

 

To use it, download and install...

Greasemonkey for Firefox

Tampermonkey for Chrome

Tampermonkey Beta for Opera

 

Then install the script from here.

 

Post here any bugs, or suggestions!

Can you edit the code a little bit so that when we create new trade in outpost, the item added directly get values in color yellow? this way its easy to distinguish the item name description and price.

For example this: http://i.imgur.com/KLgFr6Y.png

 

All it needs is append a BBCODE

Link to comment
Share on other sites

Can you edit the code a little bit so that when we create new trade in outpost, the item added directly get values in color yellow? this way its easy to distinguish the item name description and price.

For example this: http://i.imgur.com/KLgFr6Y.png

All it needs is append a BBCODE

I'll make it easyer to change that code in the next version, sometime later this month or August. I'm busy with other things right now.
Link to comment
Share on other sites

Can you edit the code a little bit so that when we create new trade in outpost, the item added directly get values in color yellow? this way its easy to distinguish the item name description and price.

For example this: http://i.imgur.com/KLgFr6Y.png

 

All it needs is append a BBCODE

Simply replace the code inside the switch statement starting on line 894 with the following:

case "1": q = "[color=#4D7455]Genuine[/color] "; break;
case "3": q = "[color=#476291]Vintage[/color] "; break;
case "5": q = "[color=#8650AC]Unusual[/color] "; break;
case "7": q = "[color=#70B04A]Community[/color] "; break;
case "9": q = "[color=#70B04A]Self-Made[/color] "; break;
case "11": q = "[color=#CF6A32]Strange[/color] "; break;
case "13": q = "[color=#38F3AB]Haunted[/color] "; break;
case "14": q = "[color=#AA0000]Collector's[/color] "; break;

(this also fixes the misspelling of "genuine" in the original script)

Link to comment
Share on other sites

I'll make it easyer to change that code in the next version, sometime later this month or August. I'm busy with other things right now.

Thank you. I understand by your comment that you are planning to add this feature in options/settings where one gets choice of choosing own color. :)

Link to comment
Share on other sites

Simply replace the code inside the switch statement starting on line 894 with the following:

case "1": q = "[color=#4D7455]Genuine[/color] "; break;
case "3": q = "[color=#476291]Vintage[/color] "; break;
case "5": q = "[color=#8650AC]Unusual[/color] "; break;
case "7": q = "[color=#70B04A]Community[/color] "; break;
case "9": q = "[color=#70B04A]Self-Made[/color] "; break;
case "11": q = "[color=#CF6A32]Strange[/color] "; break;
case "13": q = "[color=#38F3AB]Haunted[/color] "; break;
case "14": q = "[color=#AA0000]Collector's[/color] "; break;

(this also fixes the misspelling of "genuine" in the original script)

That is not what i want. It only appends the color to the single word texts above. I want to color prices seperately so they are clearly distinguishable from title names.

Check image here,

http://i.imgur.com/KLgFr6Y.png

Link to comment
Share on other sites

That is not what i want. It only appends the color to the single word texts above. I want to color prices seperately so they are clearly distinguishable from title names.

Check image here,

http://i.imgur.com/KLgFr6Y.png

To achieve that, change the code on line 931 to add the color tags around the price.

I.e. change the last bit of that line to something akin to

"[color=#FFD700]"+(noprice ? "" : pt.join(" + "))+"[/color]";
Link to comment
Share on other sites

Thank you. I understand by your comment that you are planning to add this feature in options/settings where one gets choice of choosing own color. :)

 

 

To achieve that, change the code on line 931 to add the color tags around the price.

I.e. change the last bit of that line to something akin to

"[color=#FFD700]"+(noprice ? "" : pt.join(" + "))+"[/color]";

I did little better this time. (I am no coder btw.)

http://pastebin.com/M4HR1hwjThis appearently solved most of the color coding (kinda like feature). However it does not append at the beginning of the item if it is normal item. for example a normal weapon or a key. I tried something at #896 but that doesnt seem to work :(.

 

Check if you can solve that small problem.

Link to comment
Share on other sites

Click on the link.

Ik, I clicked the link, took the api key from there. Now where do i put it...

Link to comment
Share on other sites

  • 4 weeks later...

Well, since it still gets fixes... sometimes... i can report a bug.

 

"Suggested value" of Strange normal nade launcher(whatever) = value of strange normal australium(!) nade launcher(440).

Link to comment
Share on other sites

  • 1 month later...

I wrote an userscript for myself about a half year ago. I updated it in last month, and I can publish it now. A lot of other userscripts are outdated, don't support the v4 API, and this plugin works only in chrome (I'm using Firefox).

 

 

My script's features is at Github.

 

To use it, download and install...

Greasemonkey for Firefox

Tampermonkey for Chrome

Tampermonkey Beta for Opera

 

Then install the script from here.

 

Post here any bugs, or suggestions!

 

I have a suggestion if you still take them, maybe make it if the script detects u no longer have the item in ur bp, it unhighlights it out of the trade

Link to comment
Share on other sites

1. Should probably add localStorage.removeItem("apikey") for "Invalid API Key" category. Else you can't change your invalid API key and that makes no sense.

 

2. Changing API in the settings doesn't seem to work for me (before getting any error messages). I click 'Change', paste new key, click 'Save', the settings are still the same.

 

3. And maybe allow 0% of strange parts/paints to be counted? It automatically resets to 50% paint 80% part

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 1 month later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...