• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Help with an Item

Corwyn

Active member
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
 
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.
I would recommend making this three different magic items.
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
Restrict First List to: ALL Picks on Hero

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

For item 2 & 3 you need two custom expressions. So fill out the "2nd Custom Expression" and "Restrict Second List" to the same values.

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
 
awesome bud... thanks. I was yanking my hair out trying to make it one item, was giving me all sorts of errors.
Corwyn
 
I was yanking my hair out trying to make it one item, was giving me all sorts of errors.
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. :)
 
Back
Top