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-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
  #2  
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
  #3  
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
  #4  
Old 07-17-2008, 04:46 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default sub EVENT_ITEM

Seems like I might of had a plugin problem, I grabbed updated versions and placed them in EQemu\plugins.

I then reduced sub EVENT_ITEM all the way him just wanting the item and then work my way up from there, but he still just eats everything, even if it's the right item.

Code:
sub EVENT_ITEM {  #1 open
	if (plugin::check_handin(\%itemcount, 1079 => 1)) { #2 open
		quest::exp(11);
		quest::summonitem(15036);
		quest::summonitem(15377);
		quest::summonitem(15378);
		quest::summonitem(15230);
    	          quest::summonitem(15376);
    } #2 closed
    elsif {  #3 opened
    	quest::say("I cannot provide the knowledge you seek, $name.");
    	quest::summonitem(1079); }
    }  #3 closed
    else { #4 opened
    	quest::say("You are no Wizard, and I know a Wizard when I see one!");
    	plugin::return_items(\%itemcount);
    } #4 closed
} #1 closed
Reply With Quote
  #5  
Old 07-17-2008, 05:05 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default !

It seems the elsif was breaking the sub EVENT_ITEM!
Reply With Quote
  #6  
Old 07-17-2008, 05:37 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Quote:
Originally Posted by JLB2414 View Post
Seems like I might of had a plugin problem, I grabbed updated versions and placed them in EQemu\plugins.

I then reduced sub EVENT_ITEM all the way him just wanting the item and then work my way up from there, but he still just eats everything, even if it's the right item.

Code:
sub EVENT_ITEM {  #1 open
	if (plugin::check_handin(\%itemcount, 1079 => 1)) { #2 open
		quest::exp(11);
		quest::summonitem(15036);
		quest::summonitem(15377);
		quest::summonitem(15378);
		quest::summonitem(15230);
    	          quest::summonitem(15376);
    } #2 closed
    elsif {  #3 opened
    	quest::say("I cannot provide the knowledge you seek, $name.");
    	quest::summonitem(1079); }
    }  #3 closed
    else { #4 opened
    	quest::say("You are no Wizard, and I know a Wizard when I see one!");
    	plugin::return_items(\%itemcount);
    } #4 closed
} #1 closed
Nope, relook at your code above... you didn't account for a closed bracket. What happens when you do my last event code? And yes, your elsif won't work like that. You must have a condition for an elsif.
Reply With Quote
  #7  
Old 07-17-2008, 05:43 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default Removing Gold

From my last item event, if you want to remove the gold part, try this:
Code:
sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 1079=>1)) {
    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
  #8  
Old 07-17-2008, 06:09 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default using your last code

Using your last EVENT_ITEM he simply just stands there as always what I did was used your code with the exception of one bracket I took out.

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);
    }
  } ########### REMOVED
  else {
    quest::say("I have no use for this, $name.");
    plugin::return_items(\%itemcount);
  }
}
Removing that bracket makes the quest work, but if you just turn in the book, he simply keeps it, and says "I have no use for this, $name." Giving him any other item he returns.

Since you posted I've tried:

Code:
elsif (plugin::check_handin(\%itemcount, 1079 => 1)) {
    	quest::say("I cannot provide the knowledge you seek, $name.");
    	quest::summonitem(1079); 
}
and I've tried,

Code:
 if (plugin::check_handin(\%itemcount, 1079 => 1)) {
    	quest::say("I cannot provide the knowledge you seek, $name.");
    	quest::summonitem(1079); 
}
... basically im just trying to figure out how the player can get the book back if the money isn't handed in with it.

Everything else works.

This is what I have in the .pl right now for sub EVENT_ITEM for the time being.

Code:
sub EVENT_ITEM { 
	if (plugin::check_handin(\%itemcount, 1079 => 1))
	 	{ 
			quest::exp(11);
			quest::summonitem(15036);
			quest::summonitem(15377);
			quest::summonitem(15378);
			quest::summonitem(15230);
    		quest::summonitem(15376);
    	}
   
    else 
    	{
    		quest::say("Don't waste my time, $race!");
    		plugin::return_items(\%itemcount);
    	}
}
I found out about #reloadquest... and that has been really helpful in actually testing the script so far.

I thought I had to completely reboot the server everytime I tried a new script... no wonder my first script took 6 hours lol!
Reply With Quote
  #9  
Old 07-17-2008, 06:32 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default Over complicated and pointless.

Other than just wanting it to work for my own personal glory at this point; I think I Chaos is completely right, it will probably just lead to complaining if the wrong cash amount is handed in since I cannot have the npc give back cash if it was working.

I liked the idea of the NPC charging for his skill to decipher the tome, but I will settle for characters just buying an additional item off an npc that is equivalent to 15g to turn in, in addition to the tome.

That way the characters are still paying, but my quest buddy is doing charity work... he'll get over it !

Thanks a million for the help joligario!
Reply With Quote
  #10  
Old 07-17-2008, 06:46 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Quote:
Originally Posted by JLB2414 View Post
Using your last EVENT_ITEM he simply just stands there as always what I did was used your code with the exception of one bracket I took out...
That's because the bracket needed to be in there. Gotta count the brackets. If it didn't fire, that means that condition wasn't met. One of these days try the one I posted without the gold. Make sure you send the reloadquest command after posting your new .pl.
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 09:02 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