View Single Post
  #1  
Old 04-07-2002, 05:49 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default Scripting Doors with Locks for specific keys

rivervale.qst

20001 is a house key

DOOR_SCRIPT 1 {
DOOR_LOCKED: 20001
NAME: An old and very magical hobbit door
SAY: Hello good friend!
CAST_SPELL: 7
EMOTE:slowly grinds open.
EMOTE:begins to sing.
}
DOOR_SCRIPT 2 {
DOOR_UNLOCKED: 0
NAME: A blackened door
SAY: I have been awaiting those words for eons.
EMOTE:slowly grinds open.
EMOTE:begins to chant.
SAY: I shall now be with you in spirit, good friend.
CAST_SPELL: 404
}

In order to open Door 1, you *must* have key (summonitem 20001) in your cursor when you go to click on the door. Maybe a trigger for when the door is unlocked to fire could be put in (but that's extra special .

Doors are all open by default. So door_unlocked isn't terribly exciting. In theory, people could "own" houses by just doing the above and even set special spells up for doors inside larger houses (such as teleports, etc.)

Attached is modified source files for the above.
Reply With Quote