Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-26-2015, 01:12 AM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default Large SQL statements in a quest?

Is it possible to do something like this

Code:
use DBI;
#database configuration information
$db="DATABASECORRECT";
$host="localhost";
$user="USERCORRECT";
$password="PASSWORDCORRECT"; 

#connect to MySQL database
my $dbh = DBI->connect ("DBI:mysql:database=$db:host=$host", $user, $password);



sub EVENT_SAY 
{ 
	my $wares = quest::saylink("wares", 1);
	if($text=~/Hail/i)
	{
		plugin::Whisper("Would you like me to reset my $wares ?") ;
	}
	if($text=~/wares/i)
	{
	plugin::Whisper("Restocking now!") ;
	my $Sql1 = $dbh->prepare("Delete from Merchantlist_temp where npcid =999260;");
	$Sql1->execute( );
	plugin::Whisper("Restock complete!") ;
	}
}
But I need it to run approximately 60 Sql statements?
Eventually on a timer like every 2 hours? I only set it up as a manual Hail so i could test it.

Everything works up until clicking Wares. The NPC says restocking now and then nothing

Questerrors command shows the Npc then a number of Boxes or something after that...

Any help with this would be greatly appreciated.
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 05:16 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3