-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🩹 improvement on PPU (#506) #520
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✨ add new "isPartialPriced" key in pricelist entry
- Since the new partial price will make the buy order price static, if someone had their `offerReceived.overstocked.acceptOverpay` set to `true`, then the bot will always accept although it is using the old buying price. - This patch will put the offer to review.
Merged
idinium96
added a commit
that referenced
this pull request
Apr 6, 2021
#548 ## Improvements/Major Changes - 🩹 improvement on PPU - closes issue #506 (read #520) - once updated to v3.8.0, your pricelist.json is no longer usable on the lower versions. - only effective on newly bought items. ## Added - ✨ an option to show detailed time taken (#549) - new options: `tradeSummary.showDetailedTimeTaken` (default is `true`). ## Changed - 🔨 include the old group name in high-value disabled item notification (#544) ## Fixes - 🔨 fixed bot crash if enableSocket set to false (#543) - 🐛 possible fix negative profit when accepting invalid items (#545, a344d0d) - 🔨 fixed catch the wrong error while updating `oldPrices` (mostly if use custom pricer) (#547)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #506
The old logics: #337
The new logics:
New pricelist entry key (or parameter):
isPartialPriced
- ✨ add new "isPartialPriced" key in pricelist entry #525group
parameter stays intact.New options added:
sendAlert.partialPrice.onResetAfterThreshold
(default istrue
).sendAlert.partialPrice.onBulkUpdatePartialPriced
(default istrue
).General Information
Precautions⚠️
OVERSTOCKED
reason with their side value is MORE than our side value.offerReceived.overstocked.autoAcceptOverpay
totrue
, the bot will not automatically accept it ifisPartialPriced
parameter istrue
(meaning partial price is still active on that particular item).Codes
A. On price change/update old prices
tf2autobot/src/classes/Pricelist.ts
Lines 1000 to 1097 in 4ea8c1c
B. On item sold out
tf2autobot/src/classes/MyHandler/offer/accepted/updateListings.ts
Lines 125 to 130 in 4ea8c1c
tf2autobot/src/classes/MyHandler/offer/accepted/updateListings.ts
Lines 347 to 402 in 4ea8c1c
Codes crackdown:
(1)
The bot will first determine if this option is enabled, and that particular item is (i) currently in stock, (ii) does not exceed the time threshold, (iii) is not excluded item(s), AND (iv) the max is only set to 1:tf2autobot/src/classes/Pricelist.ts
Lines 1009 to 1013 in 4ea8c1c
tf2autobot/src/classes/Pricelist.ts
Line 1027 in 4ea8c1c
(1.1)
if(1)
istrue
, the bot will then determine if (i) the item already hasisPartialPriced
set totrue
, (ii) the difference between the new selling price and the current buying price is negative or zero, OR (iii) the buying price changed:tf2autobot/src/classes/Pricelist.ts
Lines 1037 to 1038 in 4ea8c1c
tf2autobot/src/classes/Pricelist.ts
Line 1050 in 4ea8c1c
(1.1.1)
if(1.1)
istrue
, then the bot will check if (i) the new selling price is more than the current buying price, OR (ii) the new selling price is more than the current selling price. Iftrue
, then we update ONLY the selling price.tf2autobot/src/classes/Pricelist.ts
Lines 1051 to 1053 in 4ea8c1c
(1.1.2)
else if(1.1.1)
isfalse
, the bot will update the selling price with an addition of 1 scrap from the buying price (the minimum profit).tf2autobot/src/classes/Pricelist.ts
Lines 1054 to 1057 in 4ea8c1c
(1.2)
else if(1.1)
isfalse
, if the itemisPartialPrice
isfalse
, the bot will update the prices as usual.tf2autobot/src/classes/Pricelist.ts
Lines 1071 to 1078 in 4ea8c1c
(2)
else if(1)
isfalse
, the bot will first check if that particular item'sisPartialPriced
isfalse
, OR if it'strue
, then check if it's already exceeded the time threshold OR no longer in stock. If everythingtrue
, the bot will update the prices as usual and resetisPartialPriced
tofalse
.tf2autobot/src/classes/Pricelist.ts
Lines 1080 to 1093 in 4ea8c1c
B. On item sold out
- When that particular item is sold out, the bot will update the buying and selling prices to the latest prices.tf or custom pricer, and
isPartialPriced
parameter will be reset tofalse
.Some screenshots:
1
The bot bought for 18.66 ref:
The PPU in action:
Loss prevented by selling it at 18.77 ref instead of the current selling price of 16.22 ref:
2 (updated)