Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 02-12-2015, 11:15 AM
Greyhelm's Avatar
Greyhelm
Sarnak
 
Join Date: Jul 2009
Location: East Coast
Posts: 35
Default Being able to have conditional responses

I looked aorund and either I am not seeing it or I just am searching wrong.. I was looking to see how about doing a conditional reponse for quest characters that have more than one turn-in. Example;


Character X: Hail toon
Toon Response: I am looking for a [code], can you find one?
Character X: a code
Toon Response: Yes silly text to have something do something for you.
Character X: Gives Toon code.
Character X: Hail toon.
Toon response: Now that I have the code, script this.

Character Y: Hail toon.
Ton response: I am looking for a [code], can you find one?

I am guessing it will have to do with flagging the character for the turn in. But ultimately I want to have the dialogue progress as things are turned in and not repeat. Can I get pointed to where I need ot be. I was reading through the PoP flagging but I am still new to scripting. Thanks in advance!
Reply With Quote
  #2  
Old 02-12-2015, 11:19 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You should look into qglobals. Search the forums and wiki and there should be plenty of information about what you are looking for.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 02-12-2015, 12:11 PM
Greyhelm's Avatar
Greyhelm
Sarnak
 
Join Date: Jul 2009
Location: East Coast
Posts: 35
Default

Will do thanks.
Reply With Quote
  #4  
Old 02-12-2015, 01:46 PM
Greyhelm's Avatar
Greyhelm
Sarnak
 
Join Date: Jul 2009
Location: East Coast
Posts: 35
Default

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...

Last edited by Greyhelm; 02-13-2015 at 12:24 PM.. Reason: Found issue
Reply With Quote
  #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
Reply

Thread Tools
Display Modes

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:43 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