@LabelIndex 101855
@StringIndex 11773
class 0 npc_in_maintower : default_npc {
parameter:
	int	zone_type = 2;
	int	enter_type = 1;
	string	fnHi = "";

handler:
	EventHandler CREATED() {
		myself.i_ai3 = 0;
		myself.i_ai4 = 0;
	}

	EventHandler TALKED(talker,ask,reply) {
		myself::ShowPage(talker,"tombstone_main_tower001.htm");
	}

	EventHandler MENU_SELECTED(talker,ask,reply,i0,party0,maker0,i1,c0) {
		if( ask == -1006 ) {
			if( reply == 1 ) {
				party0 = gg::GetParty(talker);
				if( myself::IsNullParty(party0) == 0 ) {
					if( myself.i_ai3 == 0 ) {
						if( gg::OwnItemCount(talker,9714) >= 1 ) {
							for(i1 = 0; i1 < i0; i1++) {
								c0 = gg::Party_GetCreature(talker,i1);
								if( myself::IsNullCreature(c0) == 0 && myself::DistFromMe(c0) > 300 ) {
									myself.i_ai4 = ( myself.i_ai4 + 1 );
								}
							}
							if( myself.i_ai4 == 0 ) {
								myself::DeleteItem1(talker,9714,1);
								myself.i_ai3 = 1;
								myself::ShowPage(talker,"tombstone_main_tower002d.htm");
								myself::InstantZone_Finish(5);
							} else {
								myself::ShowPage(talker,"tombstone_main_tower002b.htm");
							}
							myself.i_ai4 = 0;
						} else {
							myself::ShowPage(talker,"tombstone_main_tower002a.htm");
						}
					} else {
						myself::ShowPage(talker,"tombstone_main_tower002c.htm");
					}
				} else {
					myself::ShowPage(talker,"tombstone_main_tower002.htm");
				}
			}
		}
	}

}
