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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-11-2008, 05:30 PM
Sylaei
Hill Giant
 
Join Date: Jan 2007
Posts: 124
Default Lang quest - $qglobals not working.

Ok, guys, I give up. I can't get this to work. I'm sure the quest is right, I think this might be something I need to add or change in the database but I can't seem to find it.

I have a new npc in pok that I want to teach you a lang for pp. I thought I'd use a global variable to determine if you had paid and then let you tell him what lang you wanted to learn. I realize there are eaiser ways to do this i.e. turn in an item, but I wanted to see if this was possible. It should be, but I'm stumped.
Here is the quest so far:

Code:
#Script to learn a language for 10pp each.
sub EVENT_SAY
{
 if($text=~/Hail/i)
  {
    quest::say("I can teach you a Language if you will give me 10 pp and then tell me the language you wish to learn.  I can teach the following languages: Barbarian, Erudian, Elvish, Dark Elvish, Dwarvish");
  }
  if($text=~/Barbarian/i)
  {
    if (defined($qglobals{lang}))
    {
        quest:setlanguage(1,100);
        quest:delglobal("lang");
    }
    else
    {
        quest::say("You must pay first! Nobody gets barbarian for free.");
    }
  }
  if($text=~/Erudian/i)
  {
    if (defined($qglobals{lang}))
    {
        quest:setlanguage(2,100);
        quest:delglobal("lang");
    }
    else
    {
        quest::say("You must pay first! Nobody gets a free languague.");
    }
  }
  if($text=~/Elvish/i)
  {
    if (defined($qglobals{lang}))
    {
        quest:setlanguage(3,100);
        quest:delglobal("lang");
    }
    else
    {
        quest::say("You must pay first! Nobody gets a free languague.");
    }
  }
  if($text=~/Dark Elvish/i)
  {
    if (defined($qglobals{lang}))
    {
        quest:setlanguage(4,100);
        quest:delglobal("lang");
    }
    else
    {
        quest::say("You must pay first! Nobody gets a free languague.");
    }
  }
  if($text=~/Dwarvish/i)
  {
    if (defined($qglobals{lang}))
    {
        quest:setlanguage(5,100);
        quest:delglobal("lang");
    }
    else
    {
        quest::say("You must pay first! Nobody gets a free languague.");
    }
  }
}

sub EVENT_ITEM
{
    if ($platinum == 10)
    {
        quest::setglobal("lang", 1, 1, "Y1");
        quest::say("Done.  Which Language do you want to learn?");

    }
}
__________________
Syl

"The significant problems we have cannot be solved at the same level of thinking with which we created them."
Albert Einstein
Reply With Quote
 

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 05:37 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3