Skip to content
Outlands Hub

Razor script

Open Dungeon Chest or Treasure Map Chest

by Jaseowns · 184 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.

Opens and loots chest without needing to be hidden

Open Dungeon Chest or Treasure Map Chest.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/c773a6ca-7a04-4c55-9d30-103f423fb389 for latest2# Automation by Jaseowns3## Script: Open Dungeon Chest or Treasure Map Chest4## Created by: Jaseowns#66945#############################################6 7# Open Chest or TMap by Jaseowns8# UO Outlands - uorazorscripts.com9# Credit: based on Auto Dungeon or TMap Chest by @FewUnderstandThis10# Description: Opens and loots chest without needing to be hidden11 12clearsysmsg13unsetvar chest14setvar! locked 015setvar! trapped 016 17# Create loot list18if not listexists 'lootTypes'19    overhead 'Compiling list...' 115020    createlist 'lootTypes'21    # Gold22    pushlist 'lootTypes' 0xeed23    # Chain Link24    pushlist 'lootTypes' 0xa8c625    # MCD26    pushlist 'lootTypes' 0x42bf27    # Mastery Scroll28    pushlist 'lootTypes' 0x227a29    # Aspect Extract30    pushlist 'lootTypes' 0xefc31    # Aspect Core32    pushlist 'lootTypes' 0xf9133    # Skill Orb34    pushlist 'lootTypes' 0x574035    # Skill Scroll36    pushlist 'lootTypes' 0xef337    # Research Mats38    pushlist 'lootTypes' 0x72a439    # Tmap40    pushlist 'lootTypes' 0x14ec41    42    # Black Pearl43    pushlist 'lootTypes' 0xf7a44    # Blood Moss45    pushlist 'lootTypes' 0xf7b46    # Mandrake Root47    pushlist 'lootTypes' 0xf8648    # Garlic49    pushlist 'lootTypes' 0xf8450    # Ginseng51    pushlist 'lootTypes' 0xf8552    # Nightshade53    pushlist 'lootTypes' 0xf8854    # Spiders Silk55    pushlist 'lootTypes' 0xf8d56    # Sulphurous Ash57    pushlist 'lootTypes' 0xf8c58    59    # Amber60    pushlist 'lootTypes' 0xf2561    # Amethyst62    pushlist 'lootTypes' 0xf1663    # Citrine64    pushlist 'lootTypes' 0xf1565    # Diamond66    pushlist 'lootTypes' 0xf2667    # Emerald68    pushlist 'lootTypes' 0xf1069    # Ruby70    pushlist 'lootTypes' 0xf1371    # Sapphire72    pushlist 'lootTypes' 0xf1973    # Star Sapphire74    pushlist 'lootTypes' 0xf2175    # Tourmaline76    pushlist 'lootTypes' 0xf2d77    78    # Magic spellbook79    pushlist 'lootTypes' 0xefa80    81    # Arrows82    pushlist 'lootTypes' 0xf3f83    # Bandages84    pushlist 'lootTypes' 0xe2185    # Bolts86    pushlist 'lootTypes' 0x1bfb87endif88 89# Set loot bag90if not find lootBag backpack91    overhead 'Set Loot Bag:' 115092    setvar! lootBag93    wait 25094endif95 96# Look for chest97if findtype 'metal chest' ground any any 2 as metalChest98    setvar! chest metalChest99elseif findtype 'wooden chest' ground any any 2 as woodenChest100    setvar! chest woodenChest101endif102getlabel chest chestLabel103wait 100104if 'dungeon chest' in chestLabel or 'treasure map chest' in chestLabel105    overhead chestLabel 1150106else107    overhead 'No chest found!' 38108    stop109endif110 111# Open chest112dclick chest113waitforgump 736038070 500114if gumpexists 736038070115    setvar! locked 1116    setvar! trapped 1117else118    overhead 'Chest not locked!' 38119    overhead 'Target chest to continue looting:' 38120    setvar chest121endif122 123# Remove trap124while trapped = 1125    gumpresponse 7126    wait 250127    if insysmsg 'cleared it of traps' or insysmsg 'devoid of traps'128        overhead 'Trap removed!' 1150129        setvar! trapped 0130        break131    elseif insysmsg 'attempt to remove traps'132        overhead 'Removing trap...' 1150133        for 15134            if insysmsg 'cleared it of traps' or insysmsg 'devoid of traps'135                break136            else137                wait 250138            endif139        endfor140    else141        overhead 'Check Script!' 38142        wait 250143    endif144endwhile145wait 250146 147# Pick lock148while locked = 1149    gumpresponse 4150    wait 250151    if not gumpexists 736038070 or insysmsg 'successfully pick the lock'152        overhead 'Lock picked!' 1150153        setvar! locked 0154        break155    elseif insysmsg 'attempt to pick the lock'156        overhead 'Picking lock...' 1150157        for 15158            if insysmsg 'successfully pick the lock'159                break160            else161                wait 250162            endif163        endfor164    else165        overhead 'Check Script!' 38166        wait 250167    endif168endwhile169wait 250170 171# Loot172overhead 'Looting...' 1150173foreach t in 'lootTypes'174    while findtype t chest as loot175        getlabel loot lootLabel176        overhead lootLabel 1150177        lift loot 60000178        drop lootBag -1 -1 -1179        wait 500180    endwhile181endfor182 183unsetvar chest184overhead 'Script Complete!' 1150