@LabelIndex 105502
@StringIndex 0
class 0 ai_room_pathfind : citizen {
parameter:
	string	c_doorname = "island_of_oracle_e";
	string	maker_name = "innadril19_2423_004m1";

handler:
	EventHandler CREATED(maker0,i0) {
		myself.i_ai0 = 0;
		myself.i_ai1 = 0;
		super;
	}

	EventHandler TALKED(talker,maker0,i0) {
		if( myself.i_ai1 == 1 ) {
			if( NoFnHi == 1 ) {
				return;
			}
			if( FriendShip1 == 0 ) {
				myself::ShowPage(talker,fnHi);
			} else if( gg::OwnItemCount(talker,FriendShip1) > 0 || gg::OwnItemCount(talker,FriendShip2) > 0 || gg::OwnItemCount(talker,FriendShip3) > 0 || gg::OwnItemCount(talker,FriendShip4) > 0 || gg::OwnItemCount(talker,FriendShip5) > 0 ) {
				myself::ShowPage(talker,fnHi);
			} else {
				myself::ShowPage(talker,fnNoFriend);
			}
			if( myself.i_ai0 == 0 ) {
				gg::Castle_GateOpenCloseEx(c_doorname,0,myself::InstantZone_GetId());
				i0 = myself::InstantZone_GetId();
				maker0 = gg::InstantZone_GetNpcMaker(i0,maker_name);
				if( gg::IsNull(maker0) == 0 ) {
					gg::SendMakerScriptEvent(maker0,1001,0,1);
				}
				myself.i_ai0 = 1;
			}
		}
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,c0,i0,maker0) {
		if( script_event_arg1 == 12575 ) {
			myself.i_ai1 = 1;
		}
	}

}
