summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/map/maps.conf1
-rw-r--r--db/map_index.txt161
-rw-r--r--maps/re/009-6.mcachebin0 -> 80 bytes
-rw-r--r--npc/009-1/estate.txt224
-rw-r--r--npc/009-6/_import.txt3
-rw-r--r--npc/009-6/_warps.txt3
-rw-r--r--npc/014-2/_warps.txt2
-rw-r--r--npc/014-4/_warps.txt2
-rw-r--r--npc/014-5/_warps.txt2
-rw-r--r--npc/015-3/_warps.txt2
-rw-r--r--npc/_import.txt1
11 files changed, 317 insertions, 84 deletions
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 890eefe47..6b7282edd 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -61,6 +61,7 @@ map_list: (
"009-3",
"009-4",
"009-5",
+ "009-6",
"010-1-1",
"010-1",
"010-2",
diff --git a/db/map_index.txt b/db/map_index.txt
index 37e5f8e5c..b4e311d93 100644
--- a/db/map_index.txt
+++ b/db/map_index.txt
@@ -58,83 +58,84 @@
009-3 58
009-4 59
009-5 60
-010-1-1 61
-010-1 62
-010-2 63
-011-1 64
-011-2 65
-011-3 66
-012-1 67
-012-2 68
-012-3 69
-012-4 70
-012-5 71
-012-6 72
-012-7 73
-012-8 74
-013-1 75
-014-1 76
-014-2-1 77
-014-2 78
-014-3 79
-014-4 80
-014-5 81
-015-1 82
-015-2 83
-015-3 84
-015-4 85
-015-5 86
-015-6 87
-015-7 88
-016-1 89
-016-6 90
-016-7 91
-017-1 92
-017-2-1 93
-017-2-2 94
-017-2 95
-017-3 96
-017-4 97
-017-5 98
-017-6 99
-017-7 100
-017-8 101
-018-1-1 102
-018-1 103
-018-2-1 104
-018-2-2 105
-018-2-3 106
-018-2-4 107
-018-2 108
-018-3 109
-018-4-1 110
-018-4-2 111
-018-4 112
-018-5 113
-019-1-1 114
-019-1 115
-019-2 116
-019-3 117
-019-4-1 118
-019-4 119
-020-1 120
-020-2 121
-020-3 122
-020-4 123
-020-5 124
-020-6 125
-021-1 126
-021-2 127
-021-3 128
-021-4 129
-022-1 130
-023-1 131
-023-2 132
-024-1 133
-boss 134
-botcheck 135
-sec_pri 136
-soren-2 137
-soren 138
-test 139
-testbg 140
+009-6 61
+010-1-1 62
+010-1 63
+010-2 64
+011-1 65
+011-2 66
+011-3 67
+012-1 68
+012-2 69
+012-3 70
+012-4 71
+012-5 72
+012-6 73
+012-7 74
+012-8 75
+013-1 76
+014-1 77
+014-2-1 78
+014-2 79
+014-3 80
+014-4 81
+014-5 82
+015-1 83
+015-2 84
+015-3 85
+015-4 86
+015-5 87
+015-6 88
+015-7 89
+016-1 90
+016-6 91
+016-7 92
+017-1 93
+017-2-1 94
+017-2-2 95
+017-2 96
+017-3 97
+017-4 98
+017-5 99
+017-6 100
+017-7 101
+017-8 102
+018-1-1 103
+018-1 104
+018-2-1 105
+018-2-2 106
+018-2-3 107
+018-2-4 108
+018-2 109
+018-3 110
+018-4-1 111
+018-4-2 112
+018-4 113
+018-5 114
+019-1-1 115
+019-1 116
+019-2 117
+019-3 118
+019-4-1 119
+019-4 120
+020-1 121
+020-2 122
+020-3 123
+020-4 124
+020-5 125
+020-6 126
+021-1 127
+021-2 128
+021-3 129
+021-4 130
+022-1 131
+023-1 132
+023-2 133
+024-1 134
+boss 135
+botcheck 136
+sec_pri 137
+soren-2 138
+soren 139
+test 140
+testbg 141
diff --git a/maps/re/009-6.mcache b/maps/re/009-6.mcache
new file mode 100644
index 000000000..2cae43ce3
--- /dev/null
+++ b/maps/re/009-6.mcache
Binary files differ
diff --git a/npc/009-1/estate.txt b/npc/009-1/estate.txt
new file mode 100644
index 000000000..e9dd26c34
--- /dev/null
+++ b/npc/009-1/estate.txt
@@ -0,0 +1,224 @@
+// TMW2: Moubootaur Legends scripts.
+// Author:
+// Jesusalva
+// Description:
+// Real Estate System
+
+// ID: 4
+// $ESTATE_OWNER[.id] → Account ID owner of the Real Estate
+// $ESTATE_OWNERNAME$[.id] → Human readable name of Real Estate owner
+// $ESTATE_RENTTIME[.id] → When the rent will expire
+// $ESTATE_MOBILIA_2[.id] → Bitmask of mobilia currently purchased on Monster Collision (6) (Use on walls only)
+// $ESTATE_MOBILIA_4[.id] → Bitmask of mobilia currently purchased on Air Collision (2)
+// $ESTATE_MOBILIA_8[.id] → Bitmask of mobilia currently purchased on Water Collision (3)
+// $ESTATE_MOBILIA_32[.id] → Bitmask of mobilia currently purchased on Yellow Collision (4)
+// $ESTATE_MOBILIA_64[.id] → Bitmask of mobilia currently purchased on Normal Collision (1)
+// $ESTATE_MOBILIA_128[.id] → Bitmask of mobilia currently purchased on Player Collision (5)
+// $ESTATE_PASSWORD$[.id] → Password to enter the estate. If it is "", then no password required
+// Note: GMs and Administrators can always use super password "mouboo" to enter a locked estate
+// $ESTATE_DOORBELL[.id] → If doorbell is disabled (enabled by default)
+
+// REAL_ESTATE_CREDITS → Credits equivalent to GP the player have. Will be used first.
+
+// The sign is the main controller
+012-1,94,70,0 script Sign#RES_0096 NPC_SWORDS_SIGN,{
+ if ($ESTATE_RENTTIME[.id] < gettimetick(2))
+ goto L_RentAvailable;
+
+ if ($ESTATE_OWNER[.id] == getcharid(3))
+ goto L_Manage;
+
+ if (is_admin() && $@GM_OVERRIDE)
+ goto L_Manage;
+
+ mesc l("This estate currently belongs to @@.", $ESTATE_OWNERNAME$[.id]);
+ mesc l("Press the doorbell?");
+ next;
+ if (askyesno() == ASK_YES)
+ doevent "Doorbell#RES_0096::OnDoorbell";
+ close;
+
+L_RentAvailable:
+ mesc l("This Real Estate is available for rent for only @@ GP!", format_number(.price));
+ .@gp=REAL_ESTATE_CREDITS+Zeny;
+ mesc l("You currently have: @@ GP and mobiliary credits", format_number(.@gp));
+ next;
+ select
+ rif(.@gp > .price, l("Rent it! Make it mine!")),
+ l("Information"),
+ l("Don't rent it");
+
+ // You want to rent
+ if (@menu == 1) {
+ if ($ESTATE_RENTTIME[.id] > gettimetick(2)) {
+ mesc l("Somebody already rented it before you!");
+ close;
+ }
+ REAL_ESTATE_CREDITS=REAL_ESTATE_CREDITS-.price;
+ if (REAL_ESTATE_CREDITS < 0) {
+ Zeny+=REAL_ESTATE_CREDITS;
+ REAL_ESTATE_CREDITS=0;
+ }
+
+ // Payment done, you can now acquire the house for a month
+ $ESTATE_RENTTIME[.id]=gettimetick(2)+.time;
+
+ // If you're not the previous owner
+ // Remove previous owner furniture and reset room password
+ if ($ESTATE_OWNER[.id] != getcharid(3)) {
+ /*
+ $ESTATE_MOBILIA_2[.id]=0;
+ $ESTATE_MOBILIA_4[.id]=0;
+ $ESTATE_MOBILIA_8[.id]=0;
+ $ESTATE_MOBILIA_32[.id]=0;
+ $ESTATE_MOBILIA_64[.id]=0;
+ $ESTATE_MOBILIA_128[.id]=0;
+ */
+ $ESTATE_PASSWORD$[.id]="";
+ $ESTATE_DOORBELL[.id]=false;
+ }
+
+ // Register your info so you can manage it
+ $ESTATE_OWNER[.id]=getcharid(3);
+ $ESTATE_OWNERNAME$[.id]=strcharinfo(0);
+
+ mesc l("Rent successful for 30 days!");
+ } else if (@menu == 2) {
+ mesc l("You can rent this house to make it yours.");
+ mesc l("Then you'll be able to buy furniture and utility.");
+ mesc l("The door is password-protected, so your friends can enter but strangers stay outside.");
+ next;
+ mesc l("Both rent and furniture are bought using money, however, there are mobiliary credits.");
+ mesc l("Mobiliary Credits is a special currency which can only be used on real estate.");
+ mesc l("It's obtained with ADMINS or by selling furniture. It is sumed to money and used first.");
+ }
+ close;
+
+L_Manage:
+ mesc l("@@'s Estate", strcharinfo(0));
+ mesc ".:: "+ l("Managment Menu") + " ::.";
+
+ .@gp=REAL_ESTATE_CREDITS+Zeny;
+ mesc l("Rent time available: @@", FuzzyTime($ESTATE_RENTTIME[.id]));
+ mesc l("Total Credits and GP: @@", format_number(.@gp));
+ mes "";
+ mesc l("Rent Renew Price: @@ GP", format_number(.price));
+ mesc l("Room password: @@", $ESTATE_PASSWORD$[.id]);
+ if ($ESTATE_DOORBELL[.id])
+ mesc l("Doorbell is disabled"), 1;
+
+ next;
+ select
+ l("Leave"),
+ l("Enable/disable doorbell"),
+ l("Set room password"),
+ rif(.@gp >= .price && $ESTATE_RENTTIME[.id] < gettimetick(2)+.time, l("Renew Rent")),
+ rif($@GM_OVERRIDE, l("Destroy all mobilia")),
+ rif($@GM_OVERRIDE, l("Expire rent time"));
+
+ switch (@menu) {
+ case 1:
+ close;
+ break;
+ case 2:
+ $ESTATE_DOORBELL[.id]=!$ESTATE_DOORBELL[.id];
+ break;
+ case 3:
+ mesc l("(Leave the password blank to disable)");
+ mesc l("Current Room password: @@", $ESTATE_PASSWORD$[.id]);
+ mesc l("Input new password: ");
+ input .@password$;
+ mesc l("Repeat new password: ");
+ input .@passwordc$;
+ if (.@password$ == .@passwordc$) {
+ $ESTATE_PASSWORD$[.id]=.@password$;
+ mesc l("Password changed with success!"), 3;
+ } else {
+ mesc l("The passwords doesn't match."), 1;
+ }
+ break;
+ case 4:
+ // The check is performed before showing the menu option
+ // I guess it could be hacked, but I'll probably see negative GP...
+ REAL_ESTATE_CREDITS=REAL_ESTATE_CREDITS-.price;
+ if (REAL_ESTATE_CREDITS < 0) {
+ Zeny+=REAL_ESTATE_CREDITS;
+ REAL_ESTATE_CREDITS=0;
+ }
+
+ // Payment done, you can now acquire the house for a month
+ // If you lost the rent on the meanwhile, it'll renew
+ // If you lost the rent and somebody else rented it, you lose the GP
+ $ESTATE_RENTTIME[.id]+=.time;
+ break;
+ case 5:
+ mesc l("Are you sure? This cannot be undone!"), 1;
+ next;
+ if (validatepin()) {
+ $ESTATE_MOBILIA_2[.id]=0;
+ $ESTATE_MOBILIA_4[.id]=0;
+ $ESTATE_MOBILIA_8[.id]=0;
+ $ESTATE_MOBILIA_32[.id]=0;
+ $ESTATE_MOBILIA_64[.id]=0;
+ $ESTATE_MOBILIA_128[.id]=0;
+ $ESTATE_PASSWORD$[.id]="";
+ $ESTATE_DOORBELL[.id]=false;
+ }
+ case 6:
+ mesc l("Are you sure? This cannot be undone!"), 1;
+ next;
+ if (validatepin()) {
+ $ESTATE_RENTTIME[.id]=gettimetick(2);
+ }
+ }
+ goto L_Manage;
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+
+ // Estate Settings
+ .id=1; // Estate ID
+ .price=120000; // Monthly rent price
+ .time=60*60*24*30; // How long last default rent time. In future could consider month.
+ end;
+
+}
+
+// Door entrance
+012-1,95,69,0 script #RES_0096 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ if ($ESTATE_RENTTIME[.id] < gettimetick(2))
+ goto L_RentAvailable;
+
+ if ($ESTATE_OWNER[.id] == getcharid(3) || $ESTATE_PASSWORD$[.id] == "")
+ goto L_Warp;
+
+ mesc l("The door is locked");
+ next;
+ mesc l("However, it can be unlocked if you know the password:");
+ if (is_gm()) mesc l("You can use super password \"mouboo\" to unlock the door."), 1;
+ input .@password$;
+ // GMs can use super password "mouboo"
+ if (.@password$ == $ESTATE_PASSWORD$[.id] || (is_gm() && .@password$ == "mouboo"))
+ goto L_Warp;
+ close;
+
+L_Warp:
+ warp "009-6", 33, 33;
+ closeclientdialog;
+ close;
+
+L_RentAvailable:
+ dispbottom l("This estate is available for rent, talk to the sign to rent it.");
+ close;
+
+OnInit:
+ // Estate Settings
+ .id=4; // Estate ID
+ end;
+
+}
+
diff --git a/npc/009-6/_import.txt b/npc/009-6/_import.txt
new file mode 100644
index 000000000..630e66dca
--- /dev/null
+++ b/npc/009-6/_import.txt
@@ -0,0 +1,3 @@
+// Map 009-6: Real Estate
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/009-6/_warps.txt",
diff --git a/npc/009-6/_warps.txt b/npc/009-6/_warps.txt
new file mode 100644
index 000000000..c395f4858
--- /dev/null
+++ b/npc/009-6/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 009-6: Real Estate warps
+009-6,34,34,0 warp #009-6_34_34 1,0,014-3,44,48
diff --git a/npc/014-2/_warps.txt b/npc/014-2/_warps.txt
index 6ab53d602..0a2817bd9 100644
--- a/npc/014-2/_warps.txt
+++ b/npc/014-2/_warps.txt
@@ -2,4 +2,4 @@
// Map 014-2: Woodlands Southeast warps
014-2,179,21,0 warp #014-2_179_21 3,0,012-1,78,101
014-2,232,20,0 warp #014-2_232_20 2,0,012-1,132,100
-014-2,49,24,0 warp #014-2_49_24 1,0,014-3,148,153
+014-2,49,24,0 warp #014-2_49_24 1,0,014-3,130,134
diff --git a/npc/014-4/_warps.txt b/npc/014-4/_warps.txt
index e503630e7..4a1824d41 100644
--- a/npc/014-4/_warps.txt
+++ b/npc/014-4/_warps.txt
@@ -1,4 +1,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 014-4: Thunderhill warps
014-4,95,32,0 warp #014-4_95_32 0,0,017-1,219,90
-014-4,159,69,0 warp #014-4_159_69 0,3,014-3,48,88
+014-4,159,69,0 warp #014-4_159_69 0,3,014-3,30,69
diff --git a/npc/014-5/_warps.txt b/npc/014-5/_warps.txt
index f5451e8f3..e8fbbdc85 100644
--- a/npc/014-5/_warps.txt
+++ b/npc/014-5/_warps.txt
@@ -2,6 +2,6 @@
// Map 014-5: North Woodlands warps
014-5,48,161,0 warp #014-5_48_161 0,0,015-7,38,94
014-5,59,154,0 warp #014-5_59_154 0,0,015-7,84,65
-014-5,82,229,0 warp #014-5_82_229 1,0,014-3,172,60
+014-5,82,229,0 warp #014-5_82_229 1,0,014-3,155,41
014-5,86,31,0 warp #014-5_86_31 0,0,015-5,81,139
014-5,192,16,0 warp #014-5_192_16 2,0,019-4,53,109
diff --git a/npc/015-3/_warps.txt b/npc/015-3/_warps.txt
index 3b1a45bb8..b703631e6 100644
--- a/npc/015-3/_warps.txt
+++ b/npc/015-3/_warps.txt
@@ -2,6 +2,6 @@
// Map 015-3: Butterfly Caves warps
015-3,152,162,0 warp #015-3_152_162 0,0,015-3,123,38
015-3,171,161,0 warp #015-3_171_161 0,0,015-3,147,39
-015-3,172,196,0 warp #015-3_172_196 0,0,014-3,138,141
+015-3,172,196,0 warp #015-3_172_196 0,0,014-3,120,122
015-3,123,39,0 warp #015-3_123_39 0,0,015-3,152,163
015-3,147,40,0 warp #015-3_147_40 0,0,015-3,171,162
diff --git a/npc/_import.txt b/npc/_import.txt
index a724e22f1..1e29d52c0 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -60,6 +60,7 @@
@include "npc/009-3/_import.txt"
@include "npc/009-4/_import.txt"
@include "npc/009-5/_import.txt"
+@include "npc/009-6/_import.txt"
@include "npc/010-1-1/_import.txt"
@include "npc/010-1/_import.txt"
@include "npc/010-2/_import.txt"