Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2020, 01:28 AM
Letza Fetza
Fire Beetle
 
Join Date: Apr 2013
Posts: 2
Default what am i doing wrong? .pl script

Trying to get this to work but consistently running into either no quest or item reward 0. New to this but reading as much as I can, just stumped! Any help greatly appreciated!

Code:
sub EVENT_SAY
{
my %Reward = (
"Warrior" => '25211''2842',
"Rogue" => '132667',
"Monk" => '132672',
"Berserker" => '132671',
"Shadowknight" => '132670',
"Paladin" => '132669',
"Ranger" => '132662',
"Bard" => '132668',
"Beastlord" => '132673',
"Cleric" => '132640',
"Druid" => '132650',
"Shaman" => '132651',
"Wizard" => '132663',
"Magician" => '132664',
"Enchanter" => '132666',
"Necromancer" => '132665');

    my $class_link = quest::saylink("class");
	my $whisper_color = 315;	#tan
	my $NPCName = $npc->GetCleanName();	

	if($text=~/Hail/i)
	{
    	quest::say("Greetings, $name.  Once I was a great Hero like you,
   	but now I am left to equipping all the new adventurer's that
	seem to be popping up all over this desolate place.  Simply tell me your [$class_link] that you wish to equip and I can summon up some accessories for you.");
	}

	if($text=~/Class/i)
	{
		$client->Message($whisper_color, "$NPCName whispers to you, 'I can
		equip any of the following classes'");

		# print out say links for each of the classes in alpha order
		foreach $class_name (sort keys "class")
		{
			my $link = quest::saylink($class_name);
			$client->Message($whisper_color, "$link");
		}
	}

	# for any typed text besides "Hail" or "class", check to see if it was a class
	# name that was said (clicked), and summon the appropriate items on a match
	if($text !~ /Hail/i || $text !~ /class/i)
	{
		foreach $class_name (sort keys "class")
		{
			if ($text eq $class_name)
			{
				$client->Message($whisper_color, "$NPCName whispers to you, 'Wear your shiny accessories with pride $name!  Be sure to shop for everything before you leave here, as you may not return if over level 10!'");

				# this will dump items onto the players cursor
				foreach ($class_name)
				{
				quest::summonitem($Reward{$class_name});
				}
			}
		}
	} #end class name checks

}#END of FILE
Reply With Quote
  #2  
Old 09-10-2020, 03:17 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

sub EVENT_SAY
{
my %Reward = (

maybe change "%" to "$" ?
Reply With Quote
  #3  
Old 09-10-2020, 08:45 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Warrior has 2 values
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:08 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3