Thread: Perl Issue.
View Single Post
  #1  
Old 01-25-2013, 11:14 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default Perl Issue.

My NPC is not handing out tasks like I want him to, he sends the text before, but no task selector, any one know how to fix this?

Code:
sub EVENT_SAY
{

	my $task = quest::saylink("task", 1);

	
	if($text=~/Hail/i)
	{
		plugin::Whisper("Hello, $name, would you like a Tier 3 $task?");
		if(quest::istaskactivityactive(271,1)) 
		{
			quest::say("Good job, here, take 50 Medallions for your hard work!");
			quest::updatetaskactivity(271,2,1);
			quest::summonitem(1118,50);
			quest::ding();
		}
		elsif(quest::istaskactivityactive(272,1)) 
		{
			quest::say("Good job, here, take 10 Medallions for your hard work!");
			quest::updatetaskactivity(272,2,1);
			quest::summonitem(1118,10);
			quest::ding();
		}
	}
	
	elsif($text=~/Task/i)
	{
		plugin::Whisper("Take your pick, come back to me when you have completed your task.");
		quest::taskselector(271, 272);
	}
}
Reply With Quote