summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-08-20 20:30:29 -0600
committerJared Adams <jaxad0127@gmail.com>2009-08-20 20:30:29 -0600
commit21b1a5c05cad84cb54d61ebf9ec5f23cfead1ea1 (patch)
tree507c3e82640bc9193e0746966fba70fbe65586ba
parent0465d6c53f3b068a48d34177bf211cb8fcc637c2 (diff)
downloadserverdata-21b1a5c05cad84cb54d61ebf9ec5f23cfead1ea1.tar.gz
serverdata-21b1a5c05cad84cb54d61ebf9ec5f23cfead1ea1.tar.bz2
serverdata-21b1a5c05cad84cb54d61ebf9ec5f23cfead1ea1.tar.xz
serverdata-21b1a5c05cad84cb54d61ebf9ec5f23cfead1ea1.zip
Add another wedding location
-rw-r--r--conf/magic.conf.template4
-rw-r--r--db/const.txt5
-rw-r--r--npc/014-1_Woodland/wedding-officiator.txt27
-rw-r--r--npc/021-2_Tulimshar/government_building.txt133
4 files changed, 149 insertions, 20 deletions
diff --git a/conf/magic.conf.template b/conf/magic.conf.template
index 707a771c..5e243f23 100644
--- a/conf/magic.conf.template
+++ b/conf/magic.conf.template
@@ -1187,7 +1187,7 @@ SPELL debug-reset : "debug-reset" =
CONST MIN_MARRY_LEVEL = 32;
NONMAGIC SILENT SPELL marriage (target : PC) : "marry" =
- (REQUIRE is_in(location(caster), @("014-1.gat", 28,39) @+ (8, 6)))=>
+ (REQUIRE (is_in(location(caster), @("014-1.gat", 28,39) @+ (8, 6)) || is_in(location(caster), @("021-2.gat", 20,25) @+ (4, 4)) ))=>
EFFECT IF target == caster # no valid target or tried to marry self?
THEN ABORT;
@@ -1207,7 +1207,7 @@ NONMAGIC SILENT SPELL marriage (target : PC) : "marry" =
THEN (message(caster, name_of(target) + " is already married."); ABORT;);
IF distance(location(caster), location(target)) <> 1
- THEN (message(caster, "You have to stand next to each other."); ABORT;);
+ THEN (message(caster, "You need to stand next to each other."); ABORT;);
IF (count_item(caster, "WeddingRing") == 0 || count_item(target, "WeddingRing") == 0)
THEN (message(caster, "You must both be wearing your wedding rings!"); ABORT;)
diff --git a/db/const.txt b/db/const.txt
index abd3b5e6..091de1b6 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -154,6 +154,11 @@ cDarkGreen 9
sc_poison 132
sc_slowpoison 14
+// Marriage-related
+WEDDING_FEE 100
+DIVORCE_FEE_PER_LEVEL 500
+WEDDING_MIN_LEVEL 32
+
sfx_skillup 1
sfx_magic_generic 2
sfx_magic_life 3
diff --git a/npc/014-1_Woodland/wedding-officiator.txt b/npc/014-1_Woodland/wedding-officiator.txt
index 2cc50197..bd19c734 100644
--- a/npc/014-1_Woodland/wedding-officiator.txt
+++ b/npc/014-1_Woodland/wedding-officiator.txt
@@ -1,11 +1,6 @@
// Wedding officiator: Marriages and divorces
014-1.gat,31,31,0 script Wedding Officiator 164,{
-
- set @WEDDING_FEE, 100;
- set @DIVORCE_FEE_PER_LEVEL, 500;
- set @WEDDING_MIN_LEVEL, 32;
-
mes "[Wedding Officiator]";
mes "A young lady in a long, green dress is overseeing the park. As she notices you looking at her, she gives you a broad and happy smile.";
mes "\"Hi there! I'm Wendy, here for all your marriage needs!\"";
@@ -32,10 +27,10 @@ L_explain_self:
L_explain_marriage:
mes "[Wedding Officiator]";
- mes "\"If you are sure that you are ready to get married, then first you come and talk to me here-- I need to register you, after all. You will first have to pay me a small fee of " + @WEDDING_FEE + " GP.\"";
+ mes "\"If you are sure that you are ready to get married, then first you come and talk to me here-- I need to register you, after all. You will first have to pay me a small fee of " + WEDDING_FEE + " GP.\"";
next;
mes "[Wedding Officiator]";
- mes "\"Both you and your partner must be at least " + @WEDDING_MIN_LEVEL + " levels of age, though; the law is very firm on that. But if all of that works out, I will give you two wedding rings for the ceremony.\"";
+ mes "\"Both you and your partner must be at least " + WEDDING_MIN_LEVEL + " levels of age, though; the law is very firm on that. But if all of that works out, I will give you two wedding rings for the ceremony.\"";
next;
mes "[Wedding Officiator]";
mes "\"To complete the marriage, each of you has to put on one of these rings, and you have to stand next to each other in the southern part of this park. Then one of you says `marry' and then the other person's name.\"";
@@ -47,9 +42,9 @@ L_explain_marriage:
goto L_main;
L_get_married:
- if (zeny < @WEDDING_FEE)
+ if (zeny < WEDDING_FEE)
goto L_too_poor;
- if (BaseLevel < @WEDDING_MIN_LEVEL)
+ if (BaseLevel < WEDDING_MIN_LEVEL)
goto L_too_young;
mes "[Wedding Officiator]";
@@ -92,14 +87,14 @@ L_get_married:
"This is taking too long.", L_end,
"No.", L_end;
- if (zeny < @WEDDING_FEE)
+ if (zeny < WEDDING_FEE)
goto L_too_poor;
- if (BaseLevel < @WEDDING_MIN_LEVEL)
+ if (BaseLevel < WEDDING_MIN_LEVEL)
goto L_too_young;
getinventorylist;
if (@inventorylist_count > 98) goto L_No_Room_For_Rings;
- set zeny, zeny - @WEDDING_FEE;
+ set zeny, zeny - WEDDING_FEE;
getitem "WeddingRing", 1;
getitem "WeddingRing", 1;
@@ -126,14 +121,14 @@ L_end:
L_too_young:
mes "[Wedding Officiator]";
mes "Wendy looks at her notes, shaking her head; pain is evident in her eyes.";
- mes "\"I'm really, really sorry-- I wish I could allow that, but you are still too young. You have to be at least " + @WEDDING_MIN_LEVEL + " levels of age.\"";
+ mes "\"I'm really, really sorry-- I wish I could allow that, but you are still too young. You have to be at least " + WEDDING_MIN_LEVEL + " levels of age.\"";
close;
L_too_poor:
mes "[Wedding Officiator]";
mes "\"Oh, this is so sad... you want to get married but don't have the money!\"";
mes "Wendy is visibly unhappy.";
- mes "\"I wish I could help you, but the rules... you see... Well, I'm afraid that you will just have to come back when you have " + @WEDDING_FEE + " GP.\"";
+ mes "\"I wish I could help you, but the rules... you see... Well, I'm afraid that you will just have to come back when you have " + WEDDING_FEE + " GP.\"";
close;
L_main_married:
@@ -211,7 +206,7 @@ L_loot:
close;
L_makesure_divorce:
- set @divorce_cost, @DIVORCE_FEE_PER_LEVEL * BaseLevel;
+ set @divorce_cost, DIVORCE_FEE_PER_LEVEL * BaseLevel;
mes "[Wedding Officiator]";
mes "Resigned, Wendy looks down at her notes.";
@@ -241,7 +236,7 @@ L_do_divorce:
next;
mes "[Server]";
- mes "You can only divorce if both you and your partner are logged in at the same time.";
+ mes "Try again when your partner is online too.";
close;
L_DidDivorce:
diff --git a/npc/021-2_Tulimshar/government_building.txt b/npc/021-2_Tulimshar/government_building.txt
index 48a7db7a..92ca1f35 100644
--- a/npc/021-2_Tulimshar/government_building.txt
+++ b/npc/021-2_Tulimshar/government_building.txt
@@ -5,12 +5,142 @@
mes "[Estard]";
mes "\"Hello what Can I do for you?\"";
next;
+
+L_main:
+ if (getpartnerid2(0))
+ goto L_main_married;
+
menu
+ "I'm looking at getting married.", L_marry,
"Nothing, I guess.", -;
close;
+
+L_main_married:
+ menu
+ "I'd like a divorce.", L_divorce,
+ "Nothing, I guess.", -;
+ close;
+
+L_marry:
+ if (BaseLevel < WEDDING_MIN_LEVEL)
+ goto L_marry_too_young;
+ if (zeny < WEDDING_FEE)
+ goto L_marry_too_poor;
+
+ mes "[Estard]";
+ mes "\"Are you sure you want to get married? It'll cost " + WEDDING_FEE + " GP.\"";
+
+ menu
+ "Yes", L_marry_do,
+ "No", -;
+ close;
+
+L_marry_do:
+ callsub S_give_rings;
+
+ mes "[Estard]";
+ mes "\"Here are your rings. You can get married by standing in one of the designated places (like that small rug over there) with your partner, give them their ring, and say 'marry (their name here)'. You both need to have your rings on.\"";
+ close;
+
+L_marry_too_young:
+ mes "[Estard]";
+ mes "\"I'm sorry, but you are too young to get married. You must be atleast " + WEDDING_MIN_LEVEL + " levels old.\"";
+ next;
+
+ menu
+ "Can I atleast get wedding rings?", L_get_rings,
+ "Thanks anyways.", -;
+ close;
+
+L_marry_too_poor:
+ mes "[Estard]";
+ mes "\"You need " + WEDDING_FEE + " GP to get married. That covers all administrative fees for the marriage and provides two wedding rings.\"";
+ close;
+
+L_get_rings:
+ mes "[Estard]";
+ mes "\"Yes. They are " + WEDDING_FEE + " GP. That covers all administrative fees for the marriage.\"";
+
+ if (zeny < WEDDING_FEE)
+ menu
+ "Thanks anyways. I don't have enough with me.", -;
+
+ if (zeny >= WEDDING_FEE)
+ menu
+ "I'll buy a pair.", L_get_rings_pay,
+ "Thanks anyways.", -;
+ close;
+
+L_get_rings_pay:
+ callsub S_give_rings;
+
+ mes "[Estard]";
+ mes "\"There you go. Come again.\"";
+ close;
+
+L_divorce:
+ set @divorce_cost, DIVORCE_FEE_PER_LEVEL * BaseLevel;
+
+ if (zeny < @divorce_cost)
+ goto L_divorce_not_enough;
+
+ mes "[Estard]";
+ mes "\"If you're sure you want a divorce, it'll cost you " + @divorce_cost + " GP.\"";
+ next;
+
+ menu
+ "I am sure I want it.", L_do_divorce,
+ "I don't want it.", -;
+ close;
+
+L_do_divorce:
+ if (zeny < @divorce_cost)
+ goto L_not_enough_money;
+
+ if divorce(0) goto L_divorce_done;
+
+ mes "[Estard]";
+ mes "\"I'm having trouble finding the record. \"";
+
+ mes "[Server]";
+ mes "Try again when your partner is online too.";
+ close;
+
+L_divorce_done:
+ set zeny, zeny - @divorce_cost;
+
+ mes "[Estard]";
+ mes "\"You have been divorced. Come again.\"";
+ close;
+
+L_divorce_not_enough:
+ mes "[Estard]";
+ mes "\"I'm sorry , but you don't have enough money to get a divorce. You need " + @divorce_cost + " GP.\"";
+ close;
+
+L_not_enough_money:
+ mes "[Estard]";
+ mes "\"Seems you don't have enough money.\"";
+ close;
+
+L_no_room_for_rings:
+ mes "[Estard]";
+ mes "\"You don't have enough room to carry these rings.\"";
+ close;
+
+S_give_rings:
+ if (zeny < WEDDING_FEE)
+ goto L_not_enough_money;
+ getinventorylist;
+ if (@inventorylist_count > 98) goto L_no_room_for_rings;
+
+ set zeny, zeny - WEDDING_FEE;
+ getitem "WeddingRing", 1;
+ getitem "WeddingRing", 1;
+ return;
}
-// A clerk
+// A clerk (TODO: give out party skill levels)
021-2.gat,36,17,0 script Tathin 107,{
mes "[Tathin]";
mes "\"Hello what Can I do for you?\"";
@@ -21,7 +151,6 @@
}
// Guard
-
021-2.gat,20,19,0 script Guard 123,1,1,{
mes "[Guard]";
mes "\"You can't come back here.\"";