View Single Post
  #1  
Old 11-30-2010, 03:21 AM
blackdragonsdg
Dragon
 
Join Date: Dec 2008
Location: Tennessee
Posts: 656
Default What is the correct usage for $class

What is the correct usage for $class? The following are the methods I have tried so far with no luck:

Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class eq "Warrior") {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class eq "Monk") {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class eq ‘Warrior’) {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class eq ‘Monk’) {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = "Warrior") {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = "Monk") {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == "Warrior") {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == "Monk") {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = ‘Warrior’) {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = ‘Monk’) {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == ‘Warrior’) {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == ‘Monk’) {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = 1) {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = 64) {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == 1) {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == 64) {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = 1) {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class = 7) {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 219614 => 1)) {
    quest::say("Oh what a surprise you actually acquired the Armor Plans. I must admit I never expected to see you again. Now lets see if I can translate the plans for you......");
    quest::say("Success, I put the translated plans into a book.");
    quest::summonitem(219615);
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == 1) {
    quest::summonitem(219628);
    quest::say("Here is your new Bracer!");
    }
elsif (plugin::check_handin(\%itemcount, 219592 => 1) && $class == 7) {
    quest::summonitem(219670);
    quest::say("Here is your new Bracer!");
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
The above mentioned methods have yielded one of three results on item turn in. The quest npc gave back a warrior bracer to a Monk or the quest npc said he didn’t want the item but kept it anyhow or the quest npc did nothing. Is there something I missed because I cannot think of any other ways to represent a characters class.I also tried various uses of $class in () & {} with no useful result.
Reply With Quote