void main( string thing ) { item wanted; if ( thing.contains_text( "acc" ) ) { #wanted = $item[stolen accordion]; print_html( "you want a toy accordion" ); return; } else if ( thing.contains_text( "totem" ) ) { wanted = $item[turtle totem]; } else if ( thing.contains_text( "saucepan" ) ) { wanted = $item[saucepan]; } else { abort("not a valid item"); } while ( item_amount( wanted ) < 1 ) { use( 1, $item[chewing gum on a string] ); } }