case "quests":
iTest = 0;
Dialog.text = DLG_TEXT[19];
int iQuantityShipGoods;
int iQuestTradeGoods;
if (CheckAttribute(pchar, "quest.generate_trade_quest_progress.iQuantityGoods")) // LDH was quest.quest.generate, fixed 01Jan09
{
iQuantityShipGoods = pchar.quest.generate_trade_quest_progress.iQuantityGoods;
iQuestTradeGoods = pchar.quest.generate_trade_quest_progress.iTradeGoods;
}
if (CheckQuestAttribute("generate_trade_quest_progress", "begin") || CheckQuestAttribute("generate_trade_quest_progress", "failed"))
{
if (GetSquadronGoods(pchar, iQuestTradeGoods) >= iQuantityShipGoods && pchar.quest.generate_trade_quest_progress.iTradeColony == GetCurrentTownID() && CheckAttribute(PChar, "quest.generate_trade_quest_progress.iTradeExp"))
{
dialog.text = DLG_TEXT[20];
link.l1 = DLG_TEXT[21];
link.l1.go = "generate_quest_2";
}
}
else
{
if (!CheckQuestAttribute("generate_trade_quest_progress", "begin"))
{
link.l1 = DLG_TEXT[22];
link.l1.go = "generate_quest";
}
}
link.l99 = DLG_TEXT[23];
Link.l99.go = "no_quests";
break;