EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   War Event (https://www.eqemulator.org/forums/showthread.php?t=34801)

Apoc.Index 01-29-2012 05:56 AM

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.

trevius 01-29-2012 07:16 AM

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);
        }

}


Apoc.Index 01-29-2012 07:50 AM

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.

joligario 01-29-2012 08:08 AM

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?

Apoc.Index 01-29-2012 08:11 AM

Yes All correct =)

joligario 01-29-2012 11:21 AM

Where did broadcast come from? Your own custom perl command?

trevius 01-29-2012 02:11 PM

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

Apoc.Index 01-30-2012 11:43 AM

Works perfectly, Thanks for the help Trevazar! Now I just need to figure out why people cant connect =/


All times are GMT -4. The time now is 08:55 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.