Login
User Name:

Password:



Register

Forgot your password?
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
I3 and IMC
Dec 8, 2024 6:35 pm
By Remcon
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
LOP 1.5
Author: Remcon
Submitted by: Remcon
Users Online
Bing, DotBot, AhrefsBot

Members: 0
Guests: 52
Stats
Files
Topics
Posts
Members
Newest Member
494
3,808
19,707
588
Mortrex

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » 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 7:54 am   
Go to the top of the page
Go to the bottom of the page

Keirath
Magician
GroupMembers
Posts148
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 4: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 5:44 pm   
Go to the top of the page
Go to the bottom of the page

Keirath
Magician
GroupMembers
Posts148
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 5: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 >>