Jaimaltz
10-29-2008, 11:59 PM
I finished writing the script. It is a lich script, I also put it in the repository. An alchemy component one would be just as easy to make, just replace the gems with the components. I'd be happy to do it if someone can point me to a complete list of alchemy components.
#Will stick gems into jars (will also do bottles and beakers)- useful for adventure guild gem hoarding
#Usage: ;jargem <container1> <container2> <container3> <container4>
#where container1 = Unprocessed gems - will default to greatcloak if not defined
# container2 = Your primary jar container (not full jars) - backpack if not defined
# container3 = Empty jar container - sack if not defined
# container4 = Full jar container (full jar storage) - satchel if not defined
#You can change the hardcoded ones pretty easily with a quick edit, if desired.
gemdb = [ "banded agate", "blue lace agate", "chameleon agate", "cloud agate", "fire agate", "frost agate", "moss agate", "mottled agate", "tigereye agate", "deep purple amethyst", "azurite", "azure blazestar", "crimson blazestar", "golden blazestar", "emerald blazestar", "bloodjewel", "bloodstone", "bright bluerock", "red carbuncle", "chalcedony", "ridge coral", "paw coral", "flower coral", "black coral", "blue coral", "pink coral", "red coral", "blue cordierite", "corestone", "cinnabar crystal", "glaesine crystal", "quartz crystal", "rock crystal", "dragonmist crystal", "tigerfang crystal", "deathstone", "scarlet despanal", "blue diamond", "dragon\'s-tear diamond", "dwarf-cut diamond", "black diamond", "yellow diamond", "uncut diamond", "maernstrike diamond", "star-of-tamzyrr diamond", "star diopside", "doomstone", "black dreamstone", "blue dreamstone", "green dreamstone", "pink dreamstone", "red dreamstone", "yellow dreamstone", "white dreamstone", "gold dust", "dragonfire emerald", "dragon\'s-tear emerald", "dwarf-cut emerald", "uncut emerald", "eye-of-Koar emerald", "star emerald", "blue eostone", "olivine faenor-bloom", "bronze fang", "copper fang", "gold fang", "iron fang", "mithril fang", "platinum fang", "silver fang", "steel fang", "urglaes fang", "violet feystone", "periwinkle feystone", "firestone", "almandine garnet", "red garnet", "green garnet", "spessartine garnet", "wyrm\'s-eye garnet", "ametrine gem", "aquamarine gem", "chrysoberyl gem", "blue gem", "red gem", "beryl gem", "chrysoprase gem", "lilac glimaerstone", "cerulean glimaerstone", "clear glimaerstone", "golden glimaerstone", "green glimaerstone", "peach glimaerstone", "smoky glimaerstone", "ultramarine glimaerstone", "petrified haon", "yellow heliodor", "yellow hyacinth", "polished ivory", "fiery jacinth", "brown jade", "green jade", "white jade", "black jasper", "red jasper", "yellow jasper", "blue lapis", "black marble", "green marble", "pink marble", "white marble", "mica", "mithril-bloom", "pale blue moonstone", "cats-eye moonstone", "golden moonstone", "opaline moonstone", "pale green moonstone", "silvery moonstone", "mother-of-pearl", "gold nugget", "platinum nugget", "obsidian", "spiderweb obsidian", "banded onyx", "black onyx", "piece of onyx", "aster opal", "black opal", "boulder opal", "dragonfire opal", "fire opal", "moonglae opal", "white opal", "frost opal", "purple opal", "green ora-bloom", "firemote orb", "shadowglass orb", "fire pearl", "iridescent pearl", "black pearl", "grey pearl", "pink pearl", "white pearl", "peridot", "pyrite", "blue quartz", "carnelian quartz", "eye quartz", "citrine quartz", "rose quartz", "rainbow quartz", "tangerine quartz", "golden rhimar-bloom", "riftshard", "riftstone", "rosespar", "dragon\'s-tear ruby", "dwarf-cut ruby", "star ruby", "uncut ruby", "sylvarraend ruby", "sandsilver", "blue sapphire", "blue shimmarglin sapphire", "clear sapphire", "dragonsbreath sapphire", "dragonseye sapphire", "blue mermaid\'s-tear sapphire", "dwarf-cut sapphire", "green sapphire", "lavender shimmarglin sapphire", "pale water sapphire", "pink sapphire", "star sapphire", "violet sapphire", "yellow sapphire", "umber sard", "sardonyx", "shimmertine shard", "viridian soulstone", "black sphene", "brown sphene", "white sphene", "yellow sphene", "spherine", "blue spinel", "pink spinel", "red spinel", "violet spinel", "sardonyx stone", "alexandrite stone", "adventure stone", "malachite stone", "labradorite stone", "morganite stone", "rhodocrosite stone", "jet stone", "turquoise stone", "sunstone", "sapphire talon", "purple thunderstone", "blue topaz", "clear topaz", "golden topaz", "errisian topaz", "imperial topaz", "pink topaz", "smoky topaz", "black tourmaline", "blue tourmaline", "clear tourmaline", "green tourmaline", "pink tourmaline", "spiderweb turquoise", "argent vultite-bloom", "wyrdshard", "brown zircon", "clear zircon", "green zircon", "snowflake zircon", "yellow zircon" ]
if script.vars.find { |val| val =~ /\bhelp\b/i }
echo("Will stick gems into jars (will also do bottles and beakers) - useful for adventure guild gem hoarding")
echo("Usage: ;jargem <container1> <container2> <container3> <container4>")
echo(" container1 = Unprocessed gems - greatcloak if not defined")
echo(" container2 = Primary jar container (not full jars) - backpack if not defined")
echo(" container3 = Empty jar container - sack if not defined")
echo(" container4 = Full jar container - satchel if not defined")
echo("You can change the hardcoded ones pretty easily with a quick edit if desired.")
exit
end
script.vars.shift
gemsack = script.vars.shift
primejarsack = script.vars.shift
emptyjarsack = script.vars.shift
fulljarsack = script.vars.shift
# Here is where you would edit, if you want to change the hardcoded containers
if gemsack.nil? then gemsack = "greatcloak" end
if primejarsack.nil? then primejarsack = "backpack" end
if emptyjarsack.nil? then emptyjarsack = "sack" end
if fulljarsack.nil? then fulljarsack = "satchel" end
fput "look in my #{gemsack}"
mytest = waitfor("nothing in there", "you see", "could not find what")
if mytest =~ /nothing in there/
echo ("There are no gems in your unprocessed gem container")
exit
end
if mytest =~ /could not find what/
echo ("You don't seem to have a #{gemsack}, you will need to either give this script arguments or change the hardcoded containers")
exit
end
fput "look in my #{gemsack}"
contents = waitfor("In the .+ you see").gsub(/ and (?:an|a|some)/, ',')
gems = contents.scan(/\b(?:#{gemdb.join('|')})(?=,|\.)/)
result = String.new
quantity = gems.length
until (quantity == 0)
gem = gems.shift
if gem =~ /pale blue sapphire/
gem = 'pale sapphire'
elsif gem =~ /pale blue moonstone/
gem = 'pale moonstone'
elsif gem =~ /pale green moonstone/
gem = 'pale moonstone'
elsif gem =~ /deep purple amethyst/
gem = 'deep amethyst'
elsif gem =~ /blue shimmarglin sapphire/
gem = 'blue sapphire'
elsif gem =~ /lavender shimmarglin sapphire/
gem = 'lavender sapphire'
end
quantity = quantity - 1
fput "take my #{gem} from my #{gemsack}"
result = waitfor("You remove", "Get what", "need a free hand")
if result =~ /need a free hand/
fput "stow all"
end
if result =~ /You remove/
status = 1
while status == 1
status = 0
contain = nil
put "rummage in my #{primejarsack} ingredient #{gem}"
newresult = waitfor("jar", "bottle", "beaker", "seem to locate any ingredient like that")
if newresult =~ /jar/
contain = 'jar'
elsif newresult =~ /bottle/
contain = 'bottle'
elsif newresult =~ /beaker/
contain = 'beaker'
end
if newresult =~ /jar|bottle|beaker/
fput "put my #{gem} in my #{contain}"
jarresult = waitfor("into your jar", "into your beaker", "into your bottle", "to the contents of", "into your empty", "full", "better of mixing", "holding the beaker", "holding the jar", "holding the bottle")
if jarresult =~ /into your empty|into your beaker|into your jar|into your bottle|to the contents of/
fput "put my #{contain} in my #{primejarsack}"
elsif jarresult =~ /better of mixing/
fput "put my #{contain} in my #{gemsack}"
status = 1
elsif jarresult =~ /full/
fput "put my #{contain} in my #{fulljarsack}"
fput "get jar from my #{emptyjarsack}"
emptyresult = waitfor("Get what", "You remove")
if emptyresult =~ /Get what/
fput "get bottle from my #{emptyjarsack}"
botresult = waitfor("Get what", "You remove")
if botresult =~ /Get what/
fput "get beaker from my #{emptyjarsack}"
beakresult = waitfor("Get what", "You remove")
if beakresult =~ /Get what/
echo ("You are out of empty jars")
exit
else
contain = 'beaker'
fput "put my #{gem} in my #{contain}"
fput "put my #{contain} in my #{primejarsack}"
end
else
contain = 'bottle'
fput "put my #{gem} in my #{contain}"
fput "put my #{contain} in my #{primejarsack}"
end
else
contain = 'jar'
fput "put my #{gem} in my #{contain}"
fput "put my #{contain} in my #{primejarsack}"
end
end
end
if newresult =~ /seem to locate any ingredient like that/
fput "get jar from my #{emptyjarsack}"
myemptyresult = waitfor("Get what", "You remove")
if myemptyresult =~ /Get what/
fput "get bottle from my #{emptyjarsack}"
botresult = waitfor("Get what", "You remove")
if botresult =~ /Get what/
fput "get beaker from my #{emptyjarsack}"
beakresult = waitfor("Get what", "You remove")
if beakresult =~ /Get what/
echo ("You are out of empty jars")
exit
else
contain = 'beaker'
fput "put my #{gem} in my #{contain}"
fput "put my #{contain} in my #{primejarsack}"
end
else
contain = 'bottle'
fput "put my #{gem} in my #{contain}"
fput "put my #{contain} in my #{primejarsack}"
end
else
contain = 'jar'
fput "put my #{gem} in my #{contain}"
fput "put my #{contain} in my #{primejarsack}"
end
end
end
pause 1
fput "look in my #{gemsack}"
trans = matchtimeout 3, "bottle", "jar", "beaker", "nothing in there"
if trans =~ /jar/
fput "get jar from my #{gemsack}"
fput "put jar in my #{primejarsack}"
end
if trans =~ /bottle/
fput "get bottle from my #{gemsack}"
fput "put bottle in my #{primejarsack}"
end
if trans =~ /beaker/
fput "get beaker from my #{gemsack}"
fput "put beaker in my #{primejarsack}"
end
end
if result =~ /Get what/
echo ("there is a problem with your gem setup, double check, exiting")
exit
end
end
echo ("And we're done! Exiting.")
exit
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.