class 1 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	fnLowLevelNoProof61 = "gmhi.htm";
	string	fnLowLevelNoProof62 = "gmhi.htm";
	string	fnLowLevelNoProof71 = "gmhi.htm";
	string	fnLowLevelNoProof72 = "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	fnLowLevel61 = "gmhi.htm";
	string	fnLowLevel62 = "gmhi.htm";
	string	fnLowLevel71 = "gmhi.htm";
	string	fnLowLevel72 = "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	fnNoProof61 = "gmhi.htm";
	string	fnNoProof62 = "gmhi.htm";
	string	fnNoProof71 = "gmhi.htm";
	string	fnNoProof72 = "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	fnAfterClassChange61 = "gmhi.htm";
	string	fnAfterClassChange62 = "gmhi.htm";
	string	fnAfterClassChange71 = "gmhi.htm";
	string	fnAfterClassChange72 = "gmhi.htm";
	string	fnYouAreFirstClass = "gmhi.htm";
	string	fnYouAreChaotic = "wyac.htm";

handler:
	EventHandler TALKED(talker)
	{
		if( talker.karma > 0 )
		{
			myself::ShowPage(talker,fnYouAreChaotic);
			return;
		}
		else
		{
			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 LEVEL_UP_PLEDGE(talker,reply)
	{
		if( reply == 0 )
		{
			if( talker.sp >= 30000 && myself::OwnItemCount(talker,57) >= 650000 )
			{
				if( myself::DeleteItem1(talker,57,650000) )
				{
					myself::IncrementParam(talker,1,-30000);
					myself::PledgeLevelUp(talker,1);
				}
			}
			else
			{
				myself::ShowPage(talker,"pl016.htm");
			}
		}
		else if( reply == 1 )
		{
			if( talker.sp >= 150000 && myself::OwnItemCount(talker,57) >= 2500000 )
			{
				if( myself::DeleteItem1(talker,57,2500000) )
				{
					myself::IncrementParam(talker,1,-150000);
					myself::PledgeLevelUp(talker,2);
				}
			}
			else
			{
				myself::ShowPage(talker,"pl016.htm");
			}
		}
		else if( reply == 2 )
		{
			if( talker.sp >= 500000 && myself::OwnItemCount(talker,1419) >= 1 )
			{
				if( myself::DeleteItem1(talker,1419,1) )
				{
					myself::IncrementParam(talker,1,-500000);
					myself::PledgeLevelUp(talker,3);
				}
			}
			else
			{
				myself::ShowPage(talker,"pl016.htm");
			}
		}
		else if( reply == 3 )
		{
			if( talker.sp >= 1400000 && myself::OwnItemCount(talker,3874) >= 1 )
			{
				if( myself::DeleteItem1(talker,3874,1) )
				{
					myself::IncrementParam(talker,1,-1400000);
					myself::PledgeLevelUp(talker,4);
				}
			}
			else
			{
				myself::ShowPage(talker,"pl016.htm");
			}
		}
		else if( reply == 4 )
		{
			if( talker.sp >= 3500000 && myself::OwnItemCount(talker,3870) >= 1 )
			{
				if( myself::DeleteItem1(talker,3870,1) )
				{
					myself::IncrementParam(talker,1,-3500000);
					myself::PledgeLevelUp(talker,5);
				}
			}
			else
			{
				myself::ShowPage(talker,"pl016.htm");
			}
		}
	}

	EventHandler MENU_SELECTED(talker,ask,reply,pledge0)
	{
		if( ask == -3 )
		{
			if( reply == 0 )
			{
				if( talker.level < 10 )
				{
					myself::ShowPage(talker,"pl002.htm");
				}
				else if( talker.is_pledge_master != 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 != 0 )
				{
					myself::ShowPage(talker,"pl007.htm");
				}
				else
				{
					myself::ShowPage(talker,"pl008.htm");
				}
			}
			else if( reply == 3 )
			{
				if( talker.is_pledge_master != 0 )
				{
					myself::ShowPage(talker,"pl010.htm");
				}
				else
				{
					myself::ShowPage(talker,"pl011.htm");
				}
			}
			else if( reply == 1 )
			{
				if( talker.is_pledge_master != 0 )
				{
					myself::ShowPage(talker,"pl013.htm");
				}
				else
				{
					myself::ShowPage(talker,"pl014.htm");
				}
			}
		}
		else if( ask == -4 )
		{
			if( reply == 0 )
			{
				myself::ShowPage(talker,"al005.htm");
			}
		}
		if( ask == -5 )
		{
			if( reply == 0 )
			{
				if( talker.is_pledge_master != 0 )
				{
					myself::ShowPage(talker,"pl001a.htm");
				}
			}
		}
		super;
	}

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

}
