View Single Post
asvaldson
Senior Member
 
Join Date: Mar 2010
Posts: 184

Old August 8th, 2010, 04:52 PM
I think that part of the problem I'm running into, is that I don't know what language the code is supposed to be in. I took 2 years of High School Programming, which was Microsoft Quick Basic, and 1 semester of college programming, which was C+, and that was 10 years ago. I familiar with the theory of coding, but NOT the details. That's like knowing that there are nouns, verbs, and adjectives in a language, but not knowing the words or the order they are supposed to be in lol.

If someone could tell me what I should study on, to familiarize myself with the format, I can at least feel a little more comfortable.


Anyway, I snatched the Eval Script from Monk's Unarmed Strike, and then edited it for the feat, and this is the script I came up with.

Quote:
if (field[xIndex].value <= 1) then
field[listname].text = "Unarmed Strike 1d4"
elseif (field[xIndex].value = 2) then
field[listname].text = "Unarmed Strike 1d6"
elseif (field[xIndex].value = 3) then
field[listname].text = "Unarmed Strike 1d8"
elseif (field[xIndex].value = 4) then
field[listname].text = "Unarmed Strike 1d10"
elseif (field[xIndex].value = 5) then
field[listname].text = "Unarmed Strike 2d6"
endif

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

~ Get our unarmed strike pick, delete the damage tag from it, and assign
~ a new damage tag.
var dice as string
perform hero.child[wUnarmed].delete[wMain.?]
if (field[xAllLev].value < 4) then
perform hero.child[wUnarmed].assign[wMain.1d4_5]
dice = "1d4"
elseif (field[xAllLev].value < 8) then
perform hero.child[wUnarmed].assign[wMain.1d6_6]
dice = "1d8"
elseif (field[xAllLev].value < 12) then
perform hero.child[wUnarmed].assign[wMain.1d8_304]
dice = "1d10"
elseif (field[xAllLev].value < 16) then
perform hero.child[wUnarmed].assign[wMain.1d10_104]
dice = "2d6"
elseif (field[xAllLev].value < 20) then
perform hero.child[wUnarmed].assign[wMain.2d6_204]
dice = "2d8"
endif
field[livename].text = field[name].text & " (" & dice & ")"
It errors out when I test it, my theory is that when I changed the ELSEIF statements, when it assigns to [wMain.#d#_###], the part after the underline needs to be altered too, but I don't know what it is refering to. For instance, I changed

Quote:
if (field[xAllLev].value < 4) then
perform hero.child[wUnarmed].assign[wMain.1d6_5]
to

Quote:
if (field[xAllLev].value < 4) then
perform hero.child[wUnarmed].assign[wMain.1d4_5]
asvaldson is offline   #4 Reply With Quote