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 11-25-2009, 06:04 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

I got one more question - what If I want npc to report which item specifically was given to him? I do not want to make 100 IF statements, so is something like this possible:

Give item to npc > item id stored into $a > npc says "you gave me item id $a"

or close to that?
Reply With Quote
  #2  
Old 11-25-2009, 06:40 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

From the Quest Tutorial Wiki Page:

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

Code:
$item1 - The item# in the first slot.
$item2 - The item# in the second slot.
$item3 - The item# in the third slot.
$item4 - The item# in the fourth slot.
Just use those variables for your script.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 11-25-2009, 06:51 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

I didn't test this, but maybe something like this?
Code:
sub EVENT_ITEM
{
	if($item1 > 0)
	{
		$itemName = quest::getItemName($item1);
		quest::say("Thank you for the $itemName");
	}
	if($item2 > 0)
	{
		$itemName = quest::getItemName($item2);
		quest::say("...and thank you for the $itemName");
	}
	if($item3 > 0)
	{
		$itemName = quest::getItemName($item3);
		quest::say("...and thank you for the $itemName");
	}
	if($item4 > 0)
	{
		$itemName = quest::getItemName($item4);
		quest::say("...and thank you for the $itemName");
	}
	if($platinum > 0)
	{
		quest::say("Thank you for the $platinum Platinum");
	}
	if($gold > 0)
	{
		quest::say("...and thank you for the $gold Gold");
	}
	if($silver > 0)
	{
		quest::say("...and thank you for the $silver Silver");
	}
	if($copper > 0)
	{
		quest::say("...and thank you for the $copper Copper");
	}
	quest::say("...but I'm not interested.");
	quest::emote("gives back your stuff");

	plugin::return_items(\%itemcount);
	if($platinum != 0 || $gold !=0 || $silver != 0 || $copper != 0)
	{
		quest::givecash($copper, $silver, $gold, $platinum);
	}
}
Reply With Quote
Reply

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 12:24 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