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")
]