marriage.txt 27 KB

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