Evalyn's Subtlety

From Serenity : The Wiki
Jump to: navigation, search

Evalyn's Subtlety provides a way for players to request a skill roll from interested parties without bothering those who don't care (and without looking entirely attention-starved. Only partially. ;) Included are commands for turning notifications on and off, check this notification status, and of course to send the request.

NOTE: now that the +roll command has been activated for all players on the game, this player-set code should use a different command than +roll (to not conflict). Suggestions: +sroll or +subtle

Code

To use Evalyn's Subtlety, copy-paste the following:

@set me=!no_command
&SUBTLETY me=1
@set me/SUBTLETY=visual
&SUBTLETY`ROLLREQ me=$+roll * at *:@pemit/list [iter([lcon(here)],[if(u(##/SUBTLETY),##)]%b)]=%[[ansi(hx,ROLL)]%] [ansi(g,%N)] requests a [ansi(y,%0)] roll against a [ansi(y,[first(%1,/)])] difficulty. [if(rest(%1,/),Reason: [ansi(g,[rest(%1,/)])])]
&SUBTLETY`ROLLWHO me=$+roll/who:think %[[ansi(hx,ROLL)]%] The following people are set up for Subtlety: %r%t[ljust(SET,5)]NAME[iter([lcon(here)],[if(hasattr(##,SUBTLETY),%r%t[ljust([if(u(##/SUBTLETY),[ansi(g,ON)],[ansi(r,OFF)])],5)][name(##)] %(##%))])]%r%t--[ansi(y,END)]--
&SUBTLETY`ROLLTOGGLE me=$+roll:think %[[ansi(hx,ROLL)]%] Subtlety status toggled to: [if(u(subtlety),[ansi(r,OFF)],[ansi(g,ON)])];&SUBTLETY me=[not([u(%#/SUBTLETY)])]

Notes

Evalyn's Subtlety uses Attribute Trees; you will only see the SUBTLETY attribute when you examine yourself, unless you specify otherwise.
See help attribute trees for more info.
This is all softcode; you can modify the formatting to your liking. Since SUBTLETY`ROLLREQ is what everyone else sees, however, you would be wise to leave that one stock.
As always, abuse of this code to do things ("Eyy.. you know... stuff.") is a breach of MUSH rules and so-forth.

Commands

+roll <skill|attribute> at <difficulty>[/<reason>]
This is the main command; it sends an emit to all those who have toggled their SUBTLETY status to 1 notifying them of your requested roll, the difficulty, and if provided the reason for it.

+roll/who
This provides a readout of who has Evalyn's set, and whether they have it turned on or off.

+roll
This toggles your Evalyn's status.

Examples

> +roll/who
[ROLL] The following people are set up for Subtlety:
        SET  NAME
        ON   Jander (#16633)
        OFF  Evalyn (#14839)
        ON   Luke (#14273)
        --END--

> +roll

[ROLL] Subtlety status toggled to: OFF

> +roll Dance at 40

> +roll/who

[ROLL] The following people are set up for Subtlety:
        SET  NAME
        OFF  Jander (#16633)
        OFF  Evalyn (#14839)
        ON   Luke (#14273)
        --END--

> +roll

[ROLL] Subtlety status toggled to: ON

> +roll Dance at 40

[ROLL] Jander requests a Dance roll against a 40 difficulty. 

> +roll Culture: Buddhism at 20/To know that's not a swastika on his neck.

[ROLL] Jander requests a Culture: Buddhism roll against a 25 difficulty. Reason: To know that's a not a swastika on his neck.

Credits

The idea and code are Evalyn's; Jander helped with ideas, formatting, and the original wiki page; Luke helped with ideas and performing testmonkey duties.