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 03-04-2012, 06:12 PM
blackdragonsdg
Dragon
 
Join Date: Dec 2008
Location: Tennessee
Posts: 656
Default

A couple of years ago I toyed around with level restricted and status based progression and while I never mastered controlling the sql execution with in a quest script the following might help you get started.

Using the example below....After Cazic Thule was killed I would spawn the Ghost_of_Fear which would cause the entire script to execute. The sql execution is uncontrolled once this script starts which is the part I never mastered.

Ghost_of_Fear.pl
Code:
sub EVENT_SPAWN {
quest::settimer(55,1200);
quest::shout2("Cazic Thule has fallen...Ruins of Kunark is now available")
}

use DBI;

# connect
my $dbh = DBI->connect("DBI:mysql:database=peq;host=localhost", "root", "password", {'RaiseError' => 1});

# execute update query
my $columns = $dbh->do("update zone set min_level = 0 where expansion = 2;");

# disconnect
$dbh->disconnect();


sub EVENT_TIMER {
if($timer == 55) {
	quest::stoptimer(55);
	quest::depop();
	}
}
If you can make the sql execution controllable then you would be set and can do so from within Cazic Thules script instead of a secondary spawns script. You will need a couple of add ons for perl to get this to work...DBD-mysql and DBI I think were the only ones that were required but I added the following as well DBD-mysqlPP, MySQL-Config, MySQL-DateFormat, MySQL-Easy, MySQL-Insert, MySQL-Locker, MySQL-Log-ParseFilter, MySQL-NameLocker, MySQL-Sandbox and MySQL-SlowLogFilter.
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 10:12 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