//===== rAthena Script ======================================= 
//= Player Marriage
//===== By: ================================================== 
//= L0ne_W0lf
//===== Current Version: ===================================== 
//= 1.4
//===== Compatible With: ===================================== 
//= rAthena SVN
//===== Description: ========================================= 
//= [Official Conversion]
//= Official Marriage script.
//= Added isloggedin() check, even though Aegis doesn't do it.
//= Currently does not support same-Sex marriages.
//= Old script located in: npc/custom/marriage.txt
//= - Variable in use: wedding_sign (max 1)
//= - Variable in use: $@wedding (max 1) 
//= - Variable in use: $@wed_groom$ $@wed_bride$
//===== Additional Comments: ================================= 
//= 1.0 First version. [L0ne_W0lf]
//= 1.1 Fixed a missing ")" [L0ne_W0lf]
//= 1.2 Corrected duration of Wedding status. [L0ne_W0lf]
//= 1.3 Changed permanent global variables to temporary ones. [Euphy]
//=     Added GM NPCs (commented).
//= 1.4 Added GM management function. [Euphy]
//============================================================

prt_church,97,100,4	script	Wedding Staff#w	71,{
	cutin "wedding_marry01",2;
	if (Upper == 2) {
		mes "[ֵ]";
		mes "~";
		mes "ҽ";
		mes "ڴΪ";
		mes "ص!";
		mes ", ";
		mes "ʲô֪ô?";
		next;
		if (select("- .:- ллĺ!") == 1) {
			mes "[ֵ]";
			mes ", ҺܱǸ, ";
			mes "С";
			mes "޷";
			mes "";
			mes "Ϊʲô";
			mes "ʱ?";
			goto L_End;
		}
		mes "[ֵ]";
		mes ", Ȼ㲻";
		mes "һС롫";
		mes "㻹ǲܽ";
		mes "̫ķɺ";
		mes "赲";
		mes "ɰС?";
		goto L_End;
	}
	mes "[ֵ]";
	mes "";
	mes "Ľ";
	mes "ѡһ,";
	mes ".";
	mes "ÿƽ";
	mes "ǷЩиƽ?";
	next;
	switch(select("- ѯйؽ:- ѯйس:- :- ǲսʤĹͷһ!")) {
	case 1:
		mes "[ֵ]";
		mes "ҲѧĹ";
		mes "֯ʽ";
		mes "Ҳ";
		mes "ڵæ";
		mes "ĹҴ! ,";
		mes "һճ̱.";
		next;
		mes "[ֵ]";
		mes ", Ǹ";
		mes "ǽ";
		mes "Ҫ˾.";
		mes "ʥ׵¼ӵ";
		mes "Ҫı.";
		next;
		mes "[ֵ]";
		mes "ĳ˽ʱ,";
		mes "ǹϵһӵ, ";
		mes "ǩЭʱϸ.";
		mes "ȻҪ֪ǸĹ";
		mes "֮ͬĸǲ.";
		next;
		mes "[ֵ]";
		mes "˵";
		mes "ҵһλԸ";
		mes "˵ĻҪʼˡ";
		mes "ϣÿ˶ҵ";
		mes "ѵİ~";
		break;

	case 2:
		mes "[ֵ]";
		mes "";
		mes "һƵ֯.";
		mes "ɺҪ";
		mes "Ǳһ.";
		mes "ʽ";
		mes "ƽʱȫͬ.";
		next;
		mes "[ֵ]";
		mes "֮,";
		mes "λҪ";
		mes "Ի. Ҫ";
		mes "̶Ի";
		mes "ұ׼ȷ˵. , 񽫻ֹͣ.";
		next;
		mes "[ֵ]";
		mes "Ȼ, Ҫ";
		mes "̶Ի";
		mes "ɵ.";
		mes "Ǹ̵";
		mes "ֶȷĻ, Ǿ";
		mes "ʼлָ.";
		next;
		mes "[ֵ]";
		mes "ָ";
		mes "˫ʽΪ. Ȼ,";
		mes "ڴ֮ǰ, 㻹кܶȥ,...";
		next;
		mes "[ֵ]";
		mes "ͬʱ̫";
		mes "Ļ";
		mes "ŶӣһԶԵ";
		mes "̸̽";
		mes "һֻܽӴһ.";
		next;
		mes "[ֵ]";
		mes "ȷ";
		mes "˵ʽ";
		mes "벻Ҫ˷̫. õʱ̫,";
		mes "ͻԶֹͣҪһ.";
		next;
		mes "[ֵ]";
		mes "Ҫ";
		mes "ֻ3";
		mes "̵ĶԻ";
		mes "֮";
		mes "ٴ̶Իɻ.";
		next;
		if (select("ʮָлİ!:ʲô򵥵ķʽ˵ɵô?") == 1) {
			mes "[ֵ]";
			mes "ðɣһ";
			mes "Ļ";
			mes "ܵ˳.";
			mes "ʲô";
			mes "㻹ûĻ,";
			mes "ѯ.";
			goto L_End;
		}
		mes "[ֵ]";
		mes "򵥵ķǽ";
		mes "˵ַ͸̴.";
		mes "̴˻ظһϢ.";
		mes "Ȼ˵.";
		mes "ԷϢ.";
		next;
		mes "[ֵ]";
		mes "Ȼ'Ctrl''C'";
		mes ".";
		mes "Ȼͨ'Insert''Shift'";
		mes "ճ˵";
		mes "ô?";
		next;
		mes "[ֵ]";
		mes "õ, ";
		mes "Ҹ˵ķ";
		mes "˵ͨ";
		mes "Ҹղ˵ķҰ.";
		next;
		input .@partner$;
		mes "[ֵ]";
		mes ", ";
		mes "Ҫ,";
		mes "ңύ";
		mes "ϣټ㣬ð~";
		mes "ף~";
		break;

	case 3:
		cutin "wedding_marry02",2;
		if (Sex) {
			mes "[ֵ]";
			mes "׼?";
			mes "Ϊ, Ҫ׼";
			mes "^3377FF1 ^000000 ֧ ^3377FF1,300,000 zeny^000000.";
			mes "ĻӦҪ׼Լ֧";
			mes "1,200,000 zeny.";
		}
		else {
			mes "[ֵ]";
			mes "ԣ׼?";
			mes "ΪҪ׼";
			mes "1 ֧";
			mes "1,200,000 zeny. ˱";
			mes "Ͻ֧ 1,300,000 zenyܽ.";
		}
		next;
		mes "[ֵ]";
		mes "˺ﶼҪ׼";
		mes " ^3377FF1 ʯָ^000000 ";
		mes "ǲָܽ.";
		mes "Ҫ׼Щ";
		mes "ύ";
		mes ".";
		next;
		mes "[ֵ]";
		mes "δ";
		mes "";
		mes "ǽн֮ǰ";
		mes "ڣ׼Ҫ,";
		mes "Ͽʼ";
		mes "ʽ?";
		next;
		if (select("- ǵ:- ") == 1) {
			if (getpartnerid()) {
				cutin "wedding_marry02",2;
				mes "[ֵ]";
				mes "ҺܱǸ";
				mes "㲻!";
				mes "Ҳ";
				mes "ż, ";
				mes "ͬʱһ";
				mes "׵¼ӵΥ.";
				break;
			}
			else if (wedding_sign == 1) {
				mes "[ֵ]";
				mes "Ѿ";
				mes "Щô?";
				mes ", ȥǷ";
				mes "Ҳͬ";
				mes "Ȼȥ̸̽.";
				mes "ɻ.";
				break;
			}
			else if (BaseLevel < 45) {
				mes "[ֵ]";
				mes ", Ҫøǿ׳";
				mes "ܱ˵";
				mes "ĵȼ֮.";
				mes "ͬʱ";
				mes "ҵ˵Ļ.";
				mes "Ұ";
				goto L_End;
			}
			else if (countitem(2613) < 1) {
				mes "[ֵ]";
				mes "? ǲ";
				mes "ʯָˣ";
				mes "úȥҰ";
				mes "˵͵ڸ";
				mes "ҵҺô?";
				mes ".";
				goto L_End;
			}
			else if (Sex) {
				if (Zeny < 1300000) {
					mes "[ֵ]";
					mes "ҺܱǸû";
					mes "1,300,000 zeny";
					mes "е˶";
					mes "ΪĽǮ.";
					mes "ǲǷڴ?";
					goto L_End;
				}
				else if (countitem(7170) < 1) {
					mes "[ֵ]";
					mes "Ľ?";
					mes "ȫ㶼";
					mes "";
					mes "Ͽȥҳ";
					mes "ȻǲܿʼĽ";
					mes "ô?";
					goto L_End;
				}
			}
			else if (Sex == 0) {
				if (Zeny < 1200000) {
					mes "[ֵ]";
					mes "ҺܱǸе";
					mes "֧1,200,000";
					mes "";
					mes "";
					mes "Ϲ֧Ǯ";
					goto L_End;
				}
				else if (countitem(2338) < 1) {
					mes "[ֵ]";
					mes "Oh dear, did you forget";
					mes "your Wedding Dress?";
					mes "Hurry and find it, then";
					mes "bring it to me-- you";
					mes "absolutely need it";
					mes "for the wedding!";
					goto L_End;
				}
			}
			mes "[ֵ]";
			mes "ðɣ";
			mes "Ѿ׼еĶ.";
			mes "Ҷ֪˭";
			mes "ҳΪһλΪ";
			mes "Ļףص˰ɡ";
			next;
			mes "[ֵ]";
			mes ", ǿʼ";
			mes ". д";
			mes "ʽ.";
			next;
			while(1) {
				input .@name$;
				if (.@name$ != strcharinfo(0)) {
					mes "[ֵ]";
					mes ", д";
					mes "ʽ";
					mes "ͬʾ. ";
					mes "Ҫƺճһ?";
					mes "һ.";
					next;
				}
				else 
					break;
			}
			mes "[ֵ]";
			mes "̫, ";
			mes "Ѿ.";
			mes "סҪд";
			mes "İµʽ";
			mes "̸̽һ";
			mes "֮󣬶?";
			next;
			mes "[ֵ]";
			mes "Ҳ";
			mes "֮";
			mes "ǶҪ̶Ի";
			mes "ܿʼȷ";
			mes ".";
			emotion e_lv;
			next;
			mes "[ֵ]";
			if (Sex) {
				mes "Ϊ,";
				mes "ҪԻ";
				mes "Ի֮";
				mes "Ǿֵ";
				mes "Ի";
				set Zeny, Zeny-1300000;
				delitem 7170,1; //Tuxedo
			}
			else {
				mes "Ϊ,";
				mes "Ҫȵ";
				mes "˶Ի֮";
				mes "Ȼֵ";
				mes "Ի";
				set Zeny, Zeny-1200000;
				delitem 2338,1; //Wedding_Dress
			}
			delitem 2613,1; //Diamond_Ring
			set wedding_sign,1;
			goto L_End;
		}
		mes "[ֵ]";
		mes "...?";
		mes "ðɣ׼";
		mes "Ҫ,";
		mes "ύô";
		mes "ףһ";
		break;

	case 4:
		cutin "wedding_marry02",2;
		donpcevent "Single Army#Prontera::OnEnable";
		donpcevent "Single Army#Geffen::OnEnable";
		donpcevent "Single Army#Morocc::OnEnable";
		donpcevent "Single Army#Payon::OnEnable";
		donpcevent "Single Army#Amatsu::OnEnable";
		donpcevent "Single Army#Gonryun::OnEnable";
		emotion e_omg;
		mes "[FFF]";
		mes "^CC9933뾫";
		mes "ӵеװ";
		mes "ʹøƷ!^000000";
		emotion e_rock,0,"Single Army#Prontera";
		next;
		mes "[FFF]";
		mes "^330099ڸ";
		mes "ֱ˷ʱ";
		mes "Լߣߣ";
		mes "!^000000";
		emotion e_rock,0,"Single Army#Geffen";
		next;
		mes "[FFF]";
		mes "^666666,";
		mes "Ҵӳʼڲϵ";
		mes "ѵԼֻΪ";
		mes "ܹ!^000000";
		emotion e_rock,0,"Single Army#Morocc";
		next;
		mes "[FFF]";
		mes "^666600I CHOOSE to spend";
		mes "µʥҹ...";
		mes "ֽ";
		mes "Ϸߣߣ˯!^000000";
		emotion e_rock,0,"Single Army#Payon";
		next;
		mes "[FFF]";
		mes "^CC9966ʦ˵";
		mes "ɽµŮϻܳ";
		mes "ǾԲܴҵ!^000000";
		emotion e_rock,0,"Single Army#Amatsu";
		next;
		mes "[FFF]";
		mes "^669900...ɵ! ";
		mes "һֻ޷򵹵ľ!^000000";
		emotion e_rock,0,"Single Army#Gonryun";
		close2;
		cutin "wedding_marry01",255;
		emotion e_swt;
		donpcevent "Single Army#Prontera::OnInit";
		donpcevent "Single Army#Geffen::OnInit";
		donpcevent "Single Army#Morocc::OnInit";
		donpcevent "Single Army#Payon::OnInit";
		donpcevent "Single Army#Amatsu::OnInit";
		donpcevent "Single Army#Gonryun::OnInit";
		end;
	}
	close2;
	cutin "wedding_marry01",255;
	end;

