Update 2/20/07

Started by Vitoc, February 20, 2007, 12:50:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Over the past week I added a menu upon entering the module and cleaned up character creation quite a bit.  The stat creation screen now allows you to change your hair length/color and eye color.  Press space on those fields to toggle between the choices.  I also cleaned up the rerolling routine so there shouldn't be any more odd behavior when rerolling.

Next up, going to tackle opening chests, item spells, using items, deathspells, and keys (for doors).  Will be working on these items throughout the next week or two.


TGS v1.0 (coming soon)

Yeah, keep it up man, you rock!
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

How chests work:
The coding for chests starts with the item database.

First you'll need an item with;
A record number, A name, it must be set to Type: Container, It may or may not have a value for Max Uses, and may or may not destory when its out of charges. It will have ability 43, cast spell with a value equal to the record number for the chests open spell. Also, in the item database their is a Cash when Opened setting that generates money for container type items.  When more money is generate than can fit in an inventory the Maximum enc is ignored, this only applies with Cash.  Note Container type items are the only items that interact with the Open command, and these items must currently be in the players inventory to be opened.

Second you'll need a spell with;
A record number(equal to the parameter of ability 43 on the item), A name, With proper magery, level, and difficulty settings. Target: Self -- Attack Type: Normal -- the spell will likely have cast message 66 (blank) and ability 148(Textblock) with a parameter equal to the starting textblock.

Textblocks will need the following funtions

message parameter, it calls the record number of the specified parameter in the message database and looks like
message {value}:message {value}:random {value}:random {value}:random {value}:random {value}:random {value}:random {value}

random parameter - Picks a random number and does a random test on the text block specified in [text]. Each line in the text block matches a number of less than or equal to the value specified, like so--

6: 9: 100:

In this example, the first set of commands are executed if the number is between 0 and 6; the second set of commands are executed if the number chosen is between 7 and 9 (including 9 and 7), and the last set of commands are executed if the number chosen is between
10 and 100 (including 10 and 100).

Example of a textblock that can be called by the random command, Textblock 878
6:message 1429:giveitem 223
9:message 1429:giveitem 269
10:message 1429:giveitem 464
11:message 1429:giveitem 467
12:message 1429:giveitem 471
17:message 1429:giveitem 469
20:message 1429:giveitem 465
22:message 1429:giveitem 878
27:message 1430:giveitem 407
29:message 1430:giveitem 433
30:message 1430:giveitem 611
31:message 1430:giveitem 406
32:message 1430:giveitem 408
33:message 1430:giveitem 424
37:message 1433:giveitem 46
40:message 1433:giveitem 404
41:message 1433:giveitem 402
42:message 1433:giveitem 420
43:message 1433:giveitem 422
44:message 1433:giveitem 445
48:message 1437:giveitem 410
51:message 1437:giveitem 414
54:message 1437:giveitem 846
57:message 1437:giveitem 521
59:message 1437:giveitem 411
61:message 1437:giveitem 847
63:message 1437:giveitem 362
64:message 1437:giveitem 418
65:message 1433:giveitem 848
69:message 1434:giveitem 295
73:message 1434:giveitem 864
76:message 1434:giveitem 361
79:message 1434:giveitem 116
81:message 1434:giveitem 868
83:message 1434:giveitem 869
87:message 1438:giveitem 863
91:message 1438:giveitem 459
93:message 1438:giveitem 865
95:message 1438:giveitem 866
97:message 1438:giveitem 867
98:message 1438:giveitem 461
99:message 1438:giveitem 870
100:message 1438:giveitem 871


giveitem parameter, adds an item with a record number equal to the specified parameter.  If there characters inventory is full, or the item requires too much enc to be held the item is placed in the Visible items of the current room.  If the visible items in the room is maxed out then the item poofs.

givecoins parameter currency, Give the amount of money specified by the paramter in the currency type specified in currency. C=copper, S=silver, G=gold, P=platinum, R=runic, it is not case sensitive.


I think this is everything

Just a heads up I tested some of the spells for chest and right now they don't work. I'm not sure if they aren't executing the textblocks or the functions in the textblocks though.

It would be nice if we had some way of debugging spells better.