@LabelIndex 263111
@StringIndex 33503
class 0 trader_nestle : merchant_for_newbie {
property:
	BuySellList SellList0 = {{"necklace_of_wisdom";20};{"blue_diamond_necklace";20};{"necklace_of_devotion";20};{"cat_seye_earing";20};{"coral_earing";20};{"red_cresent_earing";20};{"ring_of_wisdom";20};{"blue_coral_ring";20};{"ring_of_devotion";20}};
	BuySellList SellList1 = {{"sb_adv_defence_power1";20};{"sb_advanced_attack_power1";20};{"sb_might1";20};{"sb_battle_heal1";20};{"sb_vampiric_touch1";20};{"sb_ice_bolt1";20};{"sb_heal1";20};{"sb_group_heal1";20};{"sb_shield1";20};{"sb_breeze1";20};{"sb_wind_walk1";20};{"sb_curse:weakness";20};{"sb_curse:poison1";20};{"sb_cure_poison1";20};{"sb_flame_strike1";20};{"sb_drain_energy1";20};{"sb_elemental_heal1";20};{"sb_disrupt_undead1";20};{"sb_resurrection1";20};{"sb_blaze1";20};{"sb_summon_shadow1";20};{"sb_summon_silhouette1";20};{"sb_summon_unicorn_boxer1";20};{"sb_summon_blackcat1";20};{"sb_servitor_heal1";20};{"sb_aqua_swirl1";20};{"sb_arcane_acumen1";20};{"sb_energy_bolt1";20};{"sb_aura_burn1";20};{"sb_charm11";20};{"sb_concentration1";20};{"sb_water_breathing";20};{"sb_twister1";20};{"sb_poison1";20};{"sb_poison_recovery1";20};{"sb_confusion1";20};{"sb_cure_bleeding1";20};{"sb_dryad_root1";20};{"sb_mental_shield1";20};{"sb_body_to_mind1";20};{"sb_shadow_spark1";20};{"sb_surrender_to_earth1";20};{"sb_surrender_to_fire1";20};{"sb_surrender_to_poison1";20};{"sb_summon_cuti_cat1";20};{"sb_summon_unicorn_mirage1";20};{"sb_servitor_mana_charge1";20};{"sb_solar_spark1";20};{"sb_agility1";20};{"sb_empower1";20};{"sb_poison_cloud1";20};{"sb_focus1";20};{"sb_holy_weapon1";20};{"sb_touch_of_god1";20};{"sb_fire_resist1";20};{"sb_recharge1";20};{"sb_vampiric_rage1";20};{"sb_sleep1";20};{"sb_corpse_life_drain1";20};{"sb_night_murmur1";20};{"sb_blood_lust1";20};{"sb_pain_thorn1";20};{"sb_devotioin_of_shine1";20};{"sb_chill_flame1";20};{"sb_mass_frenzy1";20};{"sb_external_fear1";20};{"sb_entice_madness1";20};{"sb_pain_edge1";20};{"sb_inspire_life_force1";20};{"sb_devotioin_of_soul1";20};{"sb_burning_spirit1";20};{"sb_blaze_quake1";20};{"sb_eternal_flame1";20};{"sb_bind_will1";20};{"sb_aura_sway1";20};{"sb_engrave_seal_of_timid1";20};{"sb_pure_inspiration1";20};{"sb_power_of_paagrio1";20};{"sb_summon_mechanic_golem1";20};{"battle_manual_fallen_arrow";20};{"battle_manual_fallen_attack";20};{"battle_manual_rapid_attack";20};{"battle_manual_increase_power";20};{"battle_manual_detect_trap";20};{"battle_manual_defuse_trap";20};{"battle_manual_dark_strike";20};{"battle_manual_double_thrust";20};{"battle_manual_abyssal_blaze";20};{"battle_manual_penetrate_shot";20};{"battle_manual_erase_mark";20};{"battle_manual_change_weapon";20};{"battle_manual_furious_soul";20};{"battle_manual_dark_explosion";20};{"battle_manual_death_mark";20};{"battle_manual_fire_trap";20};{"battle_manual_fast_shot";20};{"battle_manual_surrender_to_unholy";20};{"battle_manual_rush";20};{"battle_manual_warp";20}};
	BuySellList SellList4 = {{"12312";20};{"12311";20};{"12313";20}};

handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,229) == 1 && gg::OwnItemCount(talker,3316) == 0 && gg::OwnItemCount(talker,3315) == 0 && gg::OwnItemCount(talker,3309) == 1 && gg::OwnItemCount(talker,3320) == 0 && gg::OwnItemCount(talker,3321) == 0 && gg::OwnItemCount(talker,3322) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Test of Witchcraft (In Progress)");
			}
			if( gg::HaveMemo(talker,229) == 1 && gg::OwnItemCount(talker,3309) >= 1 && gg::OwnItemCount(talker,3315) >= 1 && gg::OwnItemCount(talker,3316) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Test of Witchcraft (In Progress)");
			}
			if( gg::HaveMemo(talker,229) == 1 && gg::OwnItemCount(talker,3309) == 1 && gg::OwnItemCount(talker,3315) == 0 && ( gg::OwnItemCount(talker,3316) == 1 || gg::OwnItemCount(talker,3320) >= 1 || gg::OwnItemCount(talker,3321) >= 1 || gg::OwnItemCount(talker,3322) >= 1 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Test of Witchcraft (In Progress)");
			}
			if( gg::HaveMemo(talker,327) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Recover the Farmland (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,229) == 1 && gg::OwnItemCount(talker,3316) == 0 && gg::OwnItemCount(talker,3315) == 0 && gg::OwnItemCount(talker,3309) == 1 && gg::OwnItemCount(talker,3320) == 0 && gg::OwnItemCount(talker,3321) == 0 && gg::OwnItemCount(talker,3322) == 0 ) ) {
						myself::SetCurrentQuestID(229);
						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::ShowQuestPage(talker,"trader_nestle_q0229_01.htm",229);
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,229) == 1 && gg::OwnItemCount(talker,3309) >= 1 && gg::OwnItemCount(talker,3315) >= 1 && gg::OwnItemCount(talker,3316) == 0 ) ) {
						myself::SetCurrentQuestID(229);
						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::ShowQuestPage(talker,"trader_nestle_q0229_03.htm",229);
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,229) == 1 && gg::OwnItemCount(talker,3309) == 1 && gg::OwnItemCount(talker,3315) == 0 && ( gg::OwnItemCount(talker,3316) == 1 || gg::OwnItemCount(talker,3320) >= 1 || gg::OwnItemCount(talker,3321) >= 1 || gg::OwnItemCount(talker,3322) >= 1 ) ) ) {
						myself::SetCurrentQuestID(229);
						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::ShowQuestPage(talker,"trader_nestle_q0229_04.htm",229);
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || gg::HaveMemo(talker,327) ) {
						myself::SetCurrentQuestID(327);
						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,"trader_nestle_q0327_01.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,i0,reply,talker) {
		if( ask == 229 ) {
			myself::SetCurrentQuestID(229);
			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 == 229 ) {
			if( reply == 1 ) {
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::ShowQuestPage(talker,"trader_nestle_q0229_02.htm",229);
					myself::GiveItem1(talker,3315,1);
				}
			}
		}
		if( ask == 327 ) {
			myself::SetCurrentQuestID(327);
			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 == 327 ) {
			if( reply == 1 ) {
				myself::ShowPage(talker,"trader_nestle_q0327_02.htm");
			}
			if( reply == 2 ) {
				if( gg::OwnItemCount(talker,1852) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,1463,( gg::Rand(41) + 70 ));
						myself::DeleteItem1(talker,1852,1);
						myself::ShowPage(talker,"trader_nestle_q0327_03.htm");
					}
				} else {
					myself::ShowPage(talker,"trader_nestle_q0327_07.htm");
				}
			}
			if( reply == 3 ) {
				if( gg::OwnItemCount(talker,1853) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						i0 = gg::Rand(100);
						if( i0 < 40 ) {
							myself::GiveItem1(talker,1061,1);
						} else if( i0 < 84 ) {
							myself::GiveItem1(talker,734,1);
						} else {
							myself::GiveItem1(talker,735,1);
						}
						myself::DeleteItem1(talker,1853,1);
						myself::ShowPage(talker,"trader_nestle_q0327_04.htm");
					}
				} else {
					myself::ShowPage(talker,"trader_nestle_q0327_07.htm");
				}
			}
			if( reply == 4 ) {
				if( gg::OwnItemCount(talker,1854) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						i0 = gg::Rand(100);
						if( i0 < 59 ) {
							myself::GiveItem1(talker,736,1);
						} else {
							myself::GiveItem1(talker,737,1);
						}
						myself::DeleteItem1(talker,1854,1);
						myself::ShowPage(talker,"trader_nestle_q0327_05.htm");
					}
				} else {
					myself::ShowPage(talker,"trader_nestle_q0327_07.htm");
				}
			}
			if( reply == 5 ) {
				if( gg::OwnItemCount(talker,1855) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,2510,( gg::Rand(41) + 50 ));
						myself::DeleteItem1(talker,1855,1);
						myself::ShowPage(talker,"trader_nestle_q0327_06.htm");
					}
				} else {
					myself::ShowPage(talker,"trader_nestle_q0327_07.htm");
				}
			}
			if( reply == 6 ) {
				myself::ShowPage(talker,"trader_nestle_q0327_08.htm");
			}
			if( reply == 7 ) {
				myself::ShowPage(talker,"trader_nestle_q0327_09.htm");
			}
		}
		super;
	}

}
