Simple but I forgot...

Posted by AkiraMuyo on Mon 09 Sep 2002 12:13 AM — 3 posts, 14,984 views.

#0
I was searching around and found the code to change smaugs basic wizhelp to show them by level, ie,

[Level 60]
wiz command1 command2 etc
[Level 61]
etc

But it will only show the commands you can use and it sorts them by level. I know its really simple to add in and compile because I did it before but I forgot the code and well need help. If you know it please post it.

Thanks!,
Akira
USA #1
I'm not sure how you'd go about coding it... but I think the code for wizhelp your looking for is in act_wiz.c and do a search for do_wizhelp

If you figure out the code fo it I'd be interested in what it is... I'm not even what most would call a coder but I'm not giving up on Smaug even though I'm looking into DoT.

Again hope this helps,

Creep
#2
Ahhh, I found it! Ok this is how it works. All you gotta do in act.wiz.c is comment out the old wizhelp and replace it with this,

void do_wizhelp( CHAR_DATA *ch, 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;
}

Thanks for the help,
Akira