/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\quests\bodquest\genbqrewardcommand.cs
Lines of code: 46
***********************************************************/


using System;
using Server;
using Server.Items;
using Server.Engines.BulkOrders;
using Server.Commands;

namespace Server.Engines.Quests.Bods
{	


	public class genbqrewardcommand
	{	
		public static void Initialize()
		{
			CommandSystem.Register( "genbqreward", AccessLevel.GameMaster, new CommandEventHandler( genbqreward_OnCommand ),true );
		}

		[Usage( "genbqreward" )]
		[Description( "Generates a bod quest reward " )]
		private static void genbqreward_OnCommand( CommandEventArgs e )
		{	
		Mobile from = e.Mobile;
		
		if ( e.Arguments.Length != 3 )
		{
		from.SendMessage("format: genbqreward (smith | tailor | carp | fletching | tinkering) (material amt) (intensity)");
		return;
		}		
		string type=e.Arguments[0];
		
		BodQuestType bqt = new BodQuestType("resource","resourcetype" ,e.GetInt32( 1 ),e.GetInt32( 2 ));		
		
		Item reward=null;
		
		if(type=="smith")reward=BodQuestType.RandomBlacksmithReward(bqt);
		else if(type=="tailor")reward=BodQuestType.RandomTailorReward(bqt);
		else if(type=="carp")reward=BodQuestType.RandomCarpenterReward(bqt);
		else if(type=="fletching")reward=BodQuestType.RandomFletcherReward(bqt);
		else if(type=="tinkering")reward=BodQuestType.RandomTinkerReward(bqt);
		else
		{
		from.SendMessage("Invalid bod quest type");
		return;
		}
		
		if(reward==null)
		{
		from.SendMessage("Unable to generate a reward");
		return;		
		}
		
		reward.Engraving = String.Format("{2} Quest Reward - Intensity: {0} Material amt: {1}",bqt.PrizeLevel,bqt.ResourceAmount,type);
		
		from.GiveItem(reward);	
		}
	}
}