summaryrefslogtreecommitdiff
path: root/npc/017-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-12 18:26:32 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-12 18:26:32 -0300
commit1bd4cc9901acbab05f36402bfdbb96c2578cf2d3 (patch)
treec659a3547d49d0099714edd577f48330f7fa68d5 /npc/017-1
parenta128a876e368e86cf6075bbd1ff8a7779c30ef20 (diff)
downloadserverdata-1bd4cc9901acbab05f36402bfdbb96c2578cf2d3.tar.gz
serverdata-1bd4cc9901acbab05f36402bfdbb96c2578cf2d3.tar.bz2
serverdata-1bd4cc9901acbab05f36402bfdbb96c2578cf2d3.tar.xz
serverdata-1bd4cc9901acbab05f36402bfdbb96c2578cf2d3.zip
Remove unused NPC variable .time, and merge estate2 on main estate files
They're not THAT huge anymore to justify their own file
Diffstat (limited to 'npc/017-1')
-rw-r--r--npc/017-1/_import.txt1
-rw-r--r--npc/017-1/estate.txt77
-rw-r--r--npc/017-1/estate2.txt96
3 files changed, 76 insertions, 98 deletions
diff --git a/npc/017-1/_import.txt b/npc/017-1/_import.txt
index ebe8b188a..dfcf5c4e9 100644
--- a/npc/017-1/_import.txt
+++ b/npc/017-1/_import.txt
@@ -4,7 +4,6 @@
"npc/017-1/_mobs.txt",
"npc/017-1/_warps.txt",
"npc/017-1/estate.txt",
-"npc/017-1/estate2.txt",
"npc/017-1/fairy_collector.txt",
"npc/017-1/guards.txt",
"npc/017-1/mapflags.txt",
diff --git a/npc/017-1/estate.txt b/npc/017-1/estate.txt
index 0f2e52793..3d8d7007d 100644
--- a/npc/017-1/estate.txt
+++ b/npc/017-1/estate.txt
@@ -53,7 +53,6 @@ OnInit:
// Estate Settings
.id=2; // Estate ID
.price=80000; // Monthly rent price
- .time=60*60*24*30; // How long last default rent time. In future could consider month.
end;
}
@@ -94,3 +93,79 @@ OnInit:
}
+//////////////////////////////////////////////////////////////////////////////
+// ID: 3
+
+// The sign is the main controller
+017-1,138,22,0 script Sign#RES_0178 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_0178::OnDoorbell";
+ close;
+
+L_RentAvailable:
+ realestate_rent(.id, .price);
+ close;
+
+L_Manage:
+ realestate_manage(.id, (.price*7/10));
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+
+ // Estate Settings
+ .id=3; // Estate ID
+ .price=120000; // Monthly rent price
+ end;
+
+}
+
+// Door entrance
+017-1,139,20,0 script #RES_0178 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 "017-8", 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=3; // Estate ID
+ end;
+
+}
+
diff --git a/npc/017-1/estate2.txt b/npc/017-1/estate2.txt
deleted file mode 100644
index 66a33e439..000000000
--- a/npc/017-1/estate2.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-// TMW2: Moubootaur Legends scripts.
-// Author:
-// Jesusalva
-// Description:
-// Real Estate System
-
-// ID: 3
-// $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
-017-1,138,22,0 script Sign#RES_0178 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_0178::OnDoorbell";
- close;
-
-L_RentAvailable:
- realestate_rent(.id, .price);
- close;
-
-L_Manage:
- realestate_manage(.id, (.price*7/10));
- close;
-
-OnInit:
- .sex = G_OTHER;
- .distance = 3;
-
- // Estate Settings
- .id=3; // 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
-017-1,139,20,0 script #RES_0178 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 "017-8", 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=3; // Estate ID
- end;
-
-}
-