Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2008, 04:15 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I am getting closer! At least now I can get the corpse to actually delete or decay using one of these 2 options:

Delete Corpse:
Code:
my $deadnpc = $entity_list->GetCorpseByName("Tiny_Albino_Rat's corpse445");

  if ($deadnpc) {
    my $delete_corpse = $deadnpc->CastToCorpse();
    $delete_corpse->Delete(); }
    
    quest::say ("$deadnpc");

}
Decay Corpse after 1 Second:
Code:
my $deadnpc = $entity_list->GetCorpseByName("Tiny_Albino_Rat's corpse445");

  if ($deadnpc) {
    my $delete_corpse = $deadnpc->CastToCorpse();
    $delete_corpse->SetDecayTimer(1); }
    
    quest::say ("$deadnpc");

}
This option works as well for specifying the corpses:
Code:
my $deadnpc = $entity_list->GetCorpseByID(631);
Now, if I can just figure out how to do it without having to be so specific as to put the exact name or ID I want to delete... I will keep you all informed if I come up with a solution.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 08-10-2008, 04:37 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

This is promising! This isn't exactly what I want just yet, but I think it can definitely be useful. This will delete all corpses in the zone:

Code:
$entity_list->DeleteNPCCorpses();
I still want to be able to specify which ones I want to delete.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 08-10-2008, 04:58 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Maybe this can help for automatically poofing empty corpses:

Code:
$corpse->IsEmpty();
Now, if I can only figure out how to make them target their own corpse when they die, or something to that effect.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 08-10-2008, 07:14 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

This seems to work to only delete the corpse if it is empty:
Code:
my $deadnpc = $entity_list->GetCorpseByName("Tiny_Albino_Rat's corpse423");

  if ($deadnpc->IsEmpty()) {
    my $delete_corpse = $deadnpc->CastToCorpse();
    $delete_corpse->SetDecayTimer(1); }
The only thing left is to figure out how to select corpses without having to provide an exact name or entity ID number.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 08-10-2008, 09:13 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,500
Default

Maybe there is a GetCorpseByType?
Reply With Quote
  #6  
Old 08-10-2008, 09:04 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I am just going off of the list of Quest Objects from the Wiki here:

http://www.eqemulator.net/wiki/wikka...a=QuestObjects

I don't see anything there that will do what I need exactly. Unless maybe more were added that just aren't in the Wiki yet.

What I really need is either a way for an NPC to somehow identify it's corpse via exact name or entity ID, or a way to have the script look at all corpses in the zone.

I am not at home right now, but maybe something like this would work to have it check all corpses in the zone:

Code:
my $deadnpc = $entity_list->IsNPCCorpse();

  if ($deadnpc->IsEmpty()) {
    my $delete_corpse = $deadnpc->CastToCorpse();
    $delete_corpse->SetDecayTimer(1); }
I am doubtful, as I don't think that is actually getting anything, but rather for checking if it is a corpse or not. I will test it later tonight. But, I am definitely open to suggestions
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 08-11-2008, 04:36 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Woot! I finally figured it out!

http://www.eqemulator.net/forums/sho...131#post154131

Now, I just need to do some in depth testing on it. My only concern is the variables possibly being used by multiple NPCs and causing the IDs to not match up. But, so far my testing shows that it at least works!
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

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 10:59 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