View Single Post
  #5  
Old 03-06-2020, 05:20 PM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 197
Default

It looks like you can use quest::MerchantSetItem to add merchant inventory through a perl script. I have never used this but maybe? Replace npcid with the npc's ID, and howmanycaps with the total number you would like the npc to stock.

Code:
sub EVENT_SAY {
	if ($text=~/hail/i) 
	{
		quest::say("a response.");
	}
}

sub EVENT_SPAWN {
	#quest::MerchantSetItem(uint32 npc_id, uint32 item_id, [uint32 quantity])
	quest::MerchantSetItem(npcid, 1001, howmanycaps);
}
__________________
https://www.project1999.com
Reply With Quote