Back to "storage shelf" tags

Restock Storage Shelf with Trapped Pouches by oaksvirals

Description: If you rather not buy trapped pouches from a vendor, this script will help you restock! Grab normal pouches in your bag, set the variable at the top to the number of trapped pouches to make, and let it run.

1#Stand next to shelf and run.
2#Change PouchCount variable to how mnay trapped pouches you want to make.
3#Grab the same number of regular pouches that will be used to trap.
4
5@setvar! PouchCount '100'
6
7if findtype "storage shelf" ground any any 2 as my_shelf
8   overhead 'Shelf Found!' 0
9else 
10   overhead 'Must Be Near Your Storage Shelf!' 33
11   stop
12endif
13
14while counttype "pouch" backpack 38 < PouchCount
15    if counttype 3981 self < 10
16        if findtype "storage shelf" ground any any 2 as my_shelf
17        menu my_shelf 1
18        wait 1000
19        overhead 'Restocked!' 0
20        endif
21    else
22        cast 'magic trap'
23        wft 1000
24        target 'self'
25    endif
26    if mana < 15
27        while mana < 90
28           if not findbuff "actively meditating"
29            skill 'meditation'
30           endif
31        wait 1000
32        endwhile
33    endif
34endwhile
35
36if counttype "pouch" backpack 38 >= PouchCount
37    if findtype "storage shelf" ground any any 2 as my_shelf
38    menu my_shelf 0
39    wait 1000
40    target 'self'
41    pause 600
42    gumpclose
43    pause 600
44    menu my_shelf 1
45    overhead 'All Done!' 0
46    endif
47    stop
48endif