Scripting in Tradeskills - Imperian Online Help
20.3 Scripting in Tradeskills
Certain tradeskills allow you to add extra messages to an item when you are designing it. For example, recipes made via the Cooking tradeskill can now have up to three sets of eating messages, displayed to both the player and the room. These messages are done in groups of two, as there must be both a Room message, and a Player message which accompanies it. You can include the name and sex of the user of an item shown to the room using the correct scripting syntax, which will then be automatically displayed when that item is activated. The correct syntax is as follows: $(name$) - Users name. $(he$) - He or she. $(his$) - His or her. $(him$) - Him or her. LIBATIONS ONLY: $(container$) - container being drunk from. Also, you can add a + between $ and (, to capitalise the first letter of that word, so that it will display correctly. For example, $+(he$) would show He or She, but $(he$) would show he or she. This should be done for any word appearing at the beginning of a sentence, as it may not be capitalized otherwise. This is true even for player names, as they may normally appear as something like "a masked man". You need to include them as shown, but used properly they can be extremely effective! The messages are stored as 1st player message, 1st room message, 2nd player message, 2nd room message, and so on. These are summarised as 1P, 1R, 2P, 2R and the like. Let's use an example of how they would work, by adding messages to a platter of fruit. DESIGN 1234 EATEN 1P You begin to eat a plate of fruit. This will add the 'eaten' message shown to the player, so that when they eat the fruit, they will see 'You begin to eat a plate of fruit'. Now, to go with this, we need a room message, displayed to everyone else when the player starts to eat. DESIGN 1234 EATEN 1R $+(name$) begins to eat a plate of fruit. That adds the 'eaten' message shown to the room, so that when the player eats, the room will see 'Avasyu begins to eat a plate of fruit'. Notice the + used between $ and ( to capitalise the first letter. You can set up to three sets of these messages, though the first set should be when they start using the item, and the third set when they finish it. Messages do more than just look pretty. In the case of cooking, food with additional eaten messages will be more filling depending on how many have been shown. The messages are strictly optional however, you do not need to add them. If you do, you must do the first messages (1P and 1R) before the second, and the second before the third. You can also do only one set of messages, or, two, or even all three. Entirely up to you!