class 1 ssq_npc_depravity_priest : citizen
{
parameter:
	int	PosX1 = 0;
	int	PosY1 = 0;
	int	PosZ1 = 0;
	int	PosX2 = 0;
	int	PosY2 = 0;
	int	PosZ2 = 0;
	int	PosX3 = 0;
	int	PosY3 = 0;
	int	PosZ3 = 0;
	int	PosX4 = 0;
	int	PosY4 = 0;
	int	PosZ4 = 0;
	int	PosX5 = 0;
	int	PosY5 = 0;
	int	PosZ5 = 0;
	int	PosX6 = 0;
	int	PosY6 = 0;
	int	PosZ6 = 0;
	int	PosX7 = 0;
	int	PosY7 = 0;
	int	PosZ7 = 0;
	int	PosX8 = 0;
	int	PosY8 = 0;
	int	PosZ8 = 0;

handler:
	EventHandler TALKED(talker)
	{
		myself::ShowPage(talker,"marketeer_of_mammon001.htm");
	}

	EventHandler MENU_SELECTED(talker,ask,reply,i0,i1,i2,i3)
	{
		if( ask == 506 )
		{
			if( reply == 3 )
			{
				myself::ShowPage(talker,"marketeer_of_mammon_q0506_04.htm");
			}
			else if( reply == 4 )
			{
				myself::ShowPage(talker,"marketeer_of_mammon_q0506_04.htm");
			}
			else if( reply == 5 )
			{
				myself::ShowPage(talker,"marketeer_of_mammon_q0506_04.htm");
			}
		}
		else if( ask == -240 )
		{
			if( myself::OwnItemCount(talker,5575) < reply )
			{
				myself::ShowPage(talker,"marketeer_of_mammon_q0506_12.htm");
			}
			else if( reply <= 0 )
			{
				myself::ShowPage(talker,"marketeer_of_mammon_q0506_14.htm");
			}
			else if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
			{
				myself::ShowSystemMessage(talker,1118);
				return;
			}
			myself::DeleteItem1(talker,5575,reply);
			myself::GiveItem1(talker,57,reply);
			myself::ShowPage(talker,"marketeer_of_mammon_q0506_13.htm");
		}
		super;
	}

}
