Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2011, 02:18 PM
liquest
"Special" Member
 
Join Date: Jul 2007
Posts: 373
Default a little something i been working on.

is there a way to shorten this down? i help run a server in development where you may only play the wizard class to play the server. i created a welcome NPC to only teleport the wizard class to the next area. if there isnt a way to shorten thats fine. figured i would share anyways. feedback is appreciated

Code:
sub EVENT_SPAWN {
#Variables
	$MobName = "Cancelius_the_Gate_Keeper";
	$x = $npc->GetX();
	$y = $npc->GetY();
}

sub EVENT_SAY {
my $wizard = quest::saylink("Wizard",1);
    if ($text =~/Hail/i) 
{ 
		$client->Message(10,"Cancelius the Gate Keeper says, Greetings, $name.  I am Cancelius, I watch the gates of this citadel.  If you are a [wizard], I can let you pass.");
		$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
    if ($class eq "Wizard" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, Seek out the Grand Wizard.");
	quest::assigntask(21);
        quest::movepc(185,489.0,3.0,-981.9,102.6)
}
    if ($class eq "Magician" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Warrior" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Monk" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Cleric" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Necromancer" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Paladin" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Shadow Knight" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Ranger" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Beastlord" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Berserker" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Rogue" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Enchanter" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Bard" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Druid" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
	if ($class eq "Shaman" & $text =~/wizard/i) {
	$client->Message(10,"Cancelius the Gate Keeper says, You shall not pass unless you follow the path of the wizard!");
	$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
}
}
__________________
Also Knows as Tavish

Liquest Auctions, WTB AA's up to the current compatable clients PST with offer.

"A casual stroll through a lunatic asylum shows that faith does not prove anything." ~Fredrick Nietzsche

"Insanity: doing the same thing over and over again and expecting different results.." ~Albert Einstein
Reply With Quote
  #2  
Old 03-12-2011, 03:23 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Code:
sub EVENT_SAY {
	my $wizard = quest::saylink("Wizard",1);
	$MobName = $npc->GetCleanName();
    if ($text =~/Hail/i) { 
		$client->Message(10,"$MobName says, Greetings, $name.  I am Cancelius, I watch the gates of this citadel.  If you are a [$wizard], I can let you pass.");
		$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
	}
    if ($class eq "Wizard" && $text =~/wizard/i) {
		$client->Message(10,"$MobName says, Seek out the Grand Wizard.");
		quest::assigntask(21);
		quest::movepc(185, 489.0, 3.0, -981.9, 102.6)
	}
    elsif ($text =~/wizard/i) {
		$client->Message(10,"$MobName says, You shall not pass unless you follow the path of the wizard!");
		$client->Message(13,"A voice from the fourth-wall whispers, The Citadel of Magic server only supports the use of wizards, you will be able to tank in melee combat, deal damage in both melee and ranged, or heal depending on your specialization choices.");
	}
}
Reply With Quote
  #3  
Old 03-12-2011, 03:42 PM
liquest
"Special" Member
 
Join Date: Jul 2007
Posts: 373
Default

ahh $mobname would help alot so i dont keep adding more to the text now is there a way to reduce the length instead of having a line for each class to deny them entrance is there a way to have all classes besides wizard on one single line
__________________
Also Knows as Tavish

Liquest Auctions, WTB AA's up to the current compatable clients PST with offer.

"A casual stroll through a lunatic asylum shows that faith does not prove anything." ~Fredrick Nietzsche

"Insanity: doing the same thing over and over again and expecting different results.." ~Albert Einstein
Reply With Quote
  #4  
Old 03-12-2011, 04:00 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by liquest View Post
ahh $mobname would help alot so i dont keep adding more to the text now is there a way to reduce the length instead of having a line for each class to deny them entrance is there a way to have all classes besides wizard on one single line
Look a little closer.
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 09:09 AM.


 

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