[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Wizhelp for a godwars mud (heavily modified)

Wizhelp for a godwars mud (heavily modified)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Dextermovie   (4 posts)  [Biography] bio
Date Wed 11 Jan 2006 02:16 AM (UTC)
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
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #1 on Wed 11 Jan 2006 02:34 AM (UTC)
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
[Go to top] top

Posted by Dextermovie   (4 posts)  [Biography] bio
Date Reply #2 on Wed 11 Jan 2006 01:04 PM (UTC)
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
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #3 on Wed 11 Jan 2006 04:03 PM (UTC)
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
[Go to top] top

Posted by Dextermovie   (4 posts)  [Biography] bio
Date Reply #4 on Thu 12 Jan 2006 03:08 AM (UTC)
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 ...
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #5 on Thu 12 Jan 2006 03:13 AM (UTC)
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
[Go to top] top

Posted by Dextermovies   (65 posts)  [Biography] bio
Date Reply #6 on Thu 12 Jan 2006 01:32 PM (UTC)

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
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #7 on Thu 12 Jan 2006 04:43 PM (UTC)
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
[Go to top] 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.


17,669 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]