Skip to content

Commit

Permalink
only craft weapons if not exist in pricelist
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed Jul 23, 2020
1 parent df1f861 commit 93ef10a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/classes/MyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,8 @@ Autokeys status:-

this.craftweaponOnlyCraftable().forEach(sku => {
const weapon = currencies[sku].length;
if (weapon >= 2) {
if (weapon >= 2 && this.bot.pricelist.getPrice(sku, true) !== null) {
// Only craft if duplicated and not exist in pricelist
const combineWeapon = Math.ceil(weapon / 2);
for (let i = 0; i < combineWeapon; i++) {
this.bot.tf2gc.combineWeapon(sku);
Expand Down

0 comments on commit 93ef10a

Please sign in to comment.