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 06-08-2009, 05:19 AM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

I almost got something working, the problem I am having is getting the casting mob to recognize the target mob's Entity ID.

Unless I am doing something wrong the following lines do not reveal a mob's Entity ID by type, target, or name:

PHP Code:
$entity_list->GetMobByNpcTypeID(get_id);
$entity_list->GetMobID(id);
$entity_list->GetMob(name); 
I've got the NPC casting on itself and I can get the mob to recognize its own Entity ID, I just can't get an Entity ID from some other mob or transfer that variable to another mob's script.

PHP Code:
sub EVENT_SPAWN {
        
    
$npc->GetID();                 #returns this mob's Entity ID
        
quest::settimer(1,10);
    
}

sub EVENT_TIMER {

    if (
$timer == 1) {
    
$npc->CastSpell(2110,$mobid);   #casts skin like wood on this NPC
    
}    

Reply With Quote
  #2  
Old 06-08-2009, 07:05 AM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

We can get a mob's Entity ID from #listnpcs and #showstats, but how can we use/apply that to get and Entity ID by NPCtype or by Target or Name?
Reply With Quote
  #3  
Old 06-08-2009, 08:16 AM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

Ok I finally got it. A bizaare method but it works. I am sending the NPC's Entity ID as a signal to the other mob.

Code:
#this npc has an ID of 2900000
#this NPC will be casted on by another NPC with an ID 2900001

sub EVENT_AGGRO {

   $myeid = $npc->GetID();	           #get this npc's Entity_ID
   quest::spawn2(2900001,0,0,22,16,0,166); #spawn the casting NPC #change the loc
   quest::settimer("signal",5);            #give time for spawning
   

}


sub EVENT_TIMER {

   if ($timer eq "signal") {
	quest::signalwith(2900001,$myeid,0); #send Enity_ID as a signal to casting NPC
	quest::stoptimer("signal");
   }
}

Code:
#this npc has an ID of 2900001
#this npc will cast on NPC with an ID of 2900000

sub EVENT_SPAWN {
                        
   quest::settimer(1,15); #time before I start casting
 
}

sub EVENT_SIGNAL {

   if ($signal => 1) {
	$eid = $signal; #transfering the signal number for use in CastSpell
	
   }
}

sub EVENT_TIMER {

   if ($timer == 1) {
	$npc->CastSpell(13,$eid);   #casts a reapeating complete heal on the other NPC
   }	
}
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 04:58 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3