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

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-16-2009, 05:06 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default Tower Defense-Styled Event (incomplete)

This is old code of mine when I first started up EQEMU questing, but instead of it potentially getting deleted or lost in limbo of other projects, I figured I'd post it for others to see. Originally written on 7/12/09.

It isn't complete. It needed a few tweaks to properly get working
The general idea was, you talked to Derron_Coldmist in Crystal Caverns and he would give you a task to defend him. He also started an event where orcs would begin roaming to him, intent on killing him. If he died, you failed the task. Each time an orc died during this event, he would give you a bounty point that allowed you to spawn archers to help assist in fending off the attacks.
So essentially:
Derron_Coldmist - your life
Archers: your towers
Orcs: Creeps

I didn't know how qglobals worked back then, so I was using just temp vars.
Here's the code. Originally built on crystal\Derron_Coldmist.pl
Code:
sub EVENT_SAY {
  if ($text=~/hail/i) {
    #quest::say("Yes, hello");
    #quest::spawn2(999144, 0, 0, 184.5, -55.6, -376.7, 86.5);
    quest::spawn2(999144, 0, 0, 219.1, -53.7, -376.7, 130.1);
    quest::say("$orcslays killed");
  }
  if ($text=~/archer/i) {
    if (!defined($entity_list->GetMobByNpcTypeID(999145))) {
        $tmpname = 999145;
        quest::spawn2($tmpname, 0, 0, 200.4, -226.7, -382.7, 27.3);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #1 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999146))) {
        $tmpname = 999146;
        quest::spawn2($tmpname, 0, 0, 221.8, -227.5, -382.7, 0.0);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #2 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999147))) {
        $tmpname = 999147;
        quest::spawn2($tmpname, 0, 0, 198.8, -246.5, -382.7, 19.6);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #3 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999148))) {
        $tmpname = 999148;
        quest::spawn2($tmpname, 0, 0, 210.1, -245.2, -380.2, 8.8);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #4 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999149))) {
        $tmpname = 999149;
        quest::spawn2($tmpname, 0, 0, 220.7, -246.5, -382.7, 254.8);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #5 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999150))) {
        $tmpname = 999150;
        quest::spawn2($tmpname, 0, 0, 192.9, -259.9, -382.7, 18.6);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #6 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999151))) {
        $tmpname = 999151;
        quest::spawn2($tmpname, 0, 0, 215.2, -263.6, -382.7, 1.9);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #7 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999152))) {
        $tmpname = 999152;
        quest::spawn2($tmpname, 0, 0, 203.1, -299.6, -382.7, 7.0);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #8 reporting for duty!"); #back row guy.
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999153))) {
        $tmpname = 999153;
        quest::spawn2($tmpname, 0, 0, 191.3, -279.4, -382.7, 15.1);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #9 reporting for duty!");
    }
    elsif (!defined($entity_list->GetMobByNpcTypeID(999154))) {
        $tmpname = 999154;
        quest::spawn2($tmpname, 0, 0, 214.3, -275.6, -382.7, 0.0);
        $entity_list->GetMobByNpcTypeID($tmpname)->Stun(2.0); #They're stunned for 2 secs.
        $entity_list->GetMobByNpcTypeID($tmpname)->Say("Archer #10 reporting for duty!");
    }
    else {
        quest::say("You have already the maximum amount of guards.");
    }
  }

}

sub EVENT_SIGNAL {
    #quest::ze(15, "Orc Dead Rec'd.");
    if (!defined($orcslays)) {
        $orcslays = 0;
    }
    $orcslays++;
    $orcmoney++;
    quest::say("$orcslays orcs have been killed!");
}
Then you had crystal/a_Ry-Gorr_invader.pl
Code:
# # 999144 a_Ry`Gorr_invader used on Derron Coldmists's custom quest.

sub EVENT_SPAWN {
    #quest::attacknpctype(
    quest::moveto(206, -321, -383);
#
    #sethate
}
sub EVENT_SLAY {
    quest::moveto(206, -321, -383);
}
sub EVENT_NPC_SLAY {
    quest::moveto(206, -321, -383);
}
sub EVENT_COMBAT {
    if ($combat_state==0) {
        quest::moveto(206, -321, -383);
    }

}
sub EVENT_DEATH {
    quest::signal(121024);
}
Sadly I don't have these mobs anymore, but they wouldn't be hard to recreate.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
 

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 01:07 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3