L_End:
	close2;
	cutin "",255;
	end;
}

prt_church,97,102,0	script	Single Army#Prontera	105,{
	mes "[FFF]";
	mes "^CC9933뾫";
	mes "ӵеװ";
	mes "ʹøƷ!^000000";
	close;

OnInit:
	hideonnpc "Single Army#Prontera";
	end;

OnEnable:
	hideoffnpc "Single Army#Prontera";
	emotion e_go;
	end;
}

prt_church,98,102,0	script	Single Army#Geffen	705,{
	mes "[FFF]";
	mes "^330099ڸ";
	mes "ֱ˷ʱ";
	mes "Լߣߣ";
	mes "!^000000";
	close;

OnInit:
	hideonnpc "Single Army#Geffen";
	end;

OnEnable:
	hideoffnpc "Single Army#Geffen";
	emotion e_go;
	end;
}

prt_church,99,102,0	script	Single Army#Morocc	707,{
	mes "[FFF]";
	mes "Ҵӳʼڲϵ";
	mes "ѵԼֻΪ";
	mes "ܹ!^000000";
	close;

OnInit:
	hideonnpc "Single Army#Morocc";
	end;

OnEnable:
	hideoffnpc "Single Army#Morocc";
	emotion e_go;
	end;
}

prt_church,100,102,0	script	Single Army#Payon	708,{
	mes "[FFF]";
	mes "^666600I CHOOSE to spend";
	mes "µʥҹ...";
	mes "ֽ";
	mes "Ϸߣߣ˯!^000000";
	close;

