In Distro 097 "pkg/items/sysbook/commands/gm/readonly.src" the cfgfile.em is not declared and the script use ReadConfigFile and GetConfigString.
Code:
use uo;
use os;
program textcmd_readonly(character)
SendSysMessage(character, "Target a book to switch between read-only and read/write");
var book := Target(character);
if ( !book or book.errortext )
SendSysMessage(character, "Cancelled.");
return 0;
endif
// check to see if it's an itemdesc based book. If so, exit
var cfg := ReadConfigFile(":*:itemdesc");
cfg := cfg[book.objtype];
var author := GetConfigString(cfg, "Author");
if ( author and !author.errortext )
SendSysMessage(character, "This is a shared book and cannot be changed.");
return 0;
endif
if ( book.IsWritable() )
book.ReadOnly(1);
SendSysMessage(character, "This book is now read-only.");
else
book.ReadOnly(0);
SendSysMessage(character, "This book is now read-write.");
endif
endprogram