summaryrefslogtreecommitdiff
path: root/npc/017-1/estate.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/017-1/estate.txt')
-rw-r--r--npc/017-1/estate.txt77
1 files changed, 76 insertions, 1 deletions
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;
+
+}
+