OnInit:
	hideonnpc "Single Army#Payon";
	end;

OnEnable:
	hideoffnpc "Single Army#Payon";
	emotion e_go;
	end;
}

prt_church,101,102,0	script	Single Army#Amatsu	767,{
	mes "[FFF]";
	mes "^CC9966ʦ˵";
	mes "ɽµŮϻܳ";
	mes "ǾԲܴҵ!^000000";
	close;

OnInit:
	hideonnpc "Single Army#Amatsu";
	end;

OnEnable:
	hideoffnpc "Single Army#Amatsu";
	emotion e_go;
	end;
}

prt_church,102,102,0	script	Single Army#Gonryun	780,{
	mes "[FFF]";
	mes "^669900...ɵ! ";
	mes "һֻ޷򵹵ľ!^000000";
	close;

OnInit:
	hideonnpc "Single Army#Gonryun";
	end;

OnEnable:
	hideoffnpc "Single Army#Gonryun";
	emotion e_go;
	end;
}

prt_church,100,128,4	script	Bishop#w	60,{
	cutin "wedding_bomars01",2;
	if (Upper == 2) {
		mes "[]";
		mes "ð.";
		mes "·ô? .";
		mes "֪İְֺ";
		mes "ô?";
		close2;
		cutin "wedding_bomars01",255;
		end;
	}

	if (!getpartnerid()) {
		if (!$wedding) {
			if (wedding_sign == 1) {
				getpartymember(getcharid(1));
				set .@partymembercount,$@partymembercount;
				if (.@partymembercount == 2) {
					if (Sex) {
						set $wedding,1;
						initnpctimer;
						mes "[]";
						mes "˰, ";
						mes "סʱ";
						mes "µ. δᱻ";
						mes "ϣİ";
						mes "еÿһ춼һͬɳ.";
						next;
						mapannounce "prt_church","ھн, Mr. " + strcharinfo(0) + "...",bc_map;
						mes "[]";
						mes "ֱս";
						mes "Ҳϣ";
						mes "ǣһȥ";
						mes "";
						mes "ڣ֪";
						mes "ô?";
						next;
						input $wed_bride$;
						mes "[]";
						mes "Mr. " + strcharinfo(0) + "...";
						mes "ܷ";
						mes "Զ䰮";
						mes "ô,";
						mes "Miss " + $wed_bride$ + "?";
						next;
						select("I do.");
						set $wed_groom$,strcharinfo(0);
						mes "[]";
						mes "Ҫ";
						mes "˵";
						mes ".";
						mes "Ҫǰһ...";
						close2;
						mapannounce "prt_church",", Mr. " + strcharinfo(0) + ", Ѿ Miss " + $wed_bride$ + "...",bc_map;
						cutin "",255;
						end;
					}
					mes "[]";
					mes "ҺܱǸҪ";
					mes "ҶԻ";
					mes "ǲܼ.";
					mes "ȻǺϵĹ,";
					mes "涨ϾЩд";
					mes "ʹú˳.";
					goto L_End;
				}
				mes "[]";
				mes "֮ǰ";
				mes "";
				mes "ӣȻ";
				mes "ܼ.";
				mes "";
				goto L_End;
			}
			mes "[]";
			mes "";
			mes "ֵ ύ";
			mes "Ȼܹ.";
			mes "ֵ";
			mes "еĽ";
			mes "ҸҪ׼ʲô.";
			goto L_End;
		}
		else if ($wedding == 1) {
			if (wedding_sign == 1) {
				getpartymember(getcharid(1));
				set .@partymembercount,$@partymembercount;
				if (.@partymembercount == 2) {
					if (Sex == 0) {
						if (strcharinfo(0) == $wed_bride$) {
							mes "[]";
							mes "˰, ";
						        mes "סʱ";
						        mes "µ. δᱻ";
						        mes "ϣİ";
						        mes "еÿһ춼һͬɳ.";
							next;
							mapannounce "prt_church",", Miss "+$wed_bride$+", ˵...",bc_map;
							mes "[]";
							mes "Miss "+$wed_bride$+"...";
							mes "Ƿ㽫";
							mes " "+$wed_groom$+",";
							mes ", ";
							mes "Σյȹ?";
							next;
							if (select("^FF0000No.^000000:I do.") == 1) {
								cutin "wedding_bomars03",2;
								mapannounce "prt_church","Next couple, please proceed...",bc_map;
								mes "[]";
								mes " "+$wed_groom$;
								mes "";
								mes "֮? .";
								mes "ϵĵǸ";
								mes "һŪ...";
								set $wedding,0;
								close2;
								stopnpctimer;
								cutin "",255;
								end;
							}
							mes "[]";
							mes "Ƿķ";
							mes "ҳ?";
							mes "ǷԸ "+$wed_groom$+"?";
							next;
							if (select("Yes, I do.:^FF0000No.^000000") == 1) {
								if (isloggedin(getcharid(3,$wed_groom$))) {
									if (marriage($wed_groom$)) {
										//Call Wedding effect
										wedding;
										//Give ring to Bride, and change to wedding sprite.
										sc_start SC_Wedding,3600000,1;
										getitem 2635,1; //Bride_Ring
										//Give ring to Groom, and change to wedding sprite.
										attachrid(getcharid(3,$wed_groom$));
										sc_start SC_Wedding,3600000,1;
										getitem 2634,1; //Bridegroom_Ring
										detachrid;
										//Switch Script progression back to Bride
										attachrid(getcharid(3,$wed_bride$));
										cutin "wedding_bomars02",2;
										mapannounce "prt_church","I now pronounce you, "+$wed_groom$+" and "+$wed_bride$+", husband and wife.",bc_map;
										mes "[]";
										mes "Ϊ͵׵¼ӵµ۹Ĵ";
										mes "ڷǳҫ";
										mes "ʽ";
										mes "ĴʽΪ";
										mes "Ըδ";
										mes ".";
										next;
										mes "[]";
										mes "...";
										mes "ԶҸ,";
										mes "װ "+$wed_bride$+"...";
										set $wed_groom$,"";
										set $wed_bride$,"";
										set $wedding,0;
										close2;
										stopnpctimer;
										cutin "",255;
										detachrid;
										end;
									}
								}
								cutin "wedding_bomars03",2;
								mes "[]";
								mes "Hm. It seems that";
								mes "your groom left before";
								mes "the ceremony has finished";
								mes "Please try again once he's";
								mes "returned.";
								goto L_End;
							}
							else {
								cutin "wedding_bomars03",2;
								mapannounce "prt_church","Alas! "+$wed_bride$+" has rejected "+$wed_groom$+"'s marriage proposal!",bc_map;
								mes "[]";
								mes ".⿴";
								mes "ı";
								mes "ҺܱǸ";
								mes "";
								mes "Լȷ";
								mes "ˣ!";
							}
							set $wed_groom$,"";
							set $wed_bride$,"";
							set $wedding,0;
							close2;
							stopnpctimer;
							cutin "",255;
							end;
						}
						callsub S_Busy;
					}
					callsub S_Busy;
				}
				callsub S_Busy;
			}
			if (strcharinfo(0) == $wed_bride$) {
				mes "[]";
				mes "? ƺ";
				mes "ֵ";
				mes "ûյĽ";
				mes "ύ";
				mes "";
				mes "ʼ.";
				goto L_End;
			}
			callsub S_Busy;
		}
		callsub S_Busy;
	}
	mes "[]";
	mes "ϣܱݻ";
	mes "δĵ·жڰ";
	mes "İ¶һֱ";
	mes "";
	mes "δ";
	mes "ǵҸҲܼȥ.";

