@LabelIndex 396486
@StringIndex 59198
class 0 attribute_manager1 : ai_attribute_manager {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 2 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Containing the Attribute Power (in progress)");
			}
			if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 8 && gg::GetMemoStateEx(talker,10275,1) == 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Containing the Attribute Power (in progress)");
			}
			if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 3 && gg::OwnItemCount(talker,13861) < 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Containing the Attribute Power (in progress)");
			}
			if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 4 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Containing the Attribute Power (in progress)");
			}
			if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 5 && gg::OwnItemCount(talker,13861) < 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Containing the Attribute Power (in progress)");
			}
			if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Containing the Attribute Power (in progress)");
			}
			if( _choiceN > 1 ) {
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 ) {
			switch(_code) {
				case 0: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 2 && gg::GetMemoStateEx(talker,10275,1) == 1 ) ) {
						myself::SetCurrentQuestID(10275);
						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::ShowPage(talker,"attribute_manager1_q10275_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 8 && gg::GetMemoStateEx(talker,10275,1) == 2 ) ) {
						myself::SetCurrentQuestID(10275);
						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::ShowPage(talker,"attribute_manager1_q10275_03.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 3 && gg::OwnItemCount(talker,13861) < 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) ) {
						myself::SetCurrentQuestID(10275);
						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::ShowPage(talker,"attribute_manager1_q10275_05.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 4 && gg::GetMemoStateEx(talker,10275,1) == 1 ) ) {
						myself::SetCurrentQuestID(10275);
						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,13845,gg::OwnItemCount(talker,13845));
						myself::ShowPage(talker,"attribute_manager1_q10275_09.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 5 && gg::OwnItemCount(talker,13861) < 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) ) {
						myself::SetCurrentQuestID(10275);
						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::ShowPage(talker,"attribute_manager1_q10275_11.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) ) {
						myself::SetCurrentQuestID(10275);
						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::ShowPage(talker,"attribute_manager1_q10275_15.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 10275 ) {
			myself::SetCurrentQuestID(10275);
			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;
			}
		}
		if( ask == 10275 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 2 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::ShowPage(talker,"attribute_manager1_q10275_02.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 2 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,13845,1);
					myself::SetMemoState(talker,10275,3);
					myself::ShowPage(talker,"attribute_manager1_q10275_04.htm");
					myself::SetFlagJournal(talker,10275,3);
					myself::ShowQuestMark(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 3 && gg::OwnItemCount(talker,13861) < 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::ShowPage(talker,"attribute_manager1_q10275_06.htm");
				}
			}
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 3 && gg::OwnItemCount(talker,13861) < 6 && gg::OwnItemCount(talker,13845) == 0 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,13845,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_07.htm");
				} else if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 3 && gg::OwnItemCount(talker,13861) < 6 && gg::OwnItemCount(talker,13845) == 1 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::GiveItem1(talker,13845,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_08.htm");
				}
			}
			if( reply == 5 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 4 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::CastBuffForQuestReward(talker,172687361);
					myself::GiveItem1(talker,13845,1);
					myself::DeleteItem1(talker,13861,gg::OwnItemCount(talker,13861));
					myself::SetMemoState(talker,10275,5);
					myself::ShowPage(talker,"attribute_manager1_q10275_10.htm");
					myself::SetFlagJournal(talker,10275,5);
					myself::ShowQuestMark(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 6 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 5 && gg::OwnItemCount(talker,13861) < 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::ShowPage(talker,"attribute_manager1_q10275_12.htm");
				}
			}
			if( reply == 7 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 5 && gg::OwnItemCount(talker,13861) < 6 && gg::OwnItemCount(talker,13845) == 0 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,13845,1);
					myself::CastBuffForQuestReward(talker,172687361);
					myself::ShowPage(talker,"attribute_manager1_q10275_13.htm");
				} else if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 5 && gg::OwnItemCount(talker,13861) < 6 && gg::OwnItemCount(talker,13845) >= 1 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::GiveItem1(talker,13845,1);
					myself::CastBuffForQuestReward(talker,172687361);
					myself::ShowPage(talker,"attribute_manager1_q10275_14.htm");
				}
			}
			if( reply == 11 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,10526,2);
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::DeleteItem1(talker,13861,gg::OwnItemCount(talker,13861));
					myself::IncrementParam(talker,0,202160);
					myself::IncrementParam(talker,1,20375);
					myself::RemoveMemo(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,10275);
					gg::AddLog(3,talker,10275);
					myself::SetOneTimeQuestFlag(talker,10275,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_16.htm");
				}
			}
			if( reply == 12 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,10525,2);
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::DeleteItem1(talker,13861,gg::OwnItemCount(talker,13861));
					myself::IncrementParam(talker,0,202160);
					myself::IncrementParam(talker,1,20375);
					myself::RemoveMemo(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,10275);
					gg::AddLog(3,talker,10275);
					myself::SetOneTimeQuestFlag(talker,10275,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_17.htm");
				}
			}
			if( reply == 13 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,10521,2);
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::DeleteItem1(talker,13861,gg::OwnItemCount(talker,13861));
					myself::IncrementParam(talker,0,202160);
					myself::IncrementParam(talker,1,20375);
					myself::RemoveMemo(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,10275);
					gg::AddLog(3,talker,10275);
					myself::SetOneTimeQuestFlag(talker,10275,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_18.htm");
				}
			}
			if( reply == 14 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,10522,2);
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::DeleteItem1(talker,13861,gg::OwnItemCount(talker,13861));
					myself::IncrementParam(talker,0,202160);
					myself::IncrementParam(talker,1,20375);
					myself::RemoveMemo(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,10275);
					gg::AddLog(3,talker,10275);
					myself::SetOneTimeQuestFlag(talker,10275,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_19.htm");
				}
			}
			if( reply == 15 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,10524,2);
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::DeleteItem1(talker,13861,gg::OwnItemCount(talker,13861));
					myself::IncrementParam(talker,0,202160);
					myself::IncrementParam(talker,1,20375);
					myself::RemoveMemo(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,10275);
					gg::AddLog(3,talker,10275);
					myself::SetOneTimeQuestFlag(talker,10275,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_20.htm");
				}
			}
			if( reply == 16 ) {
				if( gg::HaveMemo(talker,10275) == 1 && gg::GetMemoState(talker,10275) == 6 && gg::GetMemoStateEx(talker,10275,1) == 1 ) {
					myself::GiveItem1(talker,10523,2);
					myself::DeleteItem1(talker,13845,gg::OwnItemCount(talker,13845));
					myself::DeleteItem1(talker,13861,gg::OwnItemCount(talker,13861));
					myself::IncrementParam(talker,0,202160);
					myself::IncrementParam(talker,1,20375);
					myself::RemoveMemo(talker,10275);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,10275);
					gg::AddLog(3,talker,10275);
					myself::SetOneTimeQuestFlag(talker,10275,1);
					myself::ShowPage(talker,"attribute_manager1_q10275_21.htm");
				}
			}
		}
		super;
	}

}
