Inn Butler Chest/Map by nulreth
# Chest & Map Butler
# Script By Nulreth
# Inspirted by Bapeths but built for Inn room use for friends to come in and use
#
# So far i put 50 maps in a chest then turned the bot on it did them all no issues
#
#
# What it does:
# - Paragon Chest Opener: Drop paragon chests into the selected container, they will be
# auto-picked up, opened, and loot sorted back into the same container
# - Map Decoder: Drop any map type into the selected container, it will be
# auto-decoded and placed back in the container, then the next map is grabbed
#
# REQUIRED SKILLS:
# 120 Lockpicking - For opening paragon chest locks
# 120 Detect Hidden - For removing paragon chest traps
# 120 Cartography - For decoding maps
#
# REQUIRED ITEMS (in backpack):
# "Lockpicks" x2
# "Trap Removal Tools" x2
# "Avarite Spyglass or higher" x3
# A Storage Shelf within 2 tiles (for tool restocking)
#
# IN GAME PARAGON CHEST MENU:
# "Continuous Lockpicking" and "Continuous Remove Trap" must be checked
#
# FULL VARIABLE RESET:
# Enter WARMODE + Open Party Menu, then run the script to wipe all memory
#
#########################################################################
# Variable Reset
if warmode and gumpexists 3527489586
gumpclose 3527489586
overhead "VARIABLE RESET..." 38
if varexist lootcontainer
@unsetvar "lootcontainer"
endif
if varexist myshelf
@unsetvar "myshelf"
endif
if varexist pushcontainer
@unsetvar "pushcontainer"
endif
overhead "MEMORY WIPED..." 38
pause 2000
endif
if not timerexists Nulbutler
createtimer Nulbutler
settimer Nulbutler 47500
elseif timer Nulbutler >= 47500
say "Daddy exist to serve thee..." 88
settimer Nulbutler 0
endif
if not timerexists Nulbutler2
createtimer Nulbutler2
settimer Nulbutler2 97500
elseif timer Nulbutler2 >= 97500
say "Daddy give me something to play with" 88
settimer Nulbutler2 0
endif
# Container Setup - Select the container to pull paragon chests and maps from
if not varexist lootcontainer
hotkey "Cancel Current Target"
hotkey "Set Last Target"
wft 1000
while targetexists
if not timerexists lootcontainerselect
createtimer lootcontainerselect
settimer lootcontainerselect 4500
elseif timer lootcontainerselect >= 4500
settimer lootcontainerselect 0
overhead "Select Loot Container" 38
endif
endwhile
@setvar "lootcontainer" lasttarget
overhead "Loot Container Set!" 69
pause 600
if timerexists lootcontainerselect
removetimer lootcontainerselect
endif
endif
# Push Container Setup - Completed maps and picked chests get moved here
if not varexist pushcontainer
hotkey "Cancel Current Target"
hotkey "Set Last Target"
wft 1000
while targetexists
if not timerexists pushcontainerselect
createtimer pushcontainerselect
settimer pushcontainerselect 4500
elseif timer pushcontainerselect >= 4500
settimer pushcontainerselect 0
overhead "Select Push Container" 38
endif
endwhile
@setvar "pushcontainer" lasttarget
overhead "Push Container Set!" 69
pause 600
if timerexists pushcontainerselect
removetimer pushcontainerselect
endif
endif
# Storage Shelf Setup - Used to restock lockpicks, drills, and spyglass
if not varexist myshelf
if findtype "storage shelf|gothic storage shelf|spring storage shelf|winter storage shelf" ground -1 -1 2 as shelf
@setvar "myshelf" shelf
else
hotkey "Cancel Current Target"
overhead "Storage Shelf not Found" 38
overhead "Manual Select..." 45
overhead "Select Backpack if none..." 45
hotkey "Set Last Target"
wft 500
while targetexists
if not timerexists lootcontainerselect
createtimer lootcontainerselect
settimer lootcontainerselect 4500
elseif timer lootcontainerselect >= 4500
settimer lootcontainerselect 0
overhead "Set Storage Shelf" 38
overhead "Select Backpack if none..." 45
endif
endwhile
getlabel lasttarget desc
if "backpack" in desc
@setvar "myshelf" lasttarget
else
@setvar "myshelf" lasttarget
overhead "Storage Shelf Set!" 69
if timerexists lootcontainerselect
settimer lootcontainerselect 4500
endif
pause 600
endif
endif
endif
# Keep container open if it is on the ground
if not timerexists lcd1 and find "lootcontainer" ground -1 -1 2
while queued
//donothing
endwhile
dclick "lootcontainer"
createtimer lcd1
endif
if timerexists lcd1 and not find "lootcontainer" ground -1 -1 2
removetimer lcd1
endif
#########################################################################
# Map Decoder
# Pulls maps one at a time from the container, fully decodes them,
# drops the decoded map back into the container, then grabs the next one
#########################################################################
if skill "Cartography" >= 120 and findtype "spyglass" backpack
if not timerexists mapdecodetimer
createtimer mapdecodetimer
settimer mapdecodetimer 5000
endif
if timer mapdecodetimer >= 5000
clearsysmsg
settimer mapdecodetimer 0
getlabel backpack ping
if findtype "spyglass" backpack as spygls
while queued
//donothing
endwhile
gumpclose 1520869851
gumpclose 3367641484
gumpclose 3473029237
gumpclose 1332805401
gumpclose 2589357942
getlabel backpack ping
// Grab map from container if not already in backpack
if findtype "Map" backpack as map
//donothing
elseif findtype "Map" "lootcontainer" as map
drop backpack
lift map
drop backpack
while queued
//donothing
endwhile
getlabel backpack ping
endif
// Decode the map
if findtype "Map" backpack as map
dclick spygls
wft 1000
target map
getlabel backpack ping
for 5000
gumpresponse 4
getlabel backpack ping
pause 200
if insysmsg "You have reached the maximum accuracy possible"
break
endif
if not findtype "spyglass" backpack
menu myshelf 1
getlabel backpack ping
dclick map
getlabel backpack ping
if not findtype "spyglass" backpack
overhead "I have no Spyglass..." 38
replay
endif
endif
endfor
// Close any open map gumps
gumpclose 1520869851
gumpclose 3367641484
gumpclose 3473029237
gumpclose 1332805401
gumpclose 2589357942
// Drop decoded map into the push container
if findtype "Map" backpack as decodedmap
drop backpack
lift decodedmap
drop pushcontainer -1 -1 0
while queued
//donothing
endwhile
getlabel backpack ping
endif
endif
endif
endif
endif
#########################################################################
# Paragon Chest Opener
# Pulls paragon chests one at a time from the container, disarms the trap,
# picks the lock, dumps loot back into the container, then grabs the next one
#########################################################################
if skill "Lockpicking" = 120 and skill "Detect" = 120 and findtype "lockpicks" backpack and findtype "drill" backpack
if not timerexists paragontimer
createtimer paragontimer
settimer paragontimer 5000
endif
if timer paragontimer >= 5000
settimer paragontimer 0
gumpclose 736038070
clearsysmsg
@clearignore
while queued
//donothing
endwhile
getlabel backpack ping
// Grab chest from container if not already in backpack
if findtype 3712|3648|3650|3708|3648|2475|3649|29833|29832 backpack as ParagonChest
//donothing
elseif findtype 3712|3648|3650|3708|3648|2475|3649|29833|29832 "lootcontainer" as ParagonChest
drop backpack
lift ParagonChest
drop backpack
while queued
//donothing
endwhile
getlabel backpack ping
if insysmsg "You cannot pick that up."
@ignore ParagonChest
endif
endif
if findtype 3712|3648|3650|3708|3648|2475|3649|29833|29832 backpack as ParagonChest
dclick ParagonChest
getlabel backpack ping
// Equip shield for trap protection if available
if not casting and findtype "Heater Shield|Chaos shield|Order shield" backpack as ParagonBlastProtection
if not findlayer self lefthand
while queued
//donothing
endwhile
dclick ParagonBlastProtection
getlabel backpack ping
endif
endif
// Disarm trap
if gumpexists 736038070 and not ingump "Cleared Of Traps" 736038070
while gumpexists 736038070
gumpresponse 7
waitforgump 736038070 1000
if insysmsg "You attempt to remove traps"
clearsysmsg
break
endif
if insysmsg "That appears to be devoid"
clearsysmsg
break
endif
endwhile
overhead "*disarming*" 1060 ParagonChest
while not dead
if not findtype "drill" backpack
menu myshelf 1
getlabel backpack ping
dclick ParagonChest
waitforgump 736038070 1000
gumpresponse 7
getlabel backpack ping
if not findtype "drill" backpack
overhead "I have no Trap Tools..." 38
replay
endif
endif
if insysmsg "You make some progress towards clearing it of traps"
overhead "*clink*" 810 ParagonChest
endif
if insysmsg "You have successfully cleared it of traps"
overhead "*tick*" 2091 ParagonChest
break
endif
if ingump "Cleared Of Traps" 736038070
overhead "*tick*" 2091 ParagonChest
break
endif
endwhile
waitforgump 736038070 1000
endif
// Pick lock
if gumpexists 736038070 and ingump "Cleared Of Traps" 736038070
while gumpexists 736038070
gumpresponse 4
waitforgump 736038070 1000
if insysmsg "You attempt to pick the lock"
clearsysmsg
break
endif
if insysmsg "It appears to be unlocked"
clearsysmsg
break
endif
endwhile
overhead "*picking*" 1060 ParagonChest
while not dead
if not findtype "lockpicks" backpack
menu myshelf 1
getlabel backpack ping
dclick ParagonChest
waitforgump 736038070 1000
gumpresponse 7
getlabel backpack ping
if not findtype "lockpicks" backpack
overhead "I have no Lockpicks..." 38
replay
endif
endif
if insysmsg "You make some progress on the lock"
overhead "*click*" 810 ParagonChest
endif
if insysmsg "You successfully pick the lock"
overhead "*pop*" 2091 ParagonChest
break
endif
endwhile
gumpclose 736038070
endif
// Drop the finished chest into the push container
drop backpack
lift ParagonChest
drop pushcontainer -1 -1 0
while queued
//donothing
endwhile
getlabel backpack ping
@ignore ParagonChest
gumpclose 736038070
endif
endif
endif
loop








