Winterbay
Active member
Get a job.
I thought that was the point of getting a degree so you could get a job
Get a job.
boolean get_foldable( item goal )
{
boolean look_get( item it, boolean DC )
{
if( DC )
return( display_amount( it ) > 0 && take_display( 1, it ) );
return( available_amount( it ) > 0 && retrieve_item( 1, it ) );
}
foreach DC in $booleans[ false, true ]
{
if( look_get( goal, DC ) )
return true;
foreach form in get_related( goal, "fold" )
{
if( look_get( form, DC ) )
{
cli_execute("fold " + goal );
if( item_amount( goal ) > 0 )
return true;
}
}
}
return item_amount( goal ) > 0 ;
}
boolean get_foldable( item goal )
{
boolean look_get( item it, boolean DC )
{
if( DC )
return( display_amount( it ) > 0 && take_display( 1, it ) );
return( available_amount( it ) > 0 && retrieve_item( 1, it ) );
}
foreach DC in $booleans[ false, true ]
{
if( look_get( goal, DC ) )
return true;
foreach form in get_related( goal, "fold" )
{
if( look_get( form, DC ) )
{
cli_execute("fold " + goal );
if( item_amount( goal ) > 0 )
return true;
}
}
}
return item_amount( goal ) > 0 ;
}
void main (item goal){
get_foldable(goal);
}
Returned: origami riding crop
fullness => 0
inebriety => 0
spleen => 0
notes =>
descid => 232940208
levelreq => 0
Updating display case...
Requests complete.
boolean get_foldable( item goal )
{
boolean look_get( item it, boolean DC )
{
if ( DC ) return ( display_amount( it ) > 0 && take_display( 1, it ) );
return ( available_amount( it ) > 0 && retrieve_item( 1, it ) );
}
foreach DC in $booleans[ false, true ]
{
if ( look_get( goal, DC ) ) return true;
foreach form in get_related( goal, "fold" )
{
if( look_get( form, DC ) )
{
cli_execute("fold " + goal );
if ( item_amount( goal ) > 0 ) return true;
}
}
}
return item_amount( goal ) > 0 ;
}
boolean get_foldable( item goal )
{
boolean look_get( item it, boolean DC )
{
if( DC )
return( display_amount( it ) > 0 && take_display( 1, it ) );
return( available_amount( it ) > 0 && retrieve_item( 1, it ) );
}
foreach DC in $booleans[ false, true ]
{
if( look_get( goal, DC ) )
return true;
foreach form in get_related( goal, "fold" )
{
if( look_get( form, DC ) )
{
cli_execute("fold " + goal );
if( item_amount( goal ) > 0 )
return true;
}
}
}
return item_amount( goal ) > 0 ;
}
get_foldable($item[origami pasties]);
> call test.ash legion jackhammer
Removing items from display case...
You acquire an item: Loathing Legion jackhammer
Requests complete.
string test;
test = get_property("_testing");
if(test == "")
print("Empty");
Does finally not actually executing when try fails qualify as a mafia bug, or is this something that's functioning as is desired? For the record, here's the code I was trying:main method must appear at top level (zlib.ash, line 667)
ash boolean failed = true; try { import <zlib> failed = false;} finally {print (failed);}
Hmm. I'm hesitant to ask this, but if you're not planning to resume development of this script, would you mind if I cannibalised it for some of its features? Then I can just bundle the functionality with NCF.ash and avoid the problem alltogether.