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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2023, 09:23 AM
Keerok
Fire Beetle
 
Join Date: Feb 2013
Posts: 11
Default Custom NPC spawn

Hi, i am pretty new to making custom scripts, just wondering how to do the following if possible

I would like a npc to shout in zone if another rare pop npc spawns rather the the actual rare shouting if it spawned
NPC A = watch npc
NPC B = rare spawn

I have the watcher set to invis/untargetable etc and the rare npc set to a low chance to spawn, just trying to figure a way to make the watcher shout if it spawns

Or if there is a better way to do it -)

Thanks for any info
Reply With Quote
  #2  
Old 06-02-2023, 09:52 AM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 198
Default

I am not sure what scripting language you are using, or if signals are still appropriate, but...

One easy way would be to have the rare npc signal the watcher npc when it spawns. Watcher npc shouts when it receives signal.
__________________
https://www.project1999.com
Reply With Quote
  #3  
Old 06-02-2023, 10:30 AM
Keerok
Fire Beetle
 
Join Date: Feb 2013
Posts: 11
Default

Thank you for the quick responce, I looked into the signals and got it working.
Thank you again -)
Reply With Quote
  #4  
Old 07-23-2023, 03:41 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

Yes, it's been a while since I was on here but I'm back and thought I'd start by trying to help answer some questions for those writing scripts. I know I'm not even close to the knowledge of some on here, but in the process of relearning this to start up my old EMU server, I'll try to answer some of your coding questions.

This one seems quite easy to accomplish, as nilbog suggested, just have the named NPC signal to a monitoring (watch) npc that it has spawned. I have attached the code you'll need. I prefer Perl so translate to lua as you wish.

As I mentioned, it's been a time since posting on here, and I may or may not have remembered the proper syntax for attaching code. Apologies.

Code:
#Watch npc, your NPC A (1000) change ID from 1000 to match your NPC A watch npc
#Add the following code to your NPC A Perl file.

sub EVENT_SIGNAL {
	if ($signal == 1) {
		quest::shout("Some named NPC has spawned!");
	}
}

#Named mob, your NPC B (1001) change ID from 1001 to match your NPC B named mob
#Add the following code to your NPC B Perl file.

sub EVENT_SPAWN {
	quest::signalwith(1000, 1); #let NPC A know I spawned, change ID from 1000 to match your NPC A
}
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:55 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