Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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 |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
pulltags is an order to perform an operation, not something you should test.
You want tagis[] |
#2 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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?
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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? |
#4 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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.
|
#5 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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 Last edited by mbran01; May 2nd, 2012 at 09:02 PM. Reason: solved part of the issue |
#6 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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 |
#7 |
|
|