I'm taking an original macro that is based on a (quite houseruled) Pathfinder campaign, which is a simple two-weapon fighting attack. It currently works as thus:
Code: Select all
[h: result = input("man|ginsus|Action",
"target|guy|Target",
"mod|2|Modifier",
"dmod|1|DamageMod",
"wep|Cold Iron Short Sword|Weapon",
"wep2|Mithril Shortsword|Weapon",
"dice|1|Dice",
"sides|6|Sides",
"sides2|6|Sides",
"SPB|Slashing|SPB?",
"threat|19|MinThreat",
"Mult|2|Multiplier")]
[r:getName()] [r:man] [r:target] with her [r:wep]!
<br>
[hit = 1d20+BAB+dex+mod+size-2] to hit, [r:dice]d[r:sides]+[r:dex+dmod]=[t: roll(dice, sides)+dex+dmod] [r:SPB] damage<br>
[if (hit >= threat+BAB+dex+mod+size), code:
{
[1d20+BAB+dex+mod+size-2]
to confirm potential critical for
[WHILE(Mult>1), Code:
{
[roll(dice, sides)+dex+dmod]
additional
[r:SPB]
damage
[h:Mult = Mult-1]
}]
};
{
}]
<br>
[r:getName()] [r:man] [r:target] with her [r:wep2]!
<br>
[hit = 1d20+BAB+dex+mod+size-2] to hit, [r:dice]d[r:sides2]+1/2dex+[r:dmod]=[t: roll(dice, sides2)+3+dmod] [r:SPB] damage<br>
[if (hit >= threat+BAB+dex+mod+size), code:
{
[1d20+BAB+dex+mod+size-2]
to confirm potential critical for
[WHILE(Mult>1), Code:
{
[roll(dice, sides2)+3+dmod]
additional
[r:SPB]
damage
[h:Mult = Mult-1]
}]
};
{
}]
Code: Select all
[h: result = input("man|ginsus|Action",
"target|guy|Target",
"mod|2|Modifier",
"dmod|1|DamageMod",
"wep|Cold Iron Short Sword|Weapon",
"wep2|Mithril Shortsword|Weapon",
"dice|1|Dice",
"sides|6|Sides",
"sides2|6|Sides",
"SPB|Slashing|SPB?",
"threat|19|MinThreat",
"Mult|2|Multiplier",
"haste|0|Haste?|check",
"flank|0|Flanking?|check",
"donkey|0|Sneak Attack?|check",
"invis|0|Invisible?|check")]
[h,if(flank == 1): flanking=2, flanking=0]
[h,if(invis == 1): stealth=2, stealth=0]
[h,if(donkey == 1): sneakattack=2d6, sneakattack=0]
[r:getName()] [r:man] [r:target] with her [r:wep]!
<br>
[hit = 1d20+BAB+dex+mod+size-2+haste+flanking+stealth] to hit, [r:dice]d[r:sides]+[r:dex+dmod]+[r:sneakattack]=[t: roll(dice, sides)+dex+dmod+sneakattack] [r:SPB] damage<br>
[if (hit >= threat+BAB+dex+mod+size), code:
{
[1d20+BAB+dex+mod+size-2+haste+flanking+stealth]
to confirm potential critical for
[WHILE(Mult>1), Code:
{
[roll(dice, sides)+dex+dmod]
additional
[r:SPB]
damage
[h:Mult = Mult-1]
}]
};
{
}]
<br>
[r:getName()] [r:man] [r:target] with her [r:wep2]!
<br>
[hit = 1d20+BAB+dex+mod+size-2+haste+flanking+stealth] to hit, [r:dice]d[r:sides2]+1/2dex+[r:dmod]+[r:sneakattack]=[t: roll(dice, sides2)+3+dmod+sneakattack] [r:SPB] damage<br>
[if (hit >= threat+BAB+dex+mod+size), code:
{
[1d20+BAB+dex+mod+size-2+haste+flanking+stealth]
to confirm potential critical for
[WHILE(Mult>1), Code:
{
[roll(dice, sides2)+3+dmod]
additional
[r:SPB]
damage
[h:Mult = Mult-1]
}]
};
{
}]
-if Haste is checked, it adds +1 to the attack roll (I would also like it to duplicate the first attack, but that can wait until later)
-if Flanking is checked, it adds +2 to the attack roll.
-if Sneak Attack is checked, I want it to add +2d6 to the damage code (but not be multiplied, obviously)
-if Invisible is checked, I want it to add +2 to the attack roll
Currently it ALMOST works. If I check everything off, it all 'works properly', (except for Sneak Attack, because I don't know how to implement the die rolls properly, currently it just rolls 2d6 and assigns the value to variable sneakattack which then gets added to both attacks, which is not how sneak attack normally works) but if I leave things unchecked, it brings up a prompt for each checkbox asking for a variable, even though I've tried telling it that if the boxes aren't checked, the variable is 0.
Advice or help would be appreciated. Thanks for your time.