PDA

View Full Version : Scripting Doors with Locks for specific keys


Malevolent
04-07-2002, 05:49 AM
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.

Malevolent
04-08-2002, 02:06 AM
Game Design Thoughts

I'm thinking of setting up merchants in each zone that sell keys to the various unused houses in the zone. The only particular problem I see is what to put inside the house once you have it up. Once inside, maybe this would flag your account as "home owner" and permit you to spawn select objects within it.

Although, I'm not sure what objects can be spawned. Chairs? Tables? Perhaps these too could be purchased, then "dropped" as items in your new home.

Drawde
04-08-2002, 02:26 AM
It would be good if houses had containers that you could store loads of things in, a bit like Daggerfall (if anyone's ever played that), it would give them a practical use as well as a prestige/roleplaying one. Maybe using a modification of the banker code, although the banker code actually seems to be client-side.

Zeitgeist
04-08-2002, 02:30 AM
hehe like AC housing? =)

Malevolent
04-08-2002, 02:32 AM
I'm thinking it wouldn't be that difficult to flag an object as a banker. Just a matter of figuring out what to stick in there -- are there some global objects that can be put in all houses? E.g., a global chest?

That definitely would open up all kinds of new doors.

TheClaus
04-09-2002, 02:27 AM
This is starting to sound like AO housing. Except I don't have to go to a crappy backyard were all the damn houses look the same. Keep this up and soon we'll have some of the functions of DAOC. You guys are doing great.

Malevolent
04-09-2002, 06:08 AM
Could someone list some common housing functionality from the other games? After I finish porting some code over I think I'm going to mess with it some more -- and if not I, at least it'd give some other folks some ideas to work with.

So far as I know a house allows you to have a house based banker, and to spawn certain objects (I have no idea what though).

Whoa. If you buy a house, then you can have a guard dog. Just a slight enhancement on the quest engine. If you don't have the key, then try to open a door, it spawns a guard dog which attacks you. Have to be a no xp kill, I think, or else could be an exploit.

Just tossing the potato around ;)

--MV

TheClaus
04-09-2002, 07:09 AM
Okay this is coming from playing AO which was a nice game but patches killed it more than fixed. With AO everyone got an apartment. It was assigned to you as soon as you walked through the door. Basically it gave you a house key and that was it. You could go to merchants and buy items like clocks, plants, chairs, tables, etc... It was said that you could also store items there that you got which I did but about 2 days later they lost all items in the apartments and all my items where gone even the table and chairs. They said that guilds could have houses and you would dupe the key and then everyone with that key could enter. There was no containers to put items in you just dropped them on the floor. Hope that helps.

Malevolent
04-09-2002, 10:15 AM
I'm thinking that once the bazaar interface is done, people could turn their homes into merchant shops.

Actually, this could be done now with even a web interface to the data. Do it in game via a command that sets a value for an item #setprice (itemoncursor) 1 2 3 4

As for the other stuff, dunno. Not sure if there is enough "stuff" capable of being put places.

just_add_water
04-20-2002, 05:58 PM
two thumbs way way up! kick ass idea, but can some1 send me the exe or whatever of this? i don't have a compiler

Malevolent
04-21-2002, 10:34 AM
I'll be putting up a compiled *NT* binary on this thread soon. It will contain the door script jazz.

http://www.eqemu.net/forums/showthread.php?s=&threadid=1437