Marvin's Quest:
Code:
#############
#Quest Name: Lost Love (Marvin Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: Undead_Serra, Marvin, Serra, Khrix
#Items Involved: Potion of Unlimited Invisibily, Potion of Infinite Invis to Undead, Gnomish Potion of Regeneration
#############
###NPC 1
#Name: Marvin
#Race 1 (Human), Texture 0, Size 6, gender 0, body type 1
#Location: Zone in of the Estate of Unrest
#level: 25
#Type: Quest NPC
#Loot: N/A
#############
sub EVENT_SAY
{
if ($text =~/Hail/i && $find_serra == undef) {
quest::say ("Oh where, oh where is my [Serra]? She has been missing for days now."); }
if ($text =~/serra/i && $find_serra == undef) {
quest::say ("Serra is my beautiful wife. The last report I heard was that she was here in the Estate of Unrest and may have been swimming in the [water] here."); }
if ($text =~/water/i && $find_serra == undef) {
quest::say ("I have heard rumors that there are secret underwater caves in this area. If you can find her, please tell her I am looking for her."); }
#If the player has spoken with Serra, Marvin gives the global find_serra 1 response
if ($text =~/Hail/i && $find_serra == 1) {
quest::say ("Have you [found] Serra yet?"); }
#Marvin follows the player to Serra and sets the global find_serra to 2. He also sets a timer for Marvin to return if he isn't brought to Serra within 5 minutes
if ($text =~/found/i && $find_serra == 1) {
quest::say ("Take me to her right away! I will follow you there.");
quest::setglobal("find_serra", 2, 5, "F");
quest::follow($userid);
quest::settimer("return_marvin",300); }
#If Marvin returns after the timer runs out, this allows him to follow the player again and sets the timer again as well
if ($text =~/Hail/i && $find_serra == 2) {
quest::say ("Let's get going. This place is spooky.");
quest::follow($userid);
quest::settimer("return_marvin",300); }
#Response if player hails Marvin while he is supposed to be looking for the cure after Marvin ran away
if ($text =~/Hail/i && $find_serra == 3) {
quest::say("Ewwe, that was one spooky creature! Please keep looking for my Serra."); }
#Response once all quests are completed
if ($text =~/Hail/i && $find_serra == 4) {
quest::say ("Thank you $name for returning my Serra to me. I thought I would never find her in such a dreary place."); }
{
$find_serra=undef;
}
}
#Signal from Undead_Serra to Marvin when the player brings Marvin to her
sub EVENT_SIGNAL {
if ($signal == 1) {
quest::say ("That isn't my Serra! That's a living dead creature of the night! Take this, $name, and lets get out of here!");
quest::stoptimer("return_marvin");
quest::settimer("sfollow_marvin",3);
quest::signalwith(63029,2,8); }
}
sub EVENT_TIMER {
#After Marvin is brought to Undead_Serra, this timer is set to have him run away back to his spawn point
if ($timer eq "sfollow_marvin") {
quest::stoptimer("sfollow_marvin");
quest::say("I can't take it here any longer! Run for your life!");
quest::sfollow(); }
#This is the timer to return Marvin if the player takes too long to find Serra. This keeps the quest from getting bugged by players
if ($timer eq "return_marvin") {
quest::stoptimer("return_marvin");
quest::say("This is taking too long! I'm going back!");
quest::sfollow();
quest::setglobal("find_serra", 1, 5, "F"); }
{
$find_serra=undef;
}
}
Human Serra's Quest:
Code:
#############
#Quest Name: Lost Love (Serra Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: Undead_Serra, Marvin, Serra, Khrix
#Items Involved: Potion of Unlimited Invisibily, Potion of Infinite Invis to Undead, Gnomish Potion of Regeneration
#############
###NPC 1
#Name: Serra
#Race 1 (Human), Texture 0, Size 5, gender 1, body type 1
#Location: -283, 688, 2.6 of the Estate of Unrest (In the underwater Cave)
#level: 25
#Type: NPC that walks back toward Marvin when quest is completed
#Loot: N/A
#############
#When the cure is given to Undead_Serra, she respawns in Human form and walks towards Marvin and despawns
sub EVENT_SPAWN {
quest::settimer("serra",30);
quest::say("I feel much better already! I must go tell Marvin of your heroic deed. I am sure he will be glad to see me like this again!");
quest::emote("leaves a potion for you.");
}
#This depops Serra in her Human form while she is walking back to Marvin
sub EVENT_TIMER {
if ($timer eq "serra") {
quest::stoptimer("serra");
quest::depop(); }
}
sub EVENT_SAY {
if ($text=~/Hail/i) {
quest::say("Thank you again! I can finally return to Marvin and never scare him like that again."); }
}
Khrix's Quest:
Code:
#############
#Quest Name: Lost Love (Khrix Portion)
#Author: Trevius of Storm Haven
#NPC's Involved: Undead_Serra, Marvin, Serra, Khrix
#Items Involved: Potion of Unlimited Invisibily, Potion of Infinite Invis to Undead, Gnomish Potion of Regeneration
#############
###NPC 4
#Name: Khrix
#Race 12 (Gnome), Texture 1, Size 3, gender 0, body type 1
#Location: In a closet inside the Estate of Unrest
#level: 25
#Type: NPC
#Loot: Gnomish Potion of Regeneration
#############
###Item 1
#Name: Gnomish Potion of Regeneration
#Item ID: 2831 (Custom Made Item)
#Stats: MAGIC, LORE, NO DROP
#Attained From: Killing and looting Khrix
#############
sub EVENT_ATTACK {
quest::say("You'll never get my secret cure! And now that you know about it, you must die!");
}