Go Back   EQEmulator Home > EQEmulator Forums > General > General::Server Discussion

General::Server Discussion Discussion about emulator servers.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old 11-01-2022, 04:36 AM
Vire70
Sarnak
 
Join Date: Apr 2010
Posts: 33
Default

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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:02 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3