Create a free account to remove all ad content.

Author Topic:  [Blueprint] Combination Lock mkII  (Read 348 times)

0 Members and 1 Guest are viewing this topic.

muD

  • Legendary Member
  • *
  • Posts: 1177
    • View Profile
[Blueprint] Combination Lock mkII
« on: December 31, 2014, 09:02:55 AM »
Combination Lock


The Scripts

This scriptwork can be replicated into any world.
Note: Replace all forward slashes with backslashes. The forum board doesn't display the backslash.

Spoiler for Scripts:
Script 1:
Button/1
-Run when player presses button 1. When scriptblock is powered On
Code: [Select]
1. History [Button/1] [player]
2. History [Button/2] [clear] [player]
3. History [Button/3] [clear] [player]
4. History [Button/4] [clear] [player]

Script 2:
Button/2
-Run when player presses button 2. When scriptblock is powered On
Code: [Select]
1. If
2.   HasHistory [Button/1] [player] [true]
3. Then
4.   History [Button/2] [player]
5. Else
6.   History [Button/1] [clear] [player]
7.   History [Button/2] [clear] [player]
8.   History [Button/3] [clear] [player]
9.   History [Button/4] [clear] [player]

Script 3:
Button/3
-Run when player presses button 3. When scriptblock is powered On
Code: [Select]
1. If
2.   HasHistory [Button/2] [player] [=] [1]
3. Then
4.   History [Button/3] [player]
5. Else
6.   History [Button/1] [clear] [player]
7.   History [Button/2] [clear] [player]
8.   History [Button/3] [clear] [player]
9.   History [Button/4] [clear] [player]

Script 4:
Button/4
-Run when player presses button 4. When scriptblock is powered On
Code: [Select]
1. If
2.   HasHistory [Button/3] [player] [=] [1]
3. Then
4.   History [Button/4] [player]
5. Else
6.   History [Button/1] [clear] [player]
7.   History [Button/2] [clear] [player]
8.   History [Button/3] [clear] [player]
9.   History [Button/4] [clear] [player]

Script 5:
Button/5
-Run when player presses button 5. When scriptblock is powered On
Code: [Select]
1. If
2.   HasHistory [Button/4] [player] [=] [1]
3. Then
4.   History [Lock/1/Open] [clear] [player]
5.   History [Lock/1/Open] [player]
6.   Notify [Correct Code Entered!] [local]
7.   History [Button/1] [clear] [player]
8.   History [Button/2] [clear] [player]
9.   History [Button/3] [clear] [player]
10.  History [Button/4] [clear] [player]
11. // Add any extra commands you want here. Open a door, give items, power a safe, wtvr..
12.
13. Else
14.   History [Button/1] [clear] [player]
15.   History [Button/2] [clear] [player]
16.   History [Button/3] [clear] [player]
17.   History [Button/4] [clear] [player]

Player is left with [Lock/1/Open] History mark after entering the correct code.

You can copy & paste the whole combi-lock. If you do; make a copy of the button 5 script and edit it to give a [Lock/2/Open] history mark instead of [Lock/1/Open]