Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Plugins & Mods

Quests::Plugins & Mods Completed plugins for public use as well as modifications.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2014, 01:43 PM
dpjaf4t
Fire Beetle
 
Join Date: May 2010
Posts: 21
Default

Getting into this a bit late, maybe ...

Is there any point to updating the npcspecialattks field(s) to the 07/11/2013 'n^1' format and/or adding such as special_abilities field(s)?
Reply With Quote
  #2  
Old 12-26-2014, 07:29 PM
freewind1
Fire Beetle
 
Join Date: Dec 2009
Posts: 6
Default

i feel dumb but i cant seem to make this work, i copied and pasted
all 3 of the code snippets into their respective .pl and then placed all 3 in quest/global folder and also sourced the zonecontroller NPC & tables to the database, but for some reason this is not doing anything... (no editing has been done to the imported tables)

this is loadmysql.pl
Code:
sub LoadMysql_Old{	
	use DBI;
	use DBD::mysql;
	# CONFIG VARIABLES
	my $confile = "eqemu_config.xml"; #default
	open(F, "<$confile") or die "Unable to open config: $confile\n";
	my $indb = 0;

	while(<F>) {
		s/\r//g;
		if(/<database>/i) {
			$indb = 1;
		}
		next unless($indb == 1);
		if(/<\/database>/i) {
			$indb = 0;
			last;
		}
		if(/<host>(.*)<\/host>/i) {
			$host = $1;
		} elsif(/<username>(.*)<\/username>/i) {
			$user = $1;
		} elsif(/<password>(.*)<\/password>/i) {
			$pass = $1;
		} elsif(/<db>(.*)<\/db>/i) {
			$db = $1;
		}
	}
	# DATA SOURCE NAME
	$dsn = "dbi:mysql:$db:localhost:3306";
	# PERL DBI CONNECT
	$connect = DBI->connect($dsn, $user, $pass);
}

sub LoadMysql{	
	use DBI;
	use DBD::mysql;
	# CONFIG VARIABLES
	$host = 127.0.0.1;
	$user = "root";
	$pass = "Mypassword";
	$db = "peq";
	$dsn = "dbi:mysql:$db:localhost:3306";
	return DBI->connect($dsn, $user, $pass);
}
im using Akka's PEQ Server Repack


thanks for the help!
Reply With Quote
  #3  
Old 12-26-2014, 08:02 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Do you know that your DBI is even working?
Reply With Quote
  #4  
Old 12-26-2014, 10:12 PM
freewind1
Fire Beetle
 
Join Date: Dec 2009
Posts: 6
Default

yes it is working i used
Code:
sub EVENT_SAY {
if($text=~/Hail/i){
if(!$connect){ $connect = plugin::LoadMysql(); }
	$query = "SELECT
		cust_npc_scaling.level,
		cust_npc_scaling.type,
		cust_npc_scaling.hp,
		cust_npc_scaling.mana,
		cust_npc_scaling.mindmg,
		cust_npc_scaling.maxdmg,
		cust_npc_scaling.attack_speed,
		cust_npc_scaling.AC,
		cust_npc_scaling.STR,
		cust_npc_scaling.STA,
		cust_npc_scaling.DEX,
		cust_npc_scaling.AGI,
		cust_npc_scaling._INT,
		cust_npc_scaling.WIS,
		cust_npc_scaling.CHA,
		cust_npc_scaling.MR,
		cust_npc_scaling.CR,
		cust_npc_scaling.DR,
		cust_npc_scaling.FR,
		cust_npc_scaling.PR,
		cust_npc_scaling.hp_regen,
		cust_npc_scaling.npcspecialattks,
		cust_npc_scaling.spellscale,
		cust_npc_scaling.healscale
		FROM
		cust_npc_scaling
		ORDER BY cust_npc_scaling.level, cust_npc_scaling.type";
		$query_handle = $connect->prepare($query);
		$query_handle->execute();
		$NTYPE = 0; my @SD;
		while (@row = $query_handle->fetchrow_array()){ 
		$SD[$row[0]][$row[1]] = [@row];
		quest::say($SD[$row[0]][$row[1]])
		}
}
}
to test it

--------
Sorry for this post i found out why it wasn't working the copy and paste of the zonecontroller did not have #### in front of the insert into field for the zonecontroller NPC i failed miserably and sorry for wasting everyones time

Last edited by freewind1; 12-26-2014 at 10:38 PM.. Reason: not paying attention
Reply With Quote
  #5  
Old 12-26-2014, 11:03 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

You're not wasting anybody's time when you're consciously making an effort to help yourself.

It's good you got it figured out
Reply With Quote
  #6  
Old 12-27-2014, 12:37 AM
freewind1
Fire Beetle
 
Join Date: Dec 2009
Posts: 6
Default

Code:
#:::  INSERT INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `mana`, `gender`, `texture`, `helmtexture`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `alt_currency_id`, 
`npc_spells_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `attack_count`, `npcspecialattks`, `aggroradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`,
 `luclin_beard`, `drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `d_meele_texture1`, `d_meele_texture2`, `prim_melee_type`, `sec_melee_type`, `runspeed`, `MR`, `CR`, 
`DR`, `FR`, `PR`, `Corrup`, `see_invis`, `see_invis_undead`, `qglobal`, `AC`, `npc_aggro`, `spawn_limit`, `attack_speed`, `findable`, `STR`, `STA`, `DEX`, `AGI`, `_INT`, `WIS`, `CHA`, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, 
`exclude`, `ATK`, `Accuracy`, `slow_mitigation`, `version`, `maxlevel`, `scalerate`, `private_corpse`, `unique_spawn_by_name`, `underwater`, `isquest`, `emoteid`) VALUES (50, 'zonecontroller', NULL, 1, 240, 1, 11, 31, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, -1, 'ZiGH', 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 1.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, 80, 75, 75, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0);
This is the segment that was causing the zonecontroller.pl not to work do the multiple lines without a # in front of them, hope this helps the next person who tries this script and doesn't find it right off
Reply With Quote
  #7  
Old 12-27-2014, 12:39 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by freewind1 View Post
Code:
#:::  INSERT INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `mana`, `gender`, `texture`, `helmtexture`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `alt_currency_id`, 
`npc_spells_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `attack_count`, `npcspecialattks`, `aggroradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`,
 `luclin_beard`, `drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `d_meele_texture1`, `d_meele_texture2`, `prim_melee_type`, `sec_melee_type`, `runspeed`, `MR`, `CR`, 
`DR`, `FR`, `PR`, `Corrup`, `see_invis`, `see_invis_undead`, `qglobal`, `AC`, `npc_aggro`, `spawn_limit`, `attack_speed`, `findable`, `STR`, `STA`, `DEX`, `AGI`, `_INT`, `WIS`, `CHA`, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, 
`exclude`, `ATK`, `Accuracy`, `slow_mitigation`, `version`, `maxlevel`, `scalerate`, `private_corpse`, `unique_spawn_by_name`, `underwater`, `isquest`, `emoteid`) VALUES (50, 'zonecontroller', NULL, 1, 240, 1, 11, 31, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, -1, 'ZiGH', 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 1.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, 80, 75, 75, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0);
This is the segment that was causing the zonecontroller.pl not to work do the multiple lines without a # in front of them, hope this helps the next person who tries this script and doesn't find it right off
Yes you have to manually insert the NPC yourself.
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:29 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