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 10-29-2013, 08:59 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default lootable corpse/container

Hello again. Back in February I asked about this, but was focused more on the appearances than function.

What I would like is a lootable body that doesn't despawn until I explicitly tell it to. This is sort of like a ground-spawn container.

I've gotten around to implementing some of these ideas, and am stumped once again at this. The idea is that a player enters a zone and the corpse spawns. The player eventually runs across it, and is able to loot some item on the body (let's say a note).

If I create a regular corpse it might decay before the player saw it. If I call the Kill() method on the NPC, then the player gets no credit for the kill, and the corpse decays immediately. I have made sure that the NPC had
an item in its inventory hoping that it wouldn't be considered empty.

The corpse is gone before I can call SetDecayTimer().

I have tried to emulate NPC:eath and create a new corpse that way, but the corpse never appears (visually) in the zone. I can look it up on the entity list. Items are transferred from the original NPC to the corpse.

If I create a mob that appears dead, then I don't see how anyone could loot it. So I'm focusing on corpses for the moment.

Does anyone have any good ideas for me to try?
Reply With Quote
  #2  
Old 10-30-2013, 01:23 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

One work-around that I have tried is to create a level-1 npc and then call Damage() giving the client as the damage source.

This gives me the lootable corpse, but it also sends messages to the client about "xyz was hit for 100000 points of damage", and "you have slain xxx".

I cannot have the mob kill itself and then add a looter, since the corpse decays instantly. If it weren't for the fast decay, this would be ideal.

-- A quick update: changing the spell_id to 0 removes everything but the "You have slain xxx" message. I would like to get rid of this. The idea is to silently spawn a corpse and later depop it.
Reply With Quote
  #3  
Old 10-30-2013, 02:33 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

I have it working correctly. I gave the npc 10hp, had the client damage it for 9hp, and then had the npc finish itself off. With spell-id 0 there are no cast/land messages. Since the npc gets the kill shot, there is no message to the client.

The result is a lootable corpse. With a suitably long decay time, and a timer to reset the decay, the corpse can stay in zone for as long as needed. When I'm done with it I reset the decay time to 1 and it poofs.

Note: I was unable to use Depop or DepopCorpse to remove the corpse. I'm not sure what was going on here. But resetting the decay time gets the job done.
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 02:41 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