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 |
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. |
|
+1 for Caryatis, learned so much from your post, thanks again mate for your useful, insightful and helpful comment, as always!
|
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. |
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.
|
All times are GMT -4. The time now is 03:15 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.