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 07-26-2011, 12:54 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default Quest Whispering

I am working on my first quest and would like to know the command to make the text that the NPC says come up in a "whisper/tell" format to where only you can see it.

For example, on some servers that I play on, when I talk to an NPC it will say something like:

"NPC Name whispers to you, 'Text' "

How do I have the NPC text that you have to say back a link?

For example, if I were to hail the NPC and it said something like:

Greetings, would you like to [know] more?

How do I make [know] a link.

And how do I link an item should I want to link something like: Rusty Dagger?

Sorry in advance for all the noob questions. Any and all help is appreciated. Thank you.
Reply With Quote
  #2  
Old 07-26-2011, 02:31 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

See the Wiki to answer most of your questions:
http://www.eqemulator.net/wiki/wikka...=QuestTutorial

Here is an example that does the 3 things you were requesting:

Code:
sub EVENT_SAY {

	my $ClothCapLink = quest::varlink(1001);
	my $ClothCap = quest::saylink("Cloth Cap");

	if ($text =~ /Hail/i)
	{
		plugin::Whisper("Hello, $name!  Would you like to see a [$ClothCap] link?");
	}
	
	if ($text =~ /Cloth Cap/i)
	{
		plugin::Whisper("Here is your link - $ClothCapLink");
	}

}
That assumes that you have the Whisper plugin in your plugins folder. It will not work if you don't have that plugin.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 07-26-2011, 06:50 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Thank you Trevius.
Reply With Quote
  #4  
Old 07-26-2011, 07:52 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Thank you for your response Trevius.


I have another question. I got the quest working just fine, but when I attempted another one, I get the NPC saying some of my "Links" when I hail him.

Would someone mind taking a look at this and telling me what I may or may not have done?

Code:
##########
#Quest Name: Death's Elusive Charm
#Zone: poknowledge
#Author: Warlore
#NPCs Involved: Deaths_Epic_Charm_Quest
#Items Involved: 
##########

sub EVENT_SAY
{
my $want = quest::saylink("want");
my $ask = quest::saylink("ask");
my $hindering = quest::saylink("hindering");
my $gather = quest::saylink("gather");
my $Dragonbane_Herb = quest::saylink("Dragonbane Herb");
my $Small_Gem_Glue_Solvent = quest::saylink("Small Gem Glue Solvent");
my $Enchanted_Bone_Powder = quest::saylink("Enchanted Bone Powder");
my $few = quest::saylink("few");
my $Dragon_Charm = quest::saylink("Dragon Charm");
my $Drachnid_Charm = quest::saylink("Drachnid Charm");
my $Vampyre_Charm = quest::saylink("Vampyre Charm");
my $rusty_dagger = quest::say("Rusty Dagger");
my $next = quest::say("next");
my $components = quest::say("components");
my $got = quest::varlink("7001");

  if($text=~/hail/i)
  {
    quest::say("Now where did I put that-- Oh hey there $name, I Didn't see you there, but since you are here, let me ask you this, 'What you [$want] and why you looking at me?'");
  }
  elsif($text=~/want/i)
  {
    quest::say("Want? Want?! That's what all you kids do these days, want. Well let me tell you what I want! If you don't mind hearing an old man [$ask] for something");
  }
  elsif($text=~/ask/i)
  {
    quest::say("Oh, you'll listen? Well then, I suppose you believe there is something of it for you huh? Only reason why you would listen. Well then, sit down here and let me tell you a tale that is most [$hindering]");
  }
  elsif($text=~/hindering/i)
  {
    quest::say("Long ago, before the lands were developed and everything is how it seems today, the lands were wrought with war, famine, and disease. During these times, I wasn't much for war, you see, I was really as far from war as you could think!");
    quest::say("Well, I was only a kid during all this, and so I was as niave as the next kid, but I was determined to stop it all! I was tired of it, sick (Not like the others) of what was going on. So I set out to find a way to make it all end, to make it better; and this is what I [$got]");
    quest::say("Unfortunately, it was lost a little while back along with the design on how to make it. However, if you would be willing to [$gather] a few items for me, I am sure that I could jog my memory on a few things.");
  }
  elsif($text=~/gather/i)
  {
    quest::say("Wonderful, since I have gotten older, my reflexes have slowed, so the first item I would like would be this wonderful little herb called [$Dragonbane Herb]. Bring this to me, and I should have the energy to recall some of the items.");
  }
  elsif($text=~/Dragonbane Herb/i)
  {
    quest::say("Yes, Dragonbane Herb! Oh, you would like me to tell you where it is? Let's see... Hmm... In my youth, I found some in the area known as Siren's Grotto. Now if you wouldn't mind fetching me some, I'll return to the list.");
  }
  elsif($text=~/few/i)
  {
    quest::say("Yes, it seems that with each type of blood, there is a new set of properties, but here is the list that I can use: Vampyre, Drachnid, and Dragon. Sorry, but those are the only 3 that I know.");
  }
  elsif($text=~/Dragon Charm/i)
  {
    quest::say("So you seek power do ya? Well let me forwarn you that with great power comes great responsibility!");
    quest::say("Nah, I'm just muckin about! But if you truely want more power, then you'll have to do as I ask, nothing less!");
    quest::say("Alright then, since we both know that you are willing to do this, then it is time to get niddy griddy! I want you to find me [$rusty_dagger]. When you find this, bring it back to me and I will tell you what is next.");
  }
  elsif($text=~/next/i)
  {
    quest::say("Ah, yes, I see it now.... Very well, this next task will have you out and about for awhile as I need a few [$components].");
  }
  elsif($text=~/components/i)
  {
    quest::say("Yes, yes, the components are: Bone Chips, Bone Skull, Femur, and Toes");
  }
}

