• 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

Scroll Tracking

Minous

Well-known member
I am trying to write a similar adjustment to the Equipment, Add Trackable but have it automaticlly apply to all scrolls.

I have it down to:
Code:
      ~ Set shorter live name
      field[livename].text = "Equipment, Trackable"

      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)
      
      foreach pick in hero where "gType.Scroll"
        ~ Add Gear Uses tag
        perform eachpick.assign[Helper.UsesQty]
        ~ Add Weapon Tracker tag
        perform eachpick.assign[User.Tracker]

        ~ Set tracker amount
        eachpick.field[trkMax].value += int(eachpick.field[usrSource1].value)
        nexteach

which will work if I set a fixed value for int(eachpick.field[usrSource1].value) but wont seem to work to grab the number of castings on a scroll. Anyone have any ideas for this?
 
usrSource1 isn't the right field to be looking, that stores a number which determines what state of thing the selector chooses (whether the selector picks from picks or things).

I think what you're trying to do is count the number of spells on the scroll and the number of times each spell is duplicated, right? In that case, you're going to have to nest a second foreach to go through all the spells inside the container.

Code:
        foreach pick in eachpick.gizmo from BaseSpell
          ~ count stuff
          nexteach
 
Back
Top