L_End:
	close2;
	cutin  "",255;
	end;

S_Busy:
	if ($wed_groom$ != "" && $wed_bride$ != "") {
		mes "[]";
		mes "Miss "+ $wed_bride$ +" and";
		mes "Mister "+ $wed_groom$;
		mes "Ľڽ.";
		mes "С.";
		goto L_End;
	}
	mes "[]";
	mes "Ϊһ";
	mes "֯";
	mes "ȴǵʱ";
	mes "лл... ^FFFFFF ^000000";
	goto L_End;

OnStop:
	stopnpctimer;
	end;

OnReset:
	set $wed_groom$,"";
	set $wed_bride$,"";
	set $wedding,0;
	end;

OnTimer180000:
	mapannounce "prt_church","ķӦͦ... һԣ뿪ʼ.",bc_map;
	donpcevent "Bishop#w::OnReset";
	stopnpctimer;
	end;
}

prt_church,28,178,4	script	The King of Midgart	108,{
	callfunc "F_GM_NPC";
	mes "[Vomars]";
	mes "Wh-who are you?";
	mes "You must know the";
	mes "password to invoke";
	mes "my awesome powers.";
	next;
	if (callfunc("F_GM_NPC",1854,0) < 1) {
		mes "[Vomars]";
		mes "This is";
		mes "no place for";
		mes "fooling around.";
		close2;
		warp "prt_church",101,102;
		end;
	}
	mes "[Wedding Switch]";
	mes "Is there a problem with";
	mes "the wedding ceremony?";
	mes "I can reset the Bishop";
	mes "Vomars NPC if you like.";
	next;
	switch(select("No, thanks:RESET")) {
	case 1:
		mes "[Wedding Switch]";
		mes "Alright, then.";
		mes "However, if the";
		mes "Bishop Vomars";
		mes "NPC is stuck, it may";
		mes "be best to reset it.";
		close;
	case 2:
		donpcevent "Bishop#w::OnStop";
		donpcevent "Bishop#w::OnReset";
		mapannounce "prt_church","You've responded too slowly... Next couple, please proceed.",bc_map;
		mes "[Wedding Switch]";
		mes "The Bishop Vomars NPC";
		mes "has now been reactivated.";
		mes "It should now be possible";
		mes "to proceed with weddings.";
		close;
	}
}

