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.");
}
}