TSM Inn System
Posted: Wed Feb 21, 2007 9:10 am
http://www.thesilvermarches.net/uploads ... system.rar
Here is a simple inn system that can be made persistent without any real fuss, but I think is better suited to remaining local.
There is no NPC involved, nor a store.
This package contains:
- 1 area with a stairwell, a hall, and 4 adjoining bedrooms
- 1 openable gate with a conversation at the top of the stairs
- 1 script to operate the locking mechanisms of any door in your module via a usable lever
- 1 key item, stored on the player after passing through the gate
All other scripts are stock Obsidian scripts and can be found inside the conversation file. The player touches the locked gate and a conversation begins. The player is asked if they want access through the gate for 5gp(change the variable value for another price). If they accept, the gate opens, the player gains the key item and is pushed through the gate to the other side, and the gate is automatically closed and locked behind them.
When they purchase their key, a local variable is added to the gate itself. When 4 keys have been purchased, the integer value is 4. Anyone trying to gain access to a room at this point is told the rooms are full. When a player leaves , the variable count is reduced by one, and so on. If you want 8 rooms, just change the variable value in the conversation.
The doors are manually locked by the PC inside the room. They enter their room, pull a lever, and their door closes and locks. Pull it again and it unlocks and opens.
Anyway, it works, it can easily be customised, requires zero scripting (change tags on doors, levers, and variables within the conversation and you've customised it) and it's hopefully useful to someone.
Here is a simple inn system that can be made persistent without any real fuss, but I think is better suited to remaining local.
There is no NPC involved, nor a store.
This package contains:
- 1 area with a stairwell, a hall, and 4 adjoining bedrooms
- 1 openable gate with a conversation at the top of the stairs
- 1 script to operate the locking mechanisms of any door in your module via a usable lever
- 1 key item, stored on the player after passing through the gate
All other scripts are stock Obsidian scripts and can be found inside the conversation file. The player touches the locked gate and a conversation begins. The player is asked if they want access through the gate for 5gp(change the variable value for another price). If they accept, the gate opens, the player gains the key item and is pushed through the gate to the other side, and the gate is automatically closed and locked behind them.
When they purchase their key, a local variable is added to the gate itself. When 4 keys have been purchased, the integer value is 4. Anyone trying to gain access to a room at this point is told the rooms are full. When a player leaves , the variable count is reduced by one, and so on. If you want 8 rooms, just change the variable value in the conversation.
The doors are manually locked by the PC inside the room. They enter their room, pull a lever, and their door closes and locks. Pull it again and it unlocks and opens.
Anyway, it works, it can easily be customised, requires zero scripting (change tags on doors, levers, and variables within the conversation and you've customised it) and it's hopefully useful to someone.