Variable Locks
Dec 13, 2010 23:06:56 GMT -8
Post by Mortain on Dec 13, 2010 23:06:56 GMT -8
A variable lock for people who don't want to use objects to trigger the locks, or items to block the doors.
New Dragonspeak Script
Created by Mortain
(0:0) When everything is starting up,
(5:300) set variable %room1 to the value 0.
(5:300) set variable %room2 to the value 0.
********Unlock all rooms
(0:31) When a furre says {&override},
(1:11) and the triggering furre has got shared control (or is the dream owner),
(5:204) emitloud message {All rooms are now unlocked. If you are now using one, please relock it at this time.} to everyone on the map.
(5:300) set variable %room1 to the value 0.
(5:300) set variable %room2 to the value 0.
********One
In, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 0,
(5:200) emit message {This room is Lockable. to lock it say &lock, and &unlock to Unlock.} to the triggering furre.
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
In, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED, ENTRY DENIED!</b>} to the triggering furre.
Out, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED</b> Please unlock it by saying &unlock before leaving.} to the triggering furre.
Out, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 0,
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
Locking/Unlocking
Lock
(0:31) When a furre says {&Lock},
(1:200) and variable %room1 is equal to 0,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room1 to the value 1.
(5:203) emit message {The room is now locked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now locked.} to the triggering furre.
Unlock
(0:31) When a furre says {&Unlock},
(1:200) and variable %room1 is equal to 1,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room1 to the value 0.
(5:203) emit message {The room is now unlocked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now unlocked.} to the triggering furre.
********Two
In, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 0,
(5:200) emit message {This room is Lockable. to lock it say &lock, and &unlock to Unlock.} to the triggering furre.
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
In, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED, ENTRY DENIED!</b>} to the triggering furre.
Out, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED</b> Please unlock it by saying &unlock before leaving.} to the triggering furre.
Out, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 0,
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
Locking/Unlocking
Lock
(0:31) When a furre says {&Lock},
(1:200) and variable %room2 is equal to 0,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room2 to the value 1.
(5:203) emit message {The room is now locked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now locked.} to the triggering furre.
Unlock
(0:31) When a furre says {&Unlock},
(1:200) and variable %room2 is equal to 1,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room2 to the value 0.
(5:203) emit message {The room is now unlocked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now unlocked.} to the triggering furre.
New Dragonspeak Script
Created by Mortain
(0:0) When everything is starting up,
(5:300) set variable %room1 to the value 0.
(5:300) set variable %room2 to the value 0.
********Unlock all rooms
(0:31) When a furre says {&override},
(1:11) and the triggering furre has got shared control (or is the dream owner),
(5:204) emitloud message {All rooms are now unlocked. If you are now using one, please relock it at this time.} to everyone on the map.
(5:300) set variable %room1 to the value 0.
(5:300) set variable %room2 to the value 0.
********One
In, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 0,
(5:200) emit message {This room is Lockable. to lock it say &lock, and &unlock to Unlock.} to the triggering furre.
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
In, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED, ENTRY DENIED!</b>} to the triggering furre.
Out, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED</b> Please unlock it by saying &unlock before leaving.} to the triggering furre.
Out, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room1 is equal to 0,
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
Locking/Unlocking
Lock
(0:31) When a furre says {&Lock},
(1:200) and variable %room1 is equal to 0,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room1 to the value 1.
(5:203) emit message {The room is now locked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now locked.} to the triggering furre.
Unlock
(0:31) When a furre says {&Unlock},
(1:200) and variable %room1 is equal to 1,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room1 to the value 0.
(5:203) emit message {The room is now unlocked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now unlocked.} to the triggering furre.
********Two
In, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 0,
(5:200) emit message {This room is Lockable. to lock it say &lock, and &unlock to Unlock.} to the triggering furre.
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
In, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED, ENTRY DENIED!</b>} to the triggering furre.
Out, Locked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 1,
(5:200) emit message {<b>ROOM LOCKED</b> Please unlock it by saying &unlock before leaving.} to the triggering furre.
Out, Unlocked
(0:7) When somebody moves into position (#,#),
(1:200) and variable %room2 is equal to 0,
(5:15) move the triggering furre to (#,#), or to someplace nearby if it's occupied.
Locking/Unlocking
Lock
(0:31) When a furre says {&Lock},
(1:200) and variable %room2 is equal to 0,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room2 to the value 1.
(5:203) emit message {The room is now locked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now locked.} to the triggering furre.
Unlock
(0:31) When a furre says {&Unlock},
(1:200) and variable %room2 is equal to 1,
(1:80) and the triggering furre is within the rectangle (#,#)Lower left - (#,#),Top Right
(5:300) set variable %room2 to the value 0.
(5:203) emit message {The room is now unlocked.} to every furre who can see the triggering furre.
(5:200) emit message {The room is now unlocked.} to the triggering furre.