New roll options - request for feedback

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: New roll options - request for feedback

Post by CoveredInFish »

While the output may not make perfect sense this macro should explain the usage. it send a msg to other and a different msg to self AND additionaly gm-info if gm.
Spoiler

Code: Select all

<!-- assume wed have a system where you have        -->
<!-- to roll 2d6+mod vs target number of 7 to succeed -->

[h: roll = 2d6]
[h: mod = 0]
[h: tn = 7]

<!-- send gm detailed infos -->
[gm: "2d6+"+mod+" vs "+ tn]

<!-- send self result -->
[s:  if( roll+mod >=tn, "Success", "Failure")]

<!-- get a list of players -->
[h: allPlayers = getAllPlayerNames()]
[h: otherPlayers = ""]
[h, foreach( name, allPlayers, ""0),code:{
    [h, if( name != getPlayerName() ): 
    otherPlayers=listAppend(otherPlayers,name)]
}]

<!-- send to other players (not self, but maybee gm) -->
[w(otherPlayers): "rolled and had a " +
    if( roll+mod >=tn, "Success", "Failure")
]
 

Post Reply

Return to “MapTool”