jkthomsen9
Well-known member
I am trying to input a class special that either rally his crew or gain sneek attack damage based on a choice made at 2nd level. I can not seem to get the sneek attack to work right in a script. I know that Assassin just boot straps it with level tag, but I dont think that will work here as I need a custom ability tag active to activate the sneek attack. This is a modifyed script from LawfulG that I am using. The part I am having trouble with is in red. Thank you in advanced.
James
var level as number
level = field[xTotalLev].value
var duration as number
duration = field[xTotalLev].value
var bonus as number
if (level >= 7) then
bonus = 2
else
bonus = 1
endif
var charges as number
if (level >= 7) then
charges = 2
else
charges = 1
endif
var sneak as number
if (level >= 7) then
sneak = 2
elseif (level >= 3) then
sneak = 1
else
sneak = 0
endif
if (hero.pickexists[cDPiHonRep] <> 0) then
field[livename].text = "Rally the Crew"
field[abSumm].text = "" & charges & "/day, free, give allies +" & bonus & " morale bon to att, dam & charm/fear for " & duration & " min."
field[CustDesc].text = "Starting at 3rd level, an honorable dread pirate can inspire his allies (including himself) to great bravery in combat once per day. This inspiration grants them a +1 morale bonus on saving throws against charm and fear effects and a +1 morale bonus on attack rolls and weapon damage rolls. To be affected, an ally must be able to see or hear the dread pirate. The effect requires a free action to activate and lasts for 1 minute per class level, even if the dread pirate moves out of range or loses consciousness. This is a mind-affecting ability.{br}{br}At 7th level, a dread pirate can use this ability twice per day, and the bonus increases to +2.{br}{br}If a dread pirate has the inspire courage bardic music ability, he can add the morale bonus gained from that ability to the morale bonus gained from this ability to determine the total morale bonus granted. For example, an 8th-level bard/3rd-level dread pirate would provide a +3 morale bonus on attack rolls and weapon damage rolls."
if (field[xTotalLev].value >= 3) then
perform assign[Helper.ShowCharge]
field[trkMax].value += 1
endif
elseif (hero.pickexists[cDPiDisRep] <> 0) then
perform delete[Helper.ShowSpec]
hero.child[cSneakAtt].field[Value].value += sneak
if (sneak = 0) then
field[livename].text = "Sneak Attack +1d6"
field[abSumm].text = "+1d6 to your Sneak Attack damage."
elseif (sneak <> 0) then
field[livename].text = "Sneak Attack +" & sneak & "d6"
field[abSumm].text = "+" & sneak & "d6 to your Sneak Attack damage."
endif
field[CustDesc].text = "Beginning at 3rd level, a dishonorable dread pirate deals an extra 1d6 points of damage when flanking an opponent or at any time when the target would be denied its Dexterity bonus. This extra damage applies to ranged attacks only if the target is within 30 feet. See the rogue class feature, page 68 of the Core Rule Book. The amount of extra damage dealt increases to 2d6 at 7th level. If a dishonorable dread pirate gets a sneak attack bonus from another source (such as levels of rogue), the bonuses on damage stack."
endif
James
var level as number
level = field[xTotalLev].value
var duration as number
duration = field[xTotalLev].value
var bonus as number
if (level >= 7) then
bonus = 2
else
bonus = 1
endif
var charges as number
if (level >= 7) then
charges = 2
else
charges = 1
endif
var sneak as number
if (level >= 7) then
sneak = 2
elseif (level >= 3) then
sneak = 1
else
sneak = 0
endif
if (hero.pickexists[cDPiHonRep] <> 0) then
field[livename].text = "Rally the Crew"
field[abSumm].text = "" & charges & "/day, free, give allies +" & bonus & " morale bon to att, dam & charm/fear for " & duration & " min."
field[CustDesc].text = "Starting at 3rd level, an honorable dread pirate can inspire his allies (including himself) to great bravery in combat once per day. This inspiration grants them a +1 morale bonus on saving throws against charm and fear effects and a +1 morale bonus on attack rolls and weapon damage rolls. To be affected, an ally must be able to see or hear the dread pirate. The effect requires a free action to activate and lasts for 1 minute per class level, even if the dread pirate moves out of range or loses consciousness. This is a mind-affecting ability.{br}{br}At 7th level, a dread pirate can use this ability twice per day, and the bonus increases to +2.{br}{br}If a dread pirate has the inspire courage bardic music ability, he can add the morale bonus gained from that ability to the morale bonus gained from this ability to determine the total morale bonus granted. For example, an 8th-level bard/3rd-level dread pirate would provide a +3 morale bonus on attack rolls and weapon damage rolls."
if (field[xTotalLev].value >= 3) then
perform assign[Helper.ShowCharge]
field[trkMax].value += 1
endif
elseif (hero.pickexists[cDPiDisRep] <> 0) then
perform delete[Helper.ShowSpec]
hero.child[cSneakAtt].field[Value].value += sneak
if (sneak = 0) then
field[livename].text = "Sneak Attack +1d6"
field[abSumm].text = "+1d6 to your Sneak Attack damage."
elseif (sneak <> 0) then
field[livename].text = "Sneak Attack +" & sneak & "d6"
field[abSumm].text = "+" & sneak & "d6 to your Sneak Attack damage."
endif
field[CustDesc].text = "Beginning at 3rd level, a dishonorable dread pirate deals an extra 1d6 points of damage when flanking an opponent or at any time when the target would be denied its Dexterity bonus. This extra damage applies to ranged attacks only if the target is within 30 feet. See the rogue class feature, page 68 of the Core Rule Book. The amount of extra damage dealt increases to 2d6 at 7th level. If a dishonorable dread pirate gets a sneak attack bonus from another source (such as levels of rogue), the bonuses on damage stack."
endif
Last edited: