diff options
author | Vicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-02 19:09:49 +0000 |
---|---|---|
committer | Vicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-02 19:09:49 +0000 |
commit | a96e29d1e6b233ff00c03584d58456a82213d26a (patch) | |
tree | 7df4f59232ea0ee391ff26e0c036d6f4b811b6bb /npc/other | |
parent | f76d5167d8baa44bc57063a3822c1f07749579ec (diff) | |
download | hercules-a96e29d1e6b233ff00c03584d58456a82213d26a.tar.gz hercules-a96e29d1e6b233ff00c03584d58456a82213d26a.tar.bz2 hercules-a96e29d1e6b233ff00c03584d58456a82213d26a.tar.xz hercules-a96e29d1e6b233ff00c03584d58456a82213d26a.zip |
* Added Skotlex's updated marriage script [Vicious]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5433 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/other')
-rw-r--r-- | npc/other/marriage.txt | 1184 |
1 files changed, 631 insertions, 553 deletions
diff --git a/npc/other/marriage.txt b/npc/other/marriage.txt index c23b4ff98..8f49532a5 100644 --- a/npc/other/marriage.txt +++ b/npc/other/marriage.txt @@ -7,9 +7,9 @@ //=====By================================================
// AppleGirl and Evera(version 1.0)
//=====Current Version===================================
-// 2.5
+// 2.7
//=====Compatible With:==================================
-// eAthena Version SVN-R1968 and up; RO Episode 6+
+// eAthena Version SVN-R4287 and up; RO Episode 6+
//=====Description=======================================
// Fully working wedding script for all kind of weddings
//=====Additional Comments:==============================
@@ -22,7 +22,7 @@ - script marriage_init -1,{
OnInit:
set $@wed_allow, 0; //If 1, allows same sex marriages.
- set $@wed_veil, 1; //Set to 0 to disable veil check on the bride
+ set $@wed_veil, 0; //Set to 0 to disable veil check on the bride
//Id of the item that is traded for the wedding ring (use 0 to disable):
set $@wed_ring, 2613;
@@ -36,8 +36,8 @@ OnInit: // Other Configuration:
// Line 59,60: Priest location, sprite and name.
-// Line 392,393: Registration location, sprite and name.
-// Line 728,729: Divorcing location, sprite and name.
+// Line 430,431: Registration location, sprite and name.
+// Line 803,804: Divorcing location, sprite and name.
// Variable Notes:
// $wed_progress Signals that there is a wedding in progress
@@ -58,170 +58,198 @@ OnInit: //The Priest
prt_church.gat,100,123,4 script Frederick Second 60,{
set @name$,"Frederick Second";
- if (getpartnerid() > 0) goto L_MARRIED;
- if ($wed_progress == 1) goto L_WED_PROGRESS;
- mes "["+@name$+"]";
- mes "Hello child. How is life treating you?";
- close;
-OnInit:
- if ($wed_groom_progress!=6)
- end;
- callsub SF_wed_end;
- end;
+ function SF_wed_end;
+ function SF_equip_check;
+ function SF_Groom;
+ function SF_Bride;
+ function SF_AcceptGroom;
+ function SF_AcceptBride;
+ function SF_RetrieveRingM;
+ function SF_RetrieveRingF;
+ function SF_RingsAccepted;
+ function SF_StartCeremony;
-L_MARRIED:
- mes "["+@name$+"]";
- mes "You have my blessings, have a wonderful married life.";
- close;
+ if (getpartnerid() > 0) {
+ mes "["+@name$+"]";
+ mes "You have my blessings, have a wonderful married life.";
+ close;
+ }
+ if ($wed_progress == 0) {
+ mes "["+@name$+"]";
+ mes "Hello child. How is life treating you?";
+ close;
+ }
-L_WED_PROGRESS:
- if (strcharinfo(0) == $wed_groom$) goto L_GROOM;
- if (strcharinfo(0) == $wed_bride$) goto L_BRIDE;
- if (($wed_groom_progress > 0) && ($wed_bride_progress > 0)) goto L_ASK_DENIAL;
- mes "["+@name$+"]";
- mes "There is a wedding being planned. I would appreciate it if you would not interrupt me.";
- close;
-
-L_ASK_DENIAL:
- if ($wed_groom_progress == 6) goto L_TOO_LATE;
- mes "["+@name$+"]";
+ if (strcharinfo(0) == $wed_groom$) {
+ SF_Groom();
+ end;
+ }
+ if (strcharinfo(0) == $wed_bride$) {
+ SF_Bride();
+ end;
+ }
+ mes "["+@name$+"]";
+ if ($wed_groom_progress == 0 || $wed_bride_progress == 0) {
+ mes "There is a wedding being planned. I would appreciate it if you would not interrupt me.";
+ close;
+ }
+ if ($wed_groom_progress == 6) {
+ mes "I am wedding "+$wed_groom$+" and "+$wed_bride$+", and it's already too late to object. Please let me continue.";
+ close;
+ }
mes "I am going to wed "+$wed_groom$+" and "+$wed_bride$+", do you have an objection to it?";
- menu "Sorry, please go on.",-,"Yes, I actually do.",L_DENIAL;
- mes "Very well, go sit and enjoy the ceremony.";
- close;
-
-L_DENIAL:
- npctalk "Ladies and gentlemen, "+strcharinfo(0)+" has an objection to the wedding!";
- callsub SF_wed_end;
- mes "Why should they not be wed?";
- input $@msg$;
- npctalk strcharinfo(0)+"'s objection is: "+$@msg$;
- emotion e_sob;
- mes "I see...";
- close;
-
-L_TOO_LATE:
- mes "["+@name$+"]";
- mes "I am wedding "+$wed_groom$+" and "+$wed_bride$+", and it's already too late to object. Please let me continue.";
- close;
-
-L_GROOM:
- if ($wed_bride_progress == 0)
- goto L_NO_BRIDE;
-
- callsub SF_equip_check;
-
- if ($wed_groom_progress == 1)
- goto L_ACCEPT_BRIDE;
- if ($wed_groom_progress == 2)
- goto L_WAIT_ACCEPT;
- if ($wed_groom_progress == 3)
- goto L_RETRIEVE_RING_M;
- if ($wed_groom_progress == 4)
- goto L_WAIT_RETRIEVE;
- if ($wed_groom_progress == 5)
- goto L_RESUME_CEREMONY;
- mes "["+@name$+"]";
- mes "Please don't interrupt me now.";
- close;
-
-L_BRIDE:
- if ($wed_groom_progress == 0)
- goto L_NO_GROOM;
-
- callsub SF_equip_check;
-
- if ($wed_bride_progress == 1)
- goto L_ACCEPT_GROOM;
- if ($wed_bride_progress == 2)
- goto L_WAIT_ACCEPT;
- if ($wed_bride_progress == 3)
- goto L_RETRIEVE_RING_F;
- if ($wed_bride_progress == 4)
- goto L_WAIT_RETRIEVE;
- if ($wed_bride_progress == 5)
- goto L_RESUME_CEREMONY;
- mes "["+@name$+"]";
- mes "Please don't interrupt me now.";
- close;
-
-L_NO_BRIDE:
- mes "["+@name$+"]";
- mes "Looks like your bride has yet to arrive and register.";
- close;
+ if (select("Sorry, please go on.","Yes, I actually do.") == 2) {
+ //Abort
+ npctalk "Ladies and gentlemen, "+strcharinfo(0)+" has an objection to the wedding!";
+ SF_wed_end();
+ mes "Why should they not be wed?";
+ input $@msg$;
+ npctalk strcharinfo(0)+"'s objection is: "+$@msg$;
+ emotion e_sob;
+ mes "I see...";
+ } else
+ mes "Very well, go sit and enjoy the ceremony.";
+ close;
+
+function SF_Groom {
+ if ($wed_bride_progress == 0) {
+ mes "["+@name$+"]";
+ mes "Looks like your bride has yet to arrive and register.";
+ close;
+ }
+ if (SF_equip_check() == 0)
+ close;
+
+ switch($wed_groom_progress) {
+ case 1:
+ goto SF_AcceptBride;
+ break;
+ case 2:
+ mes "["+@name$+"]";
+ mes "I am waiting for your partner to accept you to start the ceremony.";
+ close;
+ case 3:
+ SF_RetrieveRingM();
+ break;
+ case 4:
+ mes "["+@name$+"]";
+ mes "Your partner's wedding ring hasn't been retrieved yet. The ceremony will start as soon as you both have claimed your rings.";
+ close;
+ case 5:
+ mes "["+@name$+"]";
+ SF_StartCeremony();
+ break;
+ default:
+ mes "["+@name$+"]";
+ mes "Please don't interrupt me now.";
+ close;
+ }
+}
-L_NO_GROOM:
- mes "["+@name$+"]";
- mes "Looks like your groom has yet to arrive and register.";
- close;
+function SF_Bride {
+ if ($wed_groom_progress == 0) {
+ mes "["+@name$+"]";
+ mes "Looks like your groom has yet to arrive and register.";
+ close;
+ }
+
+ if (SF_equip_check() == 0)
+ close;
+
+ switch ($wed_bride_progress) {
+ case 1:
+ SF_AcceptGroom();
+ break;
+ case 2:
+ mes "["+@name$+"]";
+ mes "I am waiting for your partner to accept you to start the ceremony.";
+ close;
+ case 3:
+ SF_RetrieveRingF();
+ break;
+ case 4:
+ mes "["+@name$+"]";
+ mes "Your partner's wedding ring hasn't been retrieved yet. The ceremony will start as soon as you both have claimed your rings.";
+ close;
+ case 5:
+ mes "["+@name$+"]";
+ SF_StartCeremony();
+ break;
+ default:
+ mes "["+@name$+"]";
+ mes "Please don't interrupt me now.";
+ close;
+ }
+}
-L_ACCEPT_GROOM:
+function SF_AcceptGroom {
mes "["+@name$+"]";
mes $wed_bride$+", "+$wed_groom$+" has requested to be your husband for the rest of your life. Do you accept?";
next;
- menu "I need time to think about it.",L_ACCEPT_DELAY,
- "No, I don't!",L_REJECT_GROOM,
- "Yes, I do!",-;
- set $wed_bride_progress,2;
- if ($wed_groom_progress == 2) goto L_LET_ACCEPT_RINGS;
- emotion e_ok;
- mes "["+@name$+"]";
- mes "After your groom approves, you will be given your rings, the ceremony will begin and you will be officially married.";
- close;
-
-L_REJECT_GROOM:
- mes "["+@name$+"]";
- mes "!!";
- mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
- close2;
- emotion e_omg;
- npctalk "Ladies and gentlemen, "+$wed_bride$+" has rejected to marry "+$wed_groom$+"!";
- callsub SF_wed_end;
- end;
+ switch(select("I need time to think about it.","No, I don't!","Yes, I do!")) {
+ case 1:
+ mes "["+@name$+"]";
+ mes "You what!?";
+ mes "err.. *cough* *cough* very well... come back after you've made up your mind.";
+ emotion e_ag;
+ close;
+ case 2:
+ mes "["+@name$+"]";
+ mes "!!";
+ mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
+ close2;
+ emotion e_omg;
+ npctalk "Ladies and gentlemen, "+$wed_bride$+" has rejected to marry "+$wed_groom$+"!";
+ SF_wed_end();
+ break;
+ case 3:
+ set $wed_bride_progress,2;
+ if ($wed_groom_progress == 2) {
+ SF_RingsAccepted();
+ break;
+ }
+ emotion e_ok;
+ mes "["+@name$+"]";
+ mes "After your groom approves, you will be given your rings, the ceremony will begin and you will be officially married.";
+ close;
+ }
+}
-L_ACCEPT_BRIDE:
+function SF_AcceptBride {
mes "["+@name$+"]";
mes $wed_groom$+", "+$wed_bride$+" has requested to be your wife for the rest of your life. Do you accept?";
next;
- menu "I need time to think about it.",L_ACCEPT_DELAY,
- "No, I don't!",L_REJECT_BRIDE,
- "Yes, I do!",-;
- set $wed_groom_progress,2;
- if ($wed_bride_progress == 2) goto L_LET_ACCEPT_RINGS;
- emotion e_ok;
- mes "["+@name$+"]";
- mes "After your bride approves, you will be given your rings, the ceremony will begin and you will be officially married.";
- close;
-
-L_REJECT_BRIDE:
- mes "["+@name$+"]";
- mes "!!";
- mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
- emotion e_omg;
- close2;
- npctalk "Ladies and gentlemen, "+$wed_groom$+" has rejected to marry "+$wed_bride$+"!";
- callsub SF_wed_end;
- end;
-
-L_ACCEPT_DELAY:
- mes "["+@name$+"]";
- mes "You what!?";
- mes "err.. *cough* *cough* very well... come back after you've made up your mind.";
- emotion e_ag;
- close;
-
-L_WAIT_ACCEPT:
- mes "["+@name$+"]";
- mes "I am waiting for your partner to accept you to start the ceremony.";
- close;
-
-L_WAIT_RETRIEVE:
- mes "["+@name$+"]";
- mes "Your partner's wedding ring hasn't been retrieved yet. The ceremony will start as soon as you both have claimed your rings.";
- close;
+ switch(select("I need time to think about it.","No, I don't!","Yes, I do!")) {
+ case 1:
+ mes "["+@name$+"]";
+ mes "You what!?";
+ mes "err.. *cough* *cough* very well... come back after you've made up your mind.";
+ emotion e_ag;
+ close;
+ case 2:
+ mes "["+@name$+"]";
+ mes "!!";
+ mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
+ emotion e_omg;
+ close2;
+ npctalk "Ladies and gentlemen, "+$wed_groom$+" has rejected to marry "+$wed_bride$+"!";
+ SF_wed_end();
+ break;
+ case 3:
+ set $wed_groom_progress,2;
+ if ($wed_bride_progress == 2) {
+ SF_RingsAccepted();
+ break;
+ }
+ emotion e_ok;
+ mes "["+@name$+"]";
+ mes "After your bride approves, you will be given your rings, the ceremony will begin and you will be officially married.";
+ close;
+ }
+}
-L_LET_ACCEPT_RINGS:
+function SF_RingsAccepted {
mes "["+@name$+"]";
mes "Now that you both have accepted, the wedding will begin. Please come forth, you and your partner, to retrieve your rings.";
set $wed_bride_progress,3;
@@ -230,56 +258,69 @@ L_LET_ACCEPT_RINGS: close2;
emotion e_lv;
npctalk "May the groom and bride please step forward and retrieve their rings?";
- end;
-
-L_RETRIEVE_RING_M:
+}
+
+function SF_RetrieveRingM {
mes "["+@name$+"]";
- if ($@wed_ring && countitem($@wed_ring) < 1) goto L_MISSING_RING;
+ if ($@wed_ring && countitem($@wed_ring) < 1) {
+ mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
+ close;
+ }
set @item, 2635; //Bride's wedding ring
if ($wed_bride_sex)
set @item, 2634; //Groom's wedding ring
- if (getnameditem(@item,$wed_groom$) == 0) goto L_RING_FAILED;
+ if (getnameditem(@item,$wed_groom$) == 0) {
+ mes "You don't seem to have enough space to carry the ring... go free up some space and come back to reclaim your partner's ring.";
+ close;
+ }
mes "Here's the wedding ring for your bride.";
if ($@wed_ring) delitem $@wed_ring,1;
set $wed_groom_progress,4;
- if ($wed_bride_progress == 4) goto L_START_CEREMONY;
- mes "Once your bride retrieves the ring, the ceremony will begin.";
- close;
+ if ($wed_bride_progress == 4)
+ SF_StartCeremony();
+ else {
+ mes "Once your bride retrieves the ring, the ceremony will begin.";
+ close;
+ }
+}
-L_RETRIEVE_RING_F:
+function SF_RetrieveRingF {
mes "["+@name$+"]";
- if ($@wed_ring && countitem($@wed_ring) < 1) goto L_MISSING_RING;
+ if ($@wed_ring && countitem($@wed_ring) < 1) {
+ mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
+ close;
+ }
set @item, 2635; //Bride's wedding ring
if ($wed_groom_sex)
set @item, 2634; //Groom's wedding ring
- if (getnameditem(@item,$wed_bride$) == 0)
- goto L_RING_FAILED;
+ if (getnameditem(@item,$wed_bride$) == 0) {
+ mes "You don't seem to have enough space to carry the ring... go free up some space and come back to reclaim your partner's ring.";
+ close;
+ }
mes "Here's the wedding ring for your groom.";
if ($@wed_ring) delitem $@wed_ring,1;
set $wed_bride_progress,4;
- if ($wed_groom_progress == 4) goto L_START_CEREMONY;
- mes "Once your groom retrieves the ring, the ceremony will begin.";
- close;
-
-L_MISSING_RING:
- mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
- close;
+ if ($wed_groom_progress == 4)
+ SF_StartCeremony();
+ else {
+ mes "Once your groom retrieves the ring, the ceremony will begin.";
+ close;
+ }
+}
-L_RING_FAILED:
- mes "You don't seem to have enough space to carry the ring... go free up some space and come back to reclaim your partner's ring.";
- close;
-
-L_RESUME_CEREMONY:
- mes "["+@name$+"]";
-L_START_CEREMONY:
+function SF_StartCeremony {
mes "I will now start the wedding ceremony, and you will be declared forth husband and wife.";
set $wed_bride_progress,5;
set $wed_groom_progress,5;
set $@msg$,$wed_groom$;
if (strcharinfo(0) == $wed_groom$)
set $@msg$,$wed_bride$;
- set @res,marriage($@msg$);
- if (@res == 0) goto L_FAILED_WEDDING;
+ if (marriage($@msg$) == 0) {
+ next;
+ mes "["+@name$+"]";
+ mes "Where is "+$@msg$+"?? I can't marry you both if one is missing...";
+ close;
+ }
set $wed_bride_progress,6;
set $wed_groom_progress,6;
close2;
@@ -289,16 +330,12 @@ L_START_CEREMONY: if ($@wedding_effect == 2)
attachnpctimer $wed_groom$;
end;
-
-L_FAILED_WEDDING:
- next;
- mes "["+@name$+"]";
- mes "Where is "+$@msg$+"?? I can't marry you both if one is missing...";
- close;
-
+}
+
OnTimer1000:
npctalk "Ladies and Gentlemen, We will now join in holy matrimony these two lovers.";
end;
+
OnTimer5000:
npctalk "Now more than ever, will both of your lives be entwined together as so will be your souls.";
end;
@@ -341,43 +378,38 @@ OnTimer50000: OnTimer55000:
npctalk "I pronounce you Husband and Wife, you may kiss the bride and exchange rings.";
+ SF_wed_end();
wedding;
if ($@wedding_effect)
detachnpctimer;
- callsub SF_wed_end;
stopnpctimer;
end;
//Subfunction: Checks that the groom/bride is still wearing their stuff.
-SF_equip_check:
- if (sex && getequipid(2) != 7170)
- goto SL_NO_TUXEDO;
- if (sex == 0 && getequipid(2) != 2338)
- goto SL_NO_DRESS;
- if (sex == 0 && $@wed_veil && getequipid(1) != 2206)
- goto SL_NO_VEIL;
- return;
-
-SL_NO_TUXEDO:
- mes "["+@name$+"]";
- mes "Child, what did you do with your "+getitemname(7170)+"?";
- emotion e_dots;
- close;
-
-SL_NO_DRESS:
- mes "["+@name$+"]";
- mes "Child, you are supposed to wear a "+getitemname(2338)+" at all times during the ceremony...";
- emotion e_dots;
- close;
-
-SL_NO_VEIL:
- mes "["+@name$+"]";
- mes "Child, you can't take off your "+getitemname(2206)+" yet....";
- emotion e_dots;
- close;
+function SF_equip_check {
+ if (sex && getequipid(2) != 7170) {
+ mes "["+@name$+"]";
+ mes "Child, what did you do with your "+getitemname(7170)+"?";
+ emotion e_dots;
+ return 0;
+ }
+ if (sex == 0 && getequipid(2) != 2338) {
+ mes "["+@name$+"]";
+ mes "Child, you are supposed to wear a "+getitemname(2338)+" at all times during the ceremony...";
+ emotion e_dots;
+ return 0;
+ }
+ if (sex == 0 && $@wed_veil && getequipid(1) != 2206) {
+ mes "["+@name$+"]";
+ mes "Child, you can't take off your "+getitemname(2206)+" yet....";
+ emotion e_dots;
+ return 0;
+ }
+ return 1;
+}
//Subfunction: Resets wedding variables.
-SF_wed_end:
+function SF_wed_end {
set $wed_groom$,"";
set $wed_groom_sex, 0;
set $wed_bride$,"";
@@ -385,184 +417,226 @@ SF_wed_end: set $wed_groom_progress,0;
set $wed_bride_progress,0;
set $wed_progress,0;
- return;
+}
+
+OnInit:
+ if ($wed_groom_progress==6) {
+ SF_wed_end();
+ }
+ end;
}
//Registration & Status
prt_church.gat,106,99,3 script Sister Mary 67,{
set @name$,"Mary";
- if (getpartnerid() > 0) goto L_MARRIED;
- if ($wed_progress == 1) goto L_WED_PROGRESS;
-L_MAIN:
- mes "["+@name$+"]";
- mes "Marriage... is such a beautiful thing.";
- mes "Would you like to get married with someone?";
- next;
- menu "I'll be single forever!",-,
- "Explain the principles of marriage.",L_PRINCIPLES,
- "Explain the marriage procedure.",L_PROCEDURE,
- "I want to get married with someone.",L_REGISTER;
+ if (getpartnerid() > 0) {
+ mes "["+@name$+"]";
+ mes "Isn't marriage beautiful?";
+ close;
+ }
- mes "["+@name$+"]";
- mes "In that case, enjoy your bachelor's life.";
- close;
-
-L_MARRIED:
- mes "["+@name$+"]";
- mes "Isn't marriage beautiful?";
- close;
-
-L_REGISTER:
- if ($@wed_allow == 0) goto L_REGISTER_M;
- mes "["+@name$+"]";
- mes "Very well, whom would you like to register as?";
- next;
- menu "Groom",L_CHECK_GROOM,"Bride",L_CHECK_BRIDE,"Cancel",-;
- mes "["+@name$+"]";
- mes "Come back when you are ready.";
- close;
-
-L_REGISTER_M:
- if (sex == 0) goto L_REGISTER_F;
- mes "["+@name$+"]";
- mes "Very well, will you register as the Groom?";
- next;
- menu "Yes",L_CHECK_GROOM,"I've changed my mind.",-;
- mes "["+@name$+"]";
- mes "Come back when you are ready.";
- close;
-
-L_REGISTER_F:
- mes "["+@name$+"]";
- mes "Very well, will you register as the Bride?";
- next;
- menu "Yes",L_CHECK_BRIDE,"I've changed my mind.",-;
- mes "["+@name$+"]";
- mes "Come back when you are ready.";
- close;
-
-L_CHECK_GROOM:
- callsub SF_check_requirements, 0;
- set $wed_progress,1;
- set $wed_groom_progress,1;
- set $wed_groom$,strcharinfo(0);
- set $wed_groom_sex, sex;
- mes "["+@name$+"]";
- mes "You are now registered as the groom.";
- mes "Tell your bride to register as soon as possible.";
- emotion e_hmm;
- initnpctimer;
- close;
+ function SF_WedProgress;
+ function SF_Principles;
+ function SF_Procedure;
+ function SF_Register;
+ function SF_TryRegister;
+
+ if ($wed_progress) {
+ SF_WedProgress();
+ end;
+ }
-L_CHECK_BRIDE:
- callsub SF_check_requirements, 1;
- set $wed_progress,1;
- set $wed_bride_progress,1;
- set $wed_bride$,strcharinfo(0);
- set $wed_bride_sex, sex;
- mes "["+@name$+"]";
- mes "You are now registered as the bride.";
- mes "Tell your groom to register as soon as possible.";
- emotion e_hmm;
- initnpctimer;
- close;
+ do {
+ mes "["+@name$+"]";
+ mes "Marriage... is such a beautiful thing.";
+ mes "Would you like to get married with someone?";
+ next;
+ set @menu, select(
+ "I'll be single forever!",
+ "Explain the principles of marriage.",
+ "Explain the marriage procedure.",
+ "I want to get married with someone."
+ );
+ switch (@menu) {
+ case 1: //Quit
+ mes "["+@name$+"]";
+ mes "In that case, enjoy your bachelor's life.";
+ close;
+ case 2: //Principles
+ SF_Principles();
+ break;
+ case 3: //Procedure
+ SF_Procedure();
+ break;
+ case 4: //Register
+ SF_Register();
+ break;
+ }
+ } while (@menu > 1);
+ end;
-L_WED_PROGRESS:
- if (strcharinfo(0) == $wed_groom$) goto L_GROOM_PROGRESS;
- if (strcharinfo(0) == $wed_bride$) goto L_BRIDE_PROGRESS;
- if (($wed_groom_progress == 0) && (sex == 1 || $@wed_allow == 1)) goto L_ASK_GROOM;
- if (($wed_bride_progress == 0) && (sex == 0 || $@wed_allow == 1)) goto L_ASK_BRIDE;
+function SF_Register {
+ if ($@wed_allow) { //Role select
+ mes "["+@name$+"]";
+ mes "Very well, whom would you like to register as?";
+ next;
+ set @submenu, select("Groom","Bride","Cancel");
+ } else if (sex) { //Groom
+ mes "["+@name$+"]";
+ mes "Very well, will you register as the Groom?";
+ next;
+ if (select("Yes","I've changed my mind.")==1)
+ set @submenu, 1;
+ else
+ set @submenu, 3;
+ } else { //Bride
+ mes "["+@name$+"]";
+ mes "Very well, will you register as the Bride?";
+ next;
+ if (select("Yes","I've changed my mind.")==1)
+ set @submenu, 2;
+ else
+ set @submenu, 3;
+ }
+ switch (@submenu) {
+ case 1: //Groom
+ SF_TryRegister(0);
+ set $wed_progress,1;
+ mes "["+@name$+"]";
+ mes "You are now registered as the groom.";
+ mes "Tell your bride to register as soon as possible.";
+ emotion e_hmm;
+ initnpctimer;
+ close;
+ case 2: //Bride
+ SF_TryRegister(1);
+ set $wed_progress,1;
+ mes "["+@name$+"]";
+ mes "You are now registered as the bride.";
+ mes "Tell your groom to register as soon as possible.";
+ emotion e_hmm;
+ initnpctimer;
+ close;
+ default: //Cancel
+ mes "["+@name$+"]";
+ mes "Come back when you are ready.";
+ close;
+ }
+}
+
+function SF_WedProgress {
+ if (strcharinfo(0) == $wed_groom$) {
+ mes "["+@name$+"]";
+ if ($wed_bride_progress > 0)
+ mes "The Priest will handle the rest of the ceremony.";
+ else
+ mes "Tell your bride to register, what is taking so long? Time is running out.";
+ close;
+ }
+ if (strcharinfo(0) == $wed_bride$) {
+ mes "["+@name$+"]";
+ if ($wed_groom_progress > 0)
+ mes "The Priest will handle the rest of the ceremony.";
+ else
+ mes "Tell your groom to register, what is taking so long? Time is running out.";
+ close;
+ }
+ if (($wed_groom_progress == 0) && (sex == 1 || $@wed_allow == 1)) {
+ mes "["+@name$+"]";
+ mes $wed_bride$+" is waiting for the groom to register. Are you the one who came to register as groom?";
+ next;
+ if (select("Yes, I am.","Sorry, you got the wrong person.") == 1) {
+ SF_TryRegister(0);
+ stopnpctimer;
+ set $wed_groom_progress,1;
+ mes "["+@name$+"]";
+ mes "Very well, now go to the Priest to reaffirm your vows and the ceremony will begin.";
+ emotion e_no1;
+ close2;
+ npctalk "Registration finished. "+$wed_groom$+" and "+$wed_bride$+", please reaffirm your vows with the Priest.";
+ emotion e_no1;
+ end;
+ } else {
+ mes "["+@name$+"]";
+ mes "I see. Sorry to have bothered you then.";
+ close;
+ }
+
+ }
+ if (($wed_bride_progress == 0) && (sex == 0 || $@wed_allow == 1)) {
+ mes "["+@name$+"]";
+ mes $wed_groom$+" is waiting for the bride to register. Are you the one who came to register as the bride?";
+ next;
+ if(select("Yes, I am.","Sorry, you got the wrong person.") == 1) {
+ SF_TryRegister(1);
+ stopnpctimer;
+ mes "["+@name$+"]";
+ mes "Very well, now go to the Priest to reaffirm your vows and the ceremony will begin.";
+ emotion e_no1;
+ close2;
+ npctalk "Registration finished. "+$wed_groom$+" and "+$wed_bride$+", please reaffirm your vows with the Priest.";
+ emotion e_no1;
+ end;
+ } else {
+ mes "["+@name$+"]";
+ mes "I see. Sorry to have bothered you then.";
+ close;
+ }
+ }
mes "["+@name$+"]";
mes "There is a wedding in progress.";
mes "Would you like to know the progress of said wedding?";
next;
- menu "Yes",L_SHOW_PROGRESS,"No",-;
- mes "["+@name$+"]";
- mes "Enjoy the wedding.";
- close;
-
-L_GROOM_PROGRESS:
- if ($wed_bride_progress > 0) goto L_TALK_PRIEST;
- mes "["+@name$+"]";
- mes "Tell your bride to register, what is taking so long? Time is running out.";
- close;
-
-L_BRIDE_PROGRESS:
- if ($wed_groom_progress > 0) goto L_TALK_PRIEST;
- mes "["+@name$+"]";
- mes "Tell your groom to register, what is taking so long? Time is running out.";
- close;
-
-L_TALK_PRIEST:
- mes "["+@name$+"]";
- mes "The Priest will handle the rest of the ceremony.";
- close;
-
-L_ASK_GROOM:
- mes "["+@name$+"]";
- mes $wed_bride$+" is waiting for the groom to register. Are you the one who came to register as groom?";
- next;
- menu "Yes, I am.",-,"Sorry, you got the wrong person.",L_NOT_ME;
- callsub SF_check_requirements, 0;
- stopnpctimer;
- set $wed_groom_progress,1;
- set $wed_groom$,strcharinfo(0);
- set $wed_groom_sex, sex;
- goto L_REG_FINISH;
-
-L_ASK_BRIDE:
- mes "["+@name$+"]";
- mes $wed_groom$+" is waiting for the bride to register. Are you the one who came to register as the bride?";
- next;
- menu "Yes, I am.",-,"Sorry, you got the wrong person.",L_NOT_ME;
- callsub SF_check_requirements, 1;
- stopnpctimer;
- set $wed_bride_progress,1;
- set $wed_bride$,strcharinfo(0);
- set $wed_bride_sex, sex;
-
-L_REG_FINISH:
- mes "["+@name$+"]";
- mes "Very well, now go to the Priest to reaffirm your vows and the ceremony will begin.";
- emotion e_no1;
- close2;
- npctalk "Registration finished. "+$wed_groom$+" and "+$wed_bride$+", please reaffirm your vows with the Priest.";
- emotion e_no1;
- end;
-
-L_NOT_ME:
- mes "["+@name$+"]";
- mes "I see. Sorry to have bothered you then.";
- close;
-
-L_SHOW_PROGRESS:
- mes "["+@name$+"]";
- if ($wed_groom_progress == 0)
+ if (select("Yes","No") != 1) {
+ mes "["+@name$+"]";
+ mes "Enjoy the wedding.";
+ close;
+ }
+ //Display Progress
+ mes "["+@name$+"]";
+ switch ($wed_groom_progress) {
+ case 0:
mes "The groom has not registered yet.";
- if ($wed_groom_progress == 1)
+ break;
+ case 1:
mes "The groom, "+$wed_groom$+", has yet to accept the bride.";
- if ($wed_groom_progress == 2)
+ break;
+ case 2:
mes "The groom, "+$wed_groom$+", is waiting for the bride's acceptance.";
- if ($wed_groom_progress == 3)
+ break;
+ case 3:
mes "The groom, "+$wed_groom$+", has yet to retrieve the ring.";
- if ($wed_groom_progress == 4)
+ break;
+ case 4:
mes "The groom, "+$wed_groom$+", is waiting for the bride to retrieve the ring.";
- if ($wed_bride_progress == 0)
+ break;
+ }
+ switch ($wed_bride_progress) {
+ case 0:
mes "The bride has not registered yet.";
- if ($wed_bride_progress == 1)
+ break;
+ case 1:
mes "The bride, "+$wed_bride$+", has yet to confirm the groom.";
- if ($wed_bride_progress == 2)
+ break;
+ case 2:
mes "The bride, "+$wed_bride$+", is waiting for the groom's acceptance.";
- if ($wed_bride_progress == 3)
+ break;
+ case 3:
mes "The bride, "+$wed_bride$+", has yet to retrieve the ring.";
- if ($wed_bride_progress == 4)
+ break;
+ case 4:
mes "The bride, "+$wed_bride$+", is waiting for the groom to retrieve the ring.";
- if ($wed_groom_progress == 5)
+ break;
+ case 5:
mes "We are just waiting for both "+$wed_groom$+" and "+$wed_bride$+" to be together to marry them.";
- if ($wed_groom_progress == 6)
+ break;
+ case 6:
mes $wed_groom$+" and "+$wed_bride$+"'s wedding ceremony is already well on it's way.";
+ break;
+ }
mes "Enjoy the remaining of the wedding.";
close;
+}
OnInit:
if ($wed_groom_progress + $wed_bride_progress == 1)
@@ -571,11 +645,12 @@ OnInit: OnTimer60000:
//Registration failed.
- set $@msg$, $wed_groom$;
if ($wed_bride_progress == 1)
set $@msg$, $wed_bride$;
+ else
+ set $@msg$, $wed_groom$;
- npctalk "Registration timed out. Is it that no one wants to marry "+$@msg$+"..?";
+ npctalk "Registration timed out. Is it that noone wants to marry "+$@msg$+"..?";
emotion e_hmm;
set $wed_groom$,"";
@@ -585,12 +660,11 @@ OnTimer60000: set $wed_groom_progress,0;
set $wed_bride_progress,0;
set $wed_progress,0;
-
stopnpctimer;
end;
-//Subfunction SF_check_requirements (int bride)
-SF_check_requirements:
+//Subfunction SF_TryRegister (int bride)
+function SF_TryRegister {
set @bride, getarg(0);
set @type$, "groom";
if (@bride)
@@ -599,54 +673,58 @@ SF_check_requirements: mes "["+@name$+"]";
mes "Before registering as "+@type$+", let me check if you meet all the requirements...";
next;
- if (class >= Job_Baby && class <= Job_Super_Baby)
- goto SL_BABY;
- set @item, 2338;
+ if (Upper == 2) {
+ mes "["+@name$+"]";
+ mes "Oh dear, you are too young to be thinking of marriage!";
+ emotion e_gasp;
+ close;
+ }
if (sex)
set @item, 7170;
- if (getequipid(2) != @item)
- goto SL_NEED_SUIT;
- if (sex == 0 && $@wed_veil && getequipid(1) != 2206)
- goto SL_NEED_VEIL;
- if ($@wed_ring && countitem($@wed_ring) < 1)
- goto SL_MISSING_RING;
- set @cost, $@wed_groom_reg;
+ else
+ set @item, 2338;
+
+ if (getequipid(2) != @item) {
+ mes "["+@name$+"]";
+ mes "You should be wearing a "+getitemname(@item)+" if you want to get married.";
+ close;
+ }
+ if (sex == 0 && $@wed_veil && getequipid(1) != 2206) {
+ mes "["+@name$+"]";
+ mes "Where is your "+getitemname(2206)+"? It's a necessary complement to your dress.";
+ close;
+ }
+ if ($@wed_ring && countitem($@wed_ring) < 1) {
+ mes "["+@name$+"]";
+ mes "Where's the ring? You need a "+getitemname($@wed_ring)+" for the ring exchange, dear.";
+ close;
+ }
if (@bride)
set @cost, $@wed_bride_reg;
- if (Zeny < @cost)
- goto SL_NEED_ZENY;
+ else
+ set @cost, $@wed_groom_reg;
+
+ if (Zeny < @cost) {
+ mes "["+@name$+"]";
+ mes "I am sorry, but you don't have enough to pay for the registration fee.";
+ mes "Come back once you have collected "+@cost+"z.";
+ close;
+ }
set Zeny,Zeny-@cost;
- return;
-
-SL_BABY:
- mes "["+@name$+"]";
- mes "Oh dear, you are too young to be thinking of marriage!";
- emotion e_gasp;
- close;
-
-SL_NEED_SUIT:
- mes "["+@name$+"]";
- mes "You should be wearing a "+getitemname(@item)+" if you want to get married.";
- close;
-
-SL_NEED_VEIL:
- mes "["+@name$+"]";
- mes "Where is your "+getitemname(2206)+"? It's a necessary complement to your dress.";
- close;
-
-SL_MISSING_RING:
- mes "["+@name$+"]";
- mes "Where's the ring? You need a "+getitemname($@wed_ring)+" for the ring exchange, dear.";
- close;
-
-SL_NEED_ZENY:
- mes "["+@name$+"]";
- mes "I am sorry, but you don't have enough to pay for the registration fee.";
- mes "Come back once you have collected "+@cost+"z.";
- close;
+ sc_start SC_Wedding,3600000000,1; //Start Wedding Effect (SC_WEDDING)
+ if (@bride) {
+ set $wed_bride_progress,1;
+ set $wed_bride$,strcharinfo(0);
+ set $wed_bride_sex, sex;
+ } else {
+ set $wed_groom_progress,1;
+ set $wed_groom$,strcharinfo(0);
+ set $wed_groom_sex, sex;
+ }
+}
//Explain wedding principles...
-L_PRINCIPLES:
+function SF_Principles {
mes "["+@name$+"]";
mes "Weddings are performed by our local Priest with the intent of promoting love and peace among the loving couples.";
next;
@@ -657,12 +735,10 @@ L_PRINCIPLES: mes "The two who have been joined by marriage must remain together forever until the day death do them apart.";
next;
mes "["+@name$+"]";
- if ($@wed_allow == 1) goto LP_BI;
- mes "Males may only wed with females, and females only with males, the church will not consent any other kind of partnerships.";
- goto LP_CONTINUE;
-LP_BI:
- mes "Altough normally only males can wed females (and viceversa), our local Priest is more open-minded than that and he permits all pairings regardless of gender.";
-LP_CONTINUE:
+ if ($@wed_allow == 1)
+ mes "Altough normally only males can wed females (and viceversa), our local Priest is more open-minded than that and he permits all pairings regardless of gender.";
+ else
+ mes "Males may only wed with females, and females only with males, the church will not consent any other kind of partnerships.";
next;
mes "["+@name$+"]";
mes "If there is a significant other with whom you want to spend the rest of your life with, then don't be shy to propose.";
@@ -670,38 +746,36 @@ LP_CONTINUE: mes "["+@name$+"]";
mes "I wish for many blessings upon couples who wish to live happily ever after...";
next;
- goto L_MAIN;
+}
//Explain the wedding procedure...
-L_PROCEDURE:
+function SF_Procedure {
mes "["+@name$+"]";
mes "First of all, both groom and bride must register with me.";
next;
- if ($@wed_allow == 1)
- goto LP_SKIP_GB;
- mes "["+@name$+"]";
- mes "The registration requirements for the groom are:";
- mes "- To be wearing a "+getitemname(7170)+".";
- if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
- if ($@wed_groom_reg > 0) mes "- Pay a Registration fee of "+$@wed_groom_reg+"z.";
- next;
- mes "["+@name$+"]";
- mes "The registration requirements for the bride are:";
- mes "- To be wearing a "+getitemname(2338)+".";
- if ($@wed_veil) mes "- To be wearing a "+getitemname(2206)+".";
- if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
- if ($@wed_bride_reg > 0) mes "- Pay a Registration fee of "+$@wed_bride_reg+"z.";
- goto LP_SKIP_BI;
-LP_SKIP_GB:
- mes "["+@name$+"]";
- mes "The registration requirements are:";
- mes "- Males must be wearing a "+getitemname(7170)+".";
- mes "- Females must be wearing a "+getitemname(2338)+".";
- if ($@wed_veil) mes "- Females must also wear a "+getitemname(2206)+".";
- if ($@wed_ring) mes "- Both must own a "+getitemname($@wed_ring)+" each.";
- if ($@wed_groom_reg > 0) mes "- The registration fee for the groom is "+$@wed_groom_reg+"z.";
- if ($@wed_bride_reg > 0) mes "- The registration fee for the bride is "+$@wed_bride_reg+"z.";
-LP_SKIP_BI:
+ if ($@wed_allow == 1) {
+ mes "["+@name$+"]";
+ mes "The registration requirements are:";
+ mes "- Males must be wearing a "+getitemname(7170)+".";
+ mes "- Females must be wearing a "+getitemname(2338)+".";
+ if ($@wed_veil) mes "- Females must also wear a "+getitemname(2206)+".";
+ if ($@wed_ring) mes "- Both must own a "+getitemname($@wed_ring)+" each.";
+ if ($@wed_groom_reg > 0) mes "- The registration fee for the groom is "+$@wed_groom_reg+"z.";
+ if ($@wed_bride_reg > 0) mes "- The registration fee for the bride is "+$@wed_bride_reg+"z.";
+ } else {
+ mes "["+@name$+"]";
+ mes "The registration requirements for the groom are:";
+ mes "- To be wearing a "+getitemname(7170)+".";
+ if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
+ if ($@wed_groom_reg > 0) mes "- Pay a Registration fee of "+$@wed_groom_reg+"z.";
+ next;
+ mes "["+@name$+"]";
+ mes "The registration requirements for the bride are:";
+ mes "- To be wearing a "+getitemname(2338)+".";
+ if ($@wed_veil) mes "- To be wearing a "+getitemname(2206)+".";
+ if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
+ if ($@wed_bride_reg > 0) mes "- Pay a Registration fee of "+$@wed_bride_reg+"z.";
+ }
next;
mes "["+@name$+"]";
mes "I shouldn't need to mention this, but adopted kids are too young to get married.";
@@ -712,136 +786,140 @@ LP_SKIP_BI: next;
mes "["+@name$+"]";
mes "If you both accept each other, then the wedding has been decided and the ceremony will begin.";
- if ($@wed_ring == 0) goto LP_SKIP_RING;
- mes "But first, you need to get your rings ready.";
- next;
- mes "["+@name$+"]";
- mes "Talk to the priest once more, and he will exchange your "+getitemname($@wed_ring)+" for a wedding ring. After you both have claimed the rings for exchanging, the ceremony will begin.";
-LP_SKIP_RING:
+ if ($@wed_ring) {
+ mes "But first, you need to get your rings ready.";
+ next;
+ mes "["+@name$+"]";
+ mes "Talk to the priest once more, and he will exchange your "+getitemname($@wed_ring)+" for a wedding ring. After you both have claimed the rings for exchanging, the ceremony will begin.";
+ }
next;
mes "["+@name$+"]";
mes "If there are various couples who desire to marry, you should keep in order, for the Priest can only handle one wedding at a time.";
next;
- goto L_MAIN;
+}
}
prt_church.gat,94,99,4 script Sister Lisa 79,{
set @name$,"Lisa";
-L_MAIN:
- if ($@divorce_progress==1) goto L_PROGRESS;
- mes "["+@name$+"]";
- mes "Divorcing can be such a sad event...";
- if (getpartnerid() > 0) goto L_ASK_DIVORCE;
- mes "People shouldn't make shallow vows to others, don't you think?";
- close;
-L_ASK_DIVORCE:
- mes "You wouldn't want to divorce, by any chance?";
- next;
- menu "I am happy as I am, thank you.",-,
- "Explain the divorce.",L_EXPLAIN,
- "Explain Requirements.",L_REQUIREMENTS,
- "I want to divorce.",L_DIVORCE;
-
- mes "["+@name$+"]";
- mes "Good to hear.";
- close;
-
-L_EXPLAIN:
- mes "["+@name$+"]";
- mes "Even though it is said that once the wedlocks have been made they cannot be undone, sometimes it is necessary to undo our mistakes from the past..";
- next;
- mes "["+@name$+"]";
- mes "It is sad, but true. If you happen to have married the wrong person, it is possible to divorce, rather than spend the rest of your life with the wrong one.";
- next;
- goto L_MAIN;
-L_REQUIREMENTS:
- mes "["+@name$+"]";
- mes "In order to file for divorce, I need you both to agree to it.";
- mes "After you file in for divorce, your spouse has one minute to agree, and then you will both be divorced.";
- if ($@wed_divorce_fee > 0) mes "The fee is of "+$@wed_divorce_fee+"z and is paid by the person who confirms the divorce, so plan ahead of time how you will divide the costs.";
- next;
- goto L_MAIN;
-
-L_DIVORCE:
- mes "["+@name$+"]";
- mes "You should not regret the choices you've made in life.";
- mes "Are you positively sure about getting divorced?";
- next;
- menu "Wait... I need to think about it.",L_REGRET,"Absolutely",-;
- mes "["+@name$+"]";
- set $@divorcee,getpartnerid();
- set $@divorcer$,strcharinfo(0);
- set $@divorce_progress,1;
- initnpctimer;
- mes "Very well, get your partner to confirm, and I will collect the fee for filing the divorce then.";
- close;
-
-L_PROGRESS:
- if (strcharinfo(0) == $@divorcer$) goto L_WAITING;
- if (getcharid(0) == $@divorcee) goto L_CONFIRM;
- mes "["+@name$+"]";
- mes "I am in the progress of divorcing "+$@divorcer$+".";
- mes "Do you know who the spouse is?";
- close;
-
-L_WAITING:
- mes "["+@name$+"]";
- mes "...I am still waiting for your partner to confirm the divorce procedure.";
- close;
-
-L_CONFIRM:
+ function SF_DivorceEnd;
+ function SF_InProgress;
+
+ if ($@divorce_progress==1) {
+ goto SF_InProgress;
+ end;
+ }
+
+ do {
+ mes "["+@name$+"]";
+ mes "Divorcing can be such a sad event...";
+ if (getpartnerid() == 0) {
+ mes "People shouldn't make shallow vows to others, don't you think?";
+ close;
+ }
+ mes "You wouldn't want to divorce, by any chance?";
+ next;
+ set @menu, select(
+ "I am happy as I am, thank you.",
+ "Explain the divorce.",
+ "Explain Requirements.",
+ "I want to divorce."
+ );
+ switch (@menu) {
+ case 1:
+ mes "["+@name$+"]";
+ mes "Good to hear.";
+ close;
+ case 2: //Explanation
+ mes "["+@name$+"]";
+ mes "Even though it is said that once the wedlocks have been made they cannot be undone, sometimes it is necessary to undo our mistakes from the past..";
+ next;
+ mes "["+@name$+"]";
+ mes "It is sad, but true. If you happen to have married the wrong person, it is possible to divorce, rather than spend the rest of your life with the wrong one.";
+ next;
+ break;
+ case 3: //Requirement
+ mes "["+@name$+"]";
+ mes "In order to file for divorce, I need you both to agree to it.";
+ mes "After you file in for divorce, your spouse has one minute to agree, and then you will both be divorced.";
+ if ($@wed_divorce_fee > 0) mes "The fee is of "+$@wed_divorce_fee+"z and is paid by the person who confirms the divorce, so plan ahead of time how you will divide the costs.";
+ next;
+ break;
+ case 4: //Divorce
+ mes "["+@name$+"]";
+ mes "You should not regret the choices you've made in life.";
+ mes "Are you positively sure about getting divorced?";
+ next;
+ if (select("Wait... I need to think about it.","Absolutely") != 2) {
+ mes "["+@name$+"]";
+ mes "You should think this through.";
+ close;
+ }
+ mes "["+@name$+"]";
+ set $@divorcee,getpartnerid();
+ set $@divorcer$,strcharinfo(0);
+ set $@divorce_progress,1;
+ initnpctimer;
+ mes "Very well, get your partner to confirm, and I will collect the fee for filing the divorce then.";
+ close;
+ }
+ } while (@menu > 1);
+end;
+
+function SF_InProgress {
+ if (strcharinfo(0) == $@divorcer$) {
+ mes "["+@name$+"]";
+ mes "...I am still waiting for your partner to confirm the divorce procedure.";
+ close;
+ }
+ if (getcharid(0) != $@divorcee) {
+ mes "["+@name$+"]";
+ mes "I am in the progress of divorcing "+$@divorcer$+".";
+ mes "Do you know who the spouse is?";
+ close;
+ }
+ //Confirm...
mes "["+@name$+"]";
mes $@divorcer$+" has asked to divorce you. If you accept, and have the fee of "+$@wed_divorce_fee+"z at hand, I will proceed to divorce you two.";
mes "So, should I proceed with the divorce?";
next;
- menu "I don't want to divorce....",L_REJECT,
- "Yes, we have agreed to this.",-;
- if (Zeny < $@wed_divorce_fee)
- goto L_NO_ZENY;
- if (!(divorce())) goto L_DIVORCE_FAILED;
+ if (select("I don't want to divorce....","Yes, we have agreed to this.")!=2) {
+ mes "["+@name$+"]";
+ mes "I hope you can work things out.";
+ emotion e_pat;
+ goto SF_DivorceEnd;
+ close;
+ }
+ if (Zeny < $@wed_divorce_fee) {
+ mes "["+@name$+"]";
+ mes "Well, I can't file your divorce because you don't have enough for the fee. Get your partner to lend you some?";
+ close;
+ }
+ if (!(divorce())) {
+ mes "["+@name$+"]";
+ mes "Where has "+$@divorcer$+" gone to? I can't divorce you unless you both are here...";
+ emotion e_swt2;
+ close;
+ }
set Zeny,Zeny-$@wed_divorce_fee;
announce $@divorcer$+" has just divorced "+strcharinfo(0)+"...", 8;
mes "["+@name$+"]";
mes "Your divorce has been filed. You are no longer wed.";
emotion e_sob;
- goto L_DIVORCE_END;
-
-L_DIVORCE_FAILED:
- mes "["+@name$+"]";
- mes "Where has "+$@divorcer$+" gone to? I can't divorce you unless you both are here...";
- emotion e_swt2;
- close;
-
-L_REGRET:
- mes "["+@name$+"]";
- mes "You should think this through.";
+ goto SF_DivorceEnd;
close;
+}
-L_REJECT:
- mes "["+@name$+"]";
- mes "I hope you can work things out.";
- emotion e_pat;
- goto L_DIVORCE_END;
-
-L_NO_ZENY:
- mes "["+@name$+"]";
- mes "Well, I can't file your divorce because you don't have enough for the fee. Get your partner to lend you some?";
- close;
-
-L_DIVORCE_END:
+function SF_DivorceEnd {
stopnpctimer;
set $@divorce_progress,0;
set $@divorcee,0;
set $@divorcer$,"";
- close;
-
+}
+
OnTimer60000:
- stopnpctimer;
npctalk "Divorce confirmation timed out. Where did "+$@divorcer$+"'s spouse go...";
emotion e_what;
- set $@divorce_progress,0;
- set $@divorcee,0;
- set $@divorcer$,"";
+ SF_DivorceEnd();
end;
}
\ No newline at end of file |