Skip to content
Outlands Hub

Razor script

SUPER ID-Recycler-while-farming

by dennozz · 533 lines
Download

Compatibility unverified

This community Razor script has not been tested in game by the Hub. Read its setup and client requirements before use.

ver.2.05

SUPER ID-Recycler-while-farming.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/4fe6ebb5-a7aa-4119-a449-e036340480f5 for latest2# Automation by Jaseowns3## Script: SUPER ID-Recycler-while-farming4## Created by: dennozz#05#############################################6 7#SUPER ID-Recycler-while-farming ver.2.058 9#Made by @dennozz on discord. 10#Inspired/learned by other scrips in https://outlands.uorazorscripts.com/11 12#This is a recycling while farming script!13#It will recycle any item identified or unidentified that is not in your Magical Items List.14 15#You will need sewing kit, regular/container ID wand or 80 > in ID Skill16#Optional The script will look for a bag (rounded one) and will move all good items and recycled materials to the bag17 18### Changes Log ###19 20# Ver 2.05 Added new items to the recycle loop21 22#--- Auto eat arcane essences ---#23# 0 - disabled24# 1 - enabled25 26@setvar! eatArcaneEssence 127 28#--- Move materials and good items into rounded bag ---#29# 0 - disabled30# 1 - enable (need to have a rounded bag in backpack)31 32@setvar! materialsIntoBag 133 34removelist "MagicalItems"35createlist "MagicalItems"36 37# ** Add or remove magical items you want to keep to the list **38# ** Copy & Paste one line and add description of the item you are looking for **39 40#********** ADD YOUR MAGICAL ITEMS YOU WANT TO SAVE ********** 41 42pushlist "MagicalItems" "slaying"43 44pushlist "MagicalItems" "indestructible"45pushlist "MagicalItems" "invulnerability"46pushlist "MagicalItems" "supremely"47pushlist "MagicalItems" "vanquishing"48 49pushlist "MagicalItems" "fortified"50pushlist "MagicalItems" "fortification"51pushlist "MagicalItems" "exceedingly"52pushlist "MagicalItems" "power"53 54pushlist "MagicalItems" "eminently potent might"55pushlist "MagicalItems" "eminently potent force"56pushlist "MagicalItems" "surpassingly potent might"57pushlist "MagicalItems" "surpassingly potent force"58 59#-- Set your wait times depending on your ping60 61@setvar! maxwaittimeinms 70062@setvar! itemusewaittimeinms 20063 64#**********  DO NOT EDIT FROM HERE  ********** 65 66if not findtype 3997 backpack67    overhead "Sewing kit NOT found" 3468    stop69endif   70 71removetimer testTimer72createtimer testTimer73settimer testTimer 074 75setvar! deleteAllLists 076 77if deleteAllLists = 178    removelist identified_items79    removelist display_goods80    removelist recycled_items81    removelist good_items82    removelist bad_items83    overhead "All lists cleared" 6584    stop85endif86 87setvar! craftingToolGumpID 94909510188 89removelist display_goods90createlist display_goods91 92removelist loot_items93createlist loot_items94 95clearsysmsg96 97overhead "Beginning Item Recycle:" 6598 99#********** SCAN ALL ARMOR  **********  100 101sysmsg "Scanning All Armor..." 11102 103#Armor - all serials:104    while findtype 5056|5059|5060|5061|5063|5070|5074|5075|5076|5078|5085|5089|5090|5101|5103|5105|5106|5129|5131|5132|5135|5138|5139|5142|5143|5144|5146|5201|5203|5204|5205|5207|7169|7170|7173|7175|7177|7179|7181|7610|7947|31003|31004|31005|31006|31007|31008|31009|31010|31011|31012|31015|31191 backpack as itemzy105 106    getlabel itemzy itemDesc107    108    if "aspect" in itemDesc or "exceptional" in itemDesc109        #sysmsg "item not added : {{itemDesc}}" 44110    else 111        pushlist loot_items itemzy112    endif113  114    @ignore itemzy115endwhile116 117#********** SCAN ALL ARCANES, STAFF, SPELLBOOKS  **********  118 119sysmsg "Scanning Arcane Staffs, Spellbooks..." 11120 121#Arcane Staffs, Spellbook - all serials:122while findtype 31017|31019|31021|31023|31025|31027|31029|31031|31033|31035|31037|31038|31041|31043|31045|31047|31049|31051|31053|31055|3834 backpack as itemzy123   124    getlabel itemzy itemDesc125    126    if "aspect" in itemDesc or "exceptional" in itemDesc127        #sysmsg "item not added : {{itemDesc}}" 44128    else 129        pushlist loot_items itemzy130    endif131 132    @ignore itemzy133endwhile134 135#********** SCAN ALL SHIELDS & INSTRUMENTS  **********  136 137sysmsg "Scanning Shields & Instruments..." 11138 139#Instruments, Shields - all serials:140while findtype 3740|3742|3762|3763|10245|20006|20008|20010|20012|20014|20016|7026|7027|7029|7031|7033|7034|7035|7107|7109|31002|31130 backpack as itemzy141    142    getlabel itemzy itemDesc143    144    if "aspect" in itemDesc or "exceptional" in itemDesc145        #sysmsg "item not added : {{itemDesc}}" 44146    else 147        pushlist loot_items itemzy148    endif149    150    @ignore itemzy151endwhile152 153#********** SCAN ALL MELEE WEAPONS  **********  154 155sysmsg "Scanning Dexxers Weapons..." 11156 157#Archery, Fencing, Mace Fighting, Swordsmanship, Wrestling - all serials:158while findtype 3920|5042|5117|30990|30993|30994|30995|31184|31186|3719|3922|3938|5121|5123|5125|30989|30992|30996|30997|30998|31176|31188|3568|3713|3721|3932|5040|5044|5112|5127|5177|5179|5181|30991|30999|31000|31001|31014|31178|31180|31182|3909|3911|3913|3915|3917|3934|3937|5046|5049|5115|5119|5182|5185|5187|30988|31128|31190|22187|31141|31142|31172|31169 backpack as itemzy159    160    getlabel itemzy itemDesc161    162    if "aspect" in itemDesc or "exceptional" in itemDesc163        #sysmsg "item not added : {{itemDesc}}" 44164    else 165        pushlist loot_items itemzy166    endif167    168    @ignore itemzy169endwhile170 171#********** SCAN ALL DUAL THROWING WEAPONS  **********  172 173sysmsg "Scanning Throwing, Dual Weapons..." 11174 175#Throwing , dual Wielding - all serials:176while findtype "throwing star|throwing knife|chakram|hurlbat|francisca|javelin|dual wield tracker knife|dual wield rapier|dual wield sabre|duel wield katana|dual wield scimitar|dual wield norse axe" backpack as itemzy177    178    getlabel itemzy itemDesc179    180    if "aspect" in itemDesc or "exceptional" in itemDesc181        #sysmsg "item not added : {{itemDesc}}" 44182    else 183        pushlist loot_items itemzy184    endif185    186    @ignore itemzy187endwhile188 189clearignore190 191#********** START IDENTIFYING ITEMS  **********  192 193sysmsg "Identiying all items..." 11194 195removelist identified_items196createlist identified_items197 198foreach loot in loot_items199 200    if targetexists201        hotkey 'cancel current target'202    endif203    204    getlabel loot lootLabel205    206    if skill 'item identification' = 120 or findtype 20495 backpack207        pushlist identified_items loot 208        209    elseif skill 'item identification' >= 80210        if "unidentified" in lootLabel211            while "unidentified" in lootLabel212                if index != 0213                    poplist identified_items loot214                endif215                overhead "Slowly identifying with skill..." 10216                wait 1200217                skill 'itemidentification'218                waitfortarget maxwaittimeinms219                220                while not targetexists221                    skill 'itemidentification'222                    waitfortarget maxwaittimeinms223                endwhile224                225                target loot226                pushlist identified_items loot 227                getlabel loot lootLabel228            endwhile  229        else 230            pushlist identified_items loot 231        endif232        233    elseif findtype 20496 backpack as wandy234        235        if "unidentified" in lootLabel236            getlabel wandy wandDesc237        238            if "(10 uses" in wandDesc239                overhead "ID wand 10 uses left!!" 34240            elseif "(5 uses" in wandDesc241                overhead "ID wand 5 uses left!!" 34242            elseif "(1 uses" in wandDesc243                overhead "ID wand 1 use left!!" 34244            endif245                              246            dclicktype 20496 backpack247            waitfortarget itemusewaittimeinms248            249            while not targetexists and findtype 20496 backpack250                dclicktype 20496 backpack251                waitfortarget itemusewaittimeinms252            endwhile       253            254            if targetexists255                target loot256                pushlist identified_items loot    257            endif258        else 259            pushlist identified_items loot260        endif261        262    else         263        overhead "Wand ID not found" 34  264        break265    endif266 267endfor268 269#********** IF FOUND USE 120 ITEM ID OR CONTAINER WAND ID  **********  270 271if list loot_items > 0 272    if skill 'item identification' = 120273        overhead "ID with 120 skill"274        wait maxwaittimeinms275        skill 'itemidentification'276        waitfortarget maxwaittimeinms277        278        while not targetexists279            skill 'itemidentification'280            waitfortarget maxwaittimeinms281        endwhile     282        283        target backpack284        wait maxwaittimeinms  285    elseif findtype 20495 backpack286        overhead "ID with container WAND"    287        wait maxwaittimeinms288        dclicktype 20495 backpack289        waitfortarget maxwaittimeinms290        291        while not targetexists292            dclicktype 20495 backpack293            waitfortarget maxwaittimeinms294        endwhile         295        target backpack296        wait maxwaittimeinms 297    endif298endif299 300#********** SEPARATE GOOD ITEMS AND BAD ITEMS **********  301 302sysmsg "Sorting good/bad items" 11303 304removelist good_items305createlist good_items306 307removelist bad_items308createlist bad_items309 310@setvar! alertCD 800311settimer alertTimer alertCD312 313foreach i in identified_items314    if timer alertTimer > alertCD315        settimer alertTimer 0316        overhead "sorting items.." 44317    endif318    319    if i != 'x'320        @setvar! found 0321        getlabel i itemDesc  322             323        foreach keepDesc in "MagicalItems"                        324            if keepDesc in itemDesc325                @setvar! found 1326            endif             327        endfor   328        329        if 0 = found330            pushlist bad_items i  331        else 332            pushlist good_items i333            pushlist display_goods itemDesc334        endif335        336        poplist identified_items i337        pushlist identified_items 'x' front338        339    endif340    341endfor342 343removelist identified_items344 345#********** RECYCLE BAD ITEMS  **********  346 347sysmsg "Opening sewing kit..." 11348 349if not listexists recycled_items350    createlist recycled_items351endif352 353dclicktype 3997 backpack354waitforgump craftingToolGumpID maxwaittimeinms355clearsysmsg 356while not gumpexists craftingToolGumpID357    sysmsg "Opening sewing kit..." 11358    dclicktype 3997 backpack359    waitforgump craftingToolGumpID maxwaittimeinms360endwhile361 362foreach b in bad_items363    if find b backpack364        getlabel b badLabel365        if targetexists 366            hotkey 'cancel current target'367        endif368        369        @setvar! itemError 0370                371        gumpresponse 3 craftingToolGumpID372        waitfortarget maxwaittimeinms 373        target b374        wait 50375        while not ingump "you recycle" 949095101 and 0 = itemError376            if index = 50377                @setvar! itemError 1378                sysmsg "Error, item skipped" 34379                380                while not gumpexists craftingToolGumpID381                    sysmsg "Opening sewing kit..." 11382                    dclicktype 3997 backpack383                    waitforgump craftingToolGumpID maxwaittimeinms384                endwhile385            endif386            if insysmsg "that is too far"387                @setvar! itemError 1 388            endif389            if ingump "That cannot be recycled" 949095101390                getlabel b notLabel391                sysmsg "Not recycled : {{notLabel}}" 34392                @setvar! itemError 1393            endif394        endwhile395        396        if itemError = 0 397            pushlist recycled_items badLabel398        endif399   endif 400endfor401 402removelist bad_items403 404if targetexists405    hotkey 'cancel current target'406endif407gumpclose craftingToolGumpID408 409#********** MOVE GOOD ITEMS TO BAG  **********  410 411if 1 = materialsIntoBag and not findtype 3702 backpack412    sysmsg "No bag found to move good items!" 34 413else414    sysmsg "Moving good items if any..." 11415    if weight > maxweight416        sysmsg "overweight! moving items cancelled" 44 417    else 418        foreach g in good_items419    420            if g != 'x'421                if findtype 3702 backpack as myBaggy422                    while not find g myBaggy                            423                        lift g 1  424                        drop myBaggy -1 -1 0425                        wait maxwaittimeinms 426                    endwhile 427                    428                    poplist good_items g429                    pushlist good_items 'x' front 430                    sysmsg "Item saved." 55431                endif432            endif433        endfor434    endif435endif436 437removelist good_items438 439#********** MOVE RECYCLED MATERIALS TO BAG  **********  440 441sysmsg "Moving materiasl to bag..." 11442 443if weight > maxweight444    sysmsg "cancelled overweight" 44 445else 446 447    if findtype "bag" backpack as baggyz and materialsIntoBag = 1448     449        while findtype 'cut up leather' backpack any any 1 as leather450            sysmsg "moving leathers..." 6451            lift leather 1000452            drop baggyz -1 -1 0453            wait maxwaittimeinms454        endwhile455 456        while findtype 'board%s' backpack any any 1 as board457            sysmsg "moving boards..." 6458            lift board 1000459            drop baggyz -1 -1 0460            wait maxwaittimeinms461        endwhile462 463        while findtype 'iron ingot%s' backpack any any 1 as iron464            sysmsg "moving ingots..." 6465            lift iron 1000466            drop baggyz -1 -1 0467            wait maxwaittimeinms468        endwhile469 470        while findtype 'blank scroll%s%' backpack any any 1 as blankz471            sysmsg "moving scrolls..." 6472            lift blankz 1000473            drop baggyz -1 -1 0474            wait maxwaittimeinms475        endwhile476 477        if eatArcaneEssence = 0478            while findtype 3901 backpack any any 1 as arcanyz479                sysmsg "moving arcanes..." 6480                lift arcanyz 1000481                drop baggyz -1 -1 0482                wait maxwaittimeinms483            endwhile484        endif485 486    endif487endif488 489#********** DISPLAY ALL GOOD AND BAD ITEMS PROCCESED  **********  490 491if list display_goods = 0492    sysmsg "0 Good items" 55493else 494    foreach dg in display_goods495        sysmsg dg 55496    endfor497endif498 499removelist display_goods500 501if list recycled_items = 0502    sysmsg "0 recycled items" 33503else     504    foreach dr in recycled_items505        sysmsg dr 33506    endfor507endif508 509removelist recycled_items510 511hotkey 'cancel current target'512gumpclose craftingToolGumpID513 514#********** EAT ARCANE ESSENCES  **********  515 516if eatArcaneEssence = 1517    wait itemusewaittimeinms518    if findtype 3901 backpack519        sysmsg "Eating arcane.." 11520        dclicktype 3901 backpack521        waitfortarget maxwaittimeinms522        while not targetexists 523            sysmsg "Trying to eat arcane.." 11524            dclicktype 3901 backpack525            waitfortarget maxwaittimeinms526        endwhile527        waitfortarget maxwaittimeinms528        target 'self'529    endif        530endif531 532overhead "Recycle Finished!" 65533sysmsg "Time Elapse in miliseconds : {{testTimer}}" 65