@LabelIndex 921
@StringIndex 165
class 0 guild_master : citizen {
parameter:
	string	fnHi = "gmhi.htm";
	string	fnClassMismatch = "gmhi.htm";
	string	fnClassList1 = "gmhi.htm";
	string	fnClassList2 = "gmhi.htm";
	string	fnClassList3 = "gmhi.htm";
	string	fnClassList4 = "gmhi.htm";
	string	fnClassList5 = "gmhi.htm";
	string	fnYouAreSecondClass = "gmhi.htm";
	string	fnYouAreThirdClass = "gmhi.htm";
	string	fnYouAreFourthClass = "master_lv3_hef005.htm";
	string	fnLowLevelNoProof11 = "gmhi.htm";
	string	fnLowLevelNoProof12 = "gmhi.htm";
	string	fnLowLevelNoProof13 = "gmhi.htm";
	string	fnLowLevelNoProof21 = "gmhi.htm";
	string	fnLowLevelNoProof22 = "gmhi.htm";
	string	fnLowLevelNoProof23 = "gmhi.htm";
	string	fnLowLevelNoProof31 = "gmhi.htm";
	string	fnLowLevelNoProof32 = "gmhi.htm";
	string	fnLowLevelNoProof33 = "gmhi.htm";
	string	fnLowLevelNoProof41 = "gmhi.htm";
	string	fnLowLevelNoProof42 = "gmhi.htm";
	string	fnLowLevelNoProof43 = "gmhi.htm";
	string	fnLowLevelNoProof51 = "gmhi.htm";
	string	fnLowLevelNoProof52 = "gmhi.htm";
	string	fnLowLevelNoProof53 = "gmhi.htm";
	string	fnLowLevel11 = "gmhi.htm";
	string	fnLowLevel12 = "gmhi.htm";
	string	fnLowLevel13 = "gmhi.htm";
	string	fnLowLevel21 = "gmhi.htm";
	string	fnLowLevel22 = "gmhi.htm";
	string	fnLowLevel23 = "gmhi.htm";
	string	fnLowLevel31 = "gmhi.htm";
	string	fnLowLevel32 = "gmhi.htm";
	string	fnLowLevel33 = "gmhi.htm";
	string	fnLowLevel41 = "gmhi.htm";
	string	fnLowLevel42 = "gmhi.htm";
	string	fnLowLevel43 = "gmhi.htm";
	string	fnLowLevel51 = "gmhi.htm";
	string	fnLowLevel52 = "gmhi.htm";
	string	fnLowLevel53 = "gmhi.htm";
	string	fnNoProof11 = "gmhi.htm";
	string	fnNoProof12 = "gmhi.htm";
	string	fnNoProof13 = "gmhi.htm";
	string	fnNoProof21 = "gmhi.htm";
	string	fnNoProof22 = "gmhi.htm";
	string	fnNoProof23 = "gmhi.htm";
	string	fnNoProof31 = "gmhi.htm";
	string	fnNoProof32 = "gmhi.htm";
	string	fnNoProof33 = "gmhi.htm";
	string	fnNoProof41 = "gmhi.htm";
	string	fnNoProof42 = "gmhi.htm";
	string	fnNoProof43 = "gmhi.htm";
	string	fnNoProof51 = "gmhi.htm";
	string	fnNoProof52 = "gmhi.htm";
	string	fnNoProof53 = "gmhi.htm";
	string	fnAfterClassChange11 = "gmhi.htm";
	string	fnAfterClassChange12 = "gmhi.htm";
	string	fnAfterClassChange13 = "gmhi.htm";
	string	fnAfterClassChange21 = "gmhi.htm";
	string	fnAfterClassChange22 = "gmhi.htm";
	string	fnAfterClassChange23 = "gmhi.htm";
	string	fnAfterClassChange31 = "gmhi.htm";
	string	fnAfterClassChange32 = "gmhi.htm";
	string	fnAfterClassChange33 = "gmhi.htm";
	string	fnAfterClassChange41 = "gmhi.htm";
	string	fnAfterClassChange42 = "gmhi.htm";
	string	fnAfterClassChange43 = "gmhi.htm";
	string	fnAfterClassChange51 = "gmhi.htm";
	string	fnAfterClassChange52 = "gmhi.htm";
	string	fnAfterClassChange53 = "gmhi.htm";
	string	fnYouAreFirstClass = "gmhi.htm";
	int	royalGuard = 2;
	int	knights = 4;
	int	item_lvup9 = 9910;
	int	num_item_lvup9 = 150;
	int	item_lvup10 = 9911;
	int	num_item_lvup10 = 5;
	int	EffectSkill1 = 334430209;
	string	fnLowSkillLvForUpgrade = "pl_need_plv_sub2.htm";
	string	fnHalfUpgrade = "pl_sub2_upgrade1001.htm";
	string	fnFullUpgrade = "pl_sub2_upgrade2001.htm";
	string	fnLowSkillLvForUpgradeSub = "pl_need_plv_sub1.htm";
	string	fnFullUpgradeSub = "pl_sub_upgrade201.htm";

handler:
	EventHandler TALKED(talker) {
		myself::ShowPage(talker,fnHi);
	}

