Official ScriptUO EasyUO Scripts > Item Evaluation

TrailMyx's Item Paperdoll/Container Durability Checker

(1/2) > >>

TrailMyx:

--- Code: ---;-----------------------------------------------------------
; Script Name: TrainMyx's Item Paperdoll/Container Durability Checker
; Author: TrailMyx
; Version: 1.0
; Client Tested with: 6.0.1.6
; EUO version tested with: 1.5 118
; Shard: OSI, FS(?)
; Revision Date:  6/15/2007
; Public Release: ...
; Global Variables Used: None
; Purpose/Features:
;   . Scan paperdoll (or targeted container when you set %scan_container to #TRUE) to generate
;   a repair report.
;   . Change value of %warning_percentage to change your repair threshold
;-------------------------------------------------------

--- End code ---

baldielocks:
TM,
First, I GOTTA point out the typo in your name in the script header! :police: :laugh:
Second, I am trying to implement this sub into a project. I have

--- Code: --- gosub TM_CheckCurrentDurability
--- End code ---
in my setup loop.
I put a 0 durability item on and ran it, no notification of low durability. I put a display check in after the gosub, and got N/A as #result. I KNOW I am messing something up. :-\\

TrailMyx:
I like Trains as much as I like Trails!  So it's ok.

As for the script, you might want to put a pause at the beginning of execution and step through to see where it's going wonky.  I really have no scripting setup I can test with these days, so I'm blind and will need your eyes to see.

baldielocks:
It looks like there is no loop for the paperdoll. So it never scans it. there is mainloop one for the container. It opens the paperdoll and that is it. Would something like this work?:

--- Code: ---finditem * C_ , #charid
for #findindex 1 #findcount
{
event property #findid
[i]tm magic happens here[/i]
}
--- End code ---

TrailMyx:
That could work for sure.  Here's the sub I lifted out of the FAF that manages that horrible moment when your armor pieces start falling off and suddenly your LRC is no longer 100%.  :)


--- Code: easyuo ---;-------------------------------------------------------------------------------; %1 - percentage left from max.  CURRENT/MAX; %2 - #TRUE, display warnsub CheckItemDurability  namespace push  namespace local CID  set !temp_LPC #LPC  set #LPC 1000  set !warning_percentage %1  set !displaywarning %2  set !result #FALSE  set !warnstring  finditem * C_ , #CHARID    for #FINDINDEX 1 #FINDCNT  {    set !item #FINDID    event property !item    set !searchfor Durability , #SPC    if !searchfor in #PROPERTY    {      gosub TM_CheckMaxDurability !item      set !max #RESULT      gosub TM_CheckCurrentDurability !item      set !current #RESULT      gosub TM_GetItemName !item      if #RESULT <> #TRUE      {        set !name #RESULT        set !percent !current * 100 / !max        if !percent <= !warning_percentage        {          set !warnstring !warnstring , !name , : , #SPC , !current , / , !max , $          set !result #TRUE        }      }    }  }  if !result = #TRUE && !displaywarning = #TRUE  {    display ok Repair scan summary: , $ , $ , !warnstring  }  set #LPC !temp_LPC  set #RESULT !result  namespace popreturn #RESULT 
Called using this where the warning if 5% of maximum and will display a warning (#TRUE) and returns #TRUE if anything matches this criterion.


--- Code: easyuo ---gosub CheckItemDurability 5 #TRUE 

Navigation

[0] Message Index

[#] Next page

Go to full version