View Single Post
  #30  
Old 03-22-2013, 03:55 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default Almost Working

I have been working on this script on and off for a bit now when I am not doing something else on my server, however, it appears that I cannot get ONE thing to work in the script that I am wanting.

Here is the script:
Code:
#######
#Test Script
#Kingmen
#######

sub EVENT_SAY
{
    %sample = ( 1 => [1118, "Charm"],
                2 => [1388, "Ear One"],
                3 => [1119, "Head"],
                4 => [1389, "Face"],
                5 => [1388, "Ear Two"],
                6 => [1384, "Neck"],
                7 => [1385, "Shoulder"],
                8 => [1264, "Arms"],
                9 => [1386, "Back"],
                10 => [1319, "Bracer One"],
                11 => [1319, "Bracer Two"],
                12 => [1373, "Range"],
                13 => [1270, "Hands"],
                14 => [1372, "Primary"],
                15 => [1381, "Secondary"],
                16 => [1383, "Ring One"],
                17 => [1383, "Ring Two"],
                18 => [1267, "Chest"],
                19 => [1266, "Legs"],
                20 => [1261, "Feet"],
                21 => [1387, "Waist"],
                22 => [80703, "Ammo"]
              );
              
   my $have = quest::saylink("have");
   my $item1 = quest::varlink($sample{1}[0]);
   my $slot = $sample{1}[1];
   my $one = $sample{0}[1];
   #my $two = $sample{1}[2];
   my $single = quest::saylink("single");
 
   
   
   
   
   
   
              
    if($text=~/Hail/i)
      {
        plugin::Whisper("Hello $name, would you like to see what I $have? Or perhaps you would like view a $single item?");
      }
    if($text=~/have/i)
     {
     $client->Message(315, "===ITEMS===");{
     foreach my $slots ( keys %sample )
          
      {
      $client->Message(315, "$sample{$slots}[1] =-= $sample{$slots}[$item1]");
     }
     }}
     if($text=~/Single/i)
     {
      $client->Message(315, "===ITEMS===");
      $client->Message(315, "$slot =-= $item1");
      $client->Message(315, "===========");
     }
}
What I can not get working in this script is the Varlink highlighted in Dark Red.

As I stated above, all else in the script works fine (See picture below) except for the item link.

I was originally against posting this for help, but I know that I am missing something stupid, and as I am still learning perl and all of her commands, I figured I would post it for someone to tell me where I am going wrong.


http://i215.photobucket.com/albums/c...emiworking.png

A pre-thanks to those that reply.
~Kingmen
Reply With Quote