	EventHandler CREATE_PLEDGE(talker,reply) {
		if( reply == 1 ) {
			myself::ShowPage(talker,"pl006.htm");
		}
	}

	EventHandler CREATE_ALLIANCE(talker,reply) {
		if( reply == 1 ) {
			myself::ShowPage(talker,"al006.htm");
		}
	}

	EventHandler DISMISS_PLEDGE(talker,reply) {
		if( reply == 1 ) {
			myself::ShowPage(talker,"pl009.htm");
		}
	}

	EventHandler REVIVE_PLEDGE(talker,reply) {
		if( reply == 1 ) {
			myself::ShowPage(talker,"pl012.htm");
		}
	}

	EventHandler LEVEL_UP_PLEDGE(talker,reply,i0,i1) {
		i0 = myself::GetPledgeMemberCount(talker);
		i1 = myself::IsLordOfCastle(talker);
		if( reply == 0 ) {
			if( talker.sp >= 20000 && gg::OwnItemCount(talker,57) >= 650000 ) {
				if( myself::DeleteItem1(talker,57,650000) ) {
					myself::IncrementParam(talker,1,-20000);
					myself::PledgeLevelUp(talker,1);
					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);
					}
				}
			} else {
				myself::ShowPage(talker,"pl016.htm");
			}
		} else if( reply == 1 ) {
			if( talker.sp >= 100000 && gg::OwnItemCount(talker,57) >= 2500000 ) {
				if( myself::DeleteItem1(talker,57,2500000) ) {
					myself::IncrementParam(talker,1,-100000);
					myself::PledgeLevelUp(talker,2);
					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);
					}
				}
			} else {
				myself::ShowPage(talker,"pl016.htm");
			}
		} else if( reply == 2 ) {
			if( talker.sp >= 350000 && gg::OwnItemCount(talker,1419) >= 1 ) {
				if( myself::DeleteItem1(talker,1419,1) ) {
					myself::IncrementParam(talker,1,-350000);
					myself::PledgeLevelUp(talker,3);
					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);
					}
				}
			} else {
				myself::ShowPage(talker,"pl016.htm");
			}
		} else if( reply == 3 ) {
			if( talker.sp >= 1000000 && gg::OwnItemCount(talker,3874) >= 1 ) {
				if( myself::DeleteItem1(talker,3874,1) ) {
					myself::IncrementParam(talker,1,-1000000);
					myself::PledgeLevelUp(talker,4);
					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);
					}
				}
			} else {
				myself::ShowPage(talker,"pl016.htm");
			}
		} else if( reply == 4 ) {
			if( talker.sp >= 2500000 && gg::OwnItemCount(talker,3870) >= 1 ) {
				if( myself::DeleteItem1(talker,3870,1) ) {
					myself::IncrementParam(talker,1,-2500000);
					myself::PledgeLevelUp(talker,5);
					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);
					}
				}
			} else {
				myself::ShowPage(talker,"pl016.htm");
			}
		} else if( reply == 5 ) {
			if( myself::OwnPledgeNameValue(talker) >= 10000 ) {
				if( i0 >= 30 ) {
					myself::UpdatePledgeNameValue(talker,-10000);
					myself::PledgeLevelUp(talker,6);
					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);
					}
				} else {
					myself::ShowPage(talker,"pl_err_total_member.htm");
				}
			} else {
				myself::ShowPage(talker,"pl_err_fame.htm");
			}
		} else if( reply == 6 ) {
			if( myself::OwnPledgeNameValue(talker) >= 20000 ) {
				if( i0 >= 80 ) {
					myself::UpdatePledgeNameValue(talker,-20000);
					myself::PledgeLevelUp(talker,7);
					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);
					}
				} else {
					myself::ShowPage(talker,"pl_err_total_member.htm");
				}
			} else {
				myself::ShowPage(talker,"pl_err_fame.htm");
			}
		} else if( reply == 7 ) {
			if( myself::OwnPledgeNameValue(talker) >= 40000 ) {
				if( i0 >= 120 ) {
					myself::UpdatePledgeNameValue(talker,-40000);
					myself::PledgeLevelUp(talker,8);
					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);
					}
				} else {
					myself::ShowPage(talker,"pl_err_total_member.htm");
				}
			} else {
				myself::ShowPage(talker,"pl_err_fame.htm");
			}
		} else if( reply == 8 ) {
			if( myself::OwnPledgeNameValue(talker) >= 40000 ) {
				if( gg::OwnItemCount(talker,item_lvup9) >= num_item_lvup9 ) {
					if( i0 >= 120 ) {
						myself::UpdatePledgeNameValue(talker,-40000);
						myself::DeleteItem1(talker,item_lvup9,num_item_lvup9);
						myself::PledgeLevelUp(talker,9);
						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);
						}
					} else {
						myself::ShowPage(talker,"pl_err_total_member.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_not_enough_items.htm");
				}
			} else {
				myself::ShowPage(talker,"pl_err_fame.htm");
			}
		} else if( reply == 9 ) {
			if( myself::OwnPledgeNameValue(talker) >= 40000 ) {
				if( gg::OwnItemCount(talker,item_lvup10) >= num_item_lvup10 ) {
					if( i0 >= 140 ) {
						myself::UpdatePledgeNameValue(talker,-40000);
						myself::DeleteItem1(talker,item_lvup10,num_item_lvup10);
						myself::PledgeLevelUp(talker,10);
						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);
						}
					} else {
						myself::ShowPage(talker,"pl_err_total_member.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_not_enough_items.htm");
				}
			} else {
				myself::ShowPage(talker,"pl_err_fame.htm");
			}
		} else if( reply == 10 ) {
			if( myself::OwnPledgeNameValue(talker) >= 75000 ) {
				if( i1 != 0 && myself::IsDominionOfLord(( 80 + i1 )) != 0 ) {
					if( i0 >= 170 ) {
						myself::UpdatePledgeNameValue(talker,-75000);
						myself::PledgeLevelUp(talker,11);
						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);
						}
					} else {
						myself::ShowPage(talker,"pl_err_total_member.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_not_lord_yet.htm");
				}
			} else {
				myself::ShowPage(talker,"pl_err_fame.htm");
			}
		} else {
		}
	}

	EventHandler CREATE_ACADEMY(talker,reply,i0,i1,i2,s0,s1,pledge0) {
		pledge0 = myself::GetPledge(talker);
		if( gg::IsNull(pledge0) == 0 ) {
			i0 = pledge0.skill_level;
			i1 = 0;
			i2 = 0;
			s1 = "";
			if( reply == 0 ) {
				if( myself::HasAcademy(talker) == 1 ) {
					myself::ShowPage(talker,"pl_err_aca.htm");
				} else {
					myself::ShowPage(talker,"pl_err_aca.htm");
				}
			} else if( reply == 1 ) {
				if( ( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) && i0 >= 5 ) {
					myself::CreateAcademy(talker,s0);
				} else if( i0 < 5 ) {
					myself::ShowPage(talker,"pl_err_plv.htm");
				} else if( talker.is_pledge_master != 1 || myself::HavePledgePower(talker,8) == 0 ) {
					myself::ShowPage(talker,"pl_err_master.htm");
				} else {
					myself::ShowPage(talker,"pl_err_aca.htm");
				}
			} else if( reply == 2 ) {
				myself::ShowPage(talker,"pl_create_ok_aca.htm");
			} else if( reply == -2 ) {
				myself::ShowPage(talker,"pl_already_subname.htm");
			}
		}
	}

	EventHandler CREATE_SUBPLEDGE(talker,reply,i0,i1,i2,s0,s1,pledge0) {
		if( reply == -1 ) {
			myself::ShowPage(talker,"pl_err_man.htm");
		} else if( reply == 0 ) {
			pledge0 = myself::GetPledge(talker);
			if( gg::IsNull(pledge0) == 0 ) {
				i2 = pledge0.skill_level;
				if( ( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) && i1 > 0 ) {
					if( i0 < 1000 && i0 >= 100 ) {
						if( i2 > 5 ) {
							myself::UpdatePledgeNameValue(talker,5000);
						}
					} else if( i0 > 1000 && i0 <= 2002 ) {
						if( i2 > 6 ) {
							myself::UpdatePledgeNameValue(talker,10000);
						} else if( i2 == 9 ) {
						} else if( i2 == 10 ) {
						}
					} else {
					}
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
				myself::ShowPage(talker,"pl_err_subname.htm");
			}
		} else if( reply == 1 ) {
			pledge0 = myself::GetPledge(talker);
			if( gg::IsNull(pledge0) == 0 ) {
				i2 = pledge0.skill_level;
				if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					if( i0 < 1000 && i0 >= 100 ) {
						if( myself::HasSubPledge(talker,i0) == 1 ) {
							myself::ShowPage(talker,"pl_err_fame.htm");
							return;
						}
						if( i2 > 5 ) {
							if( myself::OwnPledgeNameValue(talker) >= 5000 ) {
								myself::UpdatePledgeNameValue(talker,-5000);
								myself::CreateSubPledge(talker,i0,i1,s0);
							} else {
								myself::ShowPage(talker,"pl_err_fame.htm");
							}
						} else {
							myself::ShowPage(talker,"pl_err_plv.htm");
						}
					} else if( i0 > 1000 && i0 <= 2002 ) {
						if( myself::HasSubPledge(talker,i0) == 1 ) {
							myself::ShowPage(talker,"pl_err_fame.htm");
							return;
						}
						if( i2 > 6 ) {
							if( myself::OwnPledgeNameValue(talker) >= 10000 ) {
								myself::UpdatePledgeNameValue(talker,-10000);
								myself::CreateSubPledge(talker,i0,i1,s0);
							} else {
								myself::ShowPage(talker,"pl_err_fame.htm");
							}
						} else {
							myself::ShowPage(talker,"pl_err_plv.htm");
						}
					} else {
						myself::ShowPage(talker,"pl_err_sub.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			}
		} else if( reply == 2 ) {
			if( i0 < 1000 ) {
				myself::ShowPage(talker,"pl_create_ok_sub1.htm");
			} else {
				myself::ShowPage(talker,"pl_create_ok_sub2.htm");
			}
		} else if( reply == -2 ) {
			myself::ShowPage(talker,"pl_already_subname.htm");
		}
	}

	EventHandler UPDATE_SUBPLEDGE_MASTER(talker,reply,i0) {
		if( reply == -1 ) {
			if( i0 < 1000 ) {
				myself::ShowPage(talker,"pl_err_sm3.htm");
			} else {
				myself::ShowPage(talker,"pl_err_sm4.htm");
			}
		} else if( reply == 0 ) {
			if( i0 < 1000 ) {
				myself::ShowPage(talker,"pl_err_sm3.htm");
			} else {
				myself::ShowPage(talker,"pl_err_sm4.htm");
			}
		} else if( reply == 1 ) {
			myself::ShowPage(talker,"pl_create_ok_submaster.htm");
		}
	}

	EventHandler ONE_SKILL_SELECTED(talker,skill_name_id,need_quest) {
		myself::ShowGrowEtcSkillMessage(talker,skill_name_id,2,"");
	}

	EventHandler MENU_SELECTED(talker,ask,reply,i2,pledge0,fhtml0,s0,s1,i0) {
		if( ask == -3 ) {
			if( talker.pledge_id > 0 ) {
				pledge0 = myself::GetPledge(talker);
				if( gg::IsNull(pledge0) == 0 ) {
					i2 = pledge0.skill_level;
				}
			} else {
			}
			if( reply == 0 ) {
				if( talker.level < 10 ) {
					myself::ShowPage(talker,"pl002.htm");
				} else if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					myself::ShowPage(talker,"pl003.htm");
				} else if( talker.pledge_id != 0 ) {
					myself::ShowPage(talker,"pl004.htm");
				} else {
					myself::ShowPage(talker,"pl005.htm");
				}
			} else if( reply == 2 ) {
				if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					myself::ShowPage(talker,"pl007.htm");
				} else {
					myself::ShowPage(talker,"pl008.htm");
				}
			} else if( reply == 3 ) {
				if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					myself::ShowPage(talker,"pl010.htm");
				} else {
					myself::ShowPage(talker,"pl011.htm");
				}
			} else if( reply == 1 ) {
				if( talker.is_pledge_master == 1 ) {
					myself::ShowPage(talker,"pl013.htm");
				} else {
					myself::ShowPage(talker,"pl014.htm");
				}
			} else if( reply == 4 ) {
				if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					myself::ShowEtcSkillList(talker,2,"");
				} else {
					myself::ShowPage(talker,"pl017.htm");
				}
			} else if( reply == 5 ) {
				myself::ShowPage(talker,"pl_aca_help.htm");
			} else if( reply == 6 ) {
				myself::ShowPage(talker,"pl_sub_help.htm");
			} else if( reply == 7 ) {
				if( talker.pledge_id <= 0 ) {
					myself::ShowPage(talker,"pl_no_pledgeman.htm");
				} else if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					if( i2 > 5 ) {
						if( myself::HasSubPledge(talker,100) == 1 ) {
							if( myself::HasSubPledge(talker,200) == 1 ) {
								myself::ShowPage(talker,"pl_err_more_sub.htm");
							} else {
								myself::ShowPage(talker,"pl_create_sub200.htm");
							}
						} else {
							myself::ShowPage(talker,"pl_create_sub100.htm");
						}
					} else {
						myself::ShowPage(talker,"pl_err_plv.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 8 ) {
				if( talker.pledge_id <= 0 ) {
					myself::ShowPage(talker,"pl_no_pledgeman.htm");
				} else if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					if( i2 > 5 ) {
						if( myself::HasSubPledge(talker,100) == 1 ) {
							myself::ShowPage(talker,"pl_submaster.htm");
						} else {
							myself::ShowPage(talker,"pl_err_more_sm.htm");
						}
					} else {
						myself::ShowPage(talker,"pl_err_plv.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 9 ) {
				myself::ShowPage(talker,"pl_sub2_help.htm");
			} else if( reply == 10 ) {
				if( talker.pledge_id <= 0 ) {
					myself::ShowPage(talker,"pl_no_pledgeman.htm");
				} else if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					if( i2 > 6 ) {
						if( myself::HasSubPledge(talker,100) == 1 ) {
							if( myself::HasSubPledge(talker,1001) == 1 ) {
								if( myself::HasSubPledge(talker,1002) == 1 ) {
									if( myself::HasSubPledge(talker,200) == 1 ) {
										if( myself::HasSubPledge(talker,2001) == 1 ) {
											if( myself::HasSubPledge(talker,2002) == 1 ) {
												myself::ShowPage(talker,"pl_err_more_sub2.htm");
											} else {
												myself::ShowPage(talker,"pl_create_sub2002.htm");
											}
										} else {
											myself::ShowPage(talker,"pl_create_sub2001.htm");
										}
									} else {
										myself::ShowPage(talker,"pl_need_high_lv_sub.htm");
									}
								} else {
									myself::ShowPage(talker,"pl_create_sub1002.htm");
								}
							} else {
								myself::ShowPage(talker,"pl_create_sub1001.htm");
							}
						} else {
							myself::ShowPage(talker,"pl_need_high_lv_sub.htm");
						}
					} else {
						myself::ShowPage(talker,"pl_err_plv.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 11 ) {
				if( talker.pledge_id <= 0 ) {
					myself::ShowPage(talker,"pl_no_pledgeman.htm");
				} else if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					if( i2 > 6 ) {
						if( myself::HasSubPledge(talker,100) == 1 ) {
							if( myself::HasSubPledge(talker,1001) == 1 ) {
								myself::ShowPage(talker,"pl_submaster2.htm");
							} else {
								myself::ShowPage(talker,"pl_err_more_sm2.htm");
							}
						} else {
							myself::ShowPage(talker,"pl_need_high_lv_sub.htm");
						}
					} else {
						myself::ShowPage(talker,"pl_err_plv.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 12 ) {
				if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					if( i2 > 4 ) {
						myself::ShowPage(talker,"pl_create_aca.htm");
					} else {
						myself::ShowPage(talker,"pl_err_plv.htm");
					}
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 13 ) {
				myself::ShowPage(talker,"pl_master.htm");
			} else if( reply == 14 ) {
				if( talker.is_pledge_master == 1 ) {
					myself::ShowPage(talker,"pl_transfer_master.htm");
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 15 ) {
				if( talker.is_pledge_master == 1 ) {
					myself::ShowPage(talker,"pl_cancel_master.htm");
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 16 ) {
				if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					myself::ShowPage(talker,"pl_rename.htm");
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 17 ) {
				if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
					myself::ShowPage(talker,"pl_rename2.htm");
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			} else if( reply == 100 ) {
				if( talker.pledge_id > 0 ) {
					pledge0 = myself::GetPledge(talker);
					if( gg::IsNull(pledge0) == 0 ) {
						if( pledge0.prev_server > 0 ) {
							myself::ShowPage(talker,"pl018.htm");
						} else {
							myself::ShowPage(talker,"pl001.htm");
						}
					}
				} else {
					myself::ShowPage(talker,"pl001.htm");
				}
			} else if( reply == 101 ) {
				if( talker.is_pledge_master == 1 ) {
					myself::ShowChangePledgeNameUI(talker);
				} else {
					myself::ShowPage(talker,"pl_err_master.htm");
				}
			}
		} else if( ask == -111 ) {
			if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
				if( reply < 1000 ) {
					if( reply < 100 ) {
						myself::ShowPage(talker,"pl_err_rename_aca.htm");
					} else if( ( reply / 100 ) > royalGuard ) {
						myself::ShowPage(talker,"pl_err_more_sub.htm");
					} else if( myself::HasSubPledge(talker,reply) == 0 ) {
						myself::ShowPage(talker,"pl_err_more_sm.htm");
					} else if( myself::HasSubPledge(talker,reply) == 1 ) {
						s0 = "";
						s1 = "";
						s0 = "pl_ch_submaster" + gg::IntToStr(reply) + ".htm";
						myself::FHTML_SetFileName(fhtml0,s0);
						s1 = gg::IntToStr(reply) + "submaster";
						s0 = "";
						s0 = gg::GetSubpledgeMasterName(talker,reply);
						if( myself::IsNullString(s0) == 1 ) {
							s0 = "";
							s0 = gg::MakeFString(1010642,"","","","","");
						}
						myself::FHTML_SetStr(fhtml0,s1,s0);
						myself::ShowFHTML(talker,fhtml0);
					}
				} else if( reply < 10000 ) {
					if( reply <= 1000 && ( reply % 1000 ) == 0 ) {
						myself::ShowPage(talker,"pl_err_more_sm2.htm");
					} else if( ( reply % 1000 ) > ( knights / royalGuard ) ) {
						myself::ShowPage(talker,"pl_err_more_sub2.htm");
					} else if( myself::HasSubPledge(talker,reply) == 0 ) {
						myself::ShowPage(talker,"pl_err_more_sm2.htm");
					} else if( myself::HasSubPledge(talker,reply) == 1 ) {
						s0 = "";
						s1 = "";
						s0 = "pl_ch_submaster" + gg::IntToStr(reply) + ".htm";
						myself::FHTML_SetFileName(fhtml0,s0);
						s1 = gg::IntToStr(reply) + "submaster";
						s0 = "";
						s0 = gg::GetSubpledgeMasterName(talker,reply);
						if( myself::IsNullString(s0) == 1 ) {
							s0 = "";
							s0 = gg::MakeFString(1010642,"","","","","");
						}
						myself::FHTML_SetStr(fhtml0,s1,s0);
						myself::ShowFHTML(talker,fhtml0);
					}
				}
			} else {
				myself::ShowPage(talker,"pl_err_master.htm");
			}
		} else if( ask == -222 ) {
			if( talker.is_pledge_master == 1 || ( myself::HavePledgePower(talker,9) && talker.pledge_id != 0 ) ) {
				if( reply == -1 ) {
					if( myself::HasSubPledge(talker,reply) == 0 ) {
						myself::ShowPage(talker,"pl_err_rename_aca.htm");
					} else if( myself::HasSubPledge(talker,reply) == 1 ) {
						s0 = "";
						s1 = "";
						s0 = "pl_ch_rename_aca" + ".htm";
						myself::FHTML_SetFileName(fhtml0,s0);
						myself::ShowFHTML(talker,fhtml0);
					}
				} else if( reply < 1000 ) {
					if( ( reply / 100 ) > royalGuard ) {
						myself::ShowPage(talker,"pl_err_more_sub.htm");
					} else if( myself::HasSubPledge(talker,reply) == 0 ) {
						myself::ShowPage(talker,"pl_err_rename_sub.htm");
					} else if( myself::HasSubPledge(talker,reply) == 1 ) {
						s0 = "";
						s1 = "";
						s0 = "pl_ch_rename" + gg::IntToStr(reply) + ".htm";
						myself::FHTML_SetFileName(fhtml0,s0);
						myself::ShowFHTML(talker,fhtml0);
					}
				} else if( reply < 10000 ) {
					if( ( reply % 1000 ) > ( knights / royalGuard ) ) {
						myself::ShowPage(talker,"pl_err_more_sub2.htm");
					} else if( myself::HasSubPledge(talker,reply) == 0 ) {
						myself::ShowPage(talker,"pl_err_rename_sub2.htm");
					} else if( myself::HasSubPledge(talker,reply) == 1 ) {
						s0 = "";
						s1 = "";
						s0 = "pl_ch_rename" + gg::IntToStr(reply) + ".htm";
						myself::FHTML_SetFileName(fhtml0,s0);
						myself::ShowFHTML(talker,fhtml0);
					}
				}
			} else {
				myself::ShowPage(talker,"pl_err_master.htm");
			}
		} else if( ask == -223 ) {
			i0 = myself::GetPledgeSkillLevel(talker);
			if( reply == 0 ) {
				if( i0 <= 8 ) {
					myself::ShowPage(talker,fnLowSkillLvForUpgrade);
					return;
				} else if( i0 == 9 ) {
					myself::ShowPage(talker,fnHalfUpgrade);
					return;
				} else if( i0 == 10 ) {
					myself::ShowPage(talker,fnFullUpgrade);
					return;
				} else if( i0 == 11 ) {
					myself::ShowPage(talker,fnFullUpgrade);
					return;
				}
			}
			if( reply == 1 ) {
				if( i0 <= 10 ) {
					myself::ShowPage(talker,fnLowSkillLvForUpgradeSub);
					return;
				} else if( i0 == 11 ) {
					myself::ShowPage(talker,fnFullUpgradeSub);
					return;
				}
			}
		} else if( ask == -4 ) {
			if( reply == 0 ) {
				myself::ShowPage(talker,"al005.htm");
			}
		}
		super;
	}

	EventHandler PLEDGE_MASTER_TRANSFER(talker,reply,s0) {
		if( reply == 1 ) {
			myself::ShowPage(talker,"pl_transfer_success.htm");
		} else if( reply == 0 ) {
			myself::ShowPage(talker,"pl_err_sm2.htm");
		} else if( reply == -1 ) {
			myself::ShowPage(talker,"pl_err_master.htm");
		} else if( reply == -2 ) {
			myself::ShowPage(talker,"pl_transfer_already.htm");
		} else if( reply == -4 ) {
			myself::ShowPage(talker,"pl_err_agit_owner.htm");
		} else if( reply == -8 ) {
			myself::ShowPage(talker,"pl_already_transfer.htm");
		} else if( reply <= -3 ) {
			myself::ShowPage(talker,"pl_err_master_transfer.htm");
		}
	}

	EventHandler PLEDGE_MASTER_TRANSFER_CANCEL(talker,reply) {
		if( reply == 1 ) {
			myself::ShowPage(talker,"pl_cancel_success.htm");
		} else if( reply == -1 ) {
			myself::ShowPage(talker,"pl_err_master.htm");
		} else if( reply == -2 ) {
			myself::ShowPage(talker,"pl_transfer_already.htm");
		} else if( reply == -4 ) {
			myself::ShowPage(talker,"pl_not_transfer.htm");
		} else if( reply <= -3 ) {
			myself::ShowPage(talker,"pl_err_master_transfer.htm");
		}
	}

	EventHandler RENAME_SUBPLEDGE(talker,reply,i0,s0) {
		if( reply == 1 ) {
			if( i0 == -1 ) {
				myself::ShowPage(talker,"pl_rename_ok_aca.htm");
			} else if( i0 < 1000 ) {
				myself::ShowPage(talker,"pl_rename_ok_sub1.htm");
			} else {
				myself::ShowPage(talker,"pl_rename_ok_sub2.htm");
			}
		} else if( reply == -1 ) {
			myself::ShowPage(talker,"pl_err_master.htm");
		} else if( reply == -2 ) {
			myself::ShowPage(talker,"pl_err_rename_disband.htm");
		} else if( reply == -3 ) {
			myself::ShowPage(talker,"pl_err_rename_main.htm");
		} else if( reply == -4 ) {
			if( i0 == -1 ) {
				myself::ShowPage(talker,"pl_err_rename_aca.htm");
			} else if( i0 < 1000 ) {
				myself::ShowPage(talker,"pl_err_rename_sub.htm");
			} else {
				myself::ShowPage(talker,"pl_err_rename_sub2.htm");
			}
		} else if( reply == -5 ) {
			myself::ShowSystemMessage(talker,204);
		} else if( reply == -6 ) {
			myself::ShowSystemMessage(talker,204);
		} else if( reply == -7 ) {
			myself::ShowPage(talker,"pl_already_subname.htm");
		} else if( reply == -8 ) {
			myself::ShowSystemMessage(talker,213);
		} else if( reply == -9 ) {
			myself::ShowSystemMessage(talker,213);
		}
	}

	EventHandler UPGRADE_SUBPLEDGE_MEMBER_COUNT(talker,reply,i0) {
		if( reply == 0 ) {
			myself::ShowPage(talker,"pl_upgrade_err_sub2.htm");
		} else if( reply == 1 ) {
			myself::ShowPage(talker,"pl_upgrade_ok_sub2.htm");
		}
	}

}
