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
checkpoint: load_itemdesc
Couldn't find an Armor Zone in armrzone.cfg for layer 0
Error in ObjType 0x1b72. Package armor.
Server Shutdown: load_itemdesc
Execution aborted due to: Configuration file error
ELSoft wrote:In Distro 097 "pkg/items/sysbook/commands/gm/readonly.src" the cfgfile.em is not declared and the script use ReadConfigFile and GetConfigString.
ELSoft wrote:checkpoint: load_itemdesc
Couldn't find an Armor Zone in armrzone.cfg for layer 0
Error in ObjType 0x1b72. Package armor.
Server Shutdown: load_itemdesc
Execution aborted due to: Configuration file error
This is strange because in the distro there is no coverage defined for the bronze shield. How did it get there?
Maybe someone added an armor zone for shields and then set that shield to use that armor zone. I'm not sure how that would work but if you find out let me know.
Just remove it and see if everything works correctly.
Oh and please limit each thread to 1 problem. Thanks.