Back to "distill" tags

Distillo-bot 3000 by Aphlux

Description: Distillo-bot 3000 will watch a selected container and create distillations from extracts placed within.

# Distillo-bot 3000 # # Automatically creates new distillations when # extracts are placed into a selected container. # The new distillation will be returned # to the same container. # # Designed for use by guilds or homeowners who # want to run a bot that will create distillations # for other players. # # Requirements: # A container within reach used as a drop box for extracts. # Cannot be a bag in the crafters backpack. # # The character running this script should have a stock # of empty bottles and mortal and pestles in their backpack. # # Restock commands can be added to restock from another container. # # Written by: Aphlux (aka Aphra) # Created on: September 4, 2022 # Last updated: May 22, 2023 # gump vars @setvar! alchGumpID 949095101 @setvar! aspectPageID 108 @setvar! nextPageResponse 11 # select the drop bag where people will place extracts if not varexist distDrop overhead 'Select the bag to watch for extracts in.' setvar distDrop if find distDrop self overhead 'INVALID: The drop bag cannot be in your own pockets!' 38 wait 1000 unsetvar distDrop loop endif overhead 'Distillo-bot 3000 Initialized.' else dclick distDrop endif overhead 'Waiting for extract drop...' 920 wait 250 # pickup bottles on the floor if counttype 'empty bottle%s%' self = 0 @setvar bottleID 0 if findtype 'empty bottle%s%' ground -1 -1 2 as bottles @setvar bottleID bottles elseif findtype 'empty bottle%s%' distDrop as bottles @setvar bottleID bottles endif if bottleID > 0 lift bottleID 60000 drop backpack -1 -1 -1 say 'Thank you for the bottles!' wait 1000 endif endif # pickup mortal and pestle on the floor if counttype 'mortar and pestle' self = 0 @setvar! toolID 0 if findtype 'mortar and pestle' ground -1 -1 2 as tool @setvar! toolID tool elseif findtype 'mortar and pestle' distDrop as tool @setvar! toolID tool endif if toolID > 0 lift toolID 60000 drop backpack -1 -1 -1 say 'Thank you for the tools!' wait 1000 endif endif # check for an extract in the drop bag @setvar! foundExtract 0 @setvar! shouldSpeak 1 while findtype 'bottle' distDrop as extract @setvar! foundExtract 1 overhead 'Found an extract! Creating a new distill...' getlabel extract extractName if shouldSpeak = 1 @setvar! shouldSpeak 0 say 'Ah, an extract. Let me distill that for you...' wait 250 endif # check for empty bottles if not findtype 'empty bottle%s%' self overhead 'Need more empty bottles!' 38 say "I am out of empty bottles! Please drop some on the floor for me." wait 3000 loop endif # open the alch gump, and go to page 2 # of the aspect section where distills begin if findtype 'mortar and pestle' self as tool gumpclose alchGumpID dclick tool waitforgump alchGumpID # goto 'Aspect Items' gumpresponse aspectPageID waitforgump alchGumpID wait 650 # goto page 3 gumpresponse nextPageResponse waitforgump alchGumpID wait 650 else overhead 'Need more mortal and pestles!' 38 say "I am out of mortar and pestles! Please drop some on the floor for me." wait 3000 loop endif # move the extract once we know we can make a distill lift extract 1 drop backpack -1 -1 -1 wait 650 # go to the page for this extract, # then create it // page 3 if 'Air' in extractName overhead 'Air' 1001 gumpresponse 200 alchGumpID elseif 'Artisan' in extractName overhead 'Artisan' 544 gumpresponse 201 alchGumpID elseif 'Blood' in extractName overhead 'Blood' 38 gumpresponse 202 alchGumpID elseif 'Command' in extractName overhead 'Command' 68 gumpresponse 203 alchGumpID elseif 'Death' in extractName overhead 'Death' 923 gumpresponse 204 alchGumpID elseif 'Discipline' in extractName overhead 'Discipline' 442 gumpresponse 205 alchGumpID elseif 'Earth' in extractName overhead 'Earth' 544 gumpresponse 206 alchGumpID elseif 'Eldritch' in extractName overhead 'Eldritch' 24 gumpresponse 207 alchGumpID elseif 'Fire' in extractName overhead 'Fire' 38 gumpresponse 208 alchGumpID elseif 'Fortune' in extractName overhead 'Fortune' 53 gumpresponse 209 alchGumpID // page 4 elseif 'Gadget' in extractName overhead 'Gadget' 53 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 200 alchGumpID elseif 'Harvest' in extractName overhead 'Harvest' 53 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 201 alchGumpID elseif 'Holy' in extractName overhead 'Holy' 53 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 202 alchGumpID elseif 'Lyric' in extractName overhead 'Lyric' 38 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 203 alchGumpID elseif 'Poison' in extractName overhead 'Poison' 68 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 204 alchGumpID elseif 'Shadow' in extractName overhead 'Shadow' 923 gumpresponse nextPageResponse waitforgump alchGumpID gumpresponse 205 alchGumpID elseif 'Void' in extractName overhead 'Void' 14 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 206 alchGumpID elseif 'War' in extractName overhead 'War' 44 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 207 alchGumpID elseif 'Water' in extractName overhead 'Water' 8 gumpresponse nextPageResponse alchGumpID waitforgump alchGumpID gumpresponse 208 alchGumpID else overhead 'Unknown extract type! {{extractName}}' 38 say 'DISTILLO-BOT FATAL ERROR! CANNOT COMPUTE! CANNOT COMPUTE!' endif waitforgump alchGumpID 1000 gumpclose alchGumpID wait 3000 endwhile # move the new distillations back into the drop bag while findtype 'flask' self as distillation lift distillation 99 drop distDrop -1 -1 -1 wait 1500 endwhile if foundExtract == 1 say 'There you go! Thank you for using Distillo-bot 3000 and have a nice day.' endif loop