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 01-29-2012, 05:56 AM
Apoc.Index
Sarnak
 
Join Date: Aug 2011
Posts: 67
Default War Event

Hello everyone I am attempting to recreate a war event as of right now, Its not working. But Ideally, I would like to make it a work on a random timer and If not defeated then it would spread to other zones. I'm not 100% certain how to make that happen, but Here is just the basics of what I have.

sub EVENT_SAY
{
if($text=~/hail/i)
{
plugin::Whisper("${name}, I can only be activated one way. Sorry");

}
if($text =~ /MYSECRETPASSWORD/i)
{
quest::broadcast("War! War! War is uppon Norrath! Venkars forces have been spotted in the Greater Faydark! We must drive them back or we risk the loss of Felwithe and the Greater Faydark!");
quest::shout("War is uppon us! The forces of Venkar have been sighted in the greater faydark! If they are not driven back we risk loosing not only the Greater Faydark, but Felwithe aswell!");
quest::spawn2(1254,0,0,-486.53,-2066.09,-0.09,$h); #1Scion
quest::spawn2(1254,0,0,-499.34,-2036.20,-0.09,$h); #1scion
quest::spawn2(1254,0,0,-509.26,-2015.23,-0.09,$h); #1Scion
quest::spawn2(1254,0,0,-474.10,2013.12,-0.09,$h); #1Scion
quest::spawn2(1254,0,0,-458.07,2047.01,-0.09,$h); #1Scion
quest::spawn2(1254,0,0,-427.74,-2057.92,-0.09,$h); #1scion
quest::spawn2(1254,0,0,-442.10,-2027.04,-0.09,$h); #1Scion
quest::spawn2(1254,0,0,-454.15,1996.12,-0.09,$h); #1Scion
quest::spawn2(1254,0,0,-455.67,-2019.79,-0.09,$h); #1Scion NAMED
quest::spawn2(1254,0,0,-120.84,43.00,0.73,$h); #2Kelethin
quest::spawn2(1254,0,0,-145.67,29.33,9.13,$h); #2Kelethin
quest::spawn2(1254,0,0,232.74,129.72,8.91,$h); #2Kelethin
quest::spawn2(1254,0,0,213.11,149.16,-0.09,$h); #2Kelethin
quest::spawn2(1254,0,0,616.66,64.11,77.72,$h); #2Kelethin
quest::spawn2(1254,0,0,630.73,65.39,77.72,$h); #2Kelethin
quest::spawn2(1254,0,0,623.67,26.01,94.81,$h); #2Kelethin
quest::spawn2(1254,0,0,628.96,-22.28,118.16,$h); #2Kelethin
quest::spawn2(1254,0,0,612.54,-24.89,118.16,$h); #2Kelethin
quest::spawn2(1254,0,0,627.98,-110.90,118.16,$h); #2Kelethin
quest::spawn2(1254,0,0,656.61,-89.39,118.16,$h); #2Kelethin
quest::spawn2(1254,0,0,671.28,114.67,118.16,$h); #2Kelethin
quest::spawn2(1254,0,0,706.00,-181.09,118.16,$h); #2Kelethin NAMED
quest::spawn2(1254,0,0,15.02,2400.53,19.24,$h); #3CB
quest::spawn2(1254,0,0,39.61,2390.61,19.21,$h): #3CB
quest::spawn2(1254,0,0,53.80,2423.32,19.28,$h); #3CB
quest::spawn2(1254,0,0,13.32,2454.70,19.42,$h); #3CB
quest::spawn2(1254,0,0,34.30,3478.50,19.45,$h); #3CB
quest::spawn2(1254,0,0,-7.11,2525.81,19.60,$h); #3CB
quest::spawn2(1254,0,0,-39.58,2511.76,19.60,$h); #3CB Named
quest::spawn2(1254,0,0,-106.64,-2494.43,2.84,$h); #4Lfay
quest::spawn2(1254,0,0,-1033.87,-2492.76,3.90,$h); #4Lfay
quest::spawn2(1254,0,0,-996.61,-2493.45,6.02,$h); #4Lfay
quest::spawn2(1254,0,0,-1042.26,-2530.59,3.75,$h); #4Lfay
quest::spawn2(1254,0,0,-1022.67,-2547.29,3.75,$h); #4Lfay
quest::spawn2(1254,0,0,-1085.58,-2592.19,3.75,$h); #4LFay Named
}

}

Some of the mob ID's will be changes as needed, but i just need to get it in working order first. If anyone has any improvements. I would love to see them!

Thanks.
Reply With Quote
  #2  
Old 01-29-2012, 07:16 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you get all of the plugins from the plugins repo here:

http://www.eqemulator.org/forums/showthread.php?t=32608

You can use my plugins for spawning in formations:

http://code.google.com/p/eqemuplugin...ation_tools.pl

Specifically, I think you would want to use:

Code:
#Usage: plugin::SpawnMixedFormation(LeaderMob, Distance, Columns, Rows, LeadDist=Distance, MaxZDiff=15, NPCID, NPCID...);
# Works just like SpawnInFormation, accept this allows mixing multiple NPCs into the formation
# Can add as many NPCIDs as wanted by appending to the end of the arguments
# NPCID is the NPC Type ID of the NPCs you want to form the squad formation with
# LeaderMob is the Client or NPC you want to spawn the formation behind (use invisible and/or temp NPC to show no leader)
# Distance is the distance each member of the formation will be from each other on both axis
# Columns is the number of columns you want in the formation
# Rows is the number of rows you want in the formation
# LeadDist is the distance you want the formation to be created behind the leader
# MaxZDiff is the maximum height above the leader that the best Z will be searched for
You would just need to create a "leader" NPC and put a script on him to spawn the squads around him as needed. You can make the leader invisible if needed.

