Anti-griefer organizer by gmussi
Description from the author:
#
# Anti- Griefer Script by Mortadelaz
#
# Ever found someone gray next to you, and
# attacked them only to discover later they stole your bandages?
# No longer!!
#
# This script splits bandages, potions, arrows and reagents in
# small bundles, on top of each other.
# If the thief steal your 20 bandages, there will be more 20
# underneath it, and more 20 underneath that.
#
# HOW TO USE:
#
# When you run the first time, the script will ask for the pouches
# where to store stuff.
# Run the script after restocking from the shelf.
@setvar! globalWaitTime 650
# Change which ones you want to organize
@setvar! module_bandages 1
@setvar! module_arrows 1
@setvar! module_potions 1
@setvar! module_reagents 1
# Change how you prefer your increments
@setvar! bandage_increments 20
@setvar! arrow_increments 25
@setvar! potion_increments 10
@setvar! reagent_increments 20
if findlayer self backpack as found
setvar! CHAR_BACKPACK found
endif
if not varexist my_pouch or not find my_pouch self
overhead "SELECT POUCH!" 88
@setvar! my_pouch
else
overhead "POUCH FOUND:" 88
overhead my_pouch 88
endif
#
# MODULE BANDAGES
#
if module_bandages > 0
@setvar! bandage_id 3617
@setvar! bandage_counter 0
while findtype bandage_id self as b
overhead "Moving all bandages to backpack" 88
lift b 1111
drop CHAR_BACKPACK -1 -1 0
wait globalWaitTime
@ignore b
endwhile
@clearignore
while findtype bandage_id CHAR_BACKPACK as b
overhead "Moving bandages in increments to pouch" 88
lift b bandage_increments
drop my_pouch
wait globalWaitTime
@ignore b
endwhile
@clearignore
endif
#
# MODULE ARROWS
#
if module_arrows > 0
if not varexist my_quiver or not find my_quiver self
overhead "SELECT QUIVER!" 88
@setvar! my_quiver
else
overhead "QUIVER FOUND:"
overhead my_quiver
endif
while findtype "crossbow bolt" my_quiver as bolts
overhead "Moving bolts to backpack" 88
lift bolts 1111
drop CHAR_BACKPACK
wait globalWaitTime
endwhile
while findtype "arrow" self as arrows
overhead "Moving arrows to backpack" 88
lift arrows 1111
drop CHAR_BACKPACK
wait globalWaitTime
@ignore arrows
endwhile
@clearignore
while findtype "crossbow bolt" CHAR_BACKPACK as bolts
overhead "Moving bolts" 88
lift bolts 10
drop my_quiver
wait globalWaitTime
endwhile
while findtype "arrow" CHAR_BACKPACK as arrows
overhead "Moving arrows" 88
lift arrows 10
drop my_quiver
wait globalWaitTime
@ignore arrows
endwhile
@clearignore
endif
#
# MODULE REAGENTS
#
if module_reagents > 0
clearlist 'all_reagents'
if not listexists 'all_reagents'
createlist 'all_reagents'
pushlist 'all_reagents' 'garlic'
pushlist 'all_reagents' 'ginseng'
pushlist 'all_reagents' 'blood moss'
pushlist 'all_reagents' 3980
pushlist 'all_reagents' 'mandrake root'
pushlist 'all_reagents' 'black pearl'
pushlist 'all_reagents' 3981
pushlist 'all_reagents' 3976
endif
if not varexist my_reagent_bag or not find my_reagent_bag self
overhead "SELECT REAGENT BAG!" 88
@setvar! my_reagent_bag
else
overhead "REAGENT BAG FOUND:" 88
overhead my_reagent_bag 88
endif
overhead "Moving all reagents to backpack" 88
foreach 'reg' in 'all_reagents'
overhead 'reg' 88
while findtype 'reg' self as regs
lift regs 1111
drop CHAR_BACKPACK
wait globalWaitTime
@ignore regs
endwhile
@clearignore
endfor
overhead "Sorting reagents in increments" 88
foreach 'reg' in 'all_reagents'
overhead 'reg' 56
while findtype 'reg' CHAR_BACKPACK as regs
lift regs reagent_increments
drop my_reagent_bag
wait globalWaitTime
@ignore regs
endwhile
@clearignore
endfor
endif
#
# MODULE POTIONS
#
if module_potions > 0
if not listexists 'all_potions'
createlist 'all_potions'
pushlist 'all_potions' 'yellow potion'
pushlist 'all_potions' 'orange potion'
pushlist 'all_potions' 'red potion'
pushlist 'all_potions' 'blue potion'
pushlist 'all_potions' 'white potion'
pushlist 'all_potions' 'black potion'
pushlist 'all_potions' 'purple potion'
pushlist 'all_potions' 'green potion'
endif
if not varexist my_potion_bag or not find my_potion_bag self
overhead "SELECT POTION BAG!" 88
@setvar! my_potion_bag
else
overhead "POTION BAG FOUND:" 88
overhead my_potion_bag 88
endif
overhead "Moving all potions to backpack" 88
foreach 'potion' in 'all_potions'
overhead 'potion' 88
while findtype 'potion' self as heal_potions
lift heal_potions 1111
drop CHAR_BACKPACK
wait globalWaitTime
@ignore heal_potions
endwhile
@clearignore
endfor
overhead "Sorting potions in increments" 88
foreach 'potion' in 'all_potions'
overhead 'potion' 88
while findtype 'potion' CHAR_BACKPACK as heal_potions
lift heal_potions potion_increments
drop my_potion_bag
wait globalWaitTime
@ignore heal_potions
endwhile
@clearignore
endfor
endifAnti- Griefer Script by Mortadelaz
Ever found someone gray next to you, and attacked them only to discover later they stole your bandages?
No longer!!
This script splits bandages, potions, arrows and reagents in small bundles, on top of each other.
If the thief steal your 20 bandages, there will be more 20 underneath it, and more 20 underneath that.
HOW TO USE:
When you run the first time, the script will ask for the pouches where to store stuff.
Run the script after restocking from the shelf.