deaddraqear
04-05-2011, 01:06 AM
First off, I'm new and I'm very sure there is a WAY easier way to write this, but I don't know how to do it.. but w/e..
Anyway, it all worked just fine until I tried getting the teleports in.. Now, whenever I hail npc, she just turns to me but says nothing.. Any suggestions?
#############
#Quest Name: Human Race/Class Choice
#Author: KMFW
#NPCs Involved: 1
#Items Involved: 0
#################
###NPC 1
#Name: Tar Cordell
#Race: N/A
#Location: N/A
#Level: N/A
#Type: N/A
#Loot: N/A
#############
sub EVENT_SAY
{
my $help = quest::saylink("help");
my $race1 = quest::saylink("race");
my $class = quest::saylink("class");
my $barbarian = quest::saylink("barbarian");
my $erudite = quest::saylink("erudite");
my $woodelf = quest::saylink("wood elf");
my $highelf = quest::saylink("high elf");
my $darkelf = quest::saylink("dark elf");
my $halfelf = quest::saylink("halfelf");
my $dwarf = quest::saylink("dwarf");
my $troll = quest::saylink("troll");
my $ogre = quest::saylink("ogre");
my $halfling = quest::saylink("halfling");
my $gnome = quest::saylink("gnome");
my $iksar = quest::saylink("iksar");
my $froglok = quest::saylink("froglok");
my $drakkin = quest::saylink("drakkin");
my $cleric = quest::saylink("cleric");
my $enchanter = quest::saylink("enchanter");
my $magician = quest::saylink("magician");
my $monk = quest::saylink("monk");
my $necromancer = quest::saylink("necromancer");
my $paladin = quest::saylink("paladin");
my $rogue = quest::saylink("rogue");
my $shadowknight = quest::saylink("shadowknight");
my $warrior = quest::saylink("warrior");
my $wizard = quest::saylink("wizard");
my $home = quest::saylink("Go home");
if($text=~/hail/i)
{
if($race eq 'Human')
{
quest::say("Hello $name, I am here to $help humans in their training. Be advised, human bards, druids and rangers are not welcome in this world.");
}
else
{
quest::say("Ahh, hello $race. I cannot be of assistance to you at this time. Please seek out your current race trainer, who will surely be able to assist you in your race - class preferences. Be well.");
}
}
if($text=~/help/i)
{
if($race eq 'Human')
{
quest::say("I can change your $race1 or your $class. Be advised, both choices will remove you from this world for a short time. After all, you are being reborn. Upon returning to this world, return to me or your new race trainer, for further assistance. I can also send you $home");
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/race/i)
{
if($race eq 'Human')
{
quest::say("I can change you into any of the other races, besides Vah Shir. Your choices are $highelf, $erudite, $woodelf, $halfling, $barbarian, $gnome, $drakkin, $troll, $ogre, $halfelf, $dwarf, $iksar, $froglok and $darkelf.");
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/high elf/i)
{
if($race eq 'Human')
{
quest::permarace(5);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/dwarf/i)
{
if($race eq 'Human')
{
quest::permarace(8);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/wood elf/i)
{
if($race eq 'Human')
{
quest::permarace(4);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/halfling/i)
{
if($race eq 'Human')
{
quest::permarace(11);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/barbarian/i)
{
if($race eq 'Human')
{
quest::permarace(2);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/gnome/i)
{
if($race eq 'Human')
{
quest::permarace(12);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/drakkin/i)
{
if($race eq 'Human')
{
quest::permarace(522);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/troll/i)
{
if($race eq 'Human')
{
quest::permarace(9);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/ogre/i)
{
if($race eq 'Human')
{
quest::permarace(10);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/half elf/i)
{
if($race eq 'Human')
{
quest::permarace(17);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/froglok/i)
{
if($race eq 'Human')
{
quest::permarace(330);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/iksar/i)
{
if($race eq 'Human')
{
quest::permarace(128);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/erudite/i)
{
if($race eq 'Human')
{
quest::permarace(3);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/dark elf/i)
{
if($race eq 'Human')
{
quest::permarace(6);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/class/i)
{
if($race eq 'Human')
{
quest::say("I can change you into the following classes; $wizard, $necromancer, $warrior, $cleric, $enchanter, $magician, $rogue, $shadowknight, $paladin and $monk.");
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/wizard/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,90);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,110);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(12);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/necromancer/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,80);
quest::setstat(2,75);
quest::setstat(3,85);
quest::setstat(4,110);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(11);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/warrior/i)
{
if($race eq 'Human')
{
quest::setstat(0,85);
quest::setstat(1,110);
quest::setstat(2,80);
quest::setstat(3,75);
quest::setstat(4,75);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(1);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/cleric/i)
{
if($race eq 'Human')
{
quest::setstat(0,80);
quest::setstat(1,85);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,75);
quest::setstat(5,110);
quest::setstat(6,75);
quest::permaclass(2);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/enchanter/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,75);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,90);
quest::setstat(5,75);
quest::setstat(6,110);
quest::permaclass(14);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/magician/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,90);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,110);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(13);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/rogue/i)
{
if($race eq 'Human')
{
quest::setstat(0,100);
quest::setstat(1,75);
quest::setstat(2,85);
quest::setstat(3,90);
quest::setstat(4,75);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(9);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/shadowknight/i)
{
if($race eq 'Human')
{
quest::setstat(0,85);
quest::setstat(1,100);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,85);
quest::setstat(5,75);
quest::setstat(6,80);
quest::permaclass(5);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/paladin/i)
{
if($race eq 'Human')
{
quest::setstat(0,85);
quest::setstat(1,100);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,75);
quest::setstat(5,80);
quest::setstat(6,85);
quest::permaclass(3);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/monk/i)
{
if($race eq 'Human')
{
quest::setstat(0,80);
quest::setstat(1,80);
quest::setstat(2,105);
quest::setstat(3,85);
quest::setstat(4,75);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(7);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/go home/i)
{
if(($race eq 'Human') && ($class eq 'Cleric'))
{
quest::movepc(2, 603.198, -132.003, -14);
}
if(($race eq 'Human') && ($class eq 'Paladin'))
{
quest::movepc(2, -678.183, -202.713, -14)
}
if(($race eq 'Human') && ($class eq 'Monk'))
{
quest::movepc(2, 301.081, 341.925, 0)
}
if(($race eq 'Human') && ($class eq 'Rogue'))
{
quest::movepc(2, 148.978 30.997 -31)
}
if(($race eq 'Human') && ($class eq 'Warrior'))
{
quest::movepc(1, -551.646, 56.166, 0)
}
if(($race eq 'Human') && ($class eq 'Wizard'))
{
quest::movepc(1, -674.143, 314.821, 0)
}
if(($race eq 'Human') && ($class eq 'Magician'))
{
quest::movepc(1, -665.487, 326.763, 1)
}
if(($race eq 'Human') && ($class eq 'Enchanter'))
{
quest::movepc(1, -664.904, 300.932, 1)
}
if(($race eq 'Human') && ($class eq 'Necromancer'))
{
quest::movepc(45, -303.112, 299.525, -41.969)
}
if(($race eq 'Human') && ($class eq 'Shadowknight'))
{
quest::movepc(45, -370.828, 429.554, -41.969)
}
}
}
Anyway, it all worked just fine until I tried getting the teleports in.. Now, whenever I hail npc, she just turns to me but says nothing.. Any suggestions?
#############
#Quest Name: Human Race/Class Choice
#Author: KMFW
#NPCs Involved: 1
#Items Involved: 0
#################
###NPC 1
#Name: Tar Cordell
#Race: N/A
#Location: N/A
#Level: N/A
#Type: N/A
#Loot: N/A
#############
sub EVENT_SAY
{
my $help = quest::saylink("help");
my $race1 = quest::saylink("race");
my $class = quest::saylink("class");
my $barbarian = quest::saylink("barbarian");
my $erudite = quest::saylink("erudite");
my $woodelf = quest::saylink("wood elf");
my $highelf = quest::saylink("high elf");
my $darkelf = quest::saylink("dark elf");
my $halfelf = quest::saylink("halfelf");
my $dwarf = quest::saylink("dwarf");
my $troll = quest::saylink("troll");
my $ogre = quest::saylink("ogre");
my $halfling = quest::saylink("halfling");
my $gnome = quest::saylink("gnome");
my $iksar = quest::saylink("iksar");
my $froglok = quest::saylink("froglok");
my $drakkin = quest::saylink("drakkin");
my $cleric = quest::saylink("cleric");
my $enchanter = quest::saylink("enchanter");
my $magician = quest::saylink("magician");
my $monk = quest::saylink("monk");
my $necromancer = quest::saylink("necromancer");
my $paladin = quest::saylink("paladin");
my $rogue = quest::saylink("rogue");
my $shadowknight = quest::saylink("shadowknight");
my $warrior = quest::saylink("warrior");
my $wizard = quest::saylink("wizard");
my $home = quest::saylink("Go home");
if($text=~/hail/i)
{
if($race eq 'Human')
{
quest::say("Hello $name, I am here to $help humans in their training. Be advised, human bards, druids and rangers are not welcome in this world.");
}
else
{
quest::say("Ahh, hello $race. I cannot be of assistance to you at this time. Please seek out your current race trainer, who will surely be able to assist you in your race - class preferences. Be well.");
}
}
if($text=~/help/i)
{
if($race eq 'Human')
{
quest::say("I can change your $race1 or your $class. Be advised, both choices will remove you from this world for a short time. After all, you are being reborn. Upon returning to this world, return to me or your new race trainer, for further assistance. I can also send you $home");
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/race/i)
{
if($race eq 'Human')
{
quest::say("I can change you into any of the other races, besides Vah Shir. Your choices are $highelf, $erudite, $woodelf, $halfling, $barbarian, $gnome, $drakkin, $troll, $ogre, $halfelf, $dwarf, $iksar, $froglok and $darkelf.");
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/high elf/i)
{
if($race eq 'Human')
{
quest::permarace(5);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/dwarf/i)
{
if($race eq 'Human')
{
quest::permarace(8);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/wood elf/i)
{
if($race eq 'Human')
{
quest::permarace(4);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/halfling/i)
{
if($race eq 'Human')
{
quest::permarace(11);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/barbarian/i)
{
if($race eq 'Human')
{
quest::permarace(2);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/gnome/i)
{
if($race eq 'Human')
{
quest::permarace(12);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/drakkin/i)
{
if($race eq 'Human')
{
quest::permarace(522);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/troll/i)
{
if($race eq 'Human')
{
quest::permarace(9);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/ogre/i)
{
if($race eq 'Human')
{
quest::permarace(10);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/half elf/i)
{
if($race eq 'Human')
{
quest::permarace(17);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/froglok/i)
{
if($race eq 'Human')
{
quest::permarace(330);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/iksar/i)
{
if($race eq 'Human')
{
quest::permarace(128);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/erudite/i)
{
if($race eq 'Human')
{
quest::permarace(3);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/dark elf/i)
{
if($race eq 'Human')
{
quest::permarace(6);
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/class/i)
{
if($race eq 'Human')
{
quest::say("I can change you into the following classes; $wizard, $necromancer, $warrior, $cleric, $enchanter, $magician, $rogue, $shadowknight, $paladin and $monk.");
}
else
{
quest::say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/wizard/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,90);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,110);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(12);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/necromancer/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,80);
quest::setstat(2,75);
quest::setstat(3,85);
quest::setstat(4,110);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(11);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/warrior/i)
{
if($race eq 'Human')
{
quest::setstat(0,85);
quest::setstat(1,110);
quest::setstat(2,80);
quest::setstat(3,75);
quest::setstat(4,75);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(1);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/cleric/i)
{
if($race eq 'Human')
{
quest::setstat(0,80);
quest::setstat(1,85);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,75);
quest::setstat(5,110);
quest::setstat(6,75);
quest::permaclass(2);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/enchanter/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,75);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,90);
quest::setstat(5,75);
quest::setstat(6,110);
quest::permaclass(14);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/magician/i)
{
if($race eq 'Human')
{
quest::setstat(0,75);
quest::setstat(1,90);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,110);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(13);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/rogue/i)
{
if($race eq 'Human')
{
quest::setstat(0,100);
quest::setstat(1,75);
quest::setstat(2,85);
quest::setstat(3,90);
quest::setstat(4,75);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(9);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/shadowknight/i)
{
if($race eq 'Human')
{
quest::setstat(0,85);
quest::setstat(1,100);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,85);
quest::setstat(5,75);
quest::setstat(6,80);
quest::permaclass(5);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/paladin/i)
{
if($race eq 'Human')
{
quest::setstat(0,85);
quest::setstat(1,100);
quest::setstat(2,75);
quest::setstat(3,75);
quest::setstat(4,75);
quest::setstat(5,80);
quest::setstat(6,85);
quest::permaclass(3);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/monk/i)
{
if($race eq 'Human')
{
quest::setstat(0,80);
quest::setstat(1,80);
quest::setstat(2,105);
quest::setstat(3,85);
quest::setstat(4,75);
quest::setstat(5,75);
quest::setstat(6,75);
quest::permaclass(7);
}
else
{
quest:say("I'm sorry $race, but you must speek with your race trainer.");
}
}
if($text=~/go home/i)
{
if(($race eq 'Human') && ($class eq 'Cleric'))
{
quest::movepc(2, 603.198, -132.003, -14);
}
if(($race eq 'Human') && ($class eq 'Paladin'))
{
quest::movepc(2, -678.183, -202.713, -14)
}
if(($race eq 'Human') && ($class eq 'Monk'))
{
quest::movepc(2, 301.081, 341.925, 0)
}
if(($race eq 'Human') && ($class eq 'Rogue'))
{
quest::movepc(2, 148.978 30.997 -31)
}
if(($race eq 'Human') && ($class eq 'Warrior'))
{
quest::movepc(1, -551.646, 56.166, 0)
}
if(($race eq 'Human') && ($class eq 'Wizard'))
{
quest::movepc(1, -674.143, 314.821, 0)
}
if(($race eq 'Human') && ($class eq 'Magician'))
{
quest::movepc(1, -665.487, 326.763, 1)
}
if(($race eq 'Human') && ($class eq 'Enchanter'))
{
quest::movepc(1, -664.904, 300.932, 1)
}
if(($race eq 'Human') && ($class eq 'Necromancer'))
{
quest::movepc(45, -303.112, 299.525, -41.969)
}
if(($race eq 'Human') && ($class eq 'Shadowknight'))
{
quest::movepc(45, -370.828, 429.554, -41.969)
}
}
}