Member
Join Date: Mar 2007
Posts: 53
|
I was trying to make a feat that has multiple prerequisites that are optional. Well not really optional but... well here is the feat:
Trapfinding Prerequisites: Search 4 ranks and one of the following: Craft (Trapmaking) 4 ranks, Knowledge (Architecture and engineering) 4 ranks, or Knowledge (Dungeoneering) 4 ranks. You gain the trapfinding ability that works exactly like the Rogue's Trapfinding ability. I know how to code the prereqs, but I'm having trouble with the choosing of the one of the skill prereq. I've looking in the help files, tried "or" commands in the code, and looked at d20srd.org and other data files for a similar feat or set of prerequisites but I could not find one. Help?? I did see that the Pathfinder prestige class, the Justicar, has a similar set of prerequisites, but since there doesn't see to be a data file that I can find, I'm unable to copy and paste from that. Basically I'm looking to do something like this: Code:
if (#skillranks[kKnowArcEn] >= 4) or (#skillranks[kKnowDun] >= 4) or (#skillranks[kCrafTrap] >= 4) then @valid = 1 endif |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The way I'd go about this is:
var total if (#skillranks[kKnowArcEn] >=4) then total +=1 endif repeat for dungeoneering repeat for craft trap if (total > 0) then @valid = 1 endif |
#2 |
Member
Join Date: Mar 2007
Posts: 53
|
Heh. Basically a For loop... Nice thinking :-)
|
#3 |
|
|