Jump to content

Actual Renting


VincentAlliath

Recommended Posts

So... I want to make a House Mod of sorts when I get better at building, but not a House Mod that you own.

 

I want to know if it's possible to create a room (or collection of rooms) that can be rented for a week by a player.

I was looking at the Construction Wiki at the Rent-A-Room Tutorial, and I think I know what part you'd have to change. I just want to know if you CAN change it.

 

begin gamemode

if ( rent == 1 )					   ;If you have rented the room

if ( setup == 0 )					 ;If this hasn't been done before
 set rentday to GameDaysPassed		;Saves the day of the rental 
 set setup to 1					   ;We don't want this to happen again
 (YourDoorRef).unlock				 ;Unlock the door
 (YourBedRef).SetOwnership			;Makes it legal to sleep in the bed

else								  ;If we have already done that

[b] if ( GameDaysPassed != rentday )[/b]			;If it is a new day
  set cleanup to 1					;Makes the reset ready
 endif
endif

if Player.GetinCell (YourInnCell) == 0;If the player is outside the inn
 if ( Cleanup == 1 )				  ;If the reset Is ready
  set Cleanup to 2					;Start the reset
 endif
endif



if ( Cleanup == 2 )				   ;If the reset should start


;Resets The Variables

 set rent to 0						 
 set setup to 0						
 set rentday to 0
 set cleanup to 0


 (YourDoorRef).SetOpenState 0		;Close the door
 (YourDoorRef).lock 30			   ;Lock the door
 (YourBedRef).SetOwnership (NpcID)   ;Make it illegal to sleep in the bed
endif
endif

End

 

[b] if ( GameDaysPassed != rentday )[/b]

I'm guessing you'd have to change this to be something along the lines of

 if ( GameDaysPassed >7 rentday )

Am I right, there?

 

Is this possible?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...