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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 06-06-2012, 12:36 PM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,103
Default

Zone teleporter w/ optional "flagged" zones

Code:
sub EVENT_SAY{

my $qeynos = quest::saylink ("Qeynos",1);
my $east_freeport = quest::saylink ("East Freeport", 1);
my $west_freeport = quest::saylink ("West Freeport", 1);
my $halas = quest::saylink ("Halas", 1);
my $erudin = quest::saylink ("Erudin", 1);
my $surefall = quest::saylink ("Surefall Glade", 1);
my $rivervale = quest::saylink ("Rivervale", 1);
my $akanon = quest::saylink ("Akanon", 1);
my $felwithe = quest::saylink ("Felwithe", 1);
my $kaladim = quest::saylink ("Kaladim", 1);
my $kelethin = quest::saylink ("Kelethin", 1);
my $oggok = quest::saylink ("Oggok", 1);
my $grobb = quest::saylink ("Grobb", 1);
my $neriak = quest::saylink ("Neriak", 1);
my $nektulos = quest::saylink ("Nektulos Forest", 1);
my $lavastorm = quest::saylink ("Lavastorm Mountains", 1);
my $hub = quest::saylink ("Hub", 1);
my $zone = quest::saylink ("zones", 1);
my $skyfire = quest::saylink ("Skyfire Mountains", 1);
my $firiona = quest::saylink ("Firiona Vie", 1);
my $dreadlands = quest::saylink ("Dreadlands", 1);
my $lake = quest::saylink ("Lake of Ill Omens", 1);
my $overthere = quest::saylink ("Overthere", 1);
my $tokenz = quest::has_zone_flag(104);

if ($text =~/Hail/i)
{
$client->Message(13," Greetings, $name. I could send you to. [$qeynos], [$east_freeport], [$west_freeport], [$halas], [$erudin],[$surefall], [$rivervale], [$akanon], [$felwithe],[$kaladim],[$kelethin],[$oggok], [$grobb], [$neriak], [$lavastorm], [$nektulos], or [$hub]?");
}
if($text =~/Hail/i)
{
$client->Message(13,"You need your progression token to access unlocked zones");
}

if ($text =~/Kaladim/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone(kaladima);
}

if ($text =~/Kelethin/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (gfaydark);
}

if ($text =~/Hub/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (guildhall);
}

if ($text =~/Akanon/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (steamfont);
}

if ($text =~/Nektulos/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (nektulos);
}

if ($text =~/Grobb/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (innothule);
}

if ($text =~/Oggok/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (feerrott);
}

if ($text =~/Felwithe/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (felwithea);
}

if ($text =~/East Freeport/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (freporte);
}

if ($text =~/West Freeport/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (freportw);
}

if ($text =~/Qeynos/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (qeynos2);
}

if ($text =~/Neriak/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (neriakb);
}

if ($text =~/Halas/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (everfrost);
}
if ($text =~/Rivervale/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (misty);
}

if ($text =~/Surefall Glade/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (qrg);
}

if ($text =~/Lavastorm/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (lavastorm);
}

if ($text =~/Erudin/i)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (tox);
}


if($text =~/hail/i && $tokenz == 1)
{
$client->Message(13,"I can also send you to your unlocked [$zone]");
}
if($text =~/zones/i && $tokenz == 1)
{
$client->Message(13, "You have access to [$dreadlands], [$firiona], [$lake], [$skyfire], or [$overthere].");
}
if($text =~/Dreadlands/i && $tokenz == 1)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (dreadlands);
}
if($text =~/firiona vie/i && $tokenz == 1)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (firiona);
}
if($text =~/lake of ill omen/i && $tokenz == 1)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (lakeofillomen);
}
if(text =~/Skyfire Mountains/i && $tokenz == 1)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (skyfire);
}
if(text =~/overthere/i && $tokenz == 1)
{
quest::emote ("opens a portal and kicks you through it.");
quest::zone (overthere);
}


}
Could also add statements if the character is not flagged for that particular set of zones. that just requires a

