Cryosphere

Main Connecting Starting



MyAct Tutorial


Actions are rather more versatile than emotes, as you will see.
An action string generally contains text interspersed with action tokens (as listed in the apron information file). When you use an action, these tokens are replaced with certain strings.

Take the action string ‘%1 shouts wahey!’, for example.
When you call this action, you will be shown ‘You shouts wahey!’ but anyone else in your room will see %1 replaced with your name, so if you are called Foo, then observers will see 'Foo shouts wahey!'

To turn this string into a personal action, type:
'myact add mywahey unt %1 shouts wahey!'
This creates a new untargetted action called 'mywahey', available to you only.
Myact will attempt to create an alias to this action for you (see help alias), so you just need to type 'mywahey' to use this new action.
This isn't much more useful than an emote, though; action strings come into their own when you wish to target them at other players.

Here is a second action string: ‘%1 pounces on %a, and shouts wahey!’
Add this as a targetted action by typing 'myact add mywahey targ' followed by the string. Now, when you type ‘mywahey’ followed by the name of a player or mobile (for example, Muon), you will see ‘You pounces on Muon, and shouts wahey!’. Muon will see ‘Foo pounces on you, and shouts wahey!’, where Foo is your name. Observers will see ‘Foo pounces on Muon, and shouts wahey!’, and so on.

You may wish to edit or remove your old actions.
Typing ‘myact erase mywahey unt’ will remove the untargetted string from your mywahey action. Typing ‘myact erase mywahey’ will remove the mywahey action entirely. There is no way to recover an erased action, so if you do erase one by mistake, you'll need to re-enter it yourself.

Another advantage of actions is that they have a facility for displaying plurals correctly.
When you use the untargetted 'mywahey' action, you see ‘You shouts wahey!’, which looks a little odd. By replacing ‘shouts’ with ‘%[shouts/shout]’, the action system will display ‘You shout wahey!’ to you, whilst still showing the original string to observers.
This becomes more important when you use tokens like %b, or %W in person-targetted and object-targetted actions respectively.

Make a new targetted action for yourself by typing:
'myact add isdead targ %1 %[pokes/poke] %a, wondering if %b's dead’
Now, use that new action on Muon, or perhaps another player. You will see the correct text, ‘You poke Muon, wondering if he's dead’. Muon, however, will see ‘Foo pokes you, wondering if you's dead’, and where I come from that isn't very good grammar.
You can fix this using %</> tags.

Get rid of the old string, using ‘myact erase isdead targ’
Now re-enter the action, only this time instead of ‘%b's’, use ‘%b'%<s/re>’. When you use the action again, the target will see ‘you're’, but you will still see ‘he's’.

Make sure you read info apron, and experiment with creating your own actions!