;================================== ; Script Name: ArmorList ; Author: Amdir ; Version: 1.00 ; Client Tested with: 6.0.1.10 ; EUO version tested with: 1.5.123 ; Shard OSI / FS: UODreams ; Revision Date: August 24, 2007 ; Public Release: August 24, 2007 ; Purpose: List all armor (for type) in a bag ; Copyright: 2007 Amdir ;================================== set %file armor.txt ; filename set %scriptDir Scripts\ ; specificare in che dir e' serial.txt (ignorare se nella stessa dir di euox.exe set %hotkey F12 ; tasto per far partire lo script ;================================== call serial.txt test if #result <> #true { call %scriptDir , serial.txt test if #result <> #true { display ok serial.txt not present! halt } } else { set %scriptDir } loop: wait 1 OnHotKey %hotkey goto start goto loop start: set %titolo 1 set #LTARGETID X set #TARGCURS 1 set #LTARGETKIND 1 event sysmessage Target the armor's container loopbag: wait 1 if #LTARGETID = X goto loopbag set %bag #LTARGETID set #LOBJECTID %bag event macro 17 set #LTARGETID X set #TARGCURS 1 set #LTARGETKIND 1 event sysmessage Target the armor's type loopobject: wait 1 if #LTARGETID = X goto loopobject finditem #LTARGETID C_ , %bag set %object #FINDTYPE loopfind: finditem %object C_ , %bag if #FINDKIND = -1 { event sysmessage Done! goto loop } event Property #FindId set %stringa #Property set %props ( , #spc strloop: str pos %stringa $ if #StrRes = 0 || #StrRes = N/A goto end set %pos #StrRes - 1 set #StrRes %pos str left %stringa %pos if %titolo = 1 { EXECUTE CMD /C ECHO #strRes >> %file set %titolo 0 goto skip } if INSURED in #strRes goto skip if EXCEPTIONAL in #strRes goto skip if WEIGHT in #strRes goto skip if LEATHER in #strRes goto skip if CRAFTED in #strRes goto skip if DURABILITY in #strRes goto skip if STRENGTH , #spc , REQUIREMENT in #strRes goto skip if PHYSICAL , #spc , RESIST in #StrRes { gosub resist set %physical #strres goto skip } if fire , #spc , RESIST in #StrRes { gosub resist set %fire #strRes goto skip } if cold , #spc , RESIST in #StrRes { gosub resist set %cold #strRes goto skip } if poison , #spc , RESIST in #StrRes { gosub resist set %poison #strRes goto skip } if energy , #spc , RESIST in #StrRes { gosub resist set %energy #strRes goto skip } set %props %props , #strRes set %props %props , #spc , - , #spc skip: set %pos %pos + 1 str del %stringa 1 %pos set %stringa #StrRes goto strloop end: set %totale %physical + %fire + %cold + %poison + %energy set %put %totale , : , #spc gosub len %physical gosub len %fire gosub len %cold gosub len %poison gosub len %energy call %scriptDir , serial.txt serial #FindId set %put %put , #spc , #spc , [ , #result , ] , #spc , #spc str len %props set %Edel #strRes set %Sdel #strRes - 2 str del %props %Sdel %Edel set %props #strRes , #spc , ) set %put %put , %props EXECUTE CMD /C ECHO %put >> %file ignoreitem #FINDID goto loopfind sub resist set %ress #StrRes str pos %ress t set %start #strRes + 2 str mid %ress %start 3 set %ress #StrRes str pos %ress % str del %ress #strRes 1 return sub len str len %1 if #strRes = 1 set %put %put , #spc , #spc , %1 else set %put %put , #spc , %1 return