i just added a command
{ "stop_commands_menu_here", 0, 0, 0, 0 },
and put any commands i didn't want on the command menu after this
then in acmd(do_commands)
changed num_of_cmds to an int
max_cmd=find_command("stop_commands_menu_here") and changed the for loop
with it. so the loop stoped right before the max_cmd and hide all the
'special' ones
>From: Patrick Dughi <dughi@IMAXX.NET>
>Reply-To: Circle Discussion List <CIRCLE@post.queensu.ca>
>To: CIRCLE@post.queensu.ca
>Subject: [CIRCLE] [Circle] Spec Procs + Spec Commands.
>Date: Mon, 14 Feb 2000 08:48:18 -0600
>
> Sometimes it's the little things that count. For example, there
>are a few instances in which we had spec_procs that had to use the 'pull'
>command. For most of the rest of the mud though, the command is linked to
>the 'do_not_here' function, with a rewarding "Huh?" message.
>
> The little thing though, is that players using the 'command'
>function see this annoying command that doesn't do anything. Same with
>alot of newer characters. Sometimes it even ruins the mystery surrounding
>a spec_proc'ed obj/mob/room, since the command you'd otherwise have to
>guess at is already there in your list.
>
> So, you can fix it to make spec_procs acknowledge commands that
>are not in the command_interpreter list, like "pull", "play", "fire",
>"push", etc..
>
> Open up interpreter.c, and go to command_interpreter(). Find the
>line towards the bottom that contains "special(ch, cmd, line)". Change it
>to "special(ch, cmd, line,arg)". Now search for special() and change it's
>definition from int special(struct char_data * ch, int cmd, char *arg) to
>int special(struct char_data * ch, int cmd, char *arg,char *command);
>
> Now, go into structs.h and find the SPECIAL macro definition.
>append the char *command as the last argument.
>
> Last, go into mobact.c, and find the line that reads something
>like if ((mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "")) .. change it
>to ((mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "","")).
>
> Now, your spec_procs are passed the actual command like "fight",
>"pull", etc instead of just the number. So, my 'pull' command is now in
>my spec_procs like this;
>
> if(is_abbrev(command,"pull")) {
> /* then we have pull */
> send_to_char("You pull the lever.\r\n",ch);
> return 1;
> }
>
> Exciting, but mostly simple. The only thing you may want to do is
>to convert your existing spec_procs which perform actions on a random/time
>based system to check not just for !cmd, but for !cmd && !command - else
>each nonsense command in a room could potentially trigger the non-command
>spec_proc functionality, like playing cards or the mayor's walking path.
>For the most part though, I doubt this will be a serious problem.
>
> PjD
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
> +------------------------------------------------------------+
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT