View Single Post
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 17th, 2023, 08:11 AM
Quote:
Originally Posted by Lord Magus View Post
Did that with the "doneif" you recommended!
Fair, but not quite what I meant. I was thinking of something even before you do a foreach loop (which the doneif I showed you wouldn't help with) or before the setfocus. Something like:

Code:
doneif (tagis[IsArmor.iMagArmor] = 0)
This would be done at the top of the script and would prevent anything from happening if this armor is being selected in the custom armor tab. Note: Not sure at what timing this would need to run, so probably something to worry about later.

Quote:
Originally Posted by Lord Magus View Post
So wouldn't that be the case on a custom magic armor or weapon, where you pick the type of armor or weapon, pick item powers, and then purchase the item after it has been defined?

The following item (weapon) power has a variable iPriceCash field value, that is set according to which type of weapon the power is added to. Granted, the script is on the power itself, not on another thing, but it is working. (EDIT: I set the price adjustment script to run at First-2550, but it seems to work if set up to First-10000)
If I understand correctly, you're adding this item power to the armor during the purchase process, and it correctly changes the armor's price? I think that makes sense. However, it's not the same thing as what you're trying to do with this armor. The process would look something like this:

Example 1 (Item Power)
1) Select Armor
2) Purchase Item Power
3) Armor Price Adjusted
4) Purchase Armor

Example 2 (Armor)
1) Select Armor
2) Purchase Item Power
3) Item Power Price Adjusted
4) Purchase Armor
Sendric is offline   #16 Reply With Quote