![]() |
Chest Template
I just spontaneously scripted a univeral chest NPC that could perhaps replace the default one. Dunno, comment it.
If you decide to use it, make sure to replace the parts that are obviously placeholders :) NPC Code: class chests: NPC Code: As I just typed it from scratch, it sure contains some major logical and typistic flaws, please tell me about them. I suggest that these chests are secured not only by unwalkable tiles or whatever, but by putting them into a seperate level, as it is in theory possible to trigger the chest_open action without in fact touching the chest, using trainers. Also, they obviously only work with the standard chest size of 2x2 tiles :( |
hmm interesting ^^ what does it do that the default one doesnt? i guess it's more versatile in some ways but then i think that the default ones provides enough for players who are using chests anyway... if a player wants more out of the chest it should be their job to script it themselves :rolleyes:
|
Well, why should they have to if I already did the job, and there is more interesting stuff to do? :)
btw, I recommend not using my script as it is horribly buggy. |
hehe hmm yea... its hard to make a bugless gscript i think anyway theres just so many situations that not all of them could possibly be tested. but i guess that's true for all games which is why there's beta versions and testing and etc... ^^
|
This one is bad by design, though.
|
I made one on fah that was a replica of the one that is built in graal except you could change every single aspect it even set a flag subject to its level and placement but it was like zco instead of co flags ;)
It used a showimg for showing what contents poped out though but still had same everything it could however be set that once a person opened it others couldnt or that everyone could open it once. I like yours too though i havent tested it but the way it looks it seems stable ;) |
Erm, posting full scripts is against the rules if I remember rightly but thats not my problem...anyways posting a script which is terribly buggy is going to do nothing but confuse new scripters who will try and learn from your script and learn your mistakes as being correct X_x
|
Quote:
Anyways, i'm using this script, i added some new features as *wont name* and *no name*. me and loriel fixed almost all bugs tough. |
See it as a challenge to spot the errors :)
|
loriel fooled us all!! we thought he was givin us a cool script but instead he gave us a test!!! ooooh :megaeek:
|
Quote:
|
Hmm. Thats pretty nice loriel. It's not 'perfect' but it's useable. I think I'll add to it.
|
Why don't we just use
if (created){ setimg chest.png; this.opened=false; } if (playertouchsme){ play chest.wav; //give items setimg chestopen.png; this.open=true; } |
Because that has far less functionality and won't work on any server?
|
Oh yes i forgot about those two unimportant things.
|
| All times are GMT +2. The time now is 02:52 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.