View Single Post
  #5  
Old 02-19-2015, 10:16 AM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 905
Default

Quote:
Originally Posted by Greyhelm View Post
Ok I caruised a few posts I say and came across the Hails one. I decided to try it out. I copied it to an NPC with no quest assigned, set his qglobal to 1. Restarted the server. I had one error in the logs when I tried hailing him fixed the squiggle right I missed. Restarted again. But I still do not get the NPC to respond. I removed plugin::whisper with quest::say since I do not have the whisper plugin. I do not get any log output of any error.

I read different guides and a lto of conflicting data...

example one
Code:
quest::setglobals("Hails", 1, 5, "F");
I assume this is in correct because
Code:
quest::setglobals("Hails", "1", "5", "F");
works not the first one.. Learning.... Thanks for putting me back into the boards Trevius, learned more than just being handed the info...

This is what I use:
Code:
quest::setglobal("global", 1, 5, F);
I've also used the first one you quoted with the F in quotes. Both work.


Example of conditional conversation from a quest I wrote a while back:
Code:
sub EVENT_SAY
   {

   my $deal = quest::saylink("deal", 1);
   my $coin = quest::saylink("coin", 1);
   my $estate = quest::saylink("Estate", 1);
   my $inny = quest::saylink("Innoruuk", 1);
   my $bladesmith = quest::saylink("bladesmith", 1);

   if($text=~/hail/i)
      {
      if($qglobals{hateblade} == 0)
         {
         if($class eq "Warrior")
            {
            plugin::Whisper("Hello fellow Warrior, I may have a splendid [$deal] for you!");
            }
         else
            {
            plugin::Whisper("Where have all the traders gone?");
            }
         }
            
      if($qglobals{hateblade} == 1)
         {
         plugin::Whisper("I said it was splendid; I did not say it was useful!");
         quest::doanim(54);
         plugin::Whisper("It truly IS one of a kind... literally; however, I hear it may be of more use when forged with a rare sword from the old [$estate].");
         }

      if($qglobals{hateblade} == 2)
         {
         plugin::Whisper("Did you fashion the blade? Let me see it!");
         }   
      
      if($qglobals{hateblade} == 3)
         {
         plugin::Whisper("Seek out Tirapulin V'Thex, the master bladesmith.");
         }
      
      if($qglobals{hateblade} == 4)
         {
         plugin::Whisper("You have returned! Let me see the blade!");
         }
      
      if($qglobals{hateblade} >=5 && $qglobals{hateblade} <=7)
         {
         plugin::Whisper("Ever have the strangest feeling of dejavu?");
         }
      
      }
      
   if($text=~/deal/i && $class eq "Warrior")
      {
      plugin::Whisper("If you have the [$coin], I may be able to provide you with a splendid blade!");
      }   
         
   if($text=~/coin/i && $class eq "Warrior")
      {
      plugin::Whisper("For a measly 250 platinum pieces, I will provide you with a blade no warrior has seen the likes of!");
      }   
         
   if($text=~/estate/i && $qglobals{hateblade} == 1)
      {
      plugin::Whisper("Unrest of course.  Here, take these notes.  Now leave me alone.");
      quest::summonitem(2669);
      quest::setglobal("hateblade", 2, 5, "F");
      }   
      
      
   if($text=~/innoruuk/i && $qglobals{hateblade} == 2)
      {
      plugin::Whisper("That is right, Innoruuk himself gave a blade to King Thex of the Tier'Dal, that has resemblance to that of which you hold.  Perhaps a maaster Tier'Dal [$bladesmith] may assist you further.");
      }   
         
   if($text=~/bladesmith/i && $qglobals{hateblade} == 2)
      {
      plugin::Whisper("Seek out Tirapulin V'Thex in the Bazaar.  I imagine he has migrated his wares there like every other trader.");
      quest::setglobal("hateblade", 3, 5, "F");
      }   
      
   }
__________________
Clumsy's World: Resurgence
Clumsy's World [2006-2012]
Reply With Quote