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

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

Closed Thread
 
Thread Tools Display Modes
  #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
}
  #2  
Old 02-02-2014, 03:09 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Some of these not possible to make permanent? I tried the example of 1 2 ect. up to 10 and they would all go off at once.. then they disappear.
  #3  
Old 02-02-2014, 03:14 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by NatedogEZ View Post
Some of these not possible to make permanent? I tried the example of 1 2 ect. up to 10 and they would all go off at once.. then they disappear.
It's used for spell effects that are nimbuses, some examples are

Code:
plugin::PersistentNimbus(405, 406, 368, 369);
Shows as below:





I use it all the time
  #4  
Old 02-02-2014, 03:21 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Ah so can only use the nimbus type effects to stay permanently. Thank you sir This is a very nice plugin
  #5  
Old 02-02-2014, 03:22 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by NatedogEZ View Post
Ah so can only use the nimbus type effects to stay permanently. Thank you sir This is a very nice plugin
Thank you sir
  #6  
Old 03-02-2014, 12:44 AM
roonibrice
Banned
 
Join Date: Feb 2014
Location: LA
Posts: 10
Default

Cool plugin can't wait to try
  #7  
Old 05-04-2016, 02:16 PM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default Lua equivalent for global_player

I'm not sure if you can have both a global_player.pl and global_player.lua, but if you're using the .lua version here is the equivalent code that goes in event_enter_zone in global_player.lua.

Code:
-- Persistent Nimbus Plugin
function event_enter_zone(e)
  nlist = eq.get_entity_list();
  if (npc_list ~= nil) then
    for NPC in nlist.entries do
      local n = 0;
      if (NPC.GetEntityVariable("PersistentNimbus_" .. n) > 0) then
        while NPC.GetEntityVariable("PersistentNimbus_" .. n) > 0 do
          NPC.SpellEffect(NPC.GetEntityVariable("PersistentNimbus_" .. n), 500, 0, 1, 3000, 1, e);
          n = n + 1;
        end
      end
    end
  end
end
-- End Persistent Nimbus Plugin
  #8  
Old 12-12-2020, 07:09 AM
Liontooth
Fire Beetle
 
Join Date: Dec 2020
Posts: 22
Default

Is there a list of Nimbuses anywhere or do I just need to test 1 at a time to figure them all out? Searched the wiki but didnt see any info on them.
Closed Thread


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