EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::Server Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=601)
-   -   Solo Server Package 2021 (https://www.eqemulator.org/forums/showthread.php?t=43486)

Vire70 11-01-2022 04:36 AM

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.

shadowedlegacy 12-15-2022 08:05 PM

your link for the tinyurl requires permission to access, which i submitted but still cant access the file on google drive.

EQBasic 12-15-2022 10:37 PM

according to this thread: http://www.eqemulator.org/forums/showthread.php?t=43745 these support forums are slowly being faded out. I think all those links have been removed intentionally.

edit: ok, I see what huppy meant on website in his signature now

Kingly_Krab 12-15-2022 10:50 PM

Quote:

Originally Posted by EQBasic (Post 268644)
according to this thread: http://www.eqemulator.org/forums/showthread.php?t=43745 these support forums are slowly being faded out. I think all those links have been removed intentionally.

For faster and more reliable communication, we definitely recommend using our Discord server if at all possible. These forums eventually will become a public archive and posting functionality may go away entirely.


In case anyone needs a link, you can join here: https://discord.com/invite/dUjQtvTm


All times are GMT -4. The time now is 04:00 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.