Discussion and Support

Skip to content

It is currently Sun Feb 25, 2018 3:08 am 

Reply to topic  [ 1 post ] 

Previous topic | Next topic 

  Print view

Author Message
Joined: Wed Sep 28, 2016 11:02 am
Posts: 1
 Post subject: Simple West End Games Ghostbusters Roll Macro
PostPosted: Sun Jan 15, 2017 6:24 am 
I did a forum search and didn't see one already done, so I'm posting the one I made, because I wanted to share it. I'm sure it had basis on something else, but don't remember what I cobbled it together from.

<!-- Bring up the dice pool prompt to fill the pool variable and let it be smoothly canceled. -->
[h:query=input("pool|1|Dice Pool|Text|")]

<!-- Lower the dice pool by 1 to make room for the ghost die. -->
[h:pool=pool -1]

<!-- Collect pool rolls individually for later reporting and add them up. -->
[h: listOfRolls = ""]
[h: sum = 0]
[h, count(pool), code: {
    [t: r = roll(1, 6)]
    [h: sum = sum+r]
    [h: listOfRolls = listAppend(listOfRolls, r," + ")]

<!-- Add the ghost die back in and derive the final roll total. -->

<!-- Determine if a ghost is rolled, output text, and total it all. -->
[h,if(ghost == 0): output="You rolled a ghost!"; output=""]
[h,if(ghost == 0): GDC="#FF5555"; GDC="#55FF55"]
[h: sum = sum+ghost]
You rolled <b style="background-color:#eeeeee;"> [r: listOfRolls] </b>
<b style="background-color:[r: GDC];">[t:ghost]</b> = [r: sum].
<br><b style="background-color:#FF5555;">[r:output]</b>

Display posts from previous:  Sort by  
Reply to topic  [ 1 post ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: Bing [Bot] and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman