PDA

View Full Version : Rathe Council Event (Custom with Timers, Signals and Spawn2)


trevius
03-24-2008, 10:45 AM
This is a custom event based loosely on the actual boss event in PoearthB from EQLive. I have the zone customized to be geared towards players of levels 50-65, so everything here can easily be adjusted to tune it towards higher level players if that is wanted. This quest could easily be changed to reflect the actual EQLive quest with only making a few changes if anyone cares to do so.

Before this event can begin, the Untargetable Leader of the Rathe Council must spawn. Upon spawning, he also spawns the 12 Rathe Councilmen to avoid possible exploits if they spawned like normal NPCs. When one of the Rathe Councilmen are attacked, it sets a 5 minute timer for the event and despawns the Untargetable Leader of the Rathe Council. The player(s) must then kill all 12 Rathe Councilmen before the timer wears off or the event will fail and the remaining Rathe Councilmen are depopped. If all 12 are killed within the 5 minute timer, then the boss of the zone is spawned and is now targetable. The players can then complete the encounter by beating the boss.

There are 4 NPC IDs involved in this quest. There are 12 Rathe Councilmen with the same NPC ID and 3 other individual spawns. It took me quite a while to figure out how to get this to work exactly as I wanted, but it seems flawless now. I am sure there is probably an easier way to do it, but this is the best way I could think of.


The Rathe Quest:
#############
#Quest Name: Rathe Council Event (The_Rathe Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: The Rathe, A Rathe Councilman, Leader of the Rathe Council, and Untargetable Leader of the Rathe Council
#Items Involved: N/A
#############
###NPC 1
#Name: The_Rathe (Custom Made NPC ID 2700426)
#Race 240 (TeleportMan), Texture 0, Size 5, gender 2, body type 11
#Location: 0, 0, -999 of the Plane of Earth B
#level: 80
#Type: Timer and Signal NPC to start and end the event
#Loot: N/A
#############

sub EVENT_SIGNAL {

if ($signal == 2) {
quest::settimer("event_start",310);
quest::shout("The Test of Rathe has begun. You have 5 minutes to complete this portion of the event.");
quest::depop(1216); }

if ($signal == 3) {
quest::settimer("rathe_spawn",10);
quest::signalwith(222008,4,0); }

if ($signal == 5) {
quest::stoptimer("rathe_spawn"); }

}

sub EVENT_TIMER {

if ($timer eq "event_start") {
quest::signalwith(222008,6,0);
quest::stoptimer("rathe_spawn");
quest::shout("You have failed the test!");
quest::stoptimer("event_start"); }

if ($timer eq "rathe_spawn") {
quest::stoptimer("event_start");
quest::stoptimer("rathe_spawn");
quest::spawn2(2700424,0,0,2053,414,-221,15); }

}


A Rathe Councilman Quest:
#############
#Quest Name: Rathe Council Event (A_Rathe_Councilman Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: The Rathe, A Rathe Councilman, Leader of the Rathe Council, and Untargetable Leader of the Rathe Council
#Items Involved: N/A
#############
###NPC 1
#Name: A_Rathe_Councilman (PEQ NPC ID 222008)
#Race 298 (TheRathe), Texture 0, Size 15, gender 2, body type 1
#Location: Multiple spawned by quest when the Untargetable Leader of the Rathe Council spawns.
#level: 55
#Type: Quest spawned NPCs that must all be killed within the 5 minute timer or event fails
#Loot: N/A
#############

sub EVENT_ATTACK {

quest::signalwith(1216,1,0);

}

sub EVENT_DEATH {

quest::signalwith(2700426,3,0);

}

sub EVENT_SIGNAL {

if ($signal == 4) {
quest::signalwith(2700426,5,0); }

if ($signal == 6) {
quest::depop(); }

}


Leader of the Rathe Council Quest:
#############
#Quest Name: Rathe Council Event (Untargetable Leader of the Rathe Council Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: The Rathe, A Rathe Councilman, Leader of the Rathe Council, and Untargetable Leader of the Rathe Council
#Items Involved: N/A
#############
###NPC 1
#Name: Leader of the Rathe Council (Custom Made NPC ID 1216)
#Race 298 (TheRathe), Texture 0, Size 50, gender 2, body type 11, NPC Special Attacks ABH
#Location: 2053,414,-221 of the Plane of Earth B
#level: 68
#Type: Untargetable NPC used to spawn Rathe Councilman and to begin the Event Timer
#Loot: N/A
#############

