Auto reagents splitter by dennozz
#Auto reagents splitter ver.1.18
#********** INFORMATION **********#
#Made by @dennozz12 on discord.
#Inspired/learned by other scrips in https://outlands.uorazorscripts.com/
#Split your reagents and recall scrolls into groups to prevent thiefs from stealing all at once
#********** SET YOUR SETTINGS **********#
#--- Set auto select bag ---#
# 0 - will let you pick the bag
# 1 - will auto select in order : satchel > pouch > backpack bag > rounded bag > main backpack
@setvar! autoSelectBag 0
#********** DO NOT EDIT FROM HERE UNLESS YOU KNOW HOW TO SCRIPT **********#
clearignore
@setvar! amount 0
@setvar! myBag 0
@setvar! maxwaittimeinms 650
if autoSelectBag = 1
if findtype 30765 self as b
@setvar! myBag b
elseif findtype 3705 self as b
@setvar! myBag b
elseif findtype 3701 self as b
@setvar! myBag b
elseif findtype 3702 self as b
@setvar! myBag b
else
@setvar! myBag backpack
endif
else
clearsysmsg
overhead "Select bag:" 68
@setvar! myBag
wait 200
while not targetexists and not insysmsg "Select"
@setvar! myBag
endwhile
if find myBag self
getlabel myBag bagLabel
if "wizard's satchel" in bagLabel or "pouch" in bagLabel or "bag" in bagLabel or "backpack" in bagLabel
sysmsg "new bag set" 55
else
@setvar! myBag 0
overhead "That is not a bag" 34
sysmsg "That is not a bag" 34
stop
endif
else
overhead "No bag found!" 34
stop
endif
endif
overhead "Splitter Begin.." 55
#***** SPIDER SILK 3981 *****
@setvar! regsID 3981
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting silks.." 0
if index = 0
lift regs amount
drop myBag 44 65 0
elseif index = 1
lift regs amount
drop myBag 68 65 0
elseif index = 2
lift regs amount
drop myBag 96 65 0
elseif index = 3
lift regs amount
drop myBag 121 65 0
else
lift regs amount
drop myBag 142 65 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** BLACK PEARL 3962 *****
@setvar! regsID 3962
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting pearls.." 11
if index = 0
lift regs amount
drop myBag 44 65 0
elseif index = 1
lift regs amount
drop myBag 68 65 0
elseif index = 2
lift regs amount
drop myBag 96 65 0
elseif index = 3
lift regs amount
drop myBag 121 65 0
else
lift regs amount
drop myBag 142 65 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** NIGHTSHADE 3976 *****
@setvar! regsID 3976
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting shades.." 66
if index = 0
lift regs amount
drop myBag 44 88 0
elseif index = 1
lift regs amount
drop myBag 68 88 0
elseif index = 2
lift regs amount
drop myBag 96 88 0
elseif index = 3
lift regs amount
drop myBag 121 88 0
else
lift regs amount
drop myBag 142 88 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** MANDRAKE ROOT 3974 *****
@setvar! regsID 3974
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting roots.." 439
if index = 0
lift regs amount
drop myBag 44 88 0
elseif index = 1
lift regs amount
drop myBag 68 88 0
elseif index = 2
lift regs amount
drop myBag 96 88 0
elseif index = 3
lift regs amount
drop myBag 121 88 0
else
lift regs amount
drop myBag 142 88 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** SULFUROUS ASH 3980 *****
@setvar! regsID 3980
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting ashes.." 56
if index = 0
lift regs amount
drop myBag 44 112 0
elseif index = 1
lift regs amount
drop myBag 68 112 0
elseif index = 2
lift regs amount
drop myBag 96 112 0
elseif index = 3
lift regs amount
drop myBag 121 112 0
else
lift regs amount
drop myBag 142 112 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** GINSENG 3973 *****
@setvar! regsID 3973
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting gings.." 149
if index = 0
lift regs amount
drop myBag 44 112 0
elseif index = 1
lift regs amount
drop myBag 68 112 0
elseif index = 2
lift regs amount
drop myBag 96 112 0
elseif index = 3
lift regs amount
drop myBag 121 112 0
else
lift regs amount
drop myBag 142 112 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** BLOSSMOSS 3963 *****
@setvar! regsID 3963
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting bloods.." 35
if index = 0
lift regs amount
drop myBag 44 130 0
elseif index = 1
lift regs amount
drop myBag 68 130 0
elseif index = 2
lift regs amount
drop myBag 96 130 0
elseif index = 3
lift regs amount
drop myBag 121 130 0
else
lift regs amount
drop myBag 142 130 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** GARILIC 3972 *****
@setvar! regsID 3972
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 50
@setvar! amount 10
elseif counttype regsID self <= 100
@setvar! amount 20
elseif counttype regsID self <= 150
@setvar! amount 30
elseif counttype regsID self <= 200
@setvar! amount 40
else
@setvar! amount 50
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting garlics.." 910
if index = 0
lift regs amount
drop myBag 44 130 0
elseif index = 1
lift regs amount
drop myBag 68 130 0
elseif index = 2
lift regs amount
drop myBag 96 130 0
elseif index = 3
lift regs amount
drop myBag 121 130 0
else
lift regs amount
drop myBag 142 130 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
#***** RECALL SCROLL 8012 *****
@setvar! regsID 8012
@setvar! myCounter 0
while findtype regsID self as r
@setvar! myCounter index
@ignore r
endwhile
@clearignore
if counttype regsID self <= 5
@setvar! amount 1
elseif counttype regsID self <= 10
@setvar! amount 2
elseif counttype regsID self <= 20
@setvar! amount 4
elseif counttype regsID self <= 40
@setvar! amount 8
else
@setvar! amount 15
endif
while findtype regsID self as regs
@setvar! moveRegs 0
if myCounter = 0
@setvar! moveRegs 1
elseif myCounter != 0 and not find regs myBag
@setvar! moveRegs 1
endif
if moveRegs = 1
overhead "splitting scrolls.." 0
if index = 0
lift regs amount
drop myBag 44 88 0
elseif index = 1
lift regs amount
drop myBag 68 88 0
elseif index = 2
lift regs amount
drop myBag 96 88 0
elseif index = 3
lift regs amount
drop myBag 121 88 0
else
lift regs amount
drop myBag 142 88 0
endif
endif
@ignore regs
if moveRegs = 1
wait maxwaittimeinms
endif
endwhile
overhead "Splitter completed" 66