Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2019, 09:30 PM
woton
Sarnak
 
Join Date: Mar 2019
Posts: 88
Default Merchant

Was wanting to make a merchant that will take a common item like a diamond and give the player an xp potion. Any idea on how to do this?
Reply With Quote
  #2  
Old 12-17-2019, 03:53 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

This just an example, with item trade, (this will trade a breadcake for a skin of milk.) I use this simple one for various npc's I have. (with different items)

Code:
sub EVENT_ITEM {

	if(plugin::check_handin(\%itemcount, 13005 => 1)) {
		quest::say("Thank you $name, here is the item you traded for.");
		quest::summonitem(13006);
	}
	else {
         #quest::say("I have no use for this, $name. You can have it back");
         plugin::return_items(\%itemcount);
    }
}
__________________
Hanging out at Antonica.World
Reply With Quote
  #3  
Old 12-17-2019, 08:28 PM
woton
Sarnak
 
Join Date: Mar 2019
Posts: 88
Default

Quote:
Originally Posted by Huppy View Post
This just an example, with item trade, (this will trade a breadcake for a skin of milk.) I use this simple one for various npc's I have. (with different items)

Code:
sub EVENT_ITEM {

	if(plugin::check_handin(\%itemcount, 13005 => 1)) {
		quest::say("Thank you $name, here is the item you traded for.");
		quest::summonitem(13006);
	}
	else {
         #quest::say("I have no use for this, $name. You can have it back");
         plugin::return_items(\%itemcount);
    }
}

Really appreciate the help man, cant say thank you all enough. Hate to constantly ask questions on the forums, but we are so new to this.
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 07:49 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