• 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

PF: How to Make two Items Stack???

Trueshots

Member
Ok I have 2 classes which both get Ki Pools. These are allowed to stack but the editor is not allowing me to do it. Could some one share how I should go about that?
Also I need Ki Pool based on CHA and not WIS

Thanks
 
To Make this easier for you guys Ive copied the scrip, can you just tell me what to change to make it CHA based and for it to stack with other Ki Pool. Thanks

Script #1

~ if we're not the first copy, forward our use attribute tag on to the
~ first copy
if (tagis[Helper.FirstCopy] = 0) then
perform hero.child[cMnkKiPool].pushtags[UseAttr.?]
endif

Script #2

~ only run the rest for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ if the use this attribute tag is missing, assume Wisdom
if (tagunique[UseAttr.?] = 0) then
perform assign[UseAttr.aWIS]

~ if we've only been told there's one attribute to choose from, we'll just
~ use that attribute
elseif (tagunique[UseAttr.?] = 1) then
~ do nothing

~ search through all the attributes we have tags for, filling each one
~ into the next slot of the array-based menu
else
~ if we're using the menu, we don't want the choice to show up in the
~ livename
perform assign[User.NoAutoName]

var i as number
i = 0
foreach pick in hero from BaseAttr where tagids[UseAttr.?,"|"]
field[usrArray].arraytext = eachpick.field[name].text
i += 1
nexteach
endif

Script #3

~ only run the rest for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ our maximum uses is 1/2 our monk level + WIS bonus
var bonus as number
bonus = field[xAllLev].value /2
field[abValue].value = round(bonus,0,-1)
field[trkMax].value += field[abValue].value

~ if we only have one attribute to use, use that
if (tagunique[UseAttr.?] = 1) then
field[trkMax].value += hero.findchild[BaseAttr,tagids[UseAttr.?]].field[aModBonus].value
field[abSumm].text = "You have a ki pool equal to 1/2 your monk level + your " & tagnames[UseAttr.?] & " modifier."
else
~ otherwise, take the text selected by the user, and use that to find
~ the matching attribute
foreach pick in hero from BaseAttr
if (compare(eachpick.field[name].text,field[usrSelect].text) = 0) then
field[trkMax].value += eachpick.field[aModBonus].value
field[abSumm].text = "You have a ki pool equal to 1/2 your monk level + your " & eachpick.field[name].text & " modifier."
endif
nexteach
endif

~ if we're not at 4th level yet (which would happen for a 3rd level
~ drunken master), zero out our Ki pool
if (#levelcount[Monk] < 4) then
if (#levelcount[Ninja] < 2) then
if (#levelcount[ChampIror] < 2) then
field[trkMax].value -= field[abValue].value + hero.child[aWIS].field[aModBonus].value
endif
endif
endif
 
Change UseAttr.aWIS

To UseAttr.aCHA

And any other aWIS instances to aCHA to use charisma instead.
 
Last edited:
My guess, you might try this script:



~ only run the rest for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

field[abValue].value += round(field[xAllLev].value/2, 0, -1)

if (hero.haschild[BaseClSpec,"thingid.cMnkKiPool"] <> 0) then
#trkmax[cMnkKiPool] += field[abValue].value
perform hero.child[cMnkKiPool].assign[UseAttr.aCHA]
perform hero.child[cMnkKiPool].assign[Helper.ShowSpec]
perform assign[Helper.SpecUp]
else
field[trkMax].value += field[abValue].value + hero.child[aCHA].field[aBonus].value
endif


I tried it and it seems to work ok
 
Back
Top