Member
Join Date: Jul 2010
Posts: 42
|
Hello everyone once again,
I'm making an item, and if it was a simple enhancement or even a one plus and one minus... however, this is an adjustable item. I got everything working but this part, which I know will be a script. Item (got everything in except for this) When chosen, must pick a mental stat, and a different stat. The first setting is a +2 bonus, second setting is a +4 bonus with a -2 to another, while the 3rd setting is a +6 bonus with a -4 to another. Any help would be greatly appreciated, Corwyn |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
1) Gives +2 to the selected mental stat. 2) Gives +4 to selected mental stat and -2 to another mental stat. 3) Gives +6 to selected mental stat and -4 to another mental stat. You will need a custom expression: Attribute.jpg Select From: - NONE - Custom Expression: Code:
component.BaseAttr & AttribCat.Mental Then the following script at like Post-Levels/10000: Code:
~ If not equipped get out now! doneif (field[gIsEquip].value = 0) ~ If nothing chosen get out now! doneif (field[usrChosen1].ischosen = 0) ~ Increase Ability score bonus field[usrChosen1].chosen.field[Bonus].value += 2 Then you would need to add the 2nd chooser to the script: Post-Levels/10000: Code:
~ If not equipped get out now! doneif (field[gIsEquip].value = 0) ~ If nothing chosen get out now! doneif (field[usrChosen1].ischosen = 0) doneif (field[usrChosen2].ischosen = 0) ~ Increase Ability score field[usrChosen1].chosen.field[Bonus].value += 4 ~ Decrease Ability score field[usrChosen1].chosen.field[Penalty].value += -2 Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#2 |
Member
Join Date: Jul 2010
Posts: 42
|
awesome bud... thanks. I was yanking my hair out trying to make it one item, was giving me all sorts of errors.
Corwyn |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
No problem. Just as an FYI you "could" make it one item by making use of the "Activation Amount" feature. But its allot of extra scripting that just does not seem worth it in this case.
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#4 |
|
|