Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 08-04-2011, 08:38 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

I can't get this to work:
Code:
use DBI;

#database configuration information
$db="peq";
$host="localhost";
$user="root";
$password="password";

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

sub EVENT_SAY {
	if($text=~/Hail/i) {
		$client->Message(315,"I am attempting to connect to the database.");
		
		my $workOrderItem = $dbh->prepare("SELECT * from items where id = '11621'");
		$workOrderItem->execute();
		$client->Message(315,"Hey, I have apparently connected.");
		my @row = $workOrderItem->fetchrow_array();
		
		$client->Message(315,"--------$row[2]:---------'");
		$client->Message(315,"Damage: $row[49], Delay: $row[52]") ;  
		$client->Message(315,"HP: $row[75], Mana: $row[88]") ; 
		$client->Message(315,"Mana Regen: $row[89], HP Regen: $row[76]") ;
		$client->Message(315,"AC: $row[4], ATK: $row[12]");
		$client->Message(315,"STR: $row[11]") ; 		
		$client->Message(315,"STA: $row[10]") ; 		
		$client->Message(315,"AGI: $row[3]") ; 			
		$client->Message(315,"DEX: $row[7]") ; 		
		$client->Message(315,"WIS: $row[26]") ; 		
		$client->Message(315,"INT: $row[8]") ; 		
		$client->Message(315,"CHA: $row[6]") ; 		
		$client->Message(315,"PR: $row[97]") ; 		
		$client->Message(315,"MR: $row[93]") ; 		
		$client->Message(315,"DR: $row[55]") ; 		
		$client->Message(315,"FR: $row[71]") ;			
		$client->Message(315,"CR: $row[48]") ; 	
		$client->Message(315,"Haste: $row[73]");
	}
}
The only thing I get is: "I am attempting to connect to the database."

Any ideas?
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 07:13 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