prt_church,20,179,4	script	Divorce Staff	71,{
	callfunc "F_GM_NPC";
	mes "[Bad Ending]";
	mes "Uh oh...";
	mes "You know I can't";
	mes "do anything for you.";
	next;
	if (callfunc("F_GM_NPC",1854,0) < 1) {
		mes "[Bad Ending]";
		mes "Hmm...";
		mes "You really";
		mes "shouldn't be";
		mes "in this place...";
		close;
	}
	mes "[Bad Ending]";
	mes "Great, you know the";
	mes "password! Now, did you";
	mes "want me to remove the";
	mes "Wedding Ring in your";
	mes "inventory?";
	next;
	switch(select("Drop 1 Wedding Ring.:Keep it.")) {
	case 1:
		set .@ring, (Sex)?2634:2635; //Bridegroom_Ring, Bride_Ring
		if (countitem(.@ring)) {
			delitem .@ring,1;
			mes "[Bad Ending]";
			mes "It's done!";
		} else {
			mes "[Bad Ending]";
			mes "I couldn't find";
			mes "the Wedding Ring...";
			mes "Please make sure";
			mes "that it's not equipped.";
		}
		close;
	case 2:
		mes "[Bad Ending]";
		mes "You sure you want";
		mes "to keep that ring?";
		mes "Alright, but if it becomes";
		mes "a problem, you come to me.";
		close;
	}
}

