| 
   | 
   | 
  
 
    | 
    | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
   | 
  
	
		
   
   
      | Quests::Q&A This is the quest support section | 
    
    
   
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 04:23 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				Clearing Merchant Inventory
			 
			 
			
		
		
		
		I could had sworn I used to be able to clear merchant inventory like this. 
	Code: 
	quest::merchantclear($npc->GetNPCTypeID()); 
 But it does not appear to be working anymore. What am I doing wrong here?  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 06:38 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Mar 2003 
					
					
					
						Posts: 1,500
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I don't see that command. Are you thinking the ClearMerchantTemp()? 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 07:00 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I am thinking a few years ago I may had created a custom command. Is that ClearMerchantTemp valid and working? 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 07:28 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Mar 2003 
					
					
					
						Posts: 1,500
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		It is in the code, but I don't think there is a perl export for it. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 08:26 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  joligario
					 
				 
				It is in the code, but I don't think there is a perl export for it. 
			
		 | 
	 
	 
 That is probably what I did last time was modify the source.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 08:32 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  provocating
					 
				 
				That is probably what I did last time was modify the source. 
			
		 | 
	 
	 
 Did you attempt what I said?  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 09:00 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Not yet, have not had a chance yet. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 09:01 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  provocating
					 
				 
				Not yet, have not had a chance yet. 
			
		 | 
	 
	 
 Okay, just keep me posted.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 11:22 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  Kingly_Krab
					 
				 
				Did you attempt what I said? 
			
		 | 
	 
	 
 Yeah definitely not working, the temp merchant list keeps getting larger.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-25-2013, 09:24 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Sep 2008 
					Location: So. California 
					
					
						Posts: 219
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Is this what you are looking for? If not perhaps it can do what you need.. 
	Code: 
	quest::MerchantSetItem(merchant's npc id, item id, quanity of item) - changes the number of the item that the merchant has available to sell
quest::MerchantCountItem(merchant npc id, item id) returns the number of that item in stock. 
  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 08:20 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Would $npc->ClearItemList() not work? 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 09:46 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Mar 2003 
					
					
					
						Posts: 1,500
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		That looks like it is for loot only. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 09:49 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  joligario
					 
				 
				That looks like it is for loot only. 
			
		 | 
	 
	 
 Okay, I was unsure, and my server was down, thanks for the information.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				10-24-2013, 11:18 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		It did not seem to work, I put a  
	Code: 
	$npc->ClearItemList(); 
 in the script right before a shout, I heard the shout but the merchant still had the same items. I am doing a script that dumps random items on the merchant and indeed the random items get loaded during the initial run, but never get cleared out before the next item load.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	| Thread Tools | 
	
 
	| 
	
	
	
	 | 
	
 
	| Display Modes | 
	
 
	
	
	
	
		
		  Hybrid Mode 
		
	 
	
	 | 
	
	
 
 
	
		
	
		 
		Posting Rules
	 | 
 
	
		
		You may not post new threads 
		You may not post replies 
		You may not post attachments 
		You may not edit your posts 
		 
		
		
		
		
		HTML code is Off 
		 
		
	  | 
 
 
	 | 
	
		
	 | 
 
 
All times are GMT -4. The time now is 08:16 AM. 
 
		 
	 
 
 
     | 
     | 
    
   
      | 
     | 
      | 
    
   
     | 
      | 
     | 
    
   
       | 
      | 
       | 
     
    
    
  | 
   |