Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ No wizhelp printout?

No wizhelp printout?

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


Posted by Tseris   (98 posts)  Bio
Date Sat 24 Jan 2009 03:36 AM (UTC)
Message
Not sure how I did it because I didnt change much, but 'wizhelp' isnt showing anything. It does a carriage return but doesnt display anything. Heres what I did step by step:

1) Changed MAX_LEVEL to 115, recompiled and logged in.

2) Realized I had a level 65 admin and wiz commands would be 100+. Attempted to fix this by changing #define LEVEL_AVATAR to (MAX_LEVEL - 100), thinking that it would allow me to just advance myself to level 115.

3) This didnt work so I changed LEVEL_AVATAR back and simply went into my pfile and changed the level to 115.

4) Now Im level 115 and seem to have access to all the wiz commands, but when I wizhelp, it does a carriage return and doesnt display any information. Seems really odd to me because I never touched do_wizhelp during this process. At any rate, heres my code as it stands:

in mud.h

#define MAX_LEVEL 115
#define MAX_CLAN 50
#define MAX_DEITY 50
#define MAX_CPD 4 /* Maximum council power level difference */
#define MAX_HERB 20
#define MAX_DISEASE 20
#define MAX_PERSONAL 5 /* Maximum personal skills */
#define MAX_WHERE_NAME 29
#define LEVEL_HERO (MAX_LEVEL - 15)
#define LEVEL_IMMORTAL (MAX_LEVEL - 14)
#define LEVEL_SUPREME MAX_LEVEL
#define LEVEL_INFINITE (MAX_LEVEL - 1)
#define LEVEL_ETERNAL (MAX_LEVEL - 2)
#define LEVEL_IMPLEMENTOR (MAX_LEVEL - 3)
#define LEVEL_SUB_IMPLEM (MAX_LEVEL - 4)
#define LEVEL_ASCENDANT (MAX_LEVEL - 5)
#define LEVEL_GREATER (MAX_LEVEL - 6)
#define LEVEL_GOD (MAX_LEVEL - 7)
#define LEVEL_LESSER (MAX_LEVEL - 8)
#define LEVEL_TRUEIMM (MAX_LEVEL - 9)
#define LEVEL_DEMI (MAX_LEVEL - 10)
#define LEVEL_SAVIOR (MAX_LEVEL - 11)
#define LEVEL_CREATOR (MAX_LEVEL - 12)
#define LEVEL_ACOLYTE (MAX_LEVEL - 13)
#define LEVEL_NEOPHYTE (MAX_LEVEL - 14)
#define LEVEL_AVATAR (MAX_LEVEL - 15)

#define LEVEL_LOG LEVEL_LESSER
#define LEVEL_HIGOD LEVEL_GOD



in act.wiz.c

void do_wizhelp( CHAR_DATA* ch, const char* argument)
{
CMDTYPE *cmd;
int col, hash;

col = 0;
set_pager_color( AT_PLAIN, ch );
for( hash = 0; hash < 126; hash++ )
for( cmd = command_hash[hash]; cmd; cmd = cmd->next )
if( cmd->level >= LEVEL_HERO && cmd->level <= get_trust( ch ) )
{
pager_printf( ch, "%-12s", cmd->name );
if( ++col % 6 == 0 )
send_to_pager( "\r\n", ch );
}

if( col % 6 != 0 )
send_to_pager( "\r\n", ch );
return;
}



my pfile:

#PLAYER
Version 5
Name Tseris~
Sex 1
Class 5
Race 1
Age 0 23 9 605
Languages -1 1
Level 115
Played 73799
Room 21280
HpManaMove 24 24 145 145 110 110
Gold 10000
Exp 2000
Height 24
Weight 42
Act 1644189256&2
AffectedBy 16
Position 112
Style 2
Practice 160
SavingThrows 0 0 0 0 0
Alignment 0
Favor 0
Glory 0
MGlory 0
Hitroll 0
Damroll 0
Armor 100
Resistant 2
Mentalstate -5



Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #1 on Sat 24 Jan 2009 06:38 AM (UTC)

Amended on Sat 24 Jan 2009 06:42 AM (UTC) by Nick Cash

Message
You probably need to update the command levels because of this:

if( cmd->level >= LEVEL_HERO && cmd->level <= get_trust( ch ) )


LEVEL_HERO will now be higher then it once was, and if significantly higher (I forget what the default level was) then none of the existing commands would have a level greater then your new LEVEL_HERO.

Chances are you will need to update all of the command levels in commands.dat in your system directory. This should be a simple find and replace all, searching for which old level corresponds to your new one.

I should also note that you should make sure to do a 'make all' any time you change anything in mud.h, otherwise you can get some screwy errors.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Tseris   (98 posts)  Bio
Date Reply #2 on Sat 24 Jan 2009 07:18 PM (UTC)

Amended on Sat 24 Jan 2009 07:39 PM (UTC) by Tseris

Message
Awesome, thank you.
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.


13,119 views.

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

Go to topic:           Search the forum


[Go to top] top

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