Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Simple but I forgot...
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| AkiraMuyo
(41 posts) Bio
|
| Date
| Mon 09 Sep 2002 12:13 AM (UTC) |
| Message
| 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 | | Top |
|
| Posted by
| Creeper386
USA (62 posts) Bio
|
| Date
| Reply #1 on Mon 09 Sep 2002 05:21 AM (UTC) |
| Message
| 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 | | Top |
|
| Posted by
| AkiraMuyo
(41 posts) Bio
|
| Date
| Reply #2 on Mon 09 Sep 2002 07:01 AM (UTC) |
| Message
| 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 | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
14,354 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top