Code:
if(text =~/overthere/i && $tokenz == 0)
{
client->Message(13, "You do not have the flag to use this teleporter);
}
That would be added to all your "Flagged" zones to check if the character doesn't have the flag, and if it doesn't the script will notify them.
Reply With Quote
  #2  
Old 06-06-2012, 12:39 PM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,103
Default

This is your basic "Learn the link usage" and npc respond quest.

Code:
sub EVENT_SAY
{
my $all = quest::saylink ("all",1);
my $tenth = quest::saylink ("tenth",1);
my $twentieth = quest::saylink ("twentieth",1);
my $thirtieth = quest::saylink ("thirtieth",1);
my $fourtieth = quest::saylink ("fourtieth",1);

if ($text=~/hail/i)

{
quest::say ("If you were wondering, I know [$all] the best places to hunt!");
quest::emote ("purrs.");
}

if ($text=~/all/i)

{
quest::say ("Well, of what season are you? [$tenth],[$twentieth],[$thirtieth],[$fourtieth].");
quest::emote ("hisses.");
}

if ($text=~/tenth/i)

{
quest::say ("I always hunted them orcs, over in Crushbone, in the Faydarks, but becareful if you follow evil gods, them elvies don't like that sorta thing..");
}

if ($text=~/twentieth/i)

{
quest::say ("The good old days eh? Well, I trecked through the ButcherBlock mountains, into Dagnor's Cauldron, and right into the bowels of the Estate of Unrest! Careful of the ghoulies and ghosties!");
}

if ($text=~/thirtieth/i)

{
quest::emote ("licks his lips.");
quest::say ("OmNomNomNom, them froggies tasted good, I'd say hunt that place the trolls call Guk, them make good lunches.");
}

if ($text=~/fourtieth/i)

{
quest::say ("Big ol' dragon, towering giants, wimpy kobolds, yeah, yeah, the lair of the dragon under Lavastorm! Bestest place to catch many rats!");
}

}

Sorry for the multi-post, had a brain fart, could've put it all in one post.

Last edited by Maze_EQ; 06-06-2012 at 12:41 PM.. Reason: multi-post
Reply With Quote
  #3  
Old 07-26-2012, 03:13 PM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,103
Default

Here is another few scripts to help teach the newer server Admins some PERL in a neat, understandable, environment.

I am not a PERL master, I just figured I'd share a few things.


Code:
################
#Maze 7/26/2012#
################


#perl learning script v1
#description to teach basics.

sub EVENT_SPAWN #Shout to know when event is active
{
  quest::shout("Active");
  quest::setnexthpevent(98);
}

sub EVENT_HP #HPEvents quest::spawn2(NPCID,0,0,$+/-xaxist,$+/-yaxis,$+/-zaxis,$heading) xyz axis corresponds to the axis of the original npc
{
   if ($hpevent == 98) 
   {
      quest::spawn2(950764,0,0,$x,$y,$z,$h);
      quest::spawn2(950764,0,0,$x-40,$y,$z,$h);#will spawn selected NPCID at given axis
      quest::setnexthpevent(95); #sets for an event to happen at the given HP percentage.
   }
   elsif ($hpevent == 95)
   {
      quest::shout("Insertstringhere.");   #NPC will shout at the percentage listed. Can also incorporate other quest::XXX functions.  
      quest::setnexthpevent(90);
   }
   elsif ($hpevent == 90) 
   {
      quest::spawn2(950764,0,0,$x,$y+20,$z,$h);
      quest::setnexthpevent(87);
   }
   elsif ($hpevent == 87) 
   {
      quest::shout("insertstringhere");
      quest::spawn2(950768,0,0,$x-40,$y+30,$z,$h); 
      quest::spawn2(950768,0,0,$x-40,$y-30,$z,$h); 
      quest::spawn2(950768,0,0,$x-40,$y+10,$z,$h); 
      quest::spawn2(950768,0,0,$x-40,$y-10,$z,$h); 
      quest::setnexthpevent(80);
   }
   elsif ($hpevent == 80) 
   {
      quest::spawn2(950764,0,0,$x-40,$y+20,$z,$h); 
      quest::setnexthpevent(75);
   }
   elsif ($hpevent == 75) 
   {
      quest::shout("insertstringhere.");
      quest::setnexthpevent(70);
   }
 
   elsif ($hpevent == 70) 
   {
      quest::spawn2(950764,0,0,$x-60,$y-40,$z,$h);
      quest::setnexthpevent(68);
   }

   elsif ($hpevent == 68) 
   {
      quest::shout("insertstringhere");
      quest::spawn2(950765,0,0,$x-200,$y+30,$z,$h);
      quest::spawn2(950765,0,0,$x-200,$y-30,$z,$h); 
      quest::spawn2(950765,0,0,$x-100,$y+30,$z,$h); 
      quest::spawn2(950765,0,0,$x-100,$y-30,$z,$h);
      quest::spawn2(950765,0,0,$x-40,$y+10,$z,$h);
      quest::spawn2(950765,0,0,$x-40,$y-10,$z,$h);
      quest::setnexthpevent(60);
   }
 
   elsif ($hpevent == 60) 
   {
      quest::spawn2(950764,0,0,$x+10,$y+20,$z,$h); 
      quest::setnexthpevent(50); 
   }

   elsif ($hpevent == 50) 
   {
      quest::shout("insertstringhere");
      quest::setnexthpevent(49);
   }
   elsif ($hpevent == 49) 
   {
      quest::spawn2(950764,0,0,$x+60,$y-70,$z,$h);
      quest::setnexthpevent(44);
   }

   elsif ($hpevent == 44) 
   {
      quest::shout("insertstringhere");
      quest::spawn2(950766,0,0,$x-70,$y+15,$z,$h); 
      quest::spawn2(950766,0,0,$x-70,$y,$z,$h); 
      quest::spawn2(950766,0,0,$x-70,$y-15,$z,$h); 
      quest::setnexthpevent(40);
   }
   elsif ($hpevent == 40) 
   {
      quest::spawn2(950764,0,0,$x+10,$y+10,$z,$h);
      quest::setnexthpevent(35);
   }
   elsif ($hpevent == 35) 
   {
      quest::spawn2(950764,0,0,$x-40,$y+20,$z,$h);
      quest::setnexthpevent(33);
   }
   elsif ($hpevent == 33)
   {
      quest::shout("insertstringhere");
      quest::spawn2(950767,0,0,$x+60,$y+75,$z,$h); 
      quest::spawn2(950767,0,0,$x+60,$y-75,$z,$h); 
      quest::setnexthpevent(30);
   }
   elsif ($hpevent == 30) 
   {
      quest::spawn2(950764,0,0,$x,$y-40,$z,$h); 
      quest::setnexthpevent(25);
   }

   elsif ($hpevent == 25) 
   {
      quest::shout("insertstringhere");
      quest::setnexthpevent(20);
   }
 
   elsif ($hpevent == 20) 
   {
      quest::spawn2(950764,0,0,$x,$y+40,$z,$h);
      quest::setnexthpevent(17);
   }
   elsif ($hpevent == 17) 
   {
      quest::spawn2(950764,0,0,$x+10,$y+10,$z,$h);
      quest::setnexthpevent(15);
   }
   elsif ($hpevent == 15)
   {
      quest::shout("insertstringhere");
      quest::spawn2(950769,0,0,$x+10,$y+75,$z,$h); 
      quest::spawn2(950769,0,0,$x+30,$y-15,$z,$h);
      quest::spawn2(950769,0,0,$x+60,$y+25,$z,$h); 
      quest::spawn2(950769,0,0,$x+22,$y-63,$z,$h); 
      quest::spawn2(950769,0,0,$x-44,$y+15,$z,$h); 
      quest::spawn2(950769,0,0,$x-80,$y-85,$z,$h); 
      quest::spawn2(950769,0,0,$x-20,$y+25,$z,$h); 
      quest::spawn2(950769,0,0,$x-15,$y-15,$z,$h);  
      quest::setnexthpevent(10);
   }
   elsif ($hpevent == 10) 
   {
      quest::spawn2(950764,0,0,$x,$y,$z,$h); 
      quest::setnexthpevent(7);
   }
   elsif ($hpevent == 7)
   {
      quest::shout("insertstringhere");
   }
}

sub EVENT_DEATH
{
      quest::shout("insertstringhere");
      quest::spawn2(950761,0,0,233,-1115,-2,190);
}
And

Code:
#Maze 7/26/12
#Example PERL
#Based off of Cazic thule.

sub EVENT_AGGRO {
#These are the variables that declare how to get the npcid
  my $Zombie_One = $entity_list->GetMobByNpcTypeID(1196); 
  my $Zombie_Two = $entity_list->GetMobByNpcTypeID(1203);
  my $Zombie_Three = $entity_list->GetMobByNpcTypeID(1204);
  my $Zombie_Four = $entity_list->GetMobByNpcTypeID(1205);
  my $Zombie_Five = $entity_list->GetMobByNpcTypeID(1206);
  my $Zombie_Six = $entity_list->GetMobByNpcTypeID(1213);
  my $Zombie_Seven = $entity_list->GetMobByNpcTypeID(1214);
  my $Zombie_Eight = $entity_list->GetMobByNpcTypeID(34002);
  #end
  if ($Zombie_One) {
    my $Zombie_One1 = $Zombie_One->CastToNPC();
    $Zombie_One1->AddToHateList($client, 1);
  }
  if ($Zombie_Two) {
    my $Zombie_Two2 = $Zombie_Two->CastToNPC();
    $Zombie_Two2->AddToHateList($client, 1);
  }
  if ($Zombie_Three) {
    my $Zombie_Three3 = $Zombie_Three->CastToNPC();
    $Zombie_Three3->AddToHateList($client, 1); #Works like cazic thule, pulls certain mobs onto the player.
	
  if ($Zombie_Four4) {
    my $Zombie_Four4 = $Zombie_Four->CastToNPC();
    $Zombie_Four4->AddToHateList($client, 1);
  }
  if ($Zombie_Five) {
    my $Zombie_Give5 = $Zombie_Five->CastToNPC();
    $Zombie_Five5->AddToHateList($client, 1);
  }
  if ($Zombie_Six) {
    my $Zombie_Six6 = $Zombie_Six->CastToNPC();
    $Zombie_Six6->AddToHateList($client, 1);
  }
  
  if ($Zombie_Seven) {
    my $Zombie_Seven7 = $Zombie_Seven->CastToNPC();
    $Zombie_Seven7->AddToHateList($client, 1);
  }
  if ($Zombie_Eight) {
    my $Zombie_Eight8 = $Zombie_Eight->CastToNPC();
    $Zombie_Eight8->AddToHateList($client, 1);
  }
 
}
__________________
"No, thanks, man. I don't want you fucking up my life, too."

Skype:
Comerian1
Reply With Quote
  #4  
Old 07-27-2012, 09:24 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

If you use GetNPCByNPCTypeID you won't have to cast to NPC(second example).
Reply With Quote
  #5  
Old 07-27-2012, 09:39 AM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,103
Default

Oh, did not know that, Thank you. I generalized off of the Cazic Thule script, seeing as I did not know the syntax.

Appreciate the tip.
__________________
"No, thanks, man. I don't want you fucking up my life, too."

Skype:
Comerian1
Reply With Quote
Reply

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 12:23 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