ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Paulonius on November 13, 2009, 11:42:31 AM

Title: Question About Getting a Value From Item Property
Post by: Paulonius on November 13, 2009, 11:42:31 AM
I am working on an imbue script and I need to be able to determine the value for physical resist on an item to build a check to see if the script has successfully imbued the target.  I guess what I need is a line or two of code after an event property that will pull the number off and assign it to a variable:


Event Property %ImbueItem

Set %ImbueItemPhysicalResist [Code I can't figure out that pulls off the number after Physical Resist]

Anyone got any ideas?
Title: Re: Question About Getting a Value From Item Property
Post by: Superslayer on November 13, 2009, 01:18:55 PM
I'm gonna guess that using strings may be of use. After you event property the item, set it as the #strres and crop to your likings to get the physical resist and set that as your pre/base line for comparison. Then imbue, and check the same attributes via event property and probably compare string results.  That's what I'd do, just keep it simple and stable to start.
Title: Re: Question About Getting a Value From Item Property
Post by: cgeorgemo on November 13, 2009, 02:05:38 PM
Just check the journal to see if you've got the message you successfully imbue the item.
Why wouldn't that work?
If you are imbuing physical resist it shouldn't be any different than the script we used to make fragment's checks for success when we threw Hit Life Leech on something.
Title: Re: Question About Getting a Value From Item Property
Post by: Paulonius on November 14, 2009, 02:54:03 AM
What would be the fun in that?

It required a bit more work than I had hoped, but I figured it out.

http://www.scriptuo.com/index.php?topic=3343.0