Back to "tmapping" tags

Lockpicking using Restock by neverstopswing

Description: This script checks for a chest near you on the ground. This will then drop the map on the ground, invis you, pick the chest and activate Restock 10.

1@setvar PauseTime 750
2@clearsysmsg
3
4if findtype "metal chest|wooden chest" ground -1 -1 2 as LockedBox
5    @setvar 'LockCheck' 0
6    dclick LockedBox
7    if not hidden
8        cast 'Invisibility'
9        wft
10        target self
11    endif
12    pause PauseTime
13    if insysmsg 'It appears to be locked'
14        @setvar 'LockCheck' 1
15    endif
16    if 'LockCheck' = 1
17        gumpresponse 4
18        overhead 'Picking Lock..' 20
19        pause 200
20        while not insysmsg 'You successfully pick the lock.'
21            if insysmsg 'You make some progress on the lock.'
22                overhead 'Progress!' 88
23                pause 200
24                @clearsysmsg 
25            endif
26            if insysmsg 'You fail to make any progress on the lock'
27                overhead 'Failed!' 32
28                pause 200
29                @clearsysmsg 
30            endif
31        endwhile
32        overhead 'Picking Success!' 63
33    endif
34    if 'LockCheck' = 0
35        overhead 'Chest not Locked!' 32
36    endif
37    restock 10 
38    waitfortarget 
39    target LockedBox
40    pause PauseTime
41    while findtype "metal chest|wooden chest" ground -1 -1 2 as LockedBox
42        getlabel LockedBox desc2
43        if '(0 items, 0 stones)' in desc2
44            script 'recall'
45        endif
46    endwhile
47endif