sub EVENT_ITEM
{
  if(plugin::check_handin(\%itemcount, 1785 => 1))
  {
  quest::say("Wonderful, wonderful! This really hits the spot! AHA!! I remember the base of the item. I need you to go to the Crypt of Dalnir and find me a Dwarf Skull. But I seem to be forge-- Ah, of course! Back in my youth, when I was meddling around with the skull, I couldn't keep the jaw to stay on. So I need you to stop and buy me some [$Small_Gem_Glue_Solvent]");
  quest::exp(25000);
  } 
  elsif(plugin::check_handin(\%itemcount, 37956 = >1, 12137 => 1)) 
  {
  quest::say("Ah, now I am able to start this. Well, so you're not just standing there, mind fetching me something else? Ah, who am I kidding? No need to ask you right? Of course you're willing to do what I ask. No go fetch me some [$Enchanted_Bone_Powder] from Dawnshroud Peaks.");
  quest::exp(30000);
  } 
  elsif(plugin::check_handin(\%itemcount, 69949 => 1)) 
  {
  quest::say("Ah, just what is needed. That was to clean it. Now I need to add some blood to it. Tell you what, bring me the type of blood you want, and I will make it for you like that. However, I am only skilled with so many bloods, so I must ask you to only bring me a select [$few]");
  quest::exp(40000);
  } 
  elsif(plugin::check_handin(\%itemcount, 2643 => 1)) 
  {
  quest::say("Here is your [$Drachnid Charm], if you bring it back to me, then I can always increase its power.");
  quest::summonitem(9907);
  quest::exp(40000);
  } 
  elsif(plugin::check_handin(\%itemcount, 1784 => 1))
  {
  quest::say("Here is your [$Dragon Charm], if you bring it back to me, then I can always increase its power.");
  quest::summonitem(11515);
  quest::exp(40000);
  } 
  elsif(plugin::check_handin(\%itemcount, 2693 => 1)) 
  {
  quest::say("Here is your [$Vampyre Charm], if you bring it back to me, then I can always increase its power.");
  quest::summonitem(18353);
  quest::exp(40000);
  } 
  elsif(plugin::check_handin(\%itemcount, 7007 => 1)) 
  {
  quest::say("Thanks for the Dagger. Would you like to know what is [$next]?");
  } 
  elsif(plugin::check_handin(\%itemcount, 13073 => 1, 12748 => 1, 19794 => 1, 25760 => 1)) 
  {
  quest::say("Thank you, and here is your reward!");
  quest::exp(40000000);
  quest::summonitem("7001");
  }
   else {
  quest::emote("What would I want with this?");
  plugin::return_items(\%itemcount);
        }
}
Thanks.

