Back to "anti-theft" tags

Anti-theft looting box by dennozz

1#Anti-theft looting box ver.2.00
2
3#********** INFORMATION **********# 
4#Made by @dennozz on discord. 
5
6#If you have any questions, suggestions or concerns please message me via discord
7#Inspired/learned by other scrips in https://outlands.uorazorscripts.com/
8    
9#IMPORTANT: You need 1 wooden box and 1 copper key (you can craft it with 50 carpentry and 50 tinkering)
10
11#This script will auto store all your loot into a wooden box and lock it.
12#This script already stores a bunch of valuable items like cores, ss, research mats, etc.
13
14#OPTIONAL : If you want to add more items modify the line code #45 and #51 -> `while findtype 1234|0000|0000` 
15    #       COPY and PASTE the item ID you wish to add to the beggining of the list
16
17#Update: ver.2.00 now stores item that are inside a `loot bag`
18
19clearignore 
20
21@setvar! maxwaittimeinms 650
22
23@setvar! messageCD 2800
24@settimer! messageTimer messageCD
25
26while weight > maxweight
27    if findtype "gold coin" backpack as gold
28        lift gold 500
29        droprelloc 0 0
30        getlabel backpack xxx
31        wait 200
32        if insysmsg "cannot drop anything"
33            drop backpack -1 -1 -1
34        endif
35        wait maxwaittimeinms
36        overhead "* gold dropped *" 55
37    endif
38endwhile
39
40if findtype 'wooden box' backpack as box
41    if findtype 'copper key' backpack as key
42
43#------ ADD more items below here ------# v
44    
45    while findtype 4025|11858|20309|37181|27612|29030|576|2472|2475|2594|2597|2744|2750|2760|2771|2778|2799|3648|3649|3650|3651|3708|3712|3735|3736|3737|3738|3827|3836|3838|3839|3842|3843|3985|4026|4248|5356|5359|5981|8826|12686|15296|15297|17087|17686|19717|22244|22336|23996|23997|24343|24434|29025|29036|29040|29832|29833|43166|43179|43206|48405|48407 box as boxItem
46        @ignore boxItem            
47    endwhile
48    
49#------ ADD more items below here ------# v
50
51        while findtype 4025|11858|20309|37181|27612|29030|576|2472|2475|2594|2597|2744|2750|2760|2771|2778|2799|3648|3649|3650|3651|3708|3712|3735|3736|3737|3738|3827|3836|3838|3839|3842|3843|3985|4026|4248|5356|5359|5981|8826|12686|15296|15297|17087|17686|19717|22244|22336|23996|23997|24343|24434|29025|29036|29040|29832|29833|43166|43179|43206|48405|48407 backpack as backpackItem
52            getlabel backpackItem backpackItemLabel
53            
54            if "blessed" in backpackItemLabel
55                #skip
56                @ignore backpackItem
57            else                              
58                while not dead 
59                    getlabel box boxLabelBefore 
60                    if "items" in boxLabelBefore
61                        break
62                    else
63                        dclick key
64                        getlabel backpack xxx
65                        wait 325
66                        target box
67                        getlabel backpack xxx
68                        wait 325
69                        overhead "[Box Opened]" 44     
70                    endif
71                endwhile
72                
73                if timer messageTimer > messageCD
74                    overhead "moving item..." 11
75                    settimer messageTimer 0
76                endif             
77                         
78                lift backpackItem 1000
79                drop box
80                getlabel backpack xxx    
81                wait maxwaittimeinms
82                
83                @ignore backpackItem
84                
85            endif
86            
87        endwhile
88
89        getlabel box boxLabel
90
91        while "items" in boxLabel
92            dclick key
93            getlabel backpack xxx
94            wait 325
95            target box
96            getlabel backpack xxx
97            wait 325 
98            getlabel box boxLabel
99        endwhile 
100
101        overhead "[Box Closed]" 65 
102    else
103        overhead "no copper key found" 34
104        wait maxwaittimeinms
105    endif
106else 
107    overhead "no wooden box found" 34
108    wait maxwaittimeinms
109endif
110
111removetimer messageTimer