@LabelIndex 6446
@StringIndex 1312
class 0 guild_master_kamael : guild_master_kamael_subjob {
parameter:
	int	gender = 1;
	int	lv1_class1 = 123;
	int	lv1_class2 = 124;
	int	lv2_class11 = 125;
	int	lv2_class21 = 126;
	int	proof111 = 62;
	int	proof112 = 9753;
	int	proof121 = 63;
	int	proof122 = 9772;
	int	lv2_class1 = 125;
	int	lv2_class2 = 126;
	int	lv3_class11 = 127;
	int	lv3_class12 = 128;
	int	lv3_class21 = 129;
	int	lv3_class22 = 130;
	int	proof211 = 64;
	int	proof212 = 9760;
	int	proof221 = 65;
	int	proof222 = 9806;
	int	proof231 = 66;
	int	proof232 = 9782;
	string	fnClassList11 = "master_all_kamael003m.htm";
	string	fnClassList12 = "master_all_kamael003f.htm";
	string	fnLowLevelNoProof11 = "master_all_kamael008ma.htm";
	string	fnLowLevelNoProof12 = "master_all_kamael008fa.htm";
	string	fnLowLevel11 = "master_all_kamael009ma.htm";
	string	fnLowLevel12 = "master_all_kamael009fa.htm";
	string	fnNoProof11 = "master_all_kamael010ma.htm";
	string	fnNoProof12 = "master_all_kamael010fa.htm";
	string	fnAfterClassChange11 = "master_all_kamael011ma.htm";
	string	fnAfterClassChange12 = "master_all_kamael011fa.htm";
	string	fnClassList21 = "";
	string	fnClassList22 = "";
	string	fnClassList23 = "";
	string	fnClassList24 = "";
	string	fnLowLevelNoProof21 = "master_all_kamael008ta.htm";
	string	fnLowLevelNoProof22 = "master_all_kamael008msa.htm";
	string	fnLowLevelNoProof23 = "master_all_kamael008fsa.htm";
	string	fnLowLevelNoProof24 = "master_all_kamael008wa.htm";
	string	fnLowLevel21 = "master_all_kamael009ta.htm";
	string	fnLowLevel22 = "master_all_kamael009msa.htm";
	string	fnLowLevel23 = "master_all_kamael009fsa.htm";
	string	fnLowLevel24 = "master_all_kamael009wa.htm";
	string	fnNoProof21 = "master_all_kamael010ta.htm";
	string	fnNoProof22 = "master_all_kamael010msa.htm";
	string	fnNoProof23 = "master_all_kamael010fsa.htm";
	string	fnNoProof24 = "master_all_kamael010wa.htm";
	string	fnAfterClassChange21 = "master_all_kamael011ta.htm";
	string	fnAfterClassChange22 = "master_all_kamael011msa.htm";
	string	fnAfterClassChange23 = "master_all_kamael011fsa.htm";
	string	fnAfterClassChange24 = "master_all_kamael011wa.htm";
	string	fnNotMale = "master_all_kamael002b.htm";
	string	fnNotFemale = "master_all_kamael002c.htm";
	int	weapon_ticket = 8869;
	int	num_of_tickets = 15;

handler:
	EventHandler MENU_SELECTED(talker,ask,reply,c0,i0,i1,i2,i3,i4,i5,i6,fhtml0,state) {
		if( ask == -2 && reply == 1 ) {
			if( talker.race != 5 ) {
				myself::ShowPage(talker,"master_all_kamael002a.htm");
				return;
			} else if( myself::IsInCategory(62,talker.occupation) ) {
				if( talker.occupation == 123 ) {
					myself::ShowPage(talker,fnClassList11);
				} else if( talker.occupation == 124 ) {
					myself::ShowPage(talker,fnClassList12);
				}
			} else if( myself::IsInCategory(63,talker.occupation) ) {
				myself::ShowPage(talker,"master_all_kamael004a.htm");
			} else if( myself::IsInCategory(64,talker.occupation) ) {
				myself::ShowPage(talker,"master_all_kamael005a.htm");
			} else {
				myself::ShowPage(talker,"master_all_kamael100a.htm");
			}
		} else if( ask == -2 && reply == 2 ) {
			if( talker.race != 5 ) {
				myself::ShowPage(talker,"master_all_kamael002a.htm");
				return;
			} else if( myself::IsInCategory(62,talker.occupation) ) {
				if( talker.occupation == 123 ) {
					myself::ShowPage(talker,"master_all_kamael012b.htm");
				} else if( talker.occupation == 124 ) {
					myself::ShowPage(talker,"master_all_kamael012c.htm");
				}
			} else if( myself::IsInCategory(63,talker.occupation) ) {
				if( gender == 1 ) {
					if( myself::IsInCategory(69,talker.occupation) ) {
						myself::ShowPage(talker,fnNotMale);
						return;
					}
					if( talker.occupation == 125 ) {
						myself::ShowPage(talker,"master_all_kamael003t.htm");
					} else if( talker.occupation == 126 ) {
						myself::ShowPage(talker,"master_all_kamael012b.htm");
					}
				} else if( gender == 2 ) {
					if( myself::IsInCategory(68,talker.occupation) ) {
						myself::ShowPage(talker,fnNotFemale);
						return;
					}
					if( talker.occupation == 125 ) {
						myself::ShowPage(talker,"master_all_kamael012c.htm");
					} else if( talker.occupation == 126 ) {
						myself::ShowPage(talker,"master_all_kamael003w.htm");
					}
				}
			} else if( myself::IsInCategory(64,talker.occupation) ) {
				if( gender == 1 ) {
					if( myself::IsInCategory(68,talker.occupation) ) {
						myself::ShowPage(talker,"master_all_kamael005b.htm");
					} else {
						myself::ShowPage(talker,fnNotMale);
					}
				} else if( gender == 2 ) {
					if( myself::IsInCategory(69,talker.occupation) ) {
						myself::ShowPage(talker,"master_all_kamael005c.htm");
					} else {
						myself::ShowPage(talker,fnNotFemale);
					}
				}
			} else if( myself::IsInCategory(65,talker.occupation) ) {
				if( gender == 1 ) {
					if( myself::IsInCategory(68,talker.occupation) ) {
						myself::ShowPage(talker,"master_all_kamael100b.htm");
					} else {
						myself::ShowPage(talker,fnNotMale);
					}
				} else if( gender == 2 ) {
					if( myself::IsInCategory(69,talker.occupation) ) {
						myself::ShowPage(talker,"master_all_kamael100c.htm");
					} else {
						myself::ShowPage(talker,fnNotFemale);
					}
				}
			}
		}
		super;
	}