prt_church,22,179,4	script	Remarry Staff	71,{
	callfunc "F_GM_NPC";
	mes "[Wedding Again]";
	mes "Hmm...?";
	mes "What exactly are";
	mes "you doing here?";
	next;
	if (callfunc("F_GM_NPC",1854,0) < 1) {
		mes "[Wedding Again]";
		mes "Ahk!";
		mes "An adventurer";
		mes "like you shouldn't";
		mes "be in this place!";
		close;
	}
	if (getpartnerid()) {
		mes "[Wedding Again]";
		mes "Hmm...";
		mes "I can only create";
		mes "a Wedding Ring if the";
		mes "character is married.";
		close;
	}
	mes "[Wedding Again]";
	mes "Ah, I see that you";
	mes "know the password.";
	mes "Alright, if you somehow";
	mes "lost your Wedding Ring,";
	mes "I can make you a new one.";
	next;
	switch(select("Make new Wedding Ring.:Cancel.")) {
	case 1:
		set .@ring, (Sex)?2634:2635; //Bridegroom_Ring, Bride_Ring
		if (countitem(.@ring) || isequipped(.@ring)) {
			mes "[Wedding Again]";
			mes "Wait, wait...";
			mes "You're wearing your";
			mes "Wedding Ring. I better";
			mes "not make you another since";
			mes "you don't need more than one.";
		} else {
			getitem .@ring,1;
			mes "[Wedding Again]";
			mes "Here you go~";
			mes "It's your brand";
			mes "new Wedding Ring!";
		}
		close;
	case 2:
		mes "[Wedding Again]";
		mes "Alright. If you ever";
		mes "lose your Wedding Ring,";
		mes "come to me if you happen";
		mes "to need a new one, okay?";
		close;
	}
}
