Hello, I'm having some trouble with the command intrepreter. I am trying to add a command that will lock the character. So commands can not be entered. I have all the things installed in structs.h and utils.h to have the pw saved. I am just including the part where it checks for invalid command frozen char etc... I am on BPL17, Win95. I have everything except this check for if the command is the unlock command. else if (!IS_NPC(ch) && PLR_FLAGGED(ch, PLR_FROZEN) && GET_LEVEL(ch) < LVL_IMPL) send_to_char("You try, but the mind-numbing cold prevents you...\r\n", ch); else if (cmd_info[cmd].command != 'charunlock\n' && GET_LOCK(ch) != 0 && !IS_NPC(ch)) { send_to_char("Sorry, character is locked. Type unlock, and the password you\r\n", ch); send_to_char("entered when you locked.\r\n", ch); } else if (cmd_info[cmd].command_pointer == NULL) send_to_char("Sorry, that command hasn't been implemented yet.\r\n", ch); else if (IS_NPC(ch) && cmd_info[cmd].minimum_level >= LVL_IMMORT) send_to_char("You can't use immortal commands while switched.\r\n", ch); else if (GET_POS(ch) < cmd_info[cmd].minimum_position) GET_LOCK(ch) is where the pw is stored. if not locked GET_LOCK(ch) is 0 The command for unlock is in ACMD(do_charunlock), act.other.c and id'd as charunlock in interpreter.c Thanks LW -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/03/01 PST