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
  #3  
Old 05-03-2011, 07:34 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You can add the sub below and it should work to do what you are wanting. If you name the file default.pl, and put it in the specific zone folder you want this effect to work in, or in templates folder for all zones, it will work on any NPC that doesn't already have a script associated with it.

default.pl
Code:
sub EVENT_COMBAT {

	# Activated when first engaged into combat
	if ($combat_state)
	{
		# Check if they have buff with spell id 11 - Courage - example
		if ($client && $client->FindBuff(11))
		{
			# Check if they have already doubled their loot table once
			if(!$npc->EntityVariableExists(1))
			{
				# Double the loot table
				$npc->AddLootTable();
				# Set an entity var so they don't double it again
				$npc->SetEntityVariable(1, 1);
			}
		}
	}

}
Note, I haven't actually tested this, but it should work or be really close to functional.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 

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 11:35 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