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
  #4  
Old 06-22-2016, 11:09 AM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

I copy pasted mostly from a portion of code I already had written (however it was just a subroutine in a player.pl), added the $statuslevel and gave it a plugin filename. Sorry for not placing the plugin:: before UpdateStatus

Are you certain you have Perl DBI installed?

Also, I would up your logging (its my preferred setting anyway), do this in game:
Code:
#logs set gmsay 20 3
#logs reload_all
For testing, perhaps just keep it all confined within the NPC's script (for now). If it gives a warning about UpdateStatus being redefined (which would be good), just ignore it for now.

Code:
sub EVENT_SAY {
	if ($text=~/hail/i && $status == 0 && $ulevel=>10) {
		UpdateStatus($client->AccountID(),1);
	}
} 
	
sub UpdateStatus {
	my $idargument = $_[0];
	my $statuslevel = $_[1];
	my $dbh = plugin::MySQL_Connect();
	my $query = "UPDATE account SET status = ".$statuslevel." WHERE id = ".$idargument.";";
	$dbh->do($query);
	$dbh->disconnect();
	$client->UpdateAdmin();
}
Also providing this link, just in case:

http://wiki.eqemulator.org/p?Install..._other_Modules
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:58 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