deaddraqear
03-29-2011, 10:33 PM
If I was wanting to create a NPC strictly for barbarians to change classes, (getting rid of berserker and adding ranger), how would I do this? My first experiment failed, as the npc will allow any race and class to change to one of the four classes, and there is no change in his dialogue. (was hoping he would tell an erudite for example to go find his own race etc)
If anyone would help me out, correct my mistakes, I would greatly appreciate it. Thank you in advance =)
#############
#Quest Name: Barbarian Class Choice
#Author: KMFW
#NPCs Involved: 1
#Items Involved: 0
#################
###NPC 1
#Name: Renth_McLanis
#Race: N/A
#Location: N/A
#Level: N/A
#Type: N/A
#Loot: N/A
#############
sub EVENT_SAY
{
if($text=~/hail/i)
{
if($$class ne 'Berserker')
#Allows the following: ($race == 'Barbarian')
{
quest::say("Hello $name, I am Renth McLanis. I was sent here from our home to make sure our fellow barbarians are training where they should. We support the following classes: Ranger, Rogue, Shaman and Warrior. If you are not one of these, you will have to change classes before you are allowed to advance.");
}
else
{
quest::say("Greetings $race. I'm sorry to be blunt, but I can do nothing for you. Perhaps you should seek out your proper race.");
}
}
if($text=~/warrior/i)
{
quest::permaclass(1);
}
if($text=~/ranger/i)
{
quest::permaclass(4);
}
if($text=~/rogue/i)
{
quest::permaclass(9);
}
if($text=~/shaman/i)
{
quest::permaclass(10);
}
}
If anyone would help me out, correct my mistakes, I would greatly appreciate it. Thank you in advance =)
#############
#Quest Name: Barbarian Class Choice
#Author: KMFW
#NPCs Involved: 1
#Items Involved: 0
#################
###NPC 1
#Name: Renth_McLanis
#Race: N/A
#Location: N/A
#Level: N/A
#Type: N/A
#Loot: N/A
#############
sub EVENT_SAY
{
if($text=~/hail/i)
{
if($$class ne 'Berserker')
#Allows the following: ($race == 'Barbarian')
{
quest::say("Hello $name, I am Renth McLanis. I was sent here from our home to make sure our fellow barbarians are training where they should. We support the following classes: Ranger, Rogue, Shaman and Warrior. If you are not one of these, you will have to change classes before you are allowed to advance.");
}
else
{
quest::say("Greetings $race. I'm sorry to be blunt, but I can do nothing for you. Perhaps you should seek out your proper race.");
}
}
if($text=~/warrior/i)
{
quest::permaclass(1);
}
if($text=~/ranger/i)
{
quest::permaclass(4);
}
if($text=~/rogue/i)
{
quest::permaclass(9);
}
if($text=~/shaman/i)
{
quest::permaclass(10);
}
}