Awsome c0ncrete!!! I am going to test that out right now! Here is the script me and Ghanja was working on as well. I got the npcs to respond to hail's with the proper class response but calling the correct spell list was not working... lol. Here is that script of a mess.
Code:
use strict;
no strict 'vars';
use warnings;
sub EVENT_SAY {
my $Necro = {
@spelllist => ["Bind Affinity","Dead Men Floating"],
@spellcost => [10,10],
@spellid => [35,1391],
},
my $Ench = {
@spelllist => ["Bind Affinity","Breeze","Clarity","Clarity II","Alacrity","Augment","Aanya's Quickening","Rune I"],
@spellcost => [10,25,50,200,10,30,100,5],
@spellid => [35,697,174,1693,170,1729,1708,481],
},
my $Magi = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Wiz = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Rog = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Ranger = {
@spelllist => ["Bind Affinity",],
@spellcost => [10],
@spellid => [35],
},
my $Druid = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Shaman = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Cleric = {
@spelllist => ["Bind Affinity","Daring"],
@spellcost => [10,5],
@spellid => [35,89],
},
my $SK = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Paladin = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Ber = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Bst = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $War = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $Bard = {
@spelllist => ["Bind Affinity"],
@spellcost => [10],
@spellid => [35],
},
my $cleanclass = $npc->GetClass();
if ($text=~/hail/i) {
my $buffs = quest::saylink("buffs", 1);
my $NPCName = $npc->GetCleanName();
my $count = 1;
my $n = 0;
if($cleanclass eq 11) {
$client->Message(315, "Souls and $buffs.'");
while ($Necro[$n]) {
if ((lc($Spelllist[$n]) =~ lc($text) && lc($Spelllist[$n]) ne lc($text)) || ($text =~ /^buffs$/i)) {
my $Spelllist = quest::saylink($Spelllist[$n]);
$client->Message(315, "These are your choices, $buffs");
}
if (lc($Spelllist[$n]) eq lc($text) && $text !~ /^buffs$/i) {
quest::setglobal("buffs", $text, 0, "M5");
$client->Message(315, "That's going to cost $SpellCost[$n]pp for the $qglobals{buffs} buff.");
}
$n++;
$count++;
}
}
elsif ($cleanclass eq 14) {
quest::say("I have the $buffs for your mind.");
while ($Ench[$n]) {
if ((lc($Ench[$n]) =~ lc($text) && lc($Ench[$n]) ne lc($text)) || ($text =~ /^buffs$/i)) {
my $Ench = quest::saylink($Ench[$n]);
$client->Message(315, "These are your choices, $Ench");
}
if (lc($Ench[$n]) eq lc($text) && $text !~ /^buffs$/i) {
quest::setglobal("buffs", $text, 0, "M5");
$client->Message(315, "That's going to cost $SpellCost[$n]pp for the $qglobals{buffs} buff.");
}
$n++;
$count++;
}
}
elsif ($cleanclass eq 13) {
quest::say("I will summon you no $buffs.");
}
elsif ($cleanclass eq 12) {
quest::say("Wizard $buffs? Hah! Where do you need to go?");
}
elsif ($cleanclass eq 9) {
quest::say("shhhhhhhhhhhhhhhh!");
}
elsif ($cleanclass eq 4) {
quest::say("What can I do for you naturewalker? Do you require some $buffs?");
}
elsif ($cleanclass eq 6) {
quest::say("I $buffs you to protect my animals!");
}
elsif ($cleanclass eq 10) {
quest::say("All the best $buffs bring the best money.");
}
elsif ($cleanclass eq 2) {
quest::say("Heals? $buffs?");
while ($Cleric[$n]) {
if ((lc($Cleric[$n]) =~ lc($text) && lc($Cleric[$n]) ne lc($text)) || ($text =~ /^buffs$/i)) {
my $Cleric = quest::saylink($Cleric[$n]);
$client->Message(315, "These are your choices, $SpellList");
}
if (lc($Cleric[$n]) eq lc($text) && $text !~ /^buffs$/i) {
quest::setglobal("buffs", $text, 0, "M5");
$client->Message(315, "That's going to cost $SpellCost[$n]pp for the $qglobals{buffs} buff.");
}
$n++;
$count++;
}
}
elsif ($cleanclass eq 5) {
quest::say("No $buffs here, only death!");
}
elsif ($cleanclass eq 3) {
quest::say("Do you need protection my child or some $buffs?");
}
elsif ($cleanclass eq 16) {
quest::say(".......");
}
elsif ($cleanclass eq 15) {
quest::say("Paragon, Feral, $buffs");
}
elsif ($cleanclass eq 1) {
quest::say("Kidding, right?");
}
elsif ($cleanclass eq 8) {
quest::say("La Ti Da Ti");
}
}
}