Satchel Manager
This script will automatically assemble fragments and essences if it finds 5 of the same type and quality, and also maintain the crafting ingredients within your satchel at a set limit, removing the worst quality ingredients automatically. You can set both a default limit and specific limits for certain rare or less wanted ingredients (fragments and essences will never be discarded).
The script runs whenever you type "sl" or "sl ingredient_name" (it works exactly the same way as stashlist).
#VAR {crafting[quality][specific]} {{1}{legendary}{2}{superior}{3}{good}{4}{average}{5}{poor}{6}{crude}{7}{worthless}};
#VAR {crafting[quality][all]} {{best}{worst}{all}{any}${crafting[quality][specific]}};
#VAR {crafting[limit][default]} {30};
#ALIAS {sl}
{
#ACTION {^%%*%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|}
{
#FORMAT {crafting[ingredient]} {%l} {%%1};
#VAR {satchel[$crafting[ingredient]][total]} {%%4};
#VAR {satchel[$crafting[ingredient]][subtotal][1]} {%%7};
#VAR {satchel[$crafting[ingredient]][subtotal][2]} {%%10};
#VAR {satchel[$crafting[ingredient]][subtotal][3]} {%%13};
#VAR {satchel[$crafting[ingredient]][subtotal][4]} {%%16};
#VAR {satchel[$crafting[ingredient]][subtotal][5]} {%%19};
#VAR {satchel[$crafting[ingredient]][subtotal][6]} {%%22};
#VAR {satchel[$crafting[ingredient]][subtotal][7]} {%%25};
.CleanIngredient $crafting[ingredient];
};
#ACTION {You have %%d/%%d items in your satchel.}
{
#UNACTION {^%%*%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|%%s%%d%%s|};
#UNACTION {You have %%d/%%d items in your satchel.};
};
#SEND {!stashlist %0};
};
#ALIAS {.CleanIngredient}
{
#REGEX {%0} {{fragment|essence}}
{
#FOREACH {$crafting[quality][specific][]} {i}
{
#IF {$satchel[%0][subtotal][$i] >= 5}
{
#SEND {!unstash2 5 $crafting[quality][specific][$i] %0};
#SEND {!assemble %0};
#SEND {!stash all};
};
};
}
{
#IF {$crafting[limit][%0] > 0}
{
#VAR {crafting[limit][current]} {$crafting[limit][%0]};
}
{
#VAR {crafting[limit][current]} {$crafting[limit][default]};
}
#MATH {crafting[delta]} {$satchel[%0][total] - $crafting[limit][current]};
#IF {$crafting[delta] > 0}
{
#$crafting[delta] {!unstash2 worst %0};
#VAR {satchel[%0][total]} {$crafting[limit][current]};
};
};
};
To change the default limit for ingredients, just modify the "crafting[limit][default]" line in the script above.
To set individual limits, you will first have to get Tintin Saving Variables working, then put "#VAR {crafting} {}" into the saved variables class. You can then set individual limits. For example, if you only want to keep the five best bronze shards, type the following into the commandline: (N.B. ingredients names are held in lower case.)
#VAR {crafting[limit][bronze shards]} {5}
This limit will then get saved as a constant limit for bronze shards, and your satchel will discard all but the 5 best whenever you "sl" from now on.