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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-24-2013, 12:16 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default Plugin: Persistent Nimbus

Purpose:

The purpose of this plugin was intended for setting Nimbus effects on NPC's persistently for all players. The problem with using any Nimbus is that the server does not always send Nimbus'es to new clients entering a zone, so this plugin is responsible for resending what the NPC has assigned to it.

When a client enters the zone after the nimbus was assigned to the NPC, it will only send the Nimbus packet to the client after an entity list iteration.


Name File: Akka_Custom.pl under plugins folder.

Code:
sub PersistentNimbus{
	$npc = plugin::val('$npc');
	$n = 0;
	while($_[$n]){ 
		$npc->SpellEffect($_[$n], 500, 0, 1, 3000, 1); 
		$npc->SetEntityVariable("PersistentNimbus_" . $n, $_[$n]);
		$n++;
	}
}
HOW TO USE:

Under global_player.pl under the templates or 'global' folder, this section of code needs to be placed underneath EVENT_ENTERZONE:

* Note you can assign as many as you want, you simply add more Nimbus #'s

Code:
plugin::PersistentNimbus(1, 2, 4, 5, 6, 7, 8, 9, 10);
Code:
sub EVENT_ENTERZONE {
	### Persistent Nimbus Plugin ###
	@nlist = $entity_list->GetNPCList();
	foreach my $NPC (@nlist){
		$n = 0;
		if($NPC->GetEntityVariable("PersistentNimbus_" . $n) > 0){
			while($NPC->GetEntityVariable("PersistentNimbus_" . $n) > 0){
				$NPC->SpellEffect($NPC->GetEntityVariable("PersistentNimbus_" . $n), 500, 0, 1, 3000, 1, $client);
				$n++;
			}
		} 
	}
	################################
}
Example Use, Assigning to an NPC:

This is an example of a default.pl for NPC's in a zone, this applies to many NPC's and has conditionals based on NPC name:

Code:
sub EVENT_SPAWN{
	$nn = $npc->GetCleanName();
	if($nn=~/pumpkin/i){ plugin::PersistentNimbus(550, 548, 611, 406); $npc->TempName(""); }
	if($nn=~/scare/i){ plugin::PersistentNimbus(550); }
	if($nn=~/zonein/i){ plugin::PersistentNimbus(445, 548, 516); $npc->TempName(""); }
	if($nn=~/ring/i){ plugin::PersistentNimbus(414); $npc->TempName(""); plugin::SetProx(25, 25); }
	if($nn=~/halloween orange/i){ plugin::PersistentNimbus(403); $npc->TempName(""); }
	if(($nn=~/minion of the underworld/i) && ($npc->GetRace() == 279)) { plugin::PersistentNimbus(473); } #Fairy thingie
	if(($nn=~/minion of the underworld/i) && ($npc->GetRace() == 293)) { plugin::PersistentNimbus(462); } #Imp
	if(($nn=~/minion of the underworld/i) && ($npc->GetRace() == 362)) { plugin::PersistentNimbus(319); } #Golem
	if(($nn=~/minion of the underworld/i) && ($npc->GetRace() == 270)) { plugin::PersistentNimbus(446); } #Undead
}
 


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 08:30 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3