|
Wizhelp for a godwars mud (heavily modified)
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Dextermovie
(4 posts) bio
|
| Date |
Wed 11 Jan 2006 02:16 AM (UTC) [ quote
] |
| Message |
our Wizhelp only gives those of each lvl The powers of that lvl and lvl 5 IE, if your 11, you only have lv.11 powers and lv.5 powers same with 8 - lv. 8 powers and lv. 5 powers.. we wana make it so that 11 has all its powers and the ones below it.
here is the wizhelp code
void do_wizhelp( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
int cmd;
int col;
int rep;
// Levels added by: NebuLogic
col = 0;
for ( rep = 1; rep <= 12; rep ++ )
{
for ( cmd = 0; cmd_table[cmd].name[0] != '\0'; cmd++ )
{
if (cmd_table[cmd].level != rep)
continue;
if (cmd_table[cmd].level < 4)
continue;
if (ch->level < 12 && ch->trust < 12 && ch->level > 3 &&
cmd_table[cmd].level != ch->level && cmd_table[cmd].level > 5)
continue;
else
{
sprintf( buf, "#c[#C%-2d#c]#7%-12s", cmd_table[cmd].level, cmd_table[cmd].name );
send_to_char( buf, ch );
if ( ++col % 4 == 0 )
send_to_char( "\n\r", ch );
}
}
}
if ( col % 4 != 0 )
send_to_char( "\n\r", ch );
return;
}
any help on this is greatly appreciated | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #1 on Wed 11 Jan 2006 02:34 AM (UTC) [ quote
] |
| Message |
If this is Godwars, wrong section. GodWars isn't Smaug.
From my best guess, modifying the wizhelp will not change the permissions of the commands. You may be in the wrong place. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
| Posted by |
Dextermovie
(4 posts) bio
|
| Date |
Reply #2 on Wed 11 Jan 2006 01:04 PM (UTC) [ quote
] |
| Message |
| ok, thanks I am not actually trying to change the level of the commands ... just what commands show up when you use the wiz help command | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #3 on Wed 11 Jan 2006 04:03 PM (UTC) [ quote
] |
| Message |
Well to start, you don't need this else:
if (ch->level < 12 && ch->trust < 12 && ch->level > 3 &&
cmd_table[cmd].level != ch->level && cmd_table[cmd].level > 5)
continue;
else
Since it already continues, there is no need for an else. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
| Posted by |
Dextermovie
(4 posts) bio
|
| Date |
Reply #4 on Thu 12 Jan 2006 03:08 AM (UTC) [ quote
] |
| Message |
Ok, after talking to the mud owner and about an hour of him getting pissy about it .. I got what he wants ..
he wants lvl 5-10 to be able to see their trust level and level 5 comands ( level 6 =6,5 commands ... level 7 = level 7 and 5 .. etc)
level 11 to be able to see level 11 and lower commands, and level 12 to be able to see all the commands
yet again, any help is greatly appreciated ...
| top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #5 on Thu 12 Jan 2006 03:13 AM (UTC) [ quote
] |
| Message |
Try this:
if ( ch->level >= 5 && ch->level <= 10 && (cmd_table[cmd].level != ch->trust || cmd_table[cmd].level != 5 ))
continue;
|
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
| Posted by |
Dextermovies
(65 posts) bio
|
| Date |
Reply #6 on Thu 12 Jan 2006 01:32 PM (UTC) [ quote
] Amended on Thu 12 Jan 2006 01:40 PM (UTC) by Dextermovies
|
| Message |
if I replace our " if (ch->level < 12 && ch->trust < 12 && ch->level > 3 &&
cmd_table[cmd].level != ch->level && cmd_table[cmd].level > 5)
continue;
else"
then no imm under level 11 can see any of their imm commands
** Edit **
With the way the wizhelp was, every thing worked but level 11 can not see level 6,7,8,9,10 commands | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #7 on Thu 12 Jan 2006 04:43 PM (UTC) [ quote
] |
| Message |
| The code that I gave you has nothing to do with a level 11. Which means the problem is in the code you already have. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | 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.
2,111 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )