Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Bing

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Wizhelp Update
Forum Rules | Mark all | Recent Posts

Wizhelp Update
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 24, 2010, 5:54 am
Go to the top of the page
Go to the bottom of the page

Keirath
Magician
GroupMembers
Posts144
JoinedJan 24, 2008

This is just a little enhancement - it's actually from FotE but it's quite nice for admin - especially new ones. It separates the commands by level - overall just cleans up the function.
void do_wizhelp( CHAR_DATA * ch, const char *argument )
{
     CMDTYPE * cmd;
     int col, hash;
     int curr_lvl;
     col = 0;
     set_pager_color( AT_WHITE, ch );

     for ( curr_lvl = LEVEL_AVATAR; curr_lvl <= get_trust( ch ); curr_lvl++)
     {
         send_to_pager( "\n\r\n\r", ch);
         col = 1;
         pager_printf( ch, "[LEVEL %-2d]  ", curr_lvl);

           for (hash = 0; hash < 126; hash++ )
             for ( cmd = command_hash[hash]; cmd; cmd = cmd->next )
                 if (( cmd->level == curr_lvl) && cmd->level <= get_trust( ch ) )
                 {
                     pager_printf( ch, "%-12s", cmd->name );
                    if ( ++col % 6 == 0 )
                    send_to_pager( "\n\r", ch );
                  }
     }
     if ( col % 6 != 0 )
     send_to_pager( "\n\r", ch );
     return;
}
       
Post is unread #2 Feb 24, 2010, 2:33 pm
Go to the top of the page
Go to the bottom of the page

Andril
Magician
GroupMembers
Posts147
JoinedJun 9, 2009

Could also change that call to pager_printf in the nested for loop command hash lookup like so:
pager_printf( ch, "%s%-12s&W ", get_help( ch, cmd->name ) ? "&W" : "&R", cmd->name );
This will display commands that have help files white, but any that don't have help files red so you'll know which ones may need creating.

Of course, if it's an issue of there is a help file and it's simply too high level for that player to read it'll still show as red, which can cause much confusion. :)
       
Post is unread #3 Feb 24, 2010, 3:44 pm
Go to the top of the page
Go to the bottom of the page

Keirath
Magician
GroupMembers
Posts144
JoinedJan 24, 2008

Ah that's a good idea. Though - in my mind - there is little opportunity that a command that an immortal has access too will have a help file too high for them to read. If that's the case, it's probably a mistake.
       
Post is unread #4 Feb 24, 2010, 3:58 pm
Go to the top of the page
Go to the bottom of the page

Andril
Magician
GroupMembers
Posts147
JoinedJun 9, 2009

I've seen it happen and yes, it's usually just a case of whoever wrote the help file not making sure to set the level properly to reflect that of the command it's meant to reference. Could also have been a case of a holder file where the coder made a help file with every intention of actually writing it up and forgetting about it. *shrug*

Either way it lets people know that there's a help file issue one way or another, even if it's just a case of needing to play with the level a little, which can be handy.

Plus you can also do it with the list of commands using that, well, command.
       
Pages:<< prev 1 next >>