Okay, I'm thinking this is an easy one for anyone with a clue. Sadly, that's apparently not me, as I have gone at this for four hours now.
Anyhoo ...
I simply need a ring with two dropdowns allowing attributes to be selected.
The ring gives +4 enhancement to the first attribute chosen and a -2 to the second attribute chosen.
Please advise. It will help me a great deal to see a functioning script on this with my future item additions.
I currently have this for my evalscripts, two individual scripts ...
The only issue I'm having here is that no matter what is selected in the second dropdown, the -2 applies to STR. When I remove the second script and select STR in the first dropdown, I get the expected +4.
Thank you.
Anyhoo ...
I simply need a ring with two dropdowns allowing attributes to be selected.
The ring gives +4 enhancement to the first attribute chosen and a -2 to the second attribute chosen.
Please advise. It will help me a great deal to see a functioning script on this with my future item additions.
I currently have this for my evalscripts, two individual scripts ...
Code:
~ If nothing chosen, get out now
doneif (field[usrChosen1].ischosen = 0)
~ If nothing chosen, get out now
doneif (field[usrChosen2].ischosen = 0)
if (field[gIsEquip].value <> 0) then
if (field[usrChosen1].ischosen = 1) then
#enhancementbonus[hero.child[aSTR], 4]
endif
if (field[usrChosen1].ischosen = 2) then
#enhancementbonus[hero.child[aDEX], 4]
endif
if (field[usrChosen1].ischosen = 3) then
#enhancementbonus[hero.child[aCON], 4]
endif
if (field[usrChosen1].ischosen = 4) then
#enhancementbonus[hero.child[aINT], 4]
endif
if (field[usrChosen1].ischosen = 5) then
#enhancementbonus[hero.child[aWIS], 4]
endif
if (field[usrChosen1].ischosen = 6) then
#enhancementbonus[hero.child[aCHA], 4]
endif
endif
Code:
~ If nothing chosen, get out now
doneif (field[usrChosen1].ischosen = 0)
~ If nothing chosen, get out now
doneif (field[usrChosen2].ischosen = 0)
if (field[gIsEquip].value <> 0) then
if (field[usrChosen2].ischosen = 1) then
hero.child[aSTR].field[Penalty].value -= 2
endif
if (field[usrChosen2].ischosen = 2) then
hero.child[aDEX].field[Penalty].value -= 2
endif
if (field[usrChosen2].ischosen = 3) then
hero.child[aCON].field[Penalty].value -= 2
endif
if (field[usrChosen2].ischosen = 4) then
hero.child[aINT].field[Penalty].value -= 2
endif
if (field[usrChosen2].ischosen = 5) then
hero.child[aWIS].field[Penalty].value -= 2
endif
if (field[usrChosen2].ischosen = 6) then
hero.child[aCHA].field[Penalty].value -= 2
endif
endif
The only issue I'm having here is that no matter what is selected in the second dropdown, the -2 applies to STR. When I remove the second script and select STR in the first dropdown, I get the expected +4.
Thank you.
Last edited: