Index: README ================================================================== --- README +++ README @@ -423,6 +423,11 @@ The version of SQLite in the package manager is not always the newest version. Sometimes I use features that are in released versions of SQLite but not necessarily in the package manager (and which versions are in the package manager may vary according to the distribution). The version in the package manager might or might not work; it is untested. + +** How to make it to automatically advance to next level if you win? + + Add the following into the .heromeshrc file: + .?.autoWin: select 'go',-(level()+1) where level()1&&sqlite3_column_type(autowin,1)!=SQLITE_NULL)?sqlite3_column_int(autowin,1):0; + if((name=sqlite3_column_text(autowin,0)) && *name) { + if(name[0]==':') { + switch(name[1]) { + case '!': if(i>1) i=system(sqlite3_column_text(autowin,1)?:(const unsigned char*)"# "); break; + case ';': goto done; + case '?': if(i>1) puts(sqlite3_column_text(autowin,1)?:(const unsigned char*)"(null)"); break; + case 'm': if(i>1) screen_message(sqlite3_column_text(autowin,1)?:(const unsigned char*)"(null)"); break; + } + } else { + k=name[0]*'\1\0'+name[1]*'\0\1'; + while(i && sqlite3_column_type(autowin,i-1)==SQLITE_NULL) i--; + prev=game_command(prev,k,j,i,autowin,0); + if(prev<0) goto done; + } + } + } + } + if(i!=SQLITE_DONE) screen_message("SQL error"); + done: + sqlite3_reset(autowin); +} static void set_caption(void) { const char*r; char*s; sqlite3_str*m; @@ -989,11 +1034,14 @@ if(inputs_count) { for(i=0;i