Back to "snippet" tags

Sorting Crew by Class or Level by dep_abdellah

Description: This script will sort your crewmembers by class (crewClassSort) or by pip level (crewLevelSort)

# Dep/Abdellah sorting crew script # # Nov 13th 2024 - V 0.1 # # This script will sort your crewmembers by class (crewClassSort) or by pip level (crewLevelSort) # # Variables to set before running the script: # crewClassSort = 1 if you want to sort by class (gunner, marine, orc reaver...) / 0 if not # # crewLevelSort = 1 if you want to sort by level (novice, adept, veteran, expert, master...) / 0 if not # # Script starts here... @setvar crewClassSort 0 @setvar crewLevelSort 1 # -- Don't change the next lines -- # overhead 'Select container of crewmembers to be sorted' 10 @setvar crewbag clearignore removelist 'crewClass' if not listexists "crewClass" createlist "crewClass" endif @pushlist 'crewClass' 'gunner' @pushlist 'crewClass' 'marine' @pushlist 'crewClass' 'orc' @pushlist 'crewClass' 'merchant' @pushlist 'crewClass' 'medic' @pushlist 'crewClass' 'navigator' @pushlist 'crewClass' 'spy' @pushlist 'crewClass' 'pilgrim' @pushlist 'crewClass' 'raider' @pushlist 'crewClass' 'pirate' @pushlist 'crewClass' 'fisherman' @pushlist 'crewClass' 'marksman' @pushlist 'crewClass' 'powder' @pushlist 'crewClass' 'sea' @pushlist 'crewClass' 'cook' @pushlist 'crewClass' 'engineer' @pushlist 'crewClass' 'hedge' @pushlist 'crewClass' 'paviseman' @pushlist 'crewClass' 'sailor' @pushlist 'crewClass' 'carpenter' removelist 'crewLevel' if not listexists "crewLevel" createlist "crewLevel" endif @pushlist 'crewLevel' 'novice' @pushlist 'crewLevel' 'adept' @pushlist 'crewLevel' 'expert' @pushlist 'crewLevel' 'master' @pushlist 'crewLevel' 'heroic' @pushlist 'crewLevel' 'legendary' # begin of class sort if crewClassSort = 1 overhead 'Select gunner bag' @setvar 'gunnerBag' overhead 'Select marine bag' @setvar 'marineBag' overhead 'Select orc bag' @setvar 'orcBag' overhead 'Select merchant bag' @setvar 'merchantBag' overhead 'Select medic bag' @setvar 'medicBag' overhead 'Select navigator bag' @setvar 'navigatorBag' overhead 'Select spy bag' @setvar 'spyBag' overhead 'Select pilgrim bag' @setvar 'pilgrimBag' overhead 'Select raider bag' @setvar 'raiderBag' overhead 'Select pirate bag' @setvar 'pirateBag' overhead 'Select fisherman bag' @setvar 'fishermanBag' overhead 'Select marksman bag' @setvar 'marksmanBag' overhead 'Select powder bag' @setvar 'powderBag' overhead 'Select sea bag' @setvar 'seaBag' overhead 'Select cook bag' @setvar 'cookBag' overhead 'Select engineer bag' @setvar 'engineerBag' overhead 'Select hedge bag' @setvar 'hedgeBag' overhead 'Select paviseman bag' @setvar 'pavisemanBag' overhead 'Select sailor bag' @setvar 'sailorBag' overhead 'Select carpenter bag' @setvar 'carpenterBag' while findtype "8455|8454" crewbag as crew getlabel crew crewlabel overhead crewlabel 10 if 'gunner' in 'crewlabel' overhead 'found gunner!' lift crew 1 drop gunnerBag -1 -1 0 endif if 'marine' in 'crewlabel' overhead 'found marine!' lift crew 1 drop marineBag -1 -1 0 endif if 'orc' in 'crewlabel' overhead 'found orc!' lift crew 1 drop orcBag -1 -1 0 endif if 'merchant' in 'crewlabel' overhead 'found merchant!' lift crew 1 drop merchantBag -1 -1 0 endif if 'medic' in 'crewlabel' overhead 'found medic!' lift crew 1 drop medicBag -1 -1 0 endif if 'navigator' in 'crewlabel' overhead 'found navigator!' lift crew 1 drop navigatorBag -1 -1 0 endif if 'spy' in 'crewlabel' overhead 'found spy!' lift crew 1 drop spyBag -1 -1 0 endif if 'pilgrim' in 'crewlabel' overhead 'found pilgrim!' lift crew 1 drop pilgrimBag -1 -1 0 endif if 'raider' in 'crewlabel' overhead 'found raider!' lift crew 1 drop raiderBag -1 -1 0 endif if 'pirate' in 'crewlabel' overhead 'found pirate!' lift crew 1 drop pirateBag -1 -1 0 endif if 'fisherman' in 'crewlabel' overhead 'found fisherman!' lift crew 1 drop fishermanBag -1 -1 0 endif if 'marksman' in 'crewlabel' overhead 'found marksman!' lift crew 1 drop marksmanBag -1 -1 0 endif if 'powder' in 'crewlabel' overhead 'found powder!' lift crew 1 drop powderBag -1 -1 0 endif if 'sea' in 'crewlabel' overhead 'found sea!' lift crew 1 drop seaBag -1 -1 0 endif if 'cook' in 'crewlabel' overhead 'found cook!' lift crew 1 drop cookBag -1 -1 0 endif if 'engineer' in 'crewlabel' overhead 'found engineer!' lift crew 1 drop engineerBag -1 -1 0 endif if 'hedge' in 'crewlabel' overhead 'found hedge!' lift crew 1 drop hedgeBag -1 -1 0 endif if 'paviseman' in 'crewlabel' overhead 'found paviseman!' lift crew 1 drop pavisemanBag -1 -1 0 endif if 'sailor' in 'crewlabel' overhead 'found sailor!' lift crew 1 drop sailorBag -1 -1 0 endif if 'carpenter' in 'crewlabel' overhead 'found carpenter!' lift crew 1 drop carpenterBag -1 -1 0 endif wait 300 endwhile endif # Begin of level sort if crewLevelSort = 1 overhead 'Select novice Bag' @setvar noviceBag overhead 'Select adept Bag' @setvar adeptBag overhead 'Select veteran Bag' @setvar veteranBag overhead 'Select expert Bag' @setvar expertBag overhead 'Select master Bag' @setvar masterBag overhead 'Select heroic Bag' @setvar heroicBag overhead 'Select legendary Bag' @setvar legendaryBag while findtype "8455|8454" crewbag as crew getlabel crew crewlabel overhead crewlabel 10 if 'novice' in 'crewlabel' overhead 'found novice!' lift crew 1 drop noviceBag -1 -1 0 endif if 'adept' in 'crewlabel' overhead 'found adept!' lift crew 1 drop adeptBag -1 -1 0 endif if 'veteran' in 'crewlabel' overhead 'found veteran!' lift crew 1 drop veteranBag -1 -1 0 endif if 'expert' in 'crewlabel' overhead 'found expert!' lift crew 1 drop expertBag -1 -1 0 endif if 'master' in 'crewlabel' overhead 'found master!' lift crew 1 drop masterBag -1 -1 0 endif if 'heroic' in 'crewlabel' overhead 'found heroic!' lift crew 1 drop heroicBag -1 -1 0 endif if 'legendary' in 'crewlabel' overhead 'found legendary!' lift crew 1 drop legendaryBag -1 -1 0 endif wait 300 endwhile endif overhead 'Sorting complete!' 10