Once again a slightly edited (and therefore untested) version of my hermit script, this time round I added a not enough meat to get chewing gum check to it.
To use:
Misc_Hermit( item VarItem, int VarQty);
VarItem = The item you want from the hermit.
VarQty = How many of that item you want.
eg. Misc_Hermit( $item[dingy planks], 1);
Note: I have no idea what happens when you try to get something your not ment to from the hermit. Do with your own peril.
To use:
Misc_Hermit( item VarItem, int VarQty);
VarItem = The item you want from the hermit.
VarQty = How many of that item you want.
eg. Misc_Hermit( $item[dingy planks], 1);
Note: I have no idea what happens when you try to get something your not ment to from the hermit. Do with your own peril.
Code:
void Misc_Hermit( item VarItem, int VarQty)
{
while( item_amount( $item[Worthless Trinket]) + item_amount( $item[Worthless GewGaw]) + item_amount( $item[Worthless Knick-Knack]) < VarQty)
{
if( item_amount( $item[chewing gum on a string]) == 0)
{
if( my_meat() >= 30)
{
buy( 1, $item[chewing gum on a string]);
}
else
{
cli_execute( "abort Not enough meat to purchase chewing gum on a string.");
}
}
adventure( 1, $location[sewer (unlucky)]);
}
if( item_amount( $item[Worthless Trinket]) + item_amount( $item[Worthless GewGaw]) + item_amount( $item[Worthless Knick-Knack]) >= VarQty)
{
if( item_amount( $item[hermit permit]) < VarQty)
{
buy( VarQty - item_amount( $item[hermit permit]), $item[hermit permit]);
}
trade_hermit( VarQty, VarItem);
}
}