sub EVENT_SPAWN {

quest::spawn2(222008,0,0,1985,408,-207,64);
quest::spawn2(222008,0,0,2051,340,-207,255);
quest::spawn2(222008,0,0,2018,352,-207,31);
quest::spawn2(222008,0,0,1996,377,-207,46);
quest::spawn2(222008,0,0,1996,437,-207,91);
quest::spawn2(222008,0,0,2019,464,-207,113);
quest::spawn2(222008,0,0,2051,475,-207,134);
quest::spawn2(222008,0,0,2083,463,-207,150);
quest::spawn2(222008,0,0,2106,439,-207,173);
quest::spawn2(222008,0,0,2119,408,-207,199);
quest::spawn2(222008,0,0,2107,376,-207,217);
quest::spawn2(222008,0,0,2084,353,-207,242);

}


sub EVENT_SIGNAL {

if ($signal == 1) {
quest::signalwith(2700426,2,0); }

}


#Leader of the Rathe Council Quest:
#############
#Quest Name: Rathe Council Event (Leader of the Rathe Council Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: The Rathe, A Rathe Councilman, Leader of the Rathe Council, and Untargetable Leader of the Rathe Council
#Items Involved: N/A
#############
###NPC 1
#Name: #Leader of the Rathe Council (Custom Made NPC ID 2700424)
#Race 298 (TheRathe), Texture 0, Size 50, gender 2, body type 1
#Location: 2053,414,-221 of the Plane of Earth B (spawned by the completion of this event via quest)
#level: 68
#Type: Final Boss encounter once the event has been completed successfully
#Loot: Normal Boss loot for the zone
#############


sub EVENT_SPAWN {

quest::shout("You will now learn what it means to be the Leader of the Rathe Council!");

}

sub EVENT_DEATH {

quest::say("The Council has been defeated! You will pay for this!");

}


If there are any questions, or if help is needed, just let me know in a reply here.

So_1337
03-24-2008, 02:52 PM
Huge thanks! That's gonna be a large chunk of time saved :) Thanks for sharing!

trevius
03-24-2008, 03:31 PM
NP lol. I try to share any complex quests I write in case someone might find them or parts of them useful.

This one is actually fairly simple, but took a while for me to figure out how to make it work perfectly. The hardest part was getting the event timer to work without getting reset each time one of the 12 died (since they all use the same quest file). I kept trying to think of another way to do it but finally went with having the first councilman that is attacked send a signal to the untargetable boss and that boss will send a signal to The Rathe (invisible event timer), and then The Rathe starts the timer and depops the untargetable boss. This keeps the other 11 councilman from sending the signal to start the timer over again and again (since the pass through NPC is depopped).

And if you are trying to make the event similar to the one from EQLive, the main difference is that their timer starts when the first spawn dies, not when it is attacked. You can easily change the first signal to be sent in EVENT_DEATH to get that working properly. Also, you may want to change the passthrough signal NPC (the untargetable boss) to be invisible, as I don't think the Avatar of Earth spawns until after the event is completed. But, that should be it. The basics of it is all there. And it could be used in any other zone just as easily.

AndMetal
03-24-2008, 04:42 PM
This one is actually fairly simple, but took a while for me to figure out how to make it work perfectly. The hardest part was getting the event timer to work without getting reset each time one of the 12 died (since they all use the same quest file). I kept trying to think of another way to do it but finally went with having the first councilman that is attacked send a signal to the untargetable boss and that boss will send a signal to The Rathe (invisible event timer), and then The Rathe starts the timer and depops the untargetable boss. This keeps the other 11 councilman from sending the signal to start the timer over again and again (since the pass through NPC is depopped).

Kinda thinking out loud here, but couldn't you define a variable for The_Rathe (ID 2700426), maybe call it started, set it to 1 once the first Councilman (ID 222008 ) has been killed, and then set it back to undefined once the quest has either been completed or failed? Overall, it should make it a little simpler & cleaner. It should look something like this:

The_Rathe (ID 2700426):
#############
#Quest Name: Rathe Council Event (The_Rathe Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: The Rathe, A Rathe Councilman, Leader of the Rathe Council, and Untargetable Leader of the Rathe Council
#Items Involved: N/A
#############
###NPC 1
#Name: The_Rathe (Custom Made NPC ID 2700426)
#Race 240 (TeleportMan), Texture 0, Size 5, gender 2, body type 11
#Location: 0, 0, -999 of the Plane of Earth B
#level: 80
#Type: Timer and Signal NPC to start and end the event
#Loot: N/A
#############

sub EVENT_SPAWN {
quest::spawn2(222008,0,0,1985,408,-207,64);
quest::spawn2(222008,0,0,2051,340,-207,255);
quest::spawn2(222008,0,0,2018,352,-207,31);
quest::spawn2(222008,0,0,1996,377,-207,46);
quest::spawn2(222008,0,0,1996,437,-207,91);
quest::spawn2(222008,0,0,2019,464,-207,113);
quest::spawn2(222008,0,0,2051,475,-207,134);
quest::spawn2(222008,0,0,2083,463,-207,150);
quest::spawn2(222008,0,0,2106,439,-207,173);
quest::spawn2(222008,0,0,2119,408,-207,199);
quest::spawn2(222008,0,0,2107,376,-207,217);
quest::spawn2(222008,0,0,2084,353,-207,242);
}

