Well after messing around with it a bit more, I think there is nothing wrong with my server and actually there is a flaw in the Arcanum NPC code causing oddities to not purchase. I find it hard to believe no one would have caught this before though, because the oddities can't be bought at all but the more expensive antiquities (low vs high) work just fine.
The code I posted in the comment above this one is actually for antiquities only, due to it only checking the following:
Code:
my $sql_query = "SELECT * FROM _high_dollar WHERE item = $criteria";
There is no equivalent check for FROM _low_dollar (which is oddities list of items) and therefore the Arcanum NPC doesn't reply when you try to buy one. I even tried out reversing this by changing the line to _low_dollar and it causes oddities to be purchasable but not antiquities, so the code all works it's just missing a check for which.
Unfortunately despite having some decent coding experience I'm struggling a little to fix this (to make both accessible at same time), because I've not used Perl before. I tried adding like this:
Code:
## Determines antiquities or oddities
if ($choice == 1) {
my $sql_query = "SELECT * FROM _high_dollar WHERE item = $criteria";
} elsif ($choice == 2) {
my $sql_query = "SELECT * FROM _low_dollar WHERE item = $criteria";
}
With a global var at the top of the file ( $choice = 0 ) and a $choice = 1 in antiquities / $choice = 2 in oddities (when you click either say link). However maybe I don't understand scope in Perl or something else is going wrong because doing this just seems to break purchases for both sides. I tried a few other things as well but they all either caused NPC to stop talking altogether, stop selling altogether, or only sell one side and not both.
I thought about fixing the SELECT statement so that it pulls from both high & low DB tables, but the problem there is they actually have a bunch of duplicate items between both tables, but the low ones are about a third the cost. So that introduces problems of its own.