Skip to content
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

Calculating item cost from two Arx packages is more expensive than getting the larger Arx package #1

Open
DaftMav opened this issue Nov 7, 2024 · 1 comment

Comments

@DaftMav
Copy link

DaftMav commented Nov 7, 2024

The way you're calculating the cost feels a bit off as it is more costly to buy two smaller Arx packages than one larger Arx package.

Currently if an item costs 12000 Arx it will use the 8500 package cost plus part of the 5000 package cost for what's leftover (4000). But this is of course more expensive than simply buying the 16800 package. And if you want that buy that specific item I think most people would rather buy the bigger package instead of buying two smaller ones, because that will be more expensive per Arx recieved.

So I've forked the script and have been tinkering a bit. I initially just wanted to add a discount-% calculation for each Arx package on the Arx purchase page but then I noticed the issue of how the item prices were calculated... So I changed that as well and added a few settings, like being able to force it to always use the price of one specific Arx package. I found this useful after buying the 25500 Arx package and wanting to see what items would cost with the cost of that Arx package.

There's also an issue with the window load event not triggering so the script wouldn't run most of the time. It's because the window load event is only fired when the entire page has been loaded, including all resources like scripts, style sheets and images. This is unreliable especially with ad/privacy blockers preventing certain files to load. In my fork I've replaced it with a DOMready() function that triggers earlier and it always works.

Have a look at my fork here: https://github.com/DaftMav/ArxConverter
I've updated the readme as well with the changes and new screenshots. Btw if you look at the discount-% with the USD prices and it looks like their discounts are wrong in comparison to GBP/EUR it's not, I had to double check and calculate it manually but it's correct they just have terrible discount-% except for the largest Arx package.

If you like the changes I can do a pull request but I think I messed up a bit with creating a branch on github instead of locally so it's gotten a bit messier with the commits than I intended, it's been a while since I used git.

@ShadowLp174
Copy link
Owner

Thanks for the feedback. That window event not being fired is interesting, I too have an ad blocker installed and it has always worked for me. Thanks for fixing it

I'll definitely have a look at your improvements but in the meantime a PR is probably best (I don't mind messy commits ;)). If you don't mind you could enable edits to your pull requests so I can make changes in case I find anything :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants