* @param client
	 */
	private void cmd_ask(final String arg, final Client client) {
		final String[] args = arg.split(" ");

		if (args.length < 2) {
			send("Syntax: ask <npc name> <keyword> <additional data>", client);
			return;
		}

		final Player player = getPlayer(client);           // get the player
		final NPC npc = getNPC(args[0].replace('_', ' ')); // get the npc we're referring to

		if (npc != null) {
			final String keyword = args[1]; // get the keyword;

			if (keyword.equals("quests")) {
				if( npc.isQuestgiver() ) {
					final List<Quest> quests = npc.getQuestsFor(player);

					send("Available Quests", client);
					send("================================================================================", client);

					boolean use_color = (color == Constants.ANSI || color == Constants.XTERM);

					for (final Quest quest : quests) {
						if (!quest.isComplete()) {
							// index of quest in the list or it's id
							client.write(quests.indexOf(quest) + ") " + quest.toDisplay(use_color));
						}

						client.write("" + Colors.WHITE);
					}

					send("================================================================================", client);
					send("* To accept a quest, type 'ask <npc> accept <quest identifier>')",                 client);
					send("* If you don't see a quest here, you are currently on it / already completed it.", client);
					send("* Also, finished quests are greyed out.",                                          client);
					send("** For the moment, the quest identifier is the quest's index in the list (0-?)",   client);
					// TODO the above hints should be reduced/removed since the problem may eventually be eliminated
				}
				else {
					final String str = "Impertinent scoundrel! It's not my job to find something for you to do.";
					final Message msg = npc.tell(player, str);

					addMessage(msg);
				}
			}
			else if (keyword.equals("accept")) {
				if (args.length == 3) {
					if( npc.isQuestgiver() ) {
						final Quest quest = npc.getQuestsFor(player).get(Utils.toInt(args[2], -1));

						if (quest != null) {
							if (!player.hasQuest(quest)) {
								// TODO fix this kludge, this should be more generic and not done this way
								if (quest.getName().equals("Help the Innkeeper")) {
									final String str = "We've been having problems with rats getting into our stores lately. It'd be much appreciated if you could dispatch them for us.";
									final Message msg = npc.tell(player, str);

									addMessage(msg);
								}

								final Quest new_quest = quest.getCopy();

								player.addQuest(new_quest);

								player.setActiveQuest(new_quest);

								send("New Quest - " + quest.getName(), client);
								send("Quest Added!", client);
							}
							else send("You already have that quest!", client);
						}
						else send("No such Quest!", client);
					}
					else  {
						String g = npc.getGender();
						String pn = (g.equals("M") ? "He" : (g.equals("F") ? "She" : "It"));

						send(pn + " looks at you irritatedly.", client);

						final String str = "What the heck do you want?! I haven't the faintest clue what you're going on about.";
						final Message msg = npc.tell(player, str);

						addMessage(msg);
					}
				}
			}
			else if (keyword.equals("about")) {
				if (args.length == 3) {
					// quests (by name?), conversation topics
				}
			}
			else if (keyword.equals("complete")) {
				// ask <npc> complete
				// ask <npc> complete <quest num>

				// the quest num here is (for now), simply the index of the quest in the player list of current quests

				if ( npc.isQuestgiver() ) {
					if (args.length >= 2) {	
						int questNum;

						Quest quest = null;

						// if there's an arg, get that quest, otherwise pick the
						// first of the questgiver's quests that the player currently has?

						// currently, we'll take the quest at the specified index
						if (args.length == 3) {
							questNum = Utils.toInt(args[2], -1);

							final List<Quest> quests = player.getQuests();

							if( questNum >= 0 && questNum < quests.size() ) {
								quest = player.getQuests().get(questNum);
							}
							else {
								send("Invalid Quest!", client);
								return;
							}
						}
						else {
							quest = player.getActiveQuest();
						}

						if (quest != null) {
							if ( npc.hasQuest(quest) ) {
								if( quest.isComplete() ) {
									// TODO these messages should come from quest data
									Message msg = null;

									msg = npc.tell(player, "Thanks a lot. Now we can quit worrying about our stock being consumed by vermin!");

									addMessage(msg);

									debug("Quest Completed!");

									msg = npc.tell(player, "Here's a reward for your efforts");

									addMessage(msg);

									final Reward r = quest.getReward();

									if( r != null ) {
										if( r.getCoins() != null && r.getCoins().numOfCopper() > 0 ) {
											// give player a reward
											giveMoney(player, Coins.gold(5));
										}
										else System.out.println("ASK: Quest Reward - Coins is NULL.");

										if( r.getItems() != null ) {
											//final List<Item> inv = player.getInventory();

											for(final Item item : r.getItems()) {
												final Item item1 = item.getCopy();

												initCreatedItem( item1 );

												item1.setLocation( player.getDBRef() );
												
												giveItem(player, item1);
											}
										}
										else System.out.println("ASK: Quest Reward - Items is NULL.");
									}
									else System.out.println("ASK: Quest Reward is NULL.");

									// TODO do something so the quest can't be considered again without redoing it
									player.removeQuest( quest );
								}
								else {
									Message msg = npc.tell(player, "Oh yeah? I can still hear the rats scuttling around down there!");
									addMessage(msg);
								}
							}
							else {
								send("Wrong questgiver!", client);
							}
						}
						else {
							send("No such Quest!", client);
						}
					}
				}
				else {
					final String str = "Beggars! Bunch of lazy bums, the lot of them. I'm not offering any reward for whatever it is you did!";
					final Message msg = npc.tell(player, str);

					addMessage(msg);
				}
			}
		}
		else {
			send("Ask who?", client);
		}
	}