Results 1 to 1 of 1
Thread: Help with Crystal Ball syntax
-
2013-09-09, 02:28 PM (ISO 8601)
- Join Date
- Oct 2012
- Location
- Anatevka, USA
Help with Crystal Ball syntax
I'm trying to use Crystal Ball Lite to create pre-fab attack and damage rolls for my D&D 3.5 rogue. However, I'm having trouble getting the syntax correct in order to do what I want.
I'm trying to set up a button that will roll an attack, check if it's a crit, and then roll damage (including crit damage if necessary). Here's what I've got so far. Whitespace & newlines added for clarity.
Code:resultonly( ($MainAttack1$=(1d20+17+5)) IF >= 39 THEN $MainAttack1Crit$=1 "Main Attack 1 crit!" ELSE "Main Attack 1" $MainAttack1$ END); resultonly( ($MainDamage1$=(9d8+1d6+14+12)) IF $MainAttack1Crit$ == 1 THEN $MainDamage1$+(1d6+14+12) "Sneak Attack vs FF and Evil crit!" ELSE $MainDamage1$ "Sneak Attack vs FF and Evil" END);
Code:resultonly( ($MainAttack1$=(1d20+17+5)) IF >= 39 THEN $MainAttack1Crit$=1 "Main Attack 1 crit! Confirm:" $MainAttack1Confirm$=(1d20+17+5) $MainAttack1Confirm$ ELSE $MainAttack1Crit$=0 "Main Attack 1" $MainAttack1$ END); resultonly( ($MainDamage1$=(9d8+1d6+14+12)) IF $MainAttack1Crit$ == 1 THEN "Sneak Attack vs FF and Evil not confirmed:" $MainDamage1$ $MainDamage1Crit$=($MainDamage1$+1d6+14+12) "crit:" $MainDamage1Crit$ ELSE $MainDamage1$ "Sneak Attack vs FF and Evil" END);
Having written all of this out, I'm thinking that this might be easier to do in BASH than in Crystal Ball (because that allows for input, and better output formatting). I'm still a total noob at bash, so if anyone could help me write a script for that instead, then that would work too ^^Minmax + Brilliant Gameologists Thread Index
Cleric + Favoured Soul Spell Recommendations ⊰⊷ Resources ⊶⊱ Giles' Comprehensive Bonuses Character Sheet
Wands of Lesser Vigour ⊰⊷≟⊶⊱ 3.X WotC Thread Index
Cleric Quick-Builder
"Gentlemen, you can't fight in here. This is the War Room!" – Kubrick, "Dr. Strangelove"
I do still exist. I'm active on discord. Priestess of Neptune#8648