View Single Post
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 383

Old November 5th, 2020, 04:13 AM
Here is the script. I just copied from Mathias post and modified it.

Code:
var crit as number
 
if (tagcount[wCritMin.?] > 0) then
  crit = field[chosen].chosen.tagmin[wCritMin.?]
else
  done
  endif
 
~now, we'll subtract one from the value we looked up:
 
crit -= 1
 
~and create a tag for that new value:
 
var newcrittag as string
newcrittag = "wCritMin." & crit
 
~Weapons are assumed to have exactly one wCritMin tag,
~so we'll delete anything that already exists,
~and then assign the new tag:
 
perform field[chosen].chosen.delete[wCritMin.?]
perform field[chosen].chosen.assignstr[newcrittag]
Provos is offline   #15 Reply With Quote