So, items with commas in the description are a pain when the user sends a string of comma separated parameters to the function: eg:
Are we buying 3 items or two? It's hard for scripters, because they're not able to drop the errant comma and let fuzzy matching rule the day.
What I've got in this patch
1: notices when there's no match
2: adds the current itemName to the next itemName in the next round of the for loop
"Notes from the Elfpocalypse" + ", " + Chapter VI"
3: If that's null, try falling back to just "Chapter VI", because maybe the miss was a real miss.
But the results are sorta chatty, and might look like there was an error.
I'm open to suggestions for ways to handle it better.
I would also like to understand a bit more of the difference between "mallbuy" and "buy from mall", because it's not really clear to me what's happening with that. It may be acting strange because I'm in ronin...
buy from mall Notes from the Elfpocalypse, Chapter VI, herbs
Are we buying 3 items or two? It's hard for scripters, because they're not able to drop the errant comma and let fuzzy matching rule the day.
What I've got in this patch
1: notices when there's no match
2: adds the current itemName to the next itemName in the next round of the for loop
"Notes from the Elfpocalypse" + ", " + Chapter VI"
3: If that's null, try falling back to just "Chapter VI", because maybe the miss was a real miss.
But the results are sorta chatty, and might look like there was an error.
I'm open to suggestions for ways to handle it better.
I would also like to understand a bit more of the difference between "mallbuy" and "buy from mall", because it's not really clear to me what's happening with that. It may be acting strange because I'm in ronin...
Rich (BB code):
> buy from mall Notes from the Elfpocalypse, Chapter VI
notes from the elfpocalypse, chapter i
notes from the elfpocalypse, chapter v
notes from the elfpocalypse, chapter vi
[Notes from the Elfpocalypse] has too many matches.
Searching for "Notes from the Elfpocalypse, Chapter VI"...
Search complete.
Purchasing Notes from the Elfpocalypse, Chapter VI (1 @ 200)...
Purchases complete.
> buy from mall Notes from the Elfpocalypse, Chapter VI, herbs
notes from the elfpocalypse, chapter i
notes from the elfpocalypse, chapter v
notes from the elfpocalypse, chapter vi
[Notes from the Elfpocalypse] has too many matches.
Using cached search results for Notes from the Elfpocalypse, Chapter VI...
Purchasing Notes from the Elfpocalypse, Chapter VI (1 @ 200)...
Purchases complete.
Searching for "herbs"...
Search complete.
Purchasing herbs (1 @ 100)...
Purchases complete.
> buy from mall squidbait, herbs
[squidbait] has no matches.
[squidbait, herbs] has no matches.
Searching for "herbs"...
Search complete.
Purchasing herbs (1 @ 100)...
Purchases complete.
> buy from mall Notes from the Elfpocalypse, Chapter VI, squidbreath, herbs
notes from the elfpocalypse, chapter i
notes from the elfpocalypse, chapter v
notes from the elfpocalypse, chapter vi
[Notes from the Elfpocalypse] has too many matches.
Searching for "Notes from the Elfpocalypse, Chapter VI"...
Search complete.
Purchasing Notes from the Elfpocalypse, Chapter VI (1 @ 200)...
Purchases complete.
[squidbreath] has no matches.
[squidbreath, herbs] has no matches.
Searching for "herbs"...
Search complete.
Purchasing herbs (1 @ 100)...
Purchases complete.
> mallbuy Notes from the Elfpocalypse, Chapter VI, squidbreath, herbs
notes from the elfpocalypse, chapter i
notes from the elfpocalypse, chapter v
notes from the elfpocalypse, chapter vi
[Notes from the Elfpocalypse] has too many matches.
[squidbreath] has no matches.
[squidbreath, herbs] has no matches.
Desired purchase quantity not reached (wanted 1, got 0)