summaryrefslogtreecommitdiff
path: root/npc/017-1/estate2.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/017-1/estate2.txt')
-rw-r--r--npc/017-1/estate2.txt54
1 files changed, 1 insertions, 53 deletions
diff --git a/npc/017-1/estate2.txt b/npc/017-1/estate2.txt
index 69dfcd777..82bb3744c 100644
--- a/npc/017-1/estate2.txt
+++ b/npc/017-1/estate2.txt
@@ -39,59 +39,7 @@
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.");
- }
+ realestate_rent(.id, .price);
close;
L_Manage: