Since I'm that damn bored... [Archive] - ForumsHQ
Posted: Fri Jun 21, 2002 3:36 am
First you need an item (the chest itself) and a spell (to activate the chest). I recommend copying existing chests and chest spells, as it's less settings to fuck with. Just change the names. Now the spell should link to a text block. Obviously the text block number should not be in use. Make a new one. Put this in the new text block:
random XXXX
Where XXXX is is the number of your next text block. Make another one (the one you've mentioned in the random block, obviously). Now before we go any further, remember... you can chain off of randoms. Take the graveyard for instance. If you've ever scripted digging, you know that VERY rarely you'll get a glowing broadsword or warhammer. It seems like 1 in 1000 digs, but the minimum percent you can get is 1%. They do this by chaining randoms. Here's an example. This is one of the text blocks I used on Sinister Urge for a chest I made:
60:message 10028:addexp 2000000
83:message 10029:addexp 10000000
85:message 10030:addexp 100000000
100:random 10111
The first number is the percent change. The actual chance is like monster's attacks... it's the value there minus the value of the attack (or in this case, reward) before it. For instance the chance of getting 10,000,000 experience is 82 negative 60. So 23%. As you can see by the experience rewards here, you can put a lot more than items in chests. You can put experience, stat rewards (crit chance, dodge chance, ect... I wouldn't try putting a strength reward in one), monsters, a cast of a certain spell, just about anything you can think of. Anyway, the last chance sends you to another random as you can see. This goes to another text block.... in this case, the one that awards items rather than experience.
It's a long one, but it's pretty much the same thing.
percent:message and message number:what you want to happen.
For instance...
52:message 66:addexp 1
54:message 39172:addability 4 1
58:message 39173:giveitem 3829
In this example, there'd be a 2% chance to give a bonus of +1 max damage and a 4% chance to give item 3829.
All in all, every random text block should go up to 100%. I'm not sure what would happen if you made one that didn't, and there's no reason not to. Remember, you can also give multiple chances (even chances on different things... like one chance for a stat bonus, one chance for items, one for experience, ect.) on the same spell. Just add another link to a text block. Also remember to make sure the messages work properly... it's REALLY God damned annoying to not know what you got from a chest.
Did I miss anything?
random XXXX
Where XXXX is is the number of your next text block. Make another one (the one you've mentioned in the random block, obviously). Now before we go any further, remember... you can chain off of randoms. Take the graveyard for instance. If you've ever scripted digging, you know that VERY rarely you'll get a glowing broadsword or warhammer. It seems like 1 in 1000 digs, but the minimum percent you can get is 1%. They do this by chaining randoms. Here's an example. This is one of the text blocks I used on Sinister Urge for a chest I made:
60:message 10028:addexp 2000000
83:message 10029:addexp 10000000
85:message 10030:addexp 100000000
100:random 10111
The first number is the percent change. The actual chance is like monster's attacks... it's the value there minus the value of the attack (or in this case, reward) before it. For instance the chance of getting 10,000,000 experience is 82 negative 60. So 23%. As you can see by the experience rewards here, you can put a lot more than items in chests. You can put experience, stat rewards (crit chance, dodge chance, ect... I wouldn't try putting a strength reward in one), monsters, a cast of a certain spell, just about anything you can think of. Anyway, the last chance sends you to another random as you can see. This goes to another text block.... in this case, the one that awards items rather than experience.
It's a long one, but it's pretty much the same thing.
percent:message and message number:what you want to happen.
For instance...
52:message 66:addexp 1
54:message 39172:addability 4 1
58:message 39173:giveitem 3829
In this example, there'd be a 2% chance to give a bonus of +1 max damage and a 4% chance to give item 3829.
All in all, every random text block should go up to 100%. I'm not sure what would happen if you made one that didn't, and there's no reason not to. Remember, you can also give multiple chances (even chances on different things... like one chance for a stat bonus, one chance for items, one for experience, ect.) on the same spell. Just add another link to a text block. Also remember to make sure the messages work properly... it's REALLY God damned annoying to not know what you got from a chest.
Did I miss anything?