Skip to content

Commit 6fadc81

Browse files
authored
Merge pull request #226 from Manuito83/Kwack-Kwack-patch-1
Bazaar Auto Price - prevent prices below $2
2 parents febe604 + cb7a142 commit 6fadc81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

userscripts/Bazaar Auto Price (Torn PDA).js

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function lmp(itemID) {
3939
const prices = await torn_api(`market.${itemID}.bazaar`)
4040
if (prices.error) { APIERROR = true; return 'API key error' }
4141
const lowest_market_price = prices['bazaar'][0].cost
42-
return lowest_market_price - 5
42+
return Math.max(lowest_market_price - 5, 2)
4343
}
4444

4545
// HACK to simulate input value change
@@ -125,4 +125,4 @@ var waitForElementsAndRun = setInterval(() => {
125125
// wrapper not found
126126
}
127127
}
128-
}, 300);
128+
}, 300);

0 commit comments

Comments
 (0)