	EventHandler CLASS_CHANGE_REQUESTED(talker,occupation_name_id) {
		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( myself::IsInCategory(63,occupation_name_id) ) {
			if( myself::IsInCategory(63,talker.occupation) ) {
				myself::ShowPage(talker,"master_all_kamael004a.htm");
			} else if( myself::IsInCategory(64,talker.occupation) ) {
				myself::ShowPage(talker,"master_all_kamael005a.htm");
			} else if( myself::IsInCategory(65,talker.occupation) ) {
				myself::ShowPage(talker,"master_all_kamael100a.htm");
			} else if( talker.occupation == 123 ) {
				if( lv2_class11 != -1 && occupation_name_id == lv2_class11 && talker.occupation == lv1_class1 ) {
					if( talker.level < 20 ) {
						if( myself::GetOneTimeQuestFlag(talker,proof111) == 0 ) {
							myself::ShowPage(talker,fnLowLevelNoProof11);
						} else {
							myself::ShowPage(talker,fnLowLevel11);
						}
					} else if( myself::GetOneTimeQuestFlag(talker,proof111) == 0 ) {
						myself::ShowPage(talker,fnNoProof11);
					} else {
						myself::DeleteItem1(talker,proof112,gg::OwnItemCount(talker,proof112));
						myself::ClassChange(talker,lv2_class11);
						if( myself::Skill_GetConsumeMP(EffectSkill1) < myself.sm.mp && myself::Skill_GetConsumeHP(EffectSkill1) < myself.sm.hp && myself::Skill_InReuseDelay(EffectSkill1) == 0 ) {
							myself::AddUseSkillDesire(talker,EffectSkill1,1,0,1000000);
						}
						myself::ShowSystemMessage(talker,1308);
						if( weapon_ticket != 0 && num_of_tickets != 0 ) {
							myself::GiveItem1(talker,weapon_ticket,num_of_tickets);
						}
						myself::ShowPage(talker,fnAfterClassChange11);
					}
				}
			} else if( talker.occupation == 124 ) {
				if( lv2_class21 != -1 && occupation_name_id == lv2_class21 && talker.occupation == lv1_class2 ) {
					if( talker.level < 20 ) {
						if( myself::GetOneTimeQuestFlag(talker,proof121) == 0 ) {
							myself::ShowPage(talker,fnLowLevelNoProof12);
						} else {
							myself::ShowPage(talker,fnLowLevel12);
						}
					} else if( myself::GetOneTimeQuestFlag(talker,proof121) == 0 ) {
						myself::ShowPage(talker,fnNoProof12);
					} else {
						myself::DeleteItem1(talker,proof122,gg::OwnItemCount(talker,proof122));
						myself::ClassChange(talker,lv2_class21);
						if( myself::Skill_GetConsumeMP(EffectSkill1) < myself.sm.mp && myself::Skill_GetConsumeHP(EffectSkill1) < myself.sm.hp && myself::Skill_InReuseDelay(EffectSkill1) == 0 ) {
							myself::AddUseSkillDesire(talker,EffectSkill1,1,0,1000000);
						}
						myself::ShowSystemMessage(talker,1308);
						if( weapon_ticket != 0 && num_of_tickets != 0 ) {
							myself::GiveItem1(talker,weapon_ticket,num_of_tickets);
						}
						myself::ShowPage(talker,fnAfterClassChange12);
					}
				}
			}
		} else if( myself::IsInCategory(64,occupation_name_id) ) {
			if( myself::IsInCategory(62,talker.occupation) ) {
				if( gender == 1 ) {
					myself::ShowPage(talker,"master_all_kamael012b.htm");
				} else if( gender == 2 ) {
					myself::ShowPage(talker,"master_all_kamael012c.htm");
				}
			} else if( myself::IsInCategory(64,talker.occupation) ) {
				if( gender == 1 ) {
					myself::ShowPage(talker,"master_all_kamael005b.htm");
				} else if( gender == 2 ) {
					myself::ShowPage(talker,"master_all_kamael005c.htm");
				}
			} else if( myself::IsInCategory(65,talker.occupation) ) {
				if( gender == 1 ) {
					myself::ShowPage(talker,"master_all_kamael100b.htm");
				} else if( gender == 2 ) {
					myself::ShowPage(talker,"master_all_kamael100c.htm");
				}
			} else if( talker.occupation == 125 ) {
				if( gender == 1 ) {
					if( occupation_name_id == 127 ) {
						if( lv3_class11 != -1 && occupation_name_id == lv3_class11 && talker.occupation == lv2_class1 ) {
							if( talker.level < 40 ) {
								if( myself::GetOneTimeQuestFlag(talker,proof211) == 0 ) {
									myself::ShowPage(talker,fnLowLevelNoProof21);
								} else {
									myself::ShowPage(talker,fnLowLevel21);
								}
							} else if( myself::GetOneTimeQuestFlag(talker,proof211) == 0 ) {
								myself::ShowPage(talker,fnNoProof21);
							} else {
								myself::DeleteItem1(talker,proof212,gg::OwnItemCount(talker,proof212));
								myself::ClassChange(talker,lv3_class11);
								if( myself::Skill_GetConsumeMP(EffectSkill1) < myself.sm.mp && myself::Skill_GetConsumeHP(EffectSkill1) < myself.sm.hp && myself::Skill_InReuseDelay(EffectSkill1) == 0 ) {
									myself::AddUseSkillDesire(talker,EffectSkill1,1,0,1000000);
								}
								myself::ShowSystemMessage(talker,1308);
								if( myself::IsAcademyMember(talker) == 1 ) {
									myself::GiveItem1(talker,8181,1);
									myself::ShowSystemMessage(talker,1749);
								}
								if( weapon_ticket_2 != 0 && num_of_tickets != 0 ) {
									myself::GiveItem1(talker,weapon_ticket_2,num_of_tickets);
								}
								myself::ShowPage(talker,fnAfterClassChange21);
							}
						}
					} else if( occupation_name_id == 128 ) {
						if( lv3_class12 != -1 && occupation_name_id == lv3_class12 && talker.occupation == lv2_class1 ) {
							if( talker.level < 40 ) {
								if( myself::GetOneTimeQuestFlag(talker,proof221) == 0 ) {
									myself::ShowPage(talker,fnLowLevelNoProof22);
								} else {
									myself::ShowPage(talker,fnLowLevel22);
								}
							} else if( myself::GetOneTimeQuestFlag(talker,proof221) == 0 ) {
								myself::ShowPage(talker,fnNoProof22);
							} else {
								myself::DeleteItem1(talker,proof222,gg::OwnItemCount(talker,proof222));
								myself::ClassChange(talker,lv3_class12);
								if( myself::Skill_GetConsumeMP(EffectSkill1) < myself.sm.mp && myself::Skill_GetConsumeHP(EffectSkill1) < myself.sm.hp && myself::Skill_InReuseDelay(EffectSkill1) == 0 ) {
									myself::AddUseSkillDesire(talker,EffectSkill1,1,0,1000000);
								}
								myself::ShowSystemMessage(talker,1308);
								if( myself::IsAcademyMember(talker) == 1 ) {
									myself::GiveItem1(talker,8181,1);
									myself::ShowSystemMessage(talker,1749);
								}
								if( weapon_ticket_2 != 0 && num_of_tickets != 0 ) {
									myself::GiveItem1(talker,weapon_ticket_2,num_of_tickets);
								}
								myself::ShowPage(talker,fnAfterClassChange22);
							}
						}
					}
				} else if( gender == 2 ) {
					myself::ShowPage(talker,"master_all_kamael002c.htm");
				}
			} else if( talker.occupation == 126 ) {
				if( gender == 1 ) {
					myself::ShowPage(talker,"master_all_kamael002b.htm");
				} else if( gender == 2 ) {
					if( occupation_name_id == 129 ) {
						if( lv3_class21 != -1 && occupation_name_id == lv3_class21 && talker.occupation == lv2_class2 ) {
							if( talker.level < 40 ) {
								if( myself::GetOneTimeQuestFlag(talker,proof221) == 0 ) {
									myself::ShowPage(talker,fnLowLevelNoProof23);
								} else {
									myself::ShowPage(talker,fnLowLevel23);
								}
							} else if( myself::GetOneTimeQuestFlag(talker,proof221) == 0 ) {
								myself::ShowPage(talker,fnNoProof23);
							} else {
								myself::DeleteItem1(talker,proof222,gg::OwnItemCount(talker,proof222));
								myself::ClassChange(talker,lv3_class21);
								if( myself::Skill_GetConsumeMP(EffectSkill1) < myself.sm.mp && myself::Skill_GetConsumeHP(EffectSkill1) < myself.sm.hp && myself::Skill_InReuseDelay(EffectSkill1) == 0 ) {
									myself::AddUseSkillDesire(talker,EffectSkill1,1,0,1000000);
								}
								myself::ShowSystemMessage(talker,1308);
								if( myself::IsAcademyMember(talker) == 1 ) {
									myself::GiveItem1(talker,8181,1);
									myself::ShowSystemMessage(talker,1749);
								}
								if( weapon_ticket_2 != 0 && num_of_tickets != 0 ) {
									myself::GiveItem1(talker,weapon_ticket_2,num_of_tickets);
								}
								myself::ShowPage(talker,fnAfterClassChange23);
							}
						}
					} else if( occupation_name_id == 130 ) {
						if( lv3_class22 != -1 && occupation_name_id == lv3_class22 && talker.occupation == lv2_class2 ) {
							if( talker.level < 40 ) {
								if( myself::GetOneTimeQuestFlag(talker,proof231) == 0 ) {
									myself::ShowPage(talker,fnLowLevelNoProof24);
								} else {
									myself::ShowPage(talker,fnLowLevel24);
								}
							} else if( myself::GetOneTimeQuestFlag(talker,proof231) == 0 ) {
								myself::ShowPage(talker,fnNoProof24);
							} else {
								myself::DeleteItem1(talker,proof232,gg::OwnItemCount(talker,proof232));
								myself::ClassChange(talker,lv3_class22);
								if( myself::Skill_GetConsumeMP(EffectSkill1) < myself.sm.mp && myself::Skill_GetConsumeHP(EffectSkill1) < myself.sm.hp && myself::Skill_InReuseDelay(EffectSkill1) == 0 ) {
									myself::AddUseSkillDesire(talker,EffectSkill1,1,0,1000000);
								}
								myself::ShowSystemMessage(talker,1308);
								if( myself::IsAcademyMember(talker) == 1 ) {
									myself::GiveItem1(talker,8181,1);
									myself::ShowSystemMessage(talker,1749);
								}
								if( weapon_ticket_2 != 0 && num_of_tickets != 0 ) {
									myself::GiveItem1(talker,weapon_ticket_2,num_of_tickets);
								}
								myself::ShowPage(talker,fnAfterClassChange24);
							}
						}
					}
				}
			}
		} else {
		}
	}

}
