So, ok, sadly trying to build a PW module today means the lone veteran on the team has to teach everyone else, and so I don't have a scripting team like I had back in the heyday! For 99% of what I need done I can copy-paste from my old PW or create using lilacsoul, but sadly I've hit a narrow but bottomless chasm that I hope someone can help me with!
The progression model for the action side of my module involves looting "unique power self only" items that enchant all of the items in one's inventory with the applicable enhancement bonus or other effect, replacing existing instances of said enhancement bonus as desired and as enabled by lilacsoul. I COULD identify the item by location, but I'd rather use tags so I can also simultaneously utilize a tag-based nodrop script I have hanging around in my old mod. Anyway, I thought I was totally fine in making this happen within my usual sphere of lack-of-knoweldge via lilacsoul, but sadly my script is stopping at only enchanting one item (the first it finds), and I really need it to check for more with one click (the activated item has a single charge) and apply to all items sharing the applicable tag (lunar_weapon).
I can do ALL of this except that check for more items. I have a feeling this is a really easy fix, but it's just beyond my (and my entire team's) reach. If someone could advise I'd really appreciate it!
I don't know the forum code for the ol "block of script" feature that the official forums had back in the day, so I'll just copy paste here. The visual effect listed in this script works fine, it's the enhancement bonus application that I'm concerned with!
PLEASE HELP! If I can get this once it's just a matter of changing really easy to find variables (I can do that) and my whole system clicks!
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625
oTarget = GetItemActivator();
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_ELECTRIC_EXPLOSION), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_ELECTRIC_EXPLOSION), GetLocation(oTarget));
oPC = GetItemActivator();
oTarget = oPC;
oItem = GetItemPossessedBy(oTarget, "lunar_weapon");
ipAdd = ItemPropertyEnhancementBonus(1);