root/npc/custom/marriage.txt @ 25

Revision 1, 28.3 kB (checked in by jinshiro, 17 years ago)
Line 
1//////////////////////////////////////////////////////////
2//             Marriage Script                          //
3//////////////////////////////////////////////////////////
4//
5//=====eAthena Script====================================
6// Wedding Script
7//=====By================================================
8// AppleGirl and Evera(version 1.0)
9//=====Current Version===================================
10// 2.9
11//=====Compatible With:==================================
12// eAthena Version SVN-R8637 and up; RO Episode 6+
13//=====Description=======================================
14// Fully working wedding script for all kind of weddings
15//=====Additional Comments:==============================
16// Lesbian and Gay Weddings by ShadowLady (version 1.1)
17// Complete Rewrite by Skotlex (version 2.0->2.8)
18// 2.9 : Somewhat iRO-official NPC names [DracoRPG]
19//=======================================================
20
21// Configuration Variables:
22-       script  marriage_init   -1,{
23OnInit:
24        set $@wed_allow, 0;     //If 1, allows same sex marriages.
25        set $@wed_veil, 0;      //Set to 0 to disable veil check on the bride
26
27//Id of the item that is traded for the wedding ring (use 0 to disable):
28        set $@wed_ring, 2613;
29
30        set $@wed_groom_reg, 1300000;   //Registration cost for the Groom
31        set $@wed_bride_reg, 1200000; //Registration cost for the Bride
32        set $@wed_divorce_fee, 50000;   //Divorcing fee
33        set $@wedding_effect, 1; //On who to display the FX: 0: Priest, 1: Bride, 2: Groom
34        end;
35}
36
37// Other Configuration:
38// Line 61,62: Priest location, sprite and name.
39// Line 437,438: Registration location, sprite and name.
40// Line 813,814: Divorcing location, sprite and name.
41
42// Variable Notes:
43// $wed_progress        Signals that there is a wedding in progress
44// $wed_groom$ - Groom's name storage
45// $wed_groom_sex - Groom's gender (for same marriage ring giving)
46// $wed_bride$ - Bride's name storage
47// $wed_bride_sex - Groom's gender (for same marriage ring giving)
48// $wed_groom_progress - Notes the progress on the groom's part
49// $wed_bride_progress - Notes the progress on the bride's part
50// 0: Not registered. 1: Registered. 2: Accepted the partner. 3: Ready to
51// Retrieve the ring. 4: Retrieved the ring. 5: All set to be wed. 6: Already
52// a couple.
53// ceremony.
54// $wedding_effect_id - When wedding_effect is enabled, sets the ID of the
55// player to show the effect on.
56// $divorce_progress    signals that there is a divorce in progress
57// $@divorcer$ name of the person who requested divorce
58// $@divorcee id of the partner, who has to accept the divorce and pay.
59
60//The Priest - official iRO sprite & in-dialog name (on-map name not confirmed)
61prt_church,100,123,4    script  Vomars  60,{
62        set @name$,"Vomars";
63
64        function SF_wed_end;
65        function SF_equip_check;
66        function SF_Groom;
67        function SF_Bride;
68        function SF_AcceptGroom;
69        function SF_AcceptBride;
70        function SF_RetrieveRingM;
71        function SF_RetrieveRingF;
72        function SF_RingsAccepted;
73        function SF_StartCeremony;
74       
75        if (getpartnerid() > 0) {
76                mes "["+@name$+"]";
77                mes "You have my blessings, have a wonderful married life.";
78                close;
79        }
80        if ($wed_progress == 0) { // Official iRO dialog
81                mes "["+@name$+"]";
82                mes "You must apply for";
83                mes "marriage with Happy Marry";
84                mes "before you can get married.";
85                mes "Happy Marry will let you know";
86                mes "what else you'll need to do";
87                mes "to prepare for marriage";
88                close;
89        } // End official iRO dialog
90       
91        if (strcharinfo(0) == $wed_groom$) {
92                SF_Groom();
93                end;
94        }
95        if (strcharinfo(0) == $wed_bride$) {
96                SF_Bride();
97                end;
98        }
99        mes "["+@name$+"]";
100        if ($wed_groom_progress == 0 || $wed_bride_progress == 0) {
101                mes "There is a wedding being planned. I would appreciate it if you would not interrupt me.";
102                close;
103        }
104        if ($wed_groom_progress == 6) {
105                mes "I am wedding "+$wed_groom$+" and "+$wed_bride$+", and it's already too late to object. Please let me continue.";
106                close;
107        }
108        mes "I am going to wed "+$wed_groom$+" and "+$wed_bride$+", do you have an objection to it?";
109        if (select("Sorry, please go on.","Yes, I actually do.") == 2) {
110                //Abort
111                npctalk "Ladies and gentlemen, "+strcharinfo(0)+" has an objection to the wedding!";
112                SF_wed_end();
113                mes "Why should they not be wed?";
114                input $@msg$;
115                npctalk strcharinfo(0)+"'s objection is: "+$@msg$;
116                emotion e_sob;
117                mes "I see...";
118        } else
119                mes "Very well, go sit and enjoy the ceremony.";
120        close;
121
122function SF_Groom {
123        if ($wed_bride_progress == 0) {
124                mes "["+@name$+"]";
125                mes "Looks like your bride has yet to arrive and register.";
126                close;
127        }
128        if (SF_equip_check() == 0)
129                close;
130
131        switch($wed_groom_progress) {
132        case 1:
133                SF_AcceptBride();
134                break;
135        case 2:
136                mes "["+@name$+"]";
137                mes "I am waiting for your partner to accept you to start the ceremony.";
138                close;
139        case 3:
140                SF_RetrieveRingM();
141                break;
142        case 4:
143                mes "["+@name$+"]";
144                mes "Your partner's wedding ring hasn't been retrieved yet. The ceremony will start as soon as you both have claimed your rings.";
145                close;
146        case 5:
147                mes "["+@name$+"]";
148                SF_StartCeremony();
149                break;
150        default:
151                mes "["+@name$+"]";
152                mes "Please don't interrupt me now.";
153                close;
154        }
155}
156
157function SF_Bride {
158        if ($wed_groom_progress == 0) {
159                mes "["+@name$+"]";
160                mes "Looks like your groom has yet to arrive and register.";
161                close;
162        }
163
164        if (SF_equip_check() == 0)
165                close;
166
167        switch ($wed_bride_progress) {
168        case 1:
169                SF_AcceptGroom();
170                break;
171        case 2:
172                mes "["+@name$+"]";
173                mes "I am waiting for your partner to accept you to start the ceremony.";
174                close;
175        case 3:
176                SF_RetrieveRingF();
177                break;
178        case 4:
179                mes "["+@name$+"]";
180                mes "Your partner's wedding ring hasn't been retrieved yet. The ceremony will start as soon as you both have claimed your rings.";
181                close;
182        case 5:
183                mes "["+@name$+"]";
184                SF_StartCeremony();
185                break;
186        default:
187                mes "["+@name$+"]";
188                mes "Please don't interrupt me now.";
189                close;
190        }
191}
192
193function SF_AcceptGroom {
194        mes "["+@name$+"]";
195        mes $wed_bride$+", "+$wed_groom$+" has requested to be your husband for the rest of your life. Do you accept?";
196        next;
197        switch(select("I need time to think about it.","No, I don't!","Yes, I do!")) {
198        case 1:
199                mes "["+@name$+"]";
200                mes "You what!?";
201                mes "err.. *cough* *cough* very well... come back after you've made up your mind.";
202                emotion e_ag;
203                close;
204        case 2:
205                mes "["+@name$+"]";
206                mes "!!";
207                mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
208                close2;
209                emotion e_omg;
210                npctalk "Ladies and gentlemen, "+$wed_bride$+" has rejected to marry "+$wed_groom$+"!";
211                SF_wed_end();
212                break;
213        case 3:
214                set $wed_bride_progress,2;
215                if ($wed_groom_progress == 2) {
216                        SF_RingsAccepted();
217                        break;
218                }
219                emotion e_ok;
220                mes "["+@name$+"]";
221                mes "After your groom approves, you will be given your rings, the ceremony will begin and you will be officially married.";
222                close;
223        }
224}
225
226function SF_AcceptBride {
227        mes "["+@name$+"]";
228        mes $wed_groom$+", "+$wed_bride$+" has requested to be your wife for the rest of your life. Do you accept?";
229        next;
230        switch(select("I need time to think about it.","No, I don't!","Yes, I do!")) {
231        case 1:
232                mes "["+@name$+"]";
233                mes "You what!?";
234                mes "err.. *cough* *cough* very well... come back after you've made up your mind.";
235                emotion e_ag;
236                close;
237        case 2:
238                mes "["+@name$+"]";
239                mes "!!";
240                mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
241                emotion e_omg;
242                close2;
243                npctalk "Ladies and gentlemen, "+$wed_groom$+" has rejected to marry "+$wed_bride$+"!";
244                SF_wed_end();
245                break;
246        case 3:
247                set $wed_groom_progress,2;
248                if ($wed_bride_progress == 2) {
249                        SF_RingsAccepted();
250                        break;
251                }
252                emotion e_ok;
253                mes "["+@name$+"]";
254                mes "After your bride approves, you will be given your rings, the ceremony will begin and you will be officially married.";
255                close;
256        }
257}
258
259function SF_RingsAccepted {
260        mes "["+@name$+"]";
261        mes "Now that you both have accepted, the wedding will begin. Please come forth, you and your partner, to retrieve your rings.";
262        set $wed_bride_progress,3;
263        set $wed_groom_progress,3;
264        announce $wed_groom$+" and "+$wed_bride$+"'s wedding ceremony will be held at the church!",8;
265        close2;
266        emotion e_lv;
267        npctalk "May the groom and bride please step forward and retrieve their rings?";
268}
269
270function SF_RetrieveRingM {
271        mes "["+@name$+"]";
272        if ($@wed_ring && countitem($@wed_ring) < 1) {
273                mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
274                close;
275        }
276        if ($wed_bride_sex)
277                set @item, 2634;        //Groom's wedding ring
278        else
279                set @item, 2635;        //Bride's wedding ring
280        if (getnameditem(@item,$wed_groom$) == 0) {
281                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.";
282                close;
283        }
284        mes "Here's the wedding ring for your bride.";
285        if ($@wed_ring) delitem $@wed_ring,1;
286        set $wed_groom_progress,4;
287       
288        if ($wed_bride_progress == 4)
289                SF_StartCeremony();
290        else {
291                mes "Once your bride retrieves the ring, the ceremony will begin.";
292                close;
293        }
294}
295
296function SF_RetrieveRingF {
297        mes "["+@name$+"]";
298        if ($@wed_ring && countitem($@wed_ring) < 1) {
299                mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
300                close;
301        }
302        if ($wed_groom_sex)
303                set @item, 2634;        //Groom's wedding ring
304        else
305                set @item, 2635;        //Bride's wedding ring
306
307        if (getnameditem(@item,$wed_bride$) == 0) {
308                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.";
309                close;
310        }
311        mes "Here's the wedding ring for your groom.";
312        if ($@wed_ring) delitem $@wed_ring,1;
313        set $wed_bride_progress,4;
314
315        if ($wed_groom_progress == 4)
316                SF_StartCeremony();
317        else {
318                mes "Once your groom retrieves the ring, the ceremony will begin.";
319                close;
320        }
321}
322
323function SF_StartCeremony {
324        mes "I will now start the wedding ceremony, and you will be declared forth husband and wife.";
325        set $wed_bride_progress,5;
326        set $wed_groom_progress,5;
327        set $@msg$,$wed_groom$;
328        if (strcharinfo(0) == $wed_groom$)
329                set $@msg$,$wed_bride$;
330        if (marriage($@msg$) == 0) {
331                next;
332                mes "["+@name$+"]";
333                mes "Where is "+$@msg$+"?? I can't marry you both if one is missing...";
334                close;
335        }
336        set $wed_bride_progress,6;
337        set $wed_groom_progress,6;
338        initnpctimer;
339        close;
340}
341
342OnTimer1000:
343        npctalk "Ladies and Gentlemen, We will now join in holy matrimony these two lovers.";
344        end;
345       
346OnTimer5000:
347        npctalk "Now more than ever, will both of your lives be entwined together as so will be your souls.";
348        end;
349
350OnTimer10000:
351        npctalk "You will both honor and cherish each other through the best and worst of times.";
352        end;
353       
354OnTimer15000:
355        npctalk "The safety and well being of your other will now also be your responsibility.";
356        end;
357       
358OnTimer20000:
359        npctalk "May in sickness or good health, your love burn bright like no force can extinguish it.";
360        end;
361       
362OnTimer25000:
363        npctalk "Those here stand witness to these vows bestowed upon you, you must act accordingly to them.";
364        end;
365       
366OnTimer30000:
367        npctalk "Understanding that, we are nothing more but mortals on this earth, but this is our triumph.";
368        end;
369       
370OnTimer35000:
371        npctalk "We here will now join these two mortal entities, and create an immortal love.";
372        end;
373       
374OnTimer40000:
375        npctalk $wed_groom$+", you have accepted to take "+$wed_bride$+" as your lawfully wedded wife,";
376        end;
377       
378OnTimer45000:
379        npctalk "and you, "+$wed_bride$+", have accepted take "+$wed_groom$+" as your lawfully wedded husband.";
380        end;
381
382OnTimer50000:
383        npctalk "And as such, now, by the powers vested in me...";
384        end;
385
386OnTimer55000:
387        npctalk "I pronounce you Husband and Wife, you may kiss the bride and exchange rings.";
388        if ($wedding_effect_id && isloggedin($wedding_effect_id))
389        {
390                attachrid($wedding_effect_id);
391                wedding;
392                detachrid;
393        } else
394                wedding;
395        SF_wed_end();
396        stopnpctimer;
397        end;
398
399//Subfunction: Checks that the groom/bride is still wearing their stuff.
400function SF_equip_check {
401        if (sex && getequipid(2) != 7170) {
402                mes "["+@name$+"]";
403                mes "Child, what did you do with your "+getitemname(7170)+"?";
404                emotion e_dots;
405                return 0;
406        }
407        if (sex == 0 && getequipid(2) != 2338) {
408                mes "["+@name$+"]";
409                mes "Child, you are supposed to wear a "+getitemname(2338)+" at all times during the ceremony...";
410                emotion e_dots;
411                return 0;
412        }
413        if (sex == 0 && $@wed_veil && getequipid(1) != 2206) {
414                mes "["+@name$+"]";
415                mes "Child, you can't take off your "+getitemname(2206)+" yet....";
416                emotion e_dots;
417                return 0;
418        }
419        return 1;
420}
421
422//Subfunction: Resets wedding variables.
423function SF_wed_end {
424        set $wed_groom$,"";
425        set $wed_groom_sex, 0;
426        set $wed_bride$,"";
427        set $wed_bride_sex, 0;
428        set $wed_groom_progress,0;
429        set $wed_bride_progress,0;
430        set $wed_progress,0;
431        set $wedding_effect_id,0;
432}
433
434OnInit:
435        if ($wed_groom_progress==6) {
436                SF_wed_end();
437        }
438        end;
439}
440
441//Registration & Status
442prt_church,106,99,3     script  Happy Marry     67,{
443        set @name$,"Marry";
444        if (getpartnerid() > 0) {
445                mes "["+@name$+"]";
446                mes "Isn't marriage beautiful?";
447                close; 
448        }
449       
450        function SF_WedProgress;
451        function SF_Principles;
452        function SF_Procedure;
453        function SF_Register;
454        function SF_TryRegister;
455
456        if ($wed_progress) {
457                SF_WedProgress();
458                end;
459        }
460       
461        do {
462                mes "["+@name$+"]";
463                mes "Marriage... is such a beautiful thing.";
464                mes "Would you like to get married with someone?";
465                next;
466                set @menu, select(
467                        "I'll be single forever!",
468                        "Explain the principles of marriage.",
469                        "Explain the marriage procedure.",
470                        "I want to get married with someone."
471                );
472                switch (@menu) {
473                case 1: //Quit
474                        mes "["+@name$+"]";
475                        mes "In that case, enjoy your bachelor's life.";
476                        close;
477                case 2: //Principles
478                        SF_Principles();
479                        break;
480                case 3: //Procedure
481                        SF_Procedure();
482                        break;
483                case 4: //Register
484                        SF_Register();
485                        break;
486                }
487        } while (@menu > 1);
488        end;
489
490function SF_Register {
491        if ($@wed_allow) { //Role select
492                mes "["+@name$+"]";
493                mes "Very well, whom would you like to register as?";
494                next;
495                set @submenu, select("Groom","Bride","Cancel");
496        } else if (sex) { //Groom
497                mes "["+@name$+"]";
498                mes "Very well, will you register as the Groom?";
499                next;
500                if (select("Yes","I've changed my mind.")==1)
501                        set @submenu, 1;
502                else
503                        set @submenu, 3;
504        } else { //Bride
505                mes "["+@name$+"]";
506                mes "Very well, will you register as the Bride?";
507                next;
508                if (select("Yes","I've changed my mind.")==1)
509                        set @submenu, 2;
510                else
511                        set @submenu, 3;
512        }
513        switch (@submenu) {
514        case 1: //Groom
515                SF_TryRegister(0);
516                set $wed_progress,1;
517                mes "["+@name$+"]";
518                mes "You are now registered as the groom.";
519                mes "Tell your bride to register as soon as possible.";
520                emotion e_hmm;
521                initnpctimer;
522                close;
523        case 2: //Bride
524                SF_TryRegister(1);
525                set $wed_progress,1;
526                mes "["+@name$+"]";
527                mes "You are now registered as the bride.";
528                mes "Tell your groom to register as soon as possible.";
529                emotion e_hmm;
530                initnpctimer;   
531                close;
532        default: //Cancel
533                mes "["+@name$+"]";
534                mes "Come back when you are ready.";
535                close;
536        }
537}       
538       
539function SF_WedProgress {
540        if (strcharinfo(0) == $wed_groom$) {
541                mes "["+@name$+"]";
542                if ($wed_bride_progress > 0)
543                        mes "The Priest will handle the rest of the ceremony.";
544                else
545                        mes "Tell your bride to register, what is taking so long? Time is running out.";
546                close;
547        }
548        if (strcharinfo(0) == $wed_bride$) {
549                mes "["+@name$+"]";
550                if ($wed_groom_progress > 0)
551                        mes "The Priest will handle the rest of the ceremony.";
552                else
553                        mes "Tell your groom to register, what is taking so long? Time is running out.";
554                close;
555        }
556        if (($wed_groom_progress == 0) && (sex == 1 || $@wed_allow == 1)) {
557                mes "["+@name$+"]";
558                mes $wed_bride$+" is waiting for the groom to register. Are you the one who came to register as groom?";
559                next;
560                if (select("Yes, I am.","Sorry, you got the wrong person.") == 1) {
561                        SF_TryRegister(0);
562                        stopnpctimer;
563                        set $wed_groom_progress,1;
564                        mes "["+@name$+"]";
565                        mes "Very well, now go to the Priest to reaffirm your vows and the ceremony will begin.";
566                        emotion e_no1;
567                        close2;
568                        npctalk "Registration finished. "+$wed_groom$+" and "+$wed_bride$+", please reaffirm your vows with the Priest.";
569                        emotion e_no1;
570                        end;
571                } else {
572                        mes "["+@name$+"]";
573                        mes "I see. Sorry to have bothered you then.";
574                        close;
575                }
576
577        }
578        if (($wed_bride_progress == 0) && (sex == 0 || $@wed_allow == 1)) {
579                mes "["+@name$+"]";
580                mes $wed_groom$+" is waiting for the bride to register. Are you the one who came to register as the bride?";
581                next;
582                if(select("Yes, I am.","Sorry, you got the wrong person.") == 1) {
583                        SF_TryRegister(1);
584                        stopnpctimer;
585                        mes "["+@name$+"]";
586                        mes "Very well, now go to the Priest to reaffirm your vows and the ceremony will begin.";
587                        emotion e_no1;
588                        close2;
589                        npctalk "Registration finished. "+$wed_groom$+" and "+$wed_bride$+", please reaffirm your vows with the Priest.";
590                        emotion e_no1;
591                        end;
592                } else {
593                        mes "["+@name$+"]";
594                        mes "I see. Sorry to have bothered you then.";
595                        close;
596                }
597        }
598        mes "["+@name$+"]";
599        mes "There is a wedding in progress.";
600        mes "Would you like to know the progress of said wedding?";
601        next;
602        if (select("Yes","No") != 1) {
603                mes "["+@name$+"]";
604                mes "Enjoy the wedding.";
605                close;
606        }
607        //Display Progress
608        mes "["+@name$+"]";
609        switch ($wed_groom_progress) {
610        case 0:
611                mes "The groom has not registered yet.";
612                break;
613        case 1:
614                mes "The groom, "+$wed_groom$+", has yet to accept the bride.";
615                break;
616        case 2:
617                mes "The groom, "+$wed_groom$+", is waiting for the bride's acceptance.";
618                break;
619        case 3:
620                mes "The groom, "+$wed_groom$+", has yet to retrieve the ring.";
621                break;
622        case 4:
623                mes "The groom, "+$wed_groom$+", is waiting for the bride to retrieve the ring.";
624                break;
625        }
626        switch ($wed_bride_progress) {
627        case 0:
628                mes "The bride has not registered yet.";
629                break;
630        case 1:
631                mes "The bride, "+$wed_bride$+", has yet to confirm the groom.";
632                break;
633        case 2:
634                mes "The bride, "+$wed_bride$+", is waiting for the groom's acceptance.";
635                break;
636        case 3:
637                mes "The bride, "+$wed_bride$+", has yet to retrieve the ring.";
638                break;
639        case 4:
640                mes "The bride, "+$wed_bride$+", is waiting for the groom to retrieve the ring.";       
641                break;
642        case 5:
643                mes "We are just waiting for both "+$wed_groom$+" and "+$wed_bride$+" to be together to marry them.";
644                break;
645        case 6:
646                mes $wed_groom$+" and "+$wed_bride$+"'s wedding ceremony is already well on it's way.";
647                break;
648        }
649        mes "Enjoy the remaining of the wedding.";
650        close;
651}
652
653OnInit:
654        if ($wed_groom_progress + $wed_bride_progress == 1)
655                initnpctimer;
656        end;
657
658OnTimer60000:
659        //Registration failed.
660        if ($wed_bride_progress == 1)
661                set $@msg$, $wed_bride$;
662        else
663                set $@msg$, $wed_groom$;
664
665        npctalk "Registration timed out. Is it that noone wants to marry "+$@msg$+"..?";
666        emotion e_hmm;
667       
668        set $wed_groom$,"";
669        set $wed_groom_sex, 0;
670        set $wed_bride$,"";
671        set $wed_bride_sex, 0;
672        set $wed_groom_progress,0;
673        set $wed_bride_progress,0;
674        set $wed_progress,0;
675        stopnpctimer;
676        end;
677
678//Subfunction SF_TryRegister (int bride)
679function SF_TryRegister {
680        set @bride, getarg(0);
681        set @type$, "groom";
682        if (@bride)
683                set @type$, "bride";
684               
685        mes "["+@name$+"]";
686        mes "Before registering as "+@type$+", let me check if you meet all the requirements...";
687        next;
688        if (Upper == 2) {
689                mes "["+@name$+"]";
690                mes "Oh dear, you are too young to be thinking of marriage!";
691                emotion e_gasp;
692                close;
693        }
694        if (sex)
695                set @item, 7170;
696        else
697                set @item, 2338;
698       
699        if (getequipid(2) != @item) {
700                mes "["+@name$+"]";
701                mes "You should be wearing a "+getitemname(@item)+" if you want to get married.";
702                close;
703        }
704        if (sex == 0 && $@wed_veil && getequipid(1) != 2206) {
705                mes "["+@name$+"]";
706                mes "Where is your "+getitemname(2206)+"? It's a necessary complement to your dress.";
707                close;
708        }
709        if ($@wed_ring && countitem($@wed_ring) < 1) {
710                mes "["+@name$+"]";
711                mes "Where's the ring? You need a "+getitemname($@wed_ring)+" for the ring exchange, dear.";
712                close;
713        }
714        if (@bride)
715                set @cost, $@wed_bride_reg;
716        else
717                set @cost, $@wed_groom_reg;
718
719        if (Zeny < @cost) {
720                mes "["+@name$+"]";
721                mes "I am sorry, but you don't have enough to pay for the registration fee.";
722                mes "Come back once you have collected "+@cost+"z.";
723                close;
724        }
725        set Zeny,Zeny-@cost;
726        sc_start SC_Wedding,3600000000,1; //Start Wedding Effect (SC_WEDDING)
727        if (@bride) {
728                set $wed_bride_progress,1;
729                set $wed_bride$,strcharinfo(0);
730                set $wed_bride_sex, sex;
731                if ($@wedding_effect == 1) //Store account id for effect.
732                        set $wedding_effect_id, getcharid(3);
733        } else {
734                set $wed_groom_progress,1;
735                set $wed_groom$,strcharinfo(0);
736                set $wed_groom_sex, sex;
737                if ($@wedding_effect == 2) //Store account id for effect.
738                        set $wedding_effect_id, getcharid(3);
739        }
740}
741
742//Explain wedding principles...
743function SF_Principles {
744        mes "["+@name$+"]";
745        mes "Weddings are performed by our local Priest with the intent of promoting love and peace among the loving couples.";
746        next;
747        mes "["+@name$+"]";
748        mes "The proposal must be done with prudence and courtesy, once the wedlocks have been made, they cannot be undone.";
749        next;
750        mes "["+@name$+"]";
751        mes "The two who have been joined by marriage must remain together forever until the day death do them apart.";
752        next;
753        mes "["+@name$+"]";
754        if ($@wed_allow == 1)
755                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.";
756        else
757                mes "Males may only wed with females, and females only with males, the church will not consent any other kind of partnerships.";
758        next;
759        mes "["+@name$+"]";
760        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.";
761        next;
762        mes "["+@name$+"]";
763   mes "I wish for many blessings upon couples who wish to live happily ever after...";
764        next;
765}
766
767//Explain the wedding procedure...
768function SF_Procedure {
769        mes "["+@name$+"]";
770        mes "First of all, both groom and bride must register with me.";
771        next;
772        if ($@wed_allow == 1) {
773                mes "["+@name$+"]";
774                mes "The registration requirements are:";
775                mes "- Males must be wearing a "+getitemname(7170)+".";
776                mes "- Females must be wearing a "+getitemname(2338)+".";
777                if ($@wed_veil) mes "- Females must also wear a "+getitemname(2206)+".";
778                if ($@wed_ring) mes "- Both must own a "+getitemname($@wed_ring)+" each.";
779                if ($@wed_groom_reg > 0) mes "- The registration fee for the groom is "+$@wed_groom_reg+"z.";
780                if ($@wed_bride_reg > 0) mes "- The registration fee for the bride is "+$@wed_bride_reg+"z.";
781        } else {
782                mes "["+@name$+"]";
783                mes "The registration requirements for the groom are:";
784                mes "- To be wearing a "+getitemname(7170)+".";
785                if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
786                if ($@wed_groom_reg > 0) mes "- Pay a Registration fee of "+$@wed_groom_reg+"z.";
787                next;
788                mes "["+@name$+"]";
789                mes "The registration requirements for the bride are:";
790                mes "- To be wearing a "+getitemname(2338)+".";
791                if ($@wed_veil) mes "- To be wearing a "+getitemname(2206)+".";
792                if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
793                if ($@wed_bride_reg > 0) mes "- Pay a Registration fee of "+$@wed_bride_reg+"z.";
794        }
795        next;
796        mes "["+@name$+"]";
797        mes "I shouldn't need to mention this, but adopted kids are too young to get married.";
798        mes "Both groom and bride must register within a minute of each other, or the wedding will be cancelled. So be sure you both are ready and meet the registration requirements beforehand.";
799        next;
800        mes "["+@name$+"]";
801        mes "After both have registered with me, you have to go pledge your vows to the Priest and accept your registered partner. If for some reason you reject your registered partner, the wedding will be cancelled...";
802        next;
803        mes "["+@name$+"]";
804        mes "If you both accept each other, then the wedding has been decided and the ceremony will begin.";
805        if ($@wed_ring) {
806                mes "But first, you need to get your rings ready.";
807                next;
808                mes "["+@name$+"]";
809                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.";
810        }
811        next;
812        mes "["+@name$+"]";
813        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.";
814        next;
815}
816}
817
818prt_church,94,99,4      script  Sister Lisa     79,{
819        set @name$,"Lisa";
820
821        function SF_DivorceEnd;
822        function SF_InProgress;
823       
824        if ($@divorce_progress==1) {
825                goto SF_InProgress;
826                end;
827        }
828       
829        do {
830                mes "["+@name$+"]";
831                mes "Divorcing can be such a sad event...";
832                if (getpartnerid() == 0) {
833                        mes "People shouldn't make shallow vows to others, don't you think?";
834                        close;
835                }
836                mes "You wouldn't want to divorce, by any chance?";
837                next;
838                set @menu, select(
839                        "I am happy as I am, thank you.",
840                        "Explain the divorce.",
841                        "Explain Requirements.",
842                        "I want to divorce."
843                );
844                switch (@menu) {
845                case 1:
846                        mes "["+@name$+"]";
847                        mes "Good to hear.";
848                        close;
849                case 2: //Explanation
850                        mes "["+@name$+"]";
851                        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..";
852                        next;
853                        mes "["+@name$+"]";
854                        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.";
855                        next;
856                        break;
857                case 3: //Requirement
858                        mes "["+@name$+"]";
859                        mes "In order to file for divorce, I need you both to agree to it.";
860                        mes "After you file in for divorce, your spouse has one minute to agree, and then you will both be divorced.";
861                        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.";
862                        next;
863                        break;
864                case 4: //Divorce
865                        mes "["+@name$+"]";
866                        mes "You should not regret the choices you've made in life.";
867                        mes "Are you positively sure about getting divorced?";
868                        next;
869                        if (select("Wait... I need to think about it.","Absolutely") != 2) {
870                                mes "["+@name$+"]";
871                                mes "You should think this through.";
872                                close;
873                        }
874                        mes "["+@name$+"]";
875                        set $@divorcee,getpartnerid();
876                        set $@divorcer$,strcharinfo(0);
877                        set $@divorce_progress,1;
878                        initnpctimer;
879                        mes "Very well, get your partner to confirm, and I will collect the fee for filing the divorce then.";
880                        close;
881                }
882        } while (@menu > 1);
883end;
884
885function SF_InProgress {
886        if (strcharinfo(0) == $@divorcer$) {
887                mes "["+@name$+"]";
888                mes "...I am still waiting for your partner to confirm the divorce procedure.";
889                close;
890        }
891        if (getcharid(0) != $@divorcee) {
892                mes "["+@name$+"]";
893                mes "I am in the progress of divorcing "+$@divorcer$+".";
894                mes "Do you know who the spouse is?";
895                close;
896        }
897        //Confirm...
898        mes "["+@name$+"]";
899        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.";
900        mes "So, should I proceed with the divorce?";
901        next;
902        if (select("I don't want to divorce....","Yes, we have agreed to this.")!=2) {
903                mes "["+@name$+"]";
904                mes "I hope you can work things out.";
905                emotion e_pat;
906                goto SF_DivorceEnd;
907                close;
908        }
909        if (Zeny < $@wed_divorce_fee) {
910                mes "["+@name$+"]";
911                mes "Well, I can't file your divorce because you don't have enough for the fee. Get your partner to lend you some?";
912                close;
913        }
914        if (!(divorce())) {
915                mes "["+@name$+"]";
916                mes "Where has "+$@divorcer$+" gone to? I can't divorce you unless you both are here...";
917                emotion e_swt2;
918                close;
919        }
920        set Zeny,Zeny-$@wed_divorce_fee;
921        announce $@divorcer$+" has just divorced "+strcharinfo(0)+"...", 8;
922        mes "["+@name$+"]";
923        mes "Your divorce has been filed. You are no longer wed.";
924        emotion e_sob;
925        goto SF_DivorceEnd;
926        close;
927}
928
929function SF_DivorceEnd {
930        stopnpctimer;
931        set $@divorce_progress,0;
932        set $@divorcee,0;
933        set $@divorcer$,"";
934}
935
936OnTimer60000:
937        npctalk "Divorce confirmation time's is up. Where did "+$@divorcer$+"'s spouse go...";
938        emotion e_what;
939        SF_DivorceEnd();
940        end;
941}
Note: See TracBrowser for help on using the browser.