Also, if it helps, the 3 things he keeps saying are:

Components
Rusty Dagger
Next

Thanks.
Reply With Quote
  #5  
Old 07-27-2011, 02:15 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Code:
my $rusty_dagger = quest::say("Rusty Dagger");
my $next = quest::say("next");
my $components = quest::say("components");
If you look, you used quest::say instead of quest::saylink for those 3.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 07-27-2011, 08:13 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

DOH xD... Thank you so much Trev lol...
Reply With Quote
  #7  
Old 07-27-2011, 09:27 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Okay, so I got that done, thanks to Trev... Once More lol... But now I want to make it to where when they complete one part of the quest, they can't see it again.

For example, with the quest posted above, when they turn in the first item (Dragonbane Herb), if they re-hail the guy, he doesn't start the whole quest line over again.....

Thanks in advance.
Reply With Quote
  #8  
Old 07-28-2011, 04:28 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

For that, your best best would probably be to use qglobals. They are discussed near the bottom of the quest wiki:

http://www.eqemulator.net/wiki/wikka...=QuestTutorial

You would just set a qglobal on the char when they do the turn in, and in the EVENT_SAY, you would check if they have that qglobal defined yet and if so, set it to skip the intro part.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 07-29-2011, 01:48 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

I saw where it is posted at the bottom of the page, but is there a certain part of my quest script that I need to insert it at? This is what I have right now:

