Senior Member
Join Date: Oct 2016
Posts: 621
|
Not really, but I am having problems.
I am trying to code a custom weapon, an artifact, so I need to make it's own entry. The weapon, a scythe, is both keen edged and a weapon of speed, so I tried to code them into the weapon using copied code from ikeen and ispeed pre-levels/5000 var result as number result = container.parent.assign[Helper.Keen] which gives me the error Attempt to access non-existent parent pick for a top-level container from script OK, so I modified some code from a wondrous item to come up with pre-levels/5000 if (field[gIsEquip].value <> 0) then foreach pick in hero from BaseWep where "!Helper.ExtraHigh" perform eachpick.assign[Helper.ExtraHigh] nexteach foreach pick in hero from BaseWep where "!Helper.Keen" perform eachpick.assign[Helper.Keen] nexteach endif This code does what I want it just does it to everything. My question; How do I modify this code so that it adds the keen quality and speed quality to the weapon without adding it to ALL weapons? |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
perform assign[Helper.Keen] Quote:
Code:
foreach pick in hero from BaseWep where "!Helper.ExtraHigh" Taking a look at your script, it appears all you really want to do is assign the Helper.ExtraHigh tag. As above, I would forget using the script and add the tag manually. The only reason to use a script would be if the abilities required activation or could only be used a certain number of times. |
||
#2 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
Thanks mate
|
#3 |
|
|