Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 08-11-2008, 04:34 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Adjustable Corpse Decay Timer Script

It took me a while to figure out how to make this work, but now it works like a charm as far as I have tested. This will allow you to adjust decay timers per NPC. This is mainly useful in cases where an NPC would normally have no loot at all. I will be using it in my experience only zone as well as on any quest spawned adds that have no loot. It should reduce client lag as well as maybe help server load slightly.

Code:
#Adjustable Corpse Decay Timer Script
#Decay Timer Is in Milliseconds
#This will only work on Empty corpses

my $entity_id;

sub EVENT_SPAWN {

$entity_id=$npc->GetID();

}

sub EVENT_DEATH {
   
my $corpse_id = $entity_list->GetCorpseByID($entity_id);

  if ($corpse_id->IsEmpty()) {
    my $corpse_decay = $corpse_id->CastToCorpse();
    $corpse_decay->SetDecayTimer(5000); }
 
}
This could possibly even be used in the global quest file, but I think it would be better if we can get something that does this added directly into the source. It would be awesome to have a rule to set globally for decay timers on empty corpses.

Please give feedback on this script if you try it and find that there are any issues with it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 08-11-2008, 07:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Pre-mature posting I guess lol. This quest works, but it currently only works for 1 NPC at a time. I am still working to make it so that it can be used in any scenario. Here is the thread where it is being worked on:

http://www.eqemulator.net/forums/showthread.php?t=25900

Once the quest is completed and tested enough to be considered complete, I will post the end result here in this thread.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


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 04:32 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