View Single Post
  #1  
Old 02-10-2013, 08:00 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Post Possibly a few questions.

I am in the middle of working on a quest, but the only thing that I cannot seem to get working are the skills section. Everything else is working just fine. (I tested each piece as I was writing it to insure it's working state.)

Here is what I have so far:

Code:
##########
#Skills Trainer And Quest
#By Kingmen30264
##########

sub EVENT_SAY
{
my $skills = quest::saylink("skills");
my $advanced = quest::saylink("advanced skills");
my $trade = quest::saylink("trade");
my $free = quest::saylink("FREE");
my $items = quest::saylink("items");
my $zone1 = quest::saylink("zone1");
my $zone2 = quest::saylink("zone2");
my $item1 = quest::varlink("9989");
my $item2 = quest::varlink("9999");
my $count1 = quest::saylink("2");
my $count2 = quest::saylink("2");

if($text=~/Hail/i)
	{
		plugin::Whisper("Hi $name. My name is Skills.
				 I can train you in your $skills if you would like. Otherwise I might be able to teach some more $advanced.");
	}
if($text=~/advanced skills/i)
	{
		plugin::Whisper("Yes, I can train you even more. I can train you so much, in fact, that when I am done, I doubt you could go further! However, I cannot merely offer my services for $free now can I?");
		plugin::Whisper("No, no. But, I am in a good mood today, and I am willing to $trade you your higher skills in exchange for something.");
	}
if($text=~/free/i)
	{
		plugin::Whisper("The only thing you will get from me for free is a swift kick up the --");
		quest::emote("Skills turns his head in disgust.");
	}
if($text=~/trade/i)
	{
		plugin::Whisper("Yes, you must do something for me for your $advanced.");
		plugin::Whisper("If you wouldn't mind getting your armor a little scratched, I am going to require a few $items from some different locations.");
	}
if($text=~/items/i)
	{
		plugin::Whisper("Ah, glad to hear that you are willing to begin your training. In that case, I am going to need the following:");
		$client->Message(315, "===$zone1===");
		plugin::Whisper("$item1 X $count1");
		$client->Message(315, "===$zone2===");
		plugin::Whisper("$item2 X $count2");
	}
	
}
sub EVENT_ITEM
{

if(plugin::check_handin(\%itemcount, 9989 => 1))
	
	{
	plugin::Whisper("As promised, here are your advanced skills. Use them wisely.");
	quest::setallskill(250);
	}
  
  plugin::return_items(\%itemcount);
}
As I said, above, the only thing that is not working is the skills command.

Does the command no longer work, or am I simply using it in the wrong manner?

I followed the usage from here.

Also, I was wondering about something else. On the plugin::check_handin*** I have it set right now as:

Code:
if(plugin::check_handin(\%itemcount, 9989 => 1))
If I wanted to add more items for the NPC to take, could I just modify it as follows?

Code:
if(plugin::check_handin(\%itemcount, 9989 => 1, 9990 => 1))
Or would I have to add another line to make it work? And what is the max amount of items that I can have the NPC take?

Thanks,
Kingmen
Reply With Quote