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 03-22-2015, 05:48 AM
dagulus2
Hill Giant
 
Join Date: Feb 2013
Posts: 220
Question Quest to Learn a Recipe

Is there anyway that you could have an Item (say a book) add a Recipe to a player, either when its read or as a click effect or even simply when you pick it up?

Looked through the forums and it seems to be possible, but I can't find any examples as to how.
Reply With Quote
  #2  
Old 04-23-2015, 09:25 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Wrong forum. Should be in Quest:Q & A, just fyi.

Code:
sub EVENT_ITEM_CLICK {
	if ($itemid = xxxx) {
		$client->LearnRecipe(xx);
	}
}
Save with script_xxxx.pl in your /quests/global/items directory.

Ensure the item has a script number which coincides with whatever you put in place of xxxx (for script_xxxx.pl).

Not quite sure if it will work on books, have yet to try it, though at the moment I cannot think of why it wouldn't.
Reply With Quote
  #3  
Old 04-24-2015, 07:10 AM
dagulus2
Hill Giant
 
Join Date: Feb 2013
Posts: 220
Default

I wondered where this thread had gone, must have posted it prior to drinking my first cup of tea of the morning.

Tried the script, doesn't seem to do anything.

The modified it to:

Code:
sub EVENT_ITEM_CLICK {
	if ($itemid = 97749) {
		$client->LearnRecipe(11238); #Testing /This is probably not the right recipe id for this item
		$client->Message(13, "You should have learnt recipe 11238.");
	}
}
As far as I can tell, it is not firing when clicked.
Reply With Quote
  #4  
Old 04-24-2015, 07:23 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Missing a .. "=" in the if statement.
Reply With Quote
  #5  
Old 04-24-2015, 08:37 AM
dagulus2
Hill Giant
 
Join Date: Feb 2013
Posts: 220
Default

Good catch, but I still do not think it's firing.

Is now:

Code:
sub EVENT_ITEM_CLICK {
	
	$client->Message(13, "You have clicked this item!");
	
	if ($itemid == 97749) {
		$client->LearnRecipe(11238); #Testing /This is probably not the right recipe id for this item
		$client->Message(13, "You should have learnt recipe 11238.");
	}
}
It brings up the book text, but nothing else seems to happen.
Reply With Quote
  #6  
Old 04-24-2015, 09:16 AM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Ok, make a statless item, non-book (as I assume you made it a book before) and try:

Code:
sub EVENT_ITEM_CLICK {
	$client->Message(13, "You have clicked this item!");
	if ($itemid == 97749) {
		my $booktext = "Blah blah blah";
		$client->ReadBook($booktext, 1);
		$client->LearnRecipe(11238); #Testing /This is probably not the right recipe id for this item
		$client->Message(13, "You should have learnt recipe 11238.");
	}
}
I'm still not in a testing environment atm else I would, sorry bud.
Reply With Quote
  #7  
Old 04-24-2015, 10:58 AM
dagulus2
Hill Giant
 
Join Date: Feb 2013
Posts: 220
Default

Quote:
Originally Posted by ghanja View Post
Ok, make a statless item, non-book (as I assume you made it a book before) and try:

Code:
sub EVENT_ITEM_CLICK {
	$client->Message(13, "You have clicked this item!");
	if ($itemid == 97749) {
		my $booktext = "Blah blah blah";
		$client->ReadBook($booktext, 1);
		$client->LearnRecipe(11238); #Testing /This is probably not the right recipe id for this item
		$client->Message(13, "You should have learnt recipe 11238.");
	}
}
I'm still not in a testing environment atm else I would, sorry bud.
Ok, an item with itemstype 0 and clickeffect 12484 and the above script works. Thanks for your help!
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 07:36 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3