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-16-2008, 07:06 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default Ah

Oh, he is probably picking up the "teach" in his own text. Here is a fix:
Code:
sub EVENT_SAY
{
  if ($text = ~/hail/i) 
  { 
    if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard")) 
    {
    quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
    }
    
    else 
    {
     quest::say ("I have nothing to teach you at this time.");
    }
  }
  
  elsif ($text = ~/teach/i) 
  {
    if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard"))
    {
    quest::say ("I knew you would be interested! Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
    }
    
    else 
    {
    quest::say ("I have nothing to teach you at this time.");
    }
  }
}
Going to work, so I can look at rest later if noone else replies by the time I get back.
Reply With Quote
  #2  
Old 07-16-2008, 10:46 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default hmm

Elsif definitely stopped him from firing off both strings of text, but now when you tell him "teach" he simply says the first if repeatedly.


I changed sub EVENT_ITEM to:

Code:
sub EVENT_ITEM
{
  if($class eq "Wizard")
  {
    if (plugin::check_handin(\%itemcount, 1079 => 1))
    {
    	if ($gold == 15) 
    {
      		quest::exp(15);
      		quest::summonitem(15036);
      		quest::summonitem(15377);
      		quest::summonitem(15378);
      		quest::summonitem(15230);
     	 	quest::summonitem(15376);
    }
    
    else 
    {
      quest::say("I have no use for this item!");
      plugin::return_items(\%itemcount);
    }
    
  	else 
  	{
    quest::say("You are no Wizard, And I know a Wizard when I see one!");
    plugin::return_items(\%itemcount);
    }
}
Yet, he still remains to be the hungry little item eater I've came to know him as.
Reply With Quote
  #3  
Old 07-16-2008, 11:01 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

from my experience if quest plugin check involves both cash and items- you must be EXTRA specific with it.

for once i belvie they have to be inside same If statement, and what si important if you give him 15 gold and 1 copper - he will just eat the items cuase the cash specified did not match

overall- AVOID using cash give in at all, cuase plugin return does not work for wrong cash given

also you may want to check for items BEFORE you check if he is wizard, cuase otherwise he will eat the items first, determine that you nto wizard and wihout plugin return- you won't get anything back
Reply With Quote
  #4  
Old 07-16-2008, 11:08 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

oh yeah i think you have a missing parentesis. like A LOT of them

Code:
sub EVENT_ITEM
{  - OPENED  1 
  if($class eq "Wizard")
  {  - OPENED 2 
    if (plugin::check_handin(\%itemcount, 1079 => 1))
    { - OPENED 3 
    	if ($gold == 15) 
              { - OPENED 4
      		quest::exp(15);
      		quest::summonitem(15036);
      		quest::summonitem(15377);
      		quest::summonitem(15378);
      		quest::summonitem(15230);
     	 	quest::summonitem(15376);
                } - CLOSED 4
    
    else 
    {  OPENED 5
      quest::say("I have no use for this item!");
      plugin::return_items(\%itemcount);
    }  CLOSED 5
    
  	else 
  	{  OPENED 6
    quest::say("You are no Wizard, And I know a Wizard when I see one!");
    plugin::return_items(\%itemcount);
             }  CLOSED 6
} CLOSED ????
Reply With Quote
  #5  
Old 07-17-2008, 07:39 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default Copy/Paste Bug

There seems to be something wrong with the way we are pasting the code in to your .pl file. You are getting extra spaces (possibly CRs). Try this text for the say event and after you paste it in, try to make it look like it does on the board.

Code:
sub EVENT_SAY {
  if ($text=~/hail/i) { 
    if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard")) {
      quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
    }
    else {
      quest::say ("I have nothing to teach you at this time.");
    }
  }
  elsif ($text=~/teach/i) {
    if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard")) {
      quest::say ("I knew you would be interested! Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
    }
    else {
      quest::say ("I have nothing to teach you at this time.");
    }
  }
}
Reply With Quote
  #6  
Old 07-17-2008, 09:22 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default Part 2

Ok, so you can try this. You might just consider the 15 gold as a donation if they are not wizard or they turn in the wrong item... That's what they get for trying to buck the system!!

Code:
sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 1079 => 1) && ($gold==15)) {
    if($class eq "Wizard") {
      quest::exp(15);
      quest::summonitem(15036);
      quest::summonitem(15377);
      quest::summonitem(15378);
      quest::summonitem(15230);
      quest::summonitem(15376);
    }
    else {
      quest::say("You are no Wizard, and I know a Wizard when I see one!");
      quest::summonitem(1079);
    }
  }
  else {
    quest::say("I have no use for this, $name.");
    plugin::return_items(\%itemcount);
  }
}
Reply With Quote
  #7  
Old 07-17-2008, 10:59 AM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default hmn

The text part is working great now .
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 11:21 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