(I took out the sub EVENT_ITEM so it wasn't as long)

Code:
##########
#Quest Name: Death's Elusive Charm
#Zone: poknowledge
#Author: Warlore
#NPCs Involved: Deaths_Epic_Charm_Quest
##########

sub EVENT_SAY
{
#Say Links
my $want = quest::saylink("want");
my $ask = quest::saylink("ask");
my $hindering = quest::saylink("hindering");
my $gather = quest::saylink("gather");
my $Dragonbane_Herb = quest::saylink("Dragonbane Herb");
my $few1 = quest::saylink("few");
my $Dragon_Charm = quest::saylink("Dragon Charm");
my $Drachnid_Charm = quest::saylink("Drachnid Charm");
my $Vampyre_Charm = quest::saylink("Vampyre Charm");
my $next1 = quest::saylink("next");
my $components = quest::saylink("components");
my $Dragon_Charm1 = quest::saylink("Dragon Charm");
my $Drachnid_Charm1 = quest::saylink("Drachnid Charm");
my $Vampyre_Charm1 = quest::saylink("Vampyre Charm");
my $Bone_Chips = quest::saylink("Bone Chips");
my $Bone_Skull = quest::saylink("Iksar Skull");
my $Femur = quest::saylink("Femur");
my $Toes = quest::saylink("Toes");
my $dwarf = quest::saylink("Dwarf Skull");
my $small = quest::saylink("Small Gem Glue Solvent");
my $Dragonbane_herb1 = quest::saylink("Dragonbane Herb");
my $please1 = quest::saylink("please");
my $them = quest::saylink("them");
my $charm = quest::saylink("charm");


#Item Links
my $got = quest::varlink("7001");
my $Dragonbane_herb = quest::varlink("1785");
my $Dragon_Charm1 = quest::varlink("11515");
my $Drachnid_Charm1 = quest::varlink("9907");
my $Vampyre_Charm1 = quest::varlink("18353");
my $Bone_Chips = quest::varlink("13073");
my $Bone_Skull = quest::varlink("12748");
my $Femur = quest::varlink("19794");
my $Toes = quest::varlink("25760");
my $Dragonbane_herb1 = quest::varlink("1785");
my $Enchanted_Bone_Powder = quest::varlink("69949");
my $rusty_dagger1 = quest::varlink("7007");
my $dwarf = quest::varlink("12137");
my $small = quest::varlink("37956");
my $Dragon = quest::varlink("1784");
my $Drachnid = quest::varlink("2643");
my $Vampyre = quest::varlink("2693");


  if($text=~/hail/i)
  {
    plugin::Whisper("Now where did I put that-- Oh hey there $name, I Didn't see you there, but since you are here, let me ask you this, 'What you [$want] and why you looking at me?'");
  }
  elsif($text=~/want/i)
  {
    plugin::Whisper("Want? Want?! That's what all you kids do these days, want. Well let me tell you what I want! If you don't mind hearing an old man [$ask] for something");
  }
  elsif($text=~/ask/i)
  {
    plugin::Whisper("Oh, you'll listen? Well then, I suppose you believe there is something of it for you huh? Only reason why you would listen. Well then, sit down here and let me tell you a tale that is most [$hindering]");
  }
  elsif($text=~/hindering/i)
  {
    plugin::Whisper("Long ago, before the lands were developed and everything is how it seems today, the lands were wrought with war, famine, and disease. During these times, I wasn't much for war, you see, I was really as far from war as you could think!");
    plugin::Whisper("Well, I was only a kid during all this, and so I was as niave as the next kid, but I was determined to stop it all! I was tired of it, sick (Not like the others) of what was going on. So I set out to find a way to make it all end, to make it better; and this is what I got; [$got]");
    plugin::Whisper("Unfortunately, it was lost a little while back along with the design on how to make it. However, if you would be willing to [$gather] a few items for me, I am sure that I could jog my memory on a few things.");
    quest::setglobal([gather],[0],[ALL],[F]);
  }
    elsif($text=~/gather/i)
  {
    plugin::Whisper("Wonderful, since I have gotten older, my reflexes have slowed, so the first item I would like would be this wonderful little herb called [$Dragonbane_Herb]. Bring this to me, and I should have the energy to recall some of the items.");
  }
  elsif($text=~/Dragonbane Herb/i)
  {
    plugin::Whisper("Yes, [$Dragonbane_herb1]! Oh, you would like me to tell you where it is? Let's see... Hmm... In my youth, I found some in the area known as Siren's Grotto. Now if you wouldn't mind fetching me some, I'll return to my list.");
  }
  elsif($text=~/few/i)
  {
    plugin::Whisper("Yes, it seems that with each type of blood, there is a new set of properties, but here is a list of what I can use: [$Vampyre], [$Drachnid], and [$Dragon]. Sorry, but those are the only 3 that I know. Each one has different abilities, if you would like to see [$them], let me know.");
  }
  elsif($text=~/them/i)
  {
    plugin::Whisper("Here are the charms that I can make for you. [$Dragon_Charm1], [$Vampyre_Charm1], [$Drachnid_Charm1].");
  }
  elsif($text=~/Dragon Charm/i)
  {
    plugin::Whisper("So you seek power do ya? Well let me forwarn you that with great power comes great responsibility!");
    plugin::Whisper("Nah, I'm just muckin about! But if you truely want more power, then you'll have to do as I ask, nothing less!");
    plugin::Whisper("Alright then, since we both know that you are willing to do this, then it is time to get niddy griddy! I want you to find me [$rusty_dagger1]. When you find this, bring it back to me, with your [$charm] and I will tell you what is next.");
  }
  elsif($text=~/charm/i)
  {
    plugin::Whisper("Yes, the charm you got from me before!");
    plugin::Emote("Mumbles under breath");
  }
  elsif($text=~/next/i)
  {
    plugin::Whisper("Ah, yes, I see it now.... Very well, this next task will have you out and about for awhile as I need a few [$components].");
  }
  elsif($text=~/components/i)
  {
    plugin::Whisper("Yes, yes, the components are: [$Bone_Chips], [$Bone_Skull], [$Femur], and [$Toes]");
  }
  elsif($text=~/please/i)
  {
    plugin::Whisper("I need you to go to the Crypt of Dalnir and find me a [$dwarf]. But I seem to be forge-- Ah, of course! Back in my youth, when I was meddling around with the skull, I couldn't keep the jaw to stay on. So I need you to stop and buy me some [$small].");
  }
}
I THINK I have it right, but I KNOW that it isn't, or else it would be working lol...

(Sorry for being a nuisciance, but I am trying to learn this. )
Reply With Quote
  #10  
Old 07-29-2011, 02:00 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

you've used $Dragon_Charm1 and $dwarf for both a varlink and a saylink and maybe others. You should organize your variables a bit so they're not so confusing with the same names and don't use the same one twice.
watch in the quest log files for clues to quest syntax errors.
__________________
The Realm
Reply With Quote
  #11  
Old 07-29-2011, 02:01 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

I have no errors with the varlinks, or the quest:saylinks, what I am having an issue with is the qglobals....
Reply With Quote
  #12  
Old 07-29-2011, 02:09 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

i have never tried this saylink feature, but you are basically redefining the variable when you have both
Code:
my $Toes = quest::saylink("Toes");
my $Toes = quest::varlink("25760");
and unless the saylink feature needs variables redefined then it's a bad thing.
__________________
The Realm
Reply With Quote
  #13  
Old 07-29-2011, 02:14 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

I appreciate all your help with this, and I have those working just fine. Yes, I might have used those two lines together, but it doesn't read like that. How it reads is varlink before saylink in that instance, I know because I have it running on my server and I JUST tested it while posting this... my issue is with

Code:
quest::setglobal([gather],[0],[ALL],[F]);
What do I do with that? I pulled that from HERE.
Reply With Quote
  #14  
Old 07-29-2011, 02:14 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Well, there's a couple things...

You may have taken the help page a bit too literally. Generally having something in [] in an example is just to show you what that parameter is for. An actual setglobal line should look something like this:

quest::setglobal("bic",1,5,"F");

Also, once you've set it, it won't do anything unless you actually check if it is set somewhere to change how the script operates.

Check out the #Fezbin_Fizzles.pl script in the abysmal directory for a pretty good example of using a qglobal to change how the NPC acts depending on things you've done in the past. There are some other examples of how you might use them to track handins and such in some other scripts there. Just grep for "qglobal" and you should see them.

One last thing, make sure you read and understand the last paragraph on the quest tutorial page. If you don't set the options right or set the NPC up to allow for qglobals you'll have problems.

If you think you have it all setup and it still isn't working, check the quest_globals table in your database. You can verify if it is being set and what the data is there. You can also delete it if you mess up and want to go back to the start.
Reply With Quote
  #15  
Old 07-29-2011, 02:19 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Quote:
Originally Posted by lerxst2112 View Post
Well, there's a couple things...

You may have taken the help page a bit too literally. Generally having something in [] in an example is just to show you what that parameter is for. An actual setglobal line should look something like this:

quest::setglobal("bic",1,5,"F");

Also, once you've set it, it won't do anything unless you actually check if it is set somewhere to change how the script operates.

Check out the #Fezbin_Fizzles.pl script in the abysmal directory for a pretty good example of using a qglobal to change how the NPC acts depending on things you've done in the past. There are some other examples of how you might use them to track handins and such in some other scripts there. Just grep for "qglobal" and you should see them.

One last thing, make sure you read and understand the last paragraph on the quest tutorial page. If you don't set the options right or set the NPC up to allow for qglobals you'll have problems.

If you think you have it all setup and it still isn't working, check the quest_globals table in your database. You can verify if it is being set and what the data is there. You can also delete it if you mess up and want to go back to the start.
Thanks lerx =)
Reply With Quote
Reply


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 05:57 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