LazyDope / avrae-stuff

Here you will find my aliases that I've made public.
5 stars 2 forks source link

`buy` command fixes / improved flexibility #5

Closed steffleupagus closed 2 years ago

steffleupagus commented 2 years ago

What Alias/Snippet is this for?

bag

Summary

Error: When specifying an item that didn't exactly match one of the keys in weightDict, was throwing a divide by zero error. Fix: bundle = matchItem.get("bundle", 1) if typeof(matchItem) == 'SafeDict' else 1

Improvement: Added function to grab a list of fuzzy/partial matches. The buy command will now only do the buy if it has a match, and show some options if an exact match couldn't be found. "buy dag" will work to buy a dagger, "buy sword" will list the items that contain the word 'sword'.

Checklist

PR Type

steffleupagus commented 2 years ago

My first PR. Let me know if I did it right! 😀