View Single Post
  #1  
Old 08-27-2015, 08:23 PM
chasem
Fire Beetle
 
Join Date: Apr 2014
Posts: 23
Default A better way to write this??

I'm new to PERL and writing quests. Learned a ton just through everyones helpful posts here.

I'm wondering if there is a simpler way to write the following. It is for an NPC that will just be dealing with melee classes. It works, just guessing there is probably an easier way...

Code:
if($class eq 'Druid') { plugin::Whisper("Begone! I will not help a $class!"); return; } #No Druids return...
	if($class eq 'Magician') { plugin::Whisper("Begone! I will not help a $class!"); return; } #No Mages return...
	if($class eq 'Wizard') { plugin::Whisper("Begone! I will not help a $class!"); return; } #No Wizards return...
	if($class eq 'Necromancer') { plugin::Whisper("Begone! I will not help a $class!"); return; } #No Necros return...
	if($class eq 'Shaman') { plugin::Whisper("Begone! I will not help a $class!"); return; } #No Shaman return...
	if($class eq 'Cleric') { plugin::Whisper("Begone! I will not help a $class!"); return; } #No Cleric return...
	if($class eq 'Enchanter') { plugin::Whisper("Begone! I will not help a $class!"); return; } #No Enchanter return...
Thanks for any tips you can give.
Reply With Quote