UOSteam: Property (LRC) from Self

Share your guides, how-tos, FAQs, and so forth. This is not for support -- post questions in General Discussion.
Post Reply
Vampire337
Posts: 47
Location: Cincinnati, Ohio

UOSteam: Property (LRC) from Self

Post by Vampire337 »

I guess I'll start with a general question: Is there a way to list all properties for the 'self' object? The UOSteam documentation is helpful when it wants to be, but less so when you want to see all of your options.

Failing that, how does one get at the "Lower Reagent Cost" property? My goal is to write a script that applies to multiple characters, without forcing every character to have an LRC suit on (the script can just have them grab some reagents before they recall). Apparently it isn't as simple as:

Code: Select all

if property 'Lower Reagent Cost' 'self' < 100
    //Do stuff
endif
Xionu
Posts: 99

Re: UOSteam: Property (LRC) from Self

Post by Xionu »

Vampire337 wrote: November 2nd, 2020, 3:22 pm I guess I'll start with a general question: Is there a way to list all properties for the 'self' object? The UOSteam documentation is helpful when it wants to be, but less so when you want to see all of your options.

Failing that, how does one get at the "Lower Reagent Cost" property? My goal is to write a script that applies to multiple characters, without forcing every character to have an LRC suit on (the script can just have them grab some reagents before they recall). Apparently it isn't as simple as:

Code: Select all

if property 'Lower Reagent Cost' 'self' < 100
    //Do stuff
endif
There's probably more efficient ways of doing this, but here is something that would probably work based on what you're using it for:

Code: Select all

//List for Layers of Paperdoll
@removelist 'layers'
@createlist 'layers'
@pushlist 'layers' 1
@pushlist 'layers' 2
@pushlist 'layers' 3
@pushlist 'layers' 4
@pushlist 'layers' 5
@pushlist 'layers' 6
@pushlist 'layers' 7
@pushlist 'layers' 8
@pushlist 'layers' 9
@pushlist 'layers' 10
@pushlist 'layers' 11
@pushlist 'layers' 12
@pushlist 'layers' 13
@pushlist 'layers' 14
@pushlist 'layers' 15
@pushlist 'layers' 16
@pushlist 'layers' 17
@pushlist 'layers' 18
@pushlist 'layers' 19
@pushlist 'layers' 20
//
//Create List to count LRC of each layer
@removelist 'lrc'
@createlist 'lrc'
//
//Check for each layer
for 0 to 'layers'
  if @findlayer 'self' layers[]
//
//Check LRC value of item and add that value to the list (UOSteam can only COUNT, not SUM, so you have to push 20 items, instead of 1 item with the value of 20)
    if @property 'Lower Reagent Cost' 'found' == 20
      for 20
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 19
      for 19
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 18
      for 18
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 17
      for 17
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 16
      for 16
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 15
      for 15
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 14
      for 14
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 13
      for 13
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 12
      for 12
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 11
      for 11
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 10
      for 10
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 9
      for 9
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 8
      for 8
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 7
      for 7
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 6
      for 6
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 5
      for 5
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 4
      for 4
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 3
      for 3
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 2
      for 2
        @pushlist 'lrc' 1
      endfor
    elseif @property 'Lower Reagent Cost' 'found' == 1
      for 1
        @pushlist 'lrc' 1
      endfor
    endif
  endif
endfor
//
//Count the number of items in the lrc list. return true if 100% LRC or false if less than 100%
if list 'lrc' >= 100
  sysmsg 'True'
else
sysmsg 'False'
endif
Vampire337
Posts: 47
Location: Cincinnati, Ohio

Re: UOSteam: Property (LRC) from Self

Post by Vampire337 »

I'm not in love with having to do it this way, but that is certainly effective.

Interesting method of using the number of elements in the list/array as a counter. Reminds me of a story Dad told from his days in the US Army, Vietnam-era, in Germany. There was a guy who hadn't learned much German, so when the group went to the bar off base he pointed to each person he was ordering for, and repeated "ein bier", because he didn't know how to order "a round" or how to count beyond "one beer".
Post Reply