request_clerical_appointment_interaction = {
		category = interaction_category_religion
	icon = sell_claim_interaction
	common_interaction = yes
	desc = request_clerical_appointment_interaction.desc
	interface_priority = 80
	target_type = title
	target_filter = recipient_domain_titles
	auto_accept = no
	ai_accept = {
		base = -40
		opinion_modifier = { # Opinion Factor
			who = scope:recipient
			opinion_target = scope:actor
			multiplier = 1.0
			desc = AI_OPINION_REASON
		}
		modifier = {
			scope:hook = yes
			add = 20
			scope:actor = { NOT = { has_strong_hook = scope:recipient } }
			desc = SCHEME_WEAK_HOOK_USED
		}
		
		modifier = { # Their piety level
			add = {
				add = 10
				multiply = scope:actor.piety_level
			}
			scope:actor.piety_level > 1
			desc = RECIPIENT_IS_PIOUS
		}
		modifier = { # Friends
			add = 15
			scope:recipient = {
				has_relation_friend = scope:actor
			}
			desc = WE_ARE_FRIENDS
		}
		modifier = { # BFFs
			add = 25
			scope:recipient = {
				has_relation_best_friend = scope:actor
			}
			desc = WE_ARE_BEST_FRIENDS
		}
		modifier = { # Dread
			add = 50
			scope:recipient = {
				target_is_liege_or_above = scope:actor
				has_dread_level_towards = {
					target = scope:actor
					level = 1
				}
			}
			desc = INTIMIDATED_REASON
		}
		modifier = { # Greed
			add = 20
			scope:recipient = {
				has_trait = greedy
			}
			desc = ACTIVITY_GUEST_GREEDY_REASON
		}
		modifier = { # Ambitious
			add = -20
			scope:recipient = {
				has_trait = ambitious
			}
			desc = ACTIVITY_GUEST_AMBITIOUS_REASON
		}
	
	
	}
	ai_frequency = 0
	
	
	is_shown = {
		scope:actor = {
			is_ai = no
			is_courtier_of = scope:recipient
			OR = {
			has_trait = devoted
			has_trait = cleric
			}
		}
		scope:recipient = {
			is_landed = yes
			highest_held_title_tier > tier_barony
			government_has_flag = government_is_theocracy
		}
		NOT = { scope:actor = scope:recipient }
	}
	
	can_be_picked_title = {
		scope:target = {
			is_leased_out = no
			tier < tier_county
		}
	}
	
	cost = {
		piety = {
            if = {
				limit = { scope:target.tier = tier_barony }
				add = 200
			}				
		}
	}
	
	can_send = {
		scope:actor = {
			is_ai = no
	    } 		
	}
	
	send_option = {
		flag = hook
		is_valid = {
			scope:actor = {
				has_usable_hook = scope:recipient
			}
		}
		localization = GENERIC_SPEND_A_HOOK
	}
	send_options_exclusive = no
	
	is_valid_showing_failures_only = {
	 	
		 scope:recipient = {
			custom_tooltip = { text = unlanded_purchase_land_interaction.tt1

			 NAND = { highest_held_title_tier = tier_county primary_title = scope:target }
		    }
			custom_tooltip = { text = unlanded_purchase_land_interaction.tt3
			NOT = { scope:target = scope:recipient.capital_county } }
		}
		scope:actor = { 
		 custom_tooltip = { text = unlanded_purchase_land_interaction.tt4
		 is_courtier_of = scope:recipient
		 }
		} 
	 
	}
	
	
	on_accept = {
		
		scope:target = {
			add_to_list = purchased_titles
		}
		
		scope:actor = { save_scope_as = me}
        random_living_character = {
        save_scope_as = random
         }

        scope:actor = { hidden_effect = { set_player_character = scope:random } }

		
      scope:me = {
       get_title = scope:target
	   trigger_event = rtr.0117
      }
		
		scope:me = { hidden_effect = { use_hook = scope:recipient } }
	   
        scope:random = {
		 hidden_effect = {
         set_player_character = scope:me
		 }
        }

		save_scope_value_as = {
			name = purchase_land_cost
			value = {
				every_in_list = {
					list = purchased_titles
					else_if = {
						limit = { tier = tier_barony }
						add = 200
					}
				}
			}
		}
		scope:recipient = { add_piety = scope:purchase_land_cost }
		
		
	}
}