sub EVENT_SIGNAL {

if ($signal == 2 && $started != 1) {
$started = 1; // The event has officially started, so don't keep doing this part
quest::settimer("event_start",310);
quest::shout("The Test of Rathe has begun. You have 5 minutes to complete this portion of the event.");
}

if ($signal == 3) {
quest::settimer("rathe_spawn",10);
quest::signalwith(222008,4,0);
}

if ($signal == 5) {quest::stoptimer("rathe_spawn");}

}

sub EVENT_TIMER {

if ($timer eq "event_start") {
$started = undef;
quest::signalwith(222008,6,0);
quest::stoptimer("rathe_spawn");
quest::shout("You have failed the test!");
quest::stoptimer("event_start");
}

if ($timer eq "rathe_spawn") {
$started = undef;
quest::stoptimer("event_start");
quest::stoptimer("rathe_spawn");
quest::spawn2(2700424,0,0,2053,414,-221,15); }
}

A_Rathe_Councilman (ID 222008 ):
#############
#Quest Name: Rathe Council Event (A_Rathe_Councilman Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: The Rathe, A Rathe Councilman, Leader of the Rathe Council, and Untargetable Leader of the Rathe Council
#Items Involved: N/A
#############
###NPC 1
#Name: A_Rathe_Councilman (PEQ NPC ID 222008)
#Race 298 (TheRathe), Texture 0, Size 15, gender 2, body type 1
#Location: Multiple spawned by quest when the Untargetable Leader of the Rathe Council spawns.
#level: 55
#Type: Quest spawned NPCs that must all be killed within the 5 minute timer or event fails
#Loot: N/A
#############

sub EVENT_ATTACK {
quest::signalwith(2700426,2,0);
}

sub EVENT_DEATH {
quest::signalwith(2700426,3,0);
}

sub EVENT_SIGNAL {
if ($signal == 4) {quest::signalwith(2700426,5,0);}
if ($signal == 6) {quest::depop();}
}

Anyways, just a thought.

trevius
03-25-2008, 08:45 AM
Looks like that would probably work just fine and shorten up the number of NPCs involved. I considered messing with some variables for it, but didn't know how to get it to do what you set up. Since mine is already working perfectly, I am not going to test that one out. But, I would imagine it should work. May need a little tweaking to define the variable beforehand, but I am definitely no master quest writer so I could be wrong.

Either way, it is very flexible. Thanks AndMetal for the suggestion.

Jibbatwinkers
03-25-2008, 08:53 AM
Thanks for posting this Trevius, I'll have to figure out a sweet way to implement this somewhere on Zebuxoruk. I appreciate you sharing it!

Dabloon
03-25-2012, 10:21 AM
I hate to be a newb but is there any way someone could give instructions on how to add these scripts to my server?

jsr
04-19-2012, 08:34 AM
I hate to be a newb but is there any way someone could give instructions on how to add these scripts to my server?

In your server folder structure is a quests folder, with a sub folder for each zone.

Save the script in the zone folder where the NPC spawns. The name of the script needs to be the NPC's name with a .pl suffix.

e.g. The_Rathe.pl

Each of the scripts Trevius gave here would be saved in a different file. He has documented the NPC names in the header of each script. These become the file names (suffixed with .pl)


If you've installed the PEQ database, the scripts in the pofire quest folder are a good example of how to setup scripts with signals. Take some time to get your head around what they do and you should be able to start making some decent scripts of your own.

chrsschb
04-19-2012, 08:53 AM
In your server folder structure is a quests folder, with a sub folder for each zone.

Save the script in the zone folder where the NPC spawns. The name of the script needs to be the NPC's name with a .pl suffix.

e.g. The_Rathe.pl

Each of the scripts Trevius gave here would be saved in a different file. He has documented the NPC names in the header of each script. These become the file names (suffixed with .pl)


If you've installed the PEQ database, the scripts in the pofire quest folder are a good example of how to setup scripts with signals. Take some time to get your head around what they do and you should be able to start making some decent scripts of your own.

Not trying to correct you, but you can also name scripts NPCID.pl. This is useful when you have npc names with special characters like apostrophes (dark elf names are great examples).

jsr
04-19-2012, 09:07 AM
Not trying to correct you, but..

Between everyone, we know everything there is to know :-)

chrsschb
04-19-2012, 09:24 AM
Between everyone, we know everything there is to know :-)

I just found that out like a month ago, ended up changing around a few npc names because of it. Wish I had known it sooner lol.

:grin:

joligario
04-19-2012, 10:40 AM
Not trying to correct you, but you can also name scripts NPCID.pl. This is useful when you have npc names with special characters like apostrophes (dark elf names are great examples).

You use a - in the file name in place of the `.