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
  #6  
Old 11-09-2012, 03:41 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

No, that is not correct. You almost have the plugin correct, but you have extra script lines at the end that will break your plugins:

You should be able to delete this:
Code:
    return;

  # Sample code to work from
  my $random_result = int(rand(100));
    if(($combat_state == 1) &&($random_result<=50)){
    quest::say("Death!!  Death to all who oppose the Crushbone orcs!!");
   }else{
   quest::say("You've ruined your lands. You'll not ruin mine!");
 }
At the end of your plugin file you posted.

Next, you would want to call that plugin from your default.pl file. You do not want to put the default.pl directly in your quests folder, you want it in quests/templates/default.pl so it will effect all NPCs that do not already have a script associated with them.

Then, in that default.pl file, you would have the following code:
Code:
sub EVENT_COMBAT {
	plugin::defaultCombat();
}
That will make it call the plugin you added to restore their HPs to 100%.

As mentioned, any NPC that already has a script associated with them in your templates folder or in the quests zone folder for the zone they are in will still need to be modified to have the new plugin added to them. If they already have an EVENT_COMBAT, you would just need to add the plugin line "plugin::defaultCombat();" inside the EVENT_COMBAT. If they don't have an EVENT_COMBAT already, you would need to add the sub EVENT_COMBAT as I posted above for your default.pl file.

Since this seems to be a bit confusing to you, there is a MUCH easier way to accomplish what you are wanting to do without even having to worry about scripts at all. You can just edit your rule_values table and set " NPC:OOCRegen" to 100. This will make all NPCs regen to 100% about 6 seconds after it leaves combat.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 08:33 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3