PDA

View Full Version : Scripted Doors - they're magic 'n stuff


Malevolent
04-06-2002, 01:51 PM
It's quickhack of the hour with your host: Malevolent!

I thought I'd toss in the ability to script doors. So when you script a door, it fires off the script engine. Further, you can use a new tag i stuck in called NAME to make the world seem more alive. NAME is used in the message sent across. Check through the example below if you don't catch what I'm getting at.

rivervale.qst

DOOR_SCRIPT 1 {
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 {
NAME: A blackened door
SAY: I have been awaiting those words for someone to turn the handle for a very long time.
EMOTE:slowly grinds open.
EMOTE:begins to chant.
SAY: I shall now be with you in spirit, good friend.
CAST_SPELL: 404
}

DOOR_SCRIPT 3 {
NAME: A voice inside
SAY: I don't know where you come from, pal. But here in Rivervale, we knock.
EMOTE:coughs.
CAST_SPELL: 11
}

DOOR_SCRIPT 4 {
NAME: Deputy Budo
CAST_SPELL: 911
SAY: Quick! Hide in the closet!
EMOTE:closes the closet door behind him.
}

Attached source. I didn't find it very economical with the current script engine to check everytime you say something. The first test of this sent me to cazic -- wrong spell # :P

I'd like to add #DOOR_LOCKED, #DOOR_LOCKED_LEVEL (somenum), some time later. But the above do a neat job. :)

--MV

Lyenu X`Arie
04-06-2002, 03:53 PM
Very nice.. I'll have to check it out =)

ninja_looter
04-14-2002, 01:22 PM
LOL that rocks!

Shortlived
04-14-2002, 08:45 PM
lol damn good idea!