Here is an example based on your script and I added a few random NPCIDs in there as well so you can see how to use multiple NPC IDs to spawn randomly in the squad:

Code:
sub EVENT_SAY
{
	if($text=~/hail/i)
	{
		plugin::Whisper("${name}, I can only be activated one way. Sorry");
	}
	
	# Check status if using GM test stuff
	if($status > 80 && $text =~ /spawn/i)
	{
		quest::broadcast("War! War! War is uppon Norrath! Venkars forces have been spotted in the Greater Faydark! We must drive them back or we risk the loss of Felwithe and the Greater Faydark!");
		quest::shout("War is uppon us! The forces of Venkar have been sighted in the greater faydark! If they are not driven back we risk loosing not only the Greater Faydark, but Felwithe aswell!");
		# Usage: plugin::SpawnMixedFormation(LeaderMob, Distance, Columns, Rows, LeadDist=Distance, MaxZDiff=15, NPCID, NPCID...);
		plugin::SpawnMixedFormation($npc, 15, 15, 15, 10, 15, 1254, 1253, 1252);
	}

}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 01-29-2012, 07:50 AM
Apoc.Index
Sarnak
 
Join Date: Aug 2011
Posts: 67
Default

Ok, thanks I see how that will work and I have created the Lead mobs, But what is confusing me is I need the one main NPC (Global War Trigger) to spawn those Lead mobs into the proper places arround the zone.

Here is what I have now.
This is for the Global war trigger NPC
sub EVENT_SAY
{
if($text=~/hail/i)
{
plugin::Whisper("${name}, I can only be activated one way. Sorry");
}

# Check status if using GM test stuff
if($status > 80 && $text =~ /spawn/i)
{
quest::broadcast("War! War! War is uppon Norrath! Venkars forces have been spotted in the Greater Faydark! We must drive them back or we risk the loss of Felwithe and the Greater Faydark!");
quest::shout("War is uppon us! The forces of Venkar have been sighted in the greater faydark! If they are not driven back we risk loosing not only the Greater Faydark, but Felwithe aswell!");
quest::spawn2(1254,0,0,-486.53,-2066.09,-0.09,$h); #1Scion
quest::spawn2(1255,0,0,-120.84,43.00,0.73,$h); #2Kelethin
quest::spawn2(1256,0,0,15.02,2400.53,19.24,$h); #3CB
quest::spawn2(1258,0,0,-106.64,-2494.43,2.84,$h); #4Lfay

}

}
--------------------------------------------------
Here is what I have for the four individual Leaders

sub EVENT_SPAWN
{
quest::setnexthpevent(95);
}
sub EVENT_HP
{

quest::shout("Minions, I am under attack! Aid me in battle!");
# Usage: plugin::SpawnMixedFormation(LeaderMob, Distance, Columns, Rows, LeadDist=Distance, MaxZDiff=15, NPCID, NPCID...);
plugin::SpawnMixedFormation($npc, 15, 15, 15, 10, 15, 1259, 1259, 1259, 1259, 1259);
}

}

--------------------------
The global trigger NPC wont respond past the trigger word of spawn. No broadcast or shout.
Reply With Quote
  #4  
Old 01-29-2012, 08:08 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Havent checked your code, but just some checks: your trigger npc is visible, targeted, and in range of your gm to hear the command? your account status is 81 or greater?
Reply With Quote
  #5  
Old 01-29-2012, 08:11 AM
Apoc.Index
Sarnak
 
Join Date: Aug 2011
Posts: 67
Default

Yes All correct =)
Reply With Quote
  #6  
Old 01-29-2012, 11:21 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Where did broadcast come from? Your own custom perl command?
Reply With Quote
  #7  
Old 01-29-2012, 02:11 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Also, you don't need to repeat the same NPC ID like you did:

Code:
plugin::SpawnMixedFormation($npc, 15, 15, 15, 10, 15, 1259, 1259, 1259, 1259, 1259);
If you want the whole squad to be the same NPC, you can just do this:
Code:
plugin::SpawnMixedFormation($npc, 15, 15, 15, 10, 15, 1259);
My example was just showing that you can mix in multiple NPCs if you want to have some variety. There is no limit to how many NPC IDs you can mix in.

And instead of quest::broadcast(), try using quest::we(), which is for world emotes. Here is the example:

Code:
quest::we(13, "War! War! War is upon Norrath! Venkars forces have been spotted in the Greater Faydark! We must drive them back or we risk the loss of Felwithe and the Greater Faydark!");

When using a quest function, make sure it is on this list:

http://www.eqemulator.net/wiki/wikka...=QuestTutorial

Or here if it is a quest object:

http://www.eqemulator.net/wiki/wikka...a=QuestObjects
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #8  
Old 01-30-2012, 11:43 AM
Apoc.Index
Sarnak
 
Join Date: Aug 2011
Posts: 67
Default

Works perfectly, Thanks for the help Trevazar! Now I just need to figure out why people cant connect =/
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 11:22 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