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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2012, 09:12 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Question Database Queries Through Quest Scripts?

Evening ladies/gents, I have a small question that will undoubtedly be annoying.

I am curious if there is any effective way to handle SQL updates/selects/deletes through the quest scripting system. I understand that the quest system is Perl, and I can do basic things through Perl & PHP. I am trying to find a more reliable way to handle instances than with qglobals. Is there a way to make qglobals more efficient or is there some secret to allowing an NPC(s) to allow SQL queries in the quest scripts?

-Hate
Reply With Quote
  #2  
Old 08-16-2012, 10:42 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

You can use the DBI module to access the database from perl. If memory serves there's a spawn plugin that uses it, just grep DBI in your quests/plugins directory for an example.

As for the purpose you've described, I'm not exactly sure what you mean by 'efficient'. Qglobals aren't inefficient and I don't see what you'll gain by using DBI in their stead. The only time I've ever had to step outside qglobals was for a special case with script-driven pets. If you're just managing instances with NPC's, the existing tools are more than enough.
Reply With Quote
  #3  
Old 08-16-2012, 10:44 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Seriously Dude? Its still on the first page...
Reply With Quote
  #4  
Old 08-17-2012, 06:06 AM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

+1 for Caryatis, learned so much from your post, thanks again mate for your useful, insightful and helpful comment, as always!
Reply With Quote
  #5  
Old 08-17-2012, 06:18 AM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

The link that Caryatis is referring to is http://www.eqemulator.org/forums/showthread.php?t=35216, which through the title, unless you knew what DBI was, you'd not know to look for it.

Also, in your plugins folder is GetSpawn2IDs.pl which is what Tabasco is referring to if you want to look at an example on how to use it.

But, Qglobals seems to be the way to go, they work for what they are needed for, I wouldn't mess with DBI unless it was absolutely necessary.

Good luck.
Reply With Quote
  #6  
Old 08-17-2012, 09:16 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Now had you taken the time to actually look at who posted that thread I linked, you might notice its the OP here. So while I wouldn't expect somebody as inbred as you to notice something like that, I would assume Hateborne should remember.
Reply With Quote
Reply


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 04:04 PM.


 

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