• 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

Favored Class round II

mbran01

Well-known member
Okay, so I thought I had this working (and it does, sort of). I am working on a feat hat gives you a favored class in addition to the one you get to choose (this one is chosen between the bard, sorcerer, or wizard). The script I have will make the chosen class a favored class, but only for one level, after that it is no longer a favored class. Any help would be appreciated. Here is what I have.

Code:
       ~assign Bard as a favored class
       if (field[usrChosen1].chosen.pulltags[thingid.cBard] = 1) then
          perform hero.assign[FavClass.cBard]
          perform hero.childfound[cBard].assign[Helper.FavorClass]

       ~assign Sorcerer as a favored class
       elseif (field[usrChosen1].chosen.pulltags[thingid.cSorcerer] = 1) then
          perform hero.assign[FavClass.cSorcerer]
          perform hero.childfound[cSorcerer].assign[Helper.FavorClass]

      ~assign wizard as a favored class
      elseif (field[usrChosen1].chosen.pulltags[thingid.cWizard] = 1) then
         perform hero.assign[FavClass.cWizard]
         perform hero.childfound[cWizard].assign[Helper.FavorClass]
      endif
 
I think you said that to me before, and it got lost in some other things I was doing. I fixed the code to say tagis[]. It still only gives me the class as a favored class for one level. Any thoughts?
 
field[usrChosen1].chosen is how you go about choosing a particular item.

Have you seen any other methods of finding items?

Any searches that can find all examples of a particular thing?
 
I played around with a foreach pick in hero statement, but that didn't work (with the foreach statement it would'nt even give me the class as favored for one level). So I am basically at a loss as to where to go from here.
 
So I was hoping someone could take a look at the code below and tell me if they see any problems with it. I have tried the script in various phases and priorities. Nothing seems to work, but I don't get any validation errors when compiling. So here's hoping someone can point me in the right direction with this one.

Code:
        foreach pick in hero from BaseClass

       ~assign Bard as a favored class
       if (field[usrChosen1].chosen.tagis[thingid.cBard] <> 0) then
          perform hero.assign[FavClass.cBard]
          perform hero.childfound[cBard].assign[Helper.FavorClass]

       ~assign Sorcerer as a favored class
       elseif (field[usrChosen1].chosen.tagis[thingid.cSorcerer] <> 0) then
          perform hero.assign[FavClass.cSorcerer]
          perform hero.childfound[cSorcerer].assign[Helper.FavorClass]

      ~assign wizard as a favored class
      elseif (field[usrChosen1].chosen.tagis[thingid.cWizard] <> 0) then
         perform hero.assign[FavClass.cWizard]
         perform hero.childfound[cWizard].assign[Helper.FavorClass]
      endif
      nexteach

Edit: Well I figured out that I needed to add eachpick in place of hero.childfound[cClass], this causes all classes to become favored. Still not what I was looking for, but a step closer I think.
 
Last edited:
I think I finally cracked this nut. This seems to be working.

phase/priority (post levels/11000)

Code:
       ~ Assign bard as a favored class
       if (field[usrChosen1].chosen.tagis[thingid.cBard] <> 0) then
          foreach pick in hero from BaseClass where "thingid.cBard"
          perform hero.assign[FavClass.cBard]
          perform eachpick.assign[Helper.FavorClass]
        nexteach

       ~ Assign sorcerer as a favored class
       elseif (field[usrChosen1].chosen.tagis[thingid.cSorcerer] <> 0) then
          foreach pick in hero from BaseClass where "thingid.cSorcerer"
          perform hero.assign[FavClass.cSorcerer]
          perform eachpick.assign[Helper.FavorClass]
        nexteach

       ~ Assign wizard as a favored class
       elseif (field[usrChosen1].chosen.tagis[thingid.cWizard] <> 0) then
          foreach pick in hero from BaseClass where "thingid.cWizard"
          perform hero.assign[FavClass.cWizard]
          perform eachpick.assign[Helper.FavorClass]
        nexteach
       endif

This was a tough one for me, but I figured it out. thanks to all that helped point me in the right direction.
 
Back
Top