inherit "obj/treasure"; string shortstr; string longstr; string idstr; int autol; int set; short() { return shortstr; } long() { write (longstr+ "\n"); } id(str) { return str=="anything" || str==idstr; } query_value() { return 0; } init() { if(set!=10) { shortstr="anything"; longstr="anything"; autol=0; idstr="anything"; } if((environment(this_object())==this_player()) && (this_player()->query_level() >19)) { add_action("chshort", "chshort"); add_action("chlong", "chlong"); add_action("chid", "chid"); /* add_action("chauto", "chauto"); */ } } chshort(arg) { string str; if(!arg) { write("Current short: "+shortstr+".\n"); return 1; } if(sscanf(arg,"%s",str)==1) { shortstr=str; set=10; return 1; } else { write("Usage: chsort || chsort \n"); return 1; } } chlong(arg) { string str; if(!arg) { write("Current long: "+longstr+"\n"); return 1; } if(sscanf(arg,"%s",str)==1) { longstr=str; set=10; return 1; } else { write("Usage: chlong || chlong \n"); return 1; } } chid(arg) { string str; if(!arg) { write("Current id: "+idstr+"\n"); return 1; } if(sscanf(arg,"%s",str)==1) { idstr=str; set=10; return 1; } else { write("Usage: chid || chid \n"); return 1; } } /* chauto(arg) { write("Autoload is currently not functional\n"); if(!arg) { write("Autoload for "+idstr+" is "); if(autol) write("on.\n"); else write("off.\n"); return 1; } if(arg=="on") { write("Autoload for "+idstr+" is on.\n"); autol=1; return 1; } if(arg=="off") { write("Autoload for "+idstr+" is off.\n"); autol=0; return 1; } write("Usage: chauto || chauto [on | off]\n"); return 1; } drop() { if(autol) { write("You cannot drop the "+idstr+"\n"); return 1; } ::drop(); return 1; } query_auto_load() { return autol; } */