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 09-22-2009, 06:31 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default Spawning a mob on a player death & loc

Been tinkering with this one for a bit, can't quite get it to work. What would it take to spawn a mob where a PC dies after an NPC dt's them?
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
  #2  
Old 09-22-2009, 06:57 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Is the DT simply in the NPC's spell list, or is it being trigger via a perl script?
Reply With Quote
  #3  
Old 09-22-2009, 07:08 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

via quest script it'd be something like ...
use sub EVENT_SLAY - Triggers when the mob kills a client.
then figure out where the player is, hmm.. can't think of how to do that offhand. (how to get x/y/z of client), But once you get the player/client's coordinate, you spawn mob at it. I think you can typecast the client to a mob and use GetX(), something like... $client->CastToMob()->GetX() ? This is more or less a guess with zero testing. Trying to feed you some tinkering suggestions at least. :3

Oh, JUST when a mob DT's them? Not sure the spell that killed the player is tracked via quests... But anything is possible with a slight source mod worst case.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #4  
Old 09-22-2009, 07:18 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

I'm building it into the DT script.
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
  #5  
Old 09-22-2009, 07:36 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Code:
if($timer eq "DT") {	
   			quest::shout("Testing");
		  my $list_check = 0;
		  for ($list_check = 0; $list_check < 1500; $list_check++) {
          $client_search = $entity_list->GetClientByID($list_check);     
			if ($client_search) {    
			my $ClID = $client_search->GetID();
			$npc->CastSpell(982,$ClID);
			my $x;
			my $y;
			my $z;
			my $h;
			$spawner = $ClID->CastToMob();
			$x = $spawner->GetX();
			$y = $spawner->GetY();
			$z = $spawner->GetZ();
			$h = $spawner->GetHeading();			
			quest::spawn2(99999,0,0,$x,$y,$z,$h);
			$counter = 0;
			}
		  }
	}
here's what I've been testing with & doesn't work so the CastTo isn't taking I don't think.
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
  #6  
Old 09-22-2009, 11:08 PM
Wesell
Sarnak
 
Join Date: Mar 2009
Location: none
Posts: 30
Default

You probably want to try that on the client instead of the id.
Code:
$spawner = $client_search->CastToMob();
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 12:33 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