Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Majestic-12, Yahoo!

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » BEEP
Forum Rules | Mark all | Recent Posts

BEEP
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 28, 2004, 8:24 am
Go to the top of the page
Go to the bottom of the page

paradox

GroupMembers
Posts15
JoinedOct 25, 2004

I installed your beep snippet, and it works except,
it won't show up in the config menu.

Now, I checked over that part of the code, and it 'looks' fine, so
since I also just installed your compass section, and it's config status
works fine, I decided to move it up to that section just to test it.
Still no success. I'm guessing that there might be some sort of max_config or whatever,
despite the fact that it doesn't make logical sense to me

Anyways, just asking if anyone else had this problem as well, or if they know
what I can try to do to fix it.

Thx

-Paradox
       
Post is unread #2 Oct 28, 2004, 10:21 am
Go to the top of the page
Go to the bottom of the page

paradox

GroupMembers
Posts15
JoinedOct 25, 2004

Just a note, I'm seeing the same thing with the bank code now..
the code looks fine yet, in score it won't show the line..

hope that helps with a solution..

thx

-Paradox
       
Post is unread #3 Oct 28, 2004, 10:23 am
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

If your having problems with a specific piece of code, it helps immensely when you give us the exact problem, which you did, its not showing up on the config list, but we need to see your do_config function to really help. Try these though:

Did it compile, or are you using the old executable?
Did you get any errors while compiling?
       
Post is unread #4 Oct 29, 2004, 7:38 am
Go to the top of the page
Go to the bottom of the page

paradox

GroupMembers
Posts15
JoinedOct 25, 2004

Ok, sorry for that

I hope this isn't too too long, but here's my do_config from act_info.c

/*
* Contributed by Grodyn.
* Display completely overhauled, 2/97 -- Blodkai
*/
void do_config( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];

if ( IS_NPC(ch) )
return;

one_argument( argument, arg );

set_char_color( AT_GREEN, ch );

if ( arg[0] == '' )
{
set_char_color( AT_DGREEN, ch );
send_to_char( "
Configurations ", ch );
set_char_color( AT_GREEN, ch );
send_to_char( "(use 'config +/- ' to toggle, see 'help config')

", ch );
set_char_color( AT_DGREEN, ch );
send_to_char( "Display: ", ch );
set_char_color( AT_GREY, ch );
ch_printf( ch, "%-12s %-12s %-12s %-12s
%-12s %-12s %-12s %-12s
%-12s",
IS_SET( ch->pcdata->flags, PCFLAG_PAGERON ) ? "[+] PAGER"
: "[-] pager",
IS_SET( ch->pcdata->flags, PCFLAG_GAG ) ? "[+] GAG"
: "[-] gag",
xIS_SET( ch->act, PLR_BRIEF ) ? "[+] BRIEF"
: "[-] brief",
xIS_SET( ch->act, PLR_COMBINE ) ? "[+] COMBINE"
: "[-] combine",
xIS_SET( ch->act, PLR_BLANK ) ? "[+] BLANK"
: "[-] blank",
xIS_SET( ch->act, PLR_PROMPT ) ? "[+] PROMPT"
: "[-] prompt",
xIS_SET( ch->act, PLR_ANSI ) ? "[+] ANSI"
: "[-] ansi",
xIS_SET( ch->act, PLR_RIP ) ? "[+] RIP"
: "[-] rip",
xIS_SET( ch->act, PLR_COMPASS ) ? "[+] COMPASS"
: "[-] compass";);

set_char_color( AT_DGREEN, ch );
send_to_char( "

Auto: ", ch );
set_char_color( AT_GREY, ch );
ch_printf( ch, "%-12s %-12s %-12s %-12s",
xIS_SET(ch->act, PLR_AUTOSAC ) ? "[+] AUTOSAC"
: "[-] autosac",
xIS_SET(ch->act, PLR_AUTOGOLD ) ? "[+] AUTOGOLD"
: "[-] autogold",
xIS_SET(ch->act, PLR_AUTOLOOT ) ? "[+] AUTOLOOT"
: "[-] autoloot",
xIS_SET(ch->act, PLR_AUTOEXIT ) ? "[+] AUTOEXIT"
: "[-] autoexit" );

set_char_color( AT_DGREEN, ch );
send_to_char( "

Safeties: ", ch );
set_char_color( AT_GREY, ch );
ch_printf( ch, "%-12s %-12s",
IS_SET( ch->pcdata->flags, PCFLAG_NORECALL ) ? "[+] NORECALL"
: "[-] norecall",
IS_SET( ch->pcdata->flags, PCFLAG_NOSUMMON ) ? "[+] NOSUMMON"
: "[-] nosummon",
IS_SET( ch->pcdata->flags, PCFLAG_NOBEEP ) ? "[+] NOBEEP"
: "[-] nobeep" );



if ( !IS_SET( ch->pcdata->flags, PCFLAG_DEADLY ) )
ch_printf( ch, " %-12s %-12s",
xIS_SET(ch->act, PLR_SHOVEDRAG ) ? "[+] DRAG"
: "[-] drag",
xIS_SET(ch->act, PLR_NICE ) ? "[+] NICE"
: "[-] nice" );

set_char_color( AT_DGREEN, ch );
send_to_char( "

Misc: ", ch );
set_char_color( AT_GREY, ch );
ch_printf( ch, "%-12s %-12s %-12s",
xIS_SET(ch->act, PLR_TELNET_GA ) ? "[+] TELNETGA"
: "[-] telnetga",
IS_SET( ch->pcdata->flags, PCFLAG_GROUPWHO ) ? "[+] GROUPWHO"
: "[-] groupwho",
IS_SET( ch->pcdata->flags, PCFLAG_NOINTRO ) ? "[+] NOINTRO"
: "[-] nointro" );

set_char_color( AT_DGREEN, ch );
send_to_char( "

Settings: ", ch );
set_char_color( AT_GREY, ch );
ch_printf_color( ch, "Pager Length (%d) Wimpy (&W%d&w)",
ch->pcdata->pagerlen,
ch->wimpy );

if ( IS_IMMORTAL( ch ) )
{
set_char_color( AT_DGREEN, ch );
send_to_char( "

Immortal toggles: ", ch );
set_char_color( AT_GREY, ch );
ch_printf( ch, "Roomvnum [%s] Automap [%s]",
xIS_SET(ch->act, PLR_ROOMVNUM ) ? "+"
: " ",
xIS_SET(ch->act, PLR_AUTOMAP ) ? "+"
: " " );
}

set_char_color( AT_DGREEN, ch );
send_to_char( "

Sentences imposed on you (if any):", ch );
set_char_color( AT_YELLOW, ch );
ch_printf( ch, "
%s%s%s%s%s%s",
xIS_SET(ch->act, PLR_SILENCE ) ?
" For your abuse of channels, you are currently silenced.
" : "",
xIS_SET(ch->act, PLR_NO_EMOTE ) ?
" The gods have removed your emotes.
" : "",
xIS_SET(ch->act, PLR_NO_TELL ) ?
" You are not permitted to send 'tells' to others.
" : "",
xIS_SET(ch->act, PLR_LITTERBUG )?
" A convicted litterbug. You cannot drop anything.
" : "",
xIS_SET(ch->act, PLR_THIEF ) ?
" A proven thief, you will be hunted by the authorities.
" : "",
xIS_SET(ch->act, PLR_KILLER ) ?
" For the crime of murder you are sentenced to death...
" : "" );
}
else
{
bool fSet;
int bit = 0;

if ( arg[0] == '+' ) fSet = TRUE;
else if ( arg[0] == '-' ) fSet = FALSE;
else
{
send_to_char( "Config -option or +option?
", ch );
return;
}

if ( !str_prefix( arg+1, "autoexit" ) ) bit = PLR_AUTOEXIT;
else if ( !str_prefix( arg+1, "autoloot" ) ) bit = PLR_AUTOLOOT;
else if ( !str_prefix( arg+1, "autosac" ) ) bit = PLR_AUTOSAC;
else if ( !str_prefix( arg+1, "autogold" ) ) bit = PLR_AUTOGOLD;
else if ( !str_prefix( arg+1, "blank" ) ) bit = PLR_BLANK;
else if ( !str_prefix( arg+1, "brief" ) ) bit = PLR_BRIEF;
else if ( !str_prefix( arg+1, "combine" ) ) bit = PLR_COMBINE;
else if ( !str_prefix( arg+1, "prompt" ) ) bit = PLR_PROMPT;
else if ( !str_prefix( arg+1, "telnetga" ) ) bit = PLR_TELNET_GA;
else if ( !str_prefix( arg+1, "ansi" ) ) bit = PLR_ANSI;
else if ( !str_prefix( arg+1, "rip" ) ) bit = PLR_RIP;
else if ( !str_prefix( arg+1, "compass" ) ) bit = PLR_COMPASS;
/* else if ( !str_prefix( arg+1, "flee" ) ) bit = PLR_FLEE; */
else if ( !str_prefix( arg+1, "nice" ) ) bit = PLR_NICE;
else if ( !str_prefix( arg+1, "drag" ) ) bit = PLR_SHOVEDRAG;
else if ( IS_IMMORTAL( ch )
&& !str_prefix( arg+1, "vnum" ) ) bit = PLR_ROOMVNUM;
else if ( IS_IMMORTAL( ch )
&& !str_prefix( arg+1, "map" ) ) bit = PLR_AUTOMAP; /* maps */

if (bit)
{
if ( (bit == PLR_FLEE || bit == PLR_NICE || bit == PLR_SHOVEDRAG)
&& IS_SET( ch->pcdata->flags, PCFLAG_DEADLY ) )
{
send_to_char( "Pkill characters can not config that option.
", ch );
return;
}

if ( fSet )
xSET_BIT (ch->act, bit);
else
xREMOVE_BIT(ch->act, bit);
send_to_char( "Ok.
", ch );
return;
}
else
{
if ( !str_prefix( arg+1, "norecall" ) ) bit = PCFLAG_NORECALL;
else if ( !str_prefix( arg+1, "nointro" ) ) bit = PCFLAG_NOINTRO;
else if ( !str_prefix( arg+1, "nosummon" ) ) bit = PCFLAG_NOSUMMON;
else if ( !str_prefix( arg+1, "gag" ) ) bit = PCFLAG_GAG;
else if ( !str_prefix( arg+1, "pager" ) ) bit = PCFLAG_PAGERON;
else if ( !str_prefix( arg+1, "nobeep" ) ) bit = PCFLAG_NOBEEP;
else if ( !str_prefix( arg+1, "groupwho" ) ) bit = PCFLAG_GROUPWHO;
else if ( !str_prefix( arg+1, "@hgflag_" ) ) bit = PCFLAG_HIGHGAG;
else
{
send_to_char( "Config which option?
", ch );
return;
}

if ( fSet )
SET_BIT (ch->pcdata->flags, bit);
else
REMOVE_BIT (ch->pcdata->flags, bit);

send_to_char( "Ok.
", ch );
return;
}
}

return;
}


again, it appears to be fine, very similar to every other option etc.. hope this helps

thx

-Paradox
       
Post is unread #5 Oct 29, 2004, 7:39 am
Go to the top of the page
Go to the bottom of the page

paradox

GroupMembers
Posts15
JoinedOct 25, 2004

just a note, it looks a little screwy, but that's due to the max line length on the forums, no tthe file iteself

-Paradox
       
Post is unread #6 Oct 29, 2004, 9:21 pm
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

The problem is here
ch_printf( ch, "%-12s %-12s",IS_SET( ch->pcdata->flags, PCFLAG_NORECALL ) ? "[+] NORECALL": "[-] norecall",IS_SET( ch->pcdata->flags, PCFLAG_NOSUMMON ) ? "[+] NOSUMMON": "[-] nosummon",IS_SET( ch->pcdata->flags, PCFLAG_NOBEEP ) ? "[+] NOBEEP": "[-] nobeep" );


Should look like this:
ch_printf( ch, "%-12s %-12s %-12s",IS_SET( ch->pcdata->flags, PCFLAG_NORECALL ) ? "[+] NORECALL": "[-] norecall",IS_SET( ch->pcdata->flags, PCFLAG_NOSUMMON ) ? "[+] NOSUMMON": "[-] nosummon",IS_SET( ch->pcdata->flags, PCFLAG_NOBEEP ) ? "[+] NOBEEP": "[-] nobeep" );


You can use the code button when you post to keep your formatting
       
Post is unread #7 Oct 29, 2004, 9:36 pm
Go to the top of the page
Go to the bottom of the page

paradox

GroupMembers
Posts15
JoinedOct 25, 2004

yeah, that was part of the formatting.. so I'll repost with it in the code button.. thx for that btw

/* * Contributed by Grodyn. * Display completely overhauled, 2/97 -- Blodkai */void do_config( CHAR_DATA *ch, char *argument ){    char arg[MAX_INPUT_LENGTH];     if ( IS_NPC(ch) )        return;     one_argument( argument, arg );     set_char_color( AT_GREEN, ch );     if ( arg[0] == '' )    {      set_char_color( AT_DGREEN, ch );      send_to_char( "
Configurations ", ch );      set_char_color( AT_GREEN, ch );      send_to_char( "(use 'config +/- ' to toggle, see 'help config')

", ch );      set_char_color( AT_DGREEN, ch );      send_to_char( "Display:   ", ch );      set_char_color( AT_GREY, ch );      ch_printf( ch, "%-12s   %-12s   %-12s   %-12s
           %-12s   %-12s   %-12s   %-12s
           %-12s",        IS_SET( ch->pcdata->flags, PCFLAG_PAGERON )  ? "[+] PAGER"                                                    	: "[-] pager",        IS_SET( ch->pcdata->flags, PCFLAG_GAG )      ? "[+] GAG"                                                    	: "[-] gag",        xIS_SET( ch->act, PLR_BRIEF )                	? "[+] BRIEF"                                                    	: "[-] brief",        xIS_SET( ch->act, PLR_COMBINE )              	? "[+] COMBINE"                                                    	: "[-] combine",        xIS_SET( ch->act, PLR_BLANK )                	? "[+] BLANK"                                                    	: "[-] blank",        xIS_SET( ch->act, PLR_PROMPT )                ? "[+] PROMPT"                                                    	: "[-] prompt",        xIS_SET( ch->act, PLR_ANSI )                  ? "[+] ANSI"                                                    	: "[-] ansi",        xIS_SET( ch->act, PLR_RIP )                  	? "[+] RIP"                                                    	: "[-] rip",	xIS_SET( ch->act, PLR_COMPASS )  	? "[+] COMPASS"      	: "[-] compass";);      set_char_color( AT_DGREEN, ch );      send_to_char( "

Auto:      ", ch );      set_char_color( AT_GREY, ch );      ch_printf( ch, "%-12s   %-12s   %-12s   %-12s",        xIS_SET(ch->act, PLR_AUTOSAC  )              ? "[+] AUTOSAC"                                                    	: "[-] autosac",        xIS_SET(ch->act, PLR_AUTOGOLD )              ? "[+] AUTOGOLD"                                                    	: "[-] autogold",        xIS_SET(ch->act, PLR_AUTOLOOT )              ? "[+] AUTOLOOT"                                                    	: "[-] autoloot",        xIS_SET(ch->act, PLR_AUTOEXIT )              ? "[+] AUTOEXIT"                                                    	: "[-] autoexit" );       set_char_color( AT_DGREEN, ch );      send_to_char( "

Safeties:  ", ch );      set_char_color( AT_GREY, ch );      ch_printf( ch, "%-12s   %-12s",        IS_SET( ch->pcdata->flags, PCFLAG_NORECALL )  ? "[+] NORECALL"                                                      : "[-] norecall",        IS_SET( ch->pcdata->flags, PCFLAG_NOSUMMON )  ? "[+] NOSUMMON"                                                      : "[-] nosummon",	IS_SET( ch->pcdata->flags, PCFLAG_NOBEEP   )  	? "[+] NOBEEP"        : "[-] nobeep" );       if ( !IS_SET( ch->pcdata->flags, PCFLAG_DEADLY ) )        ch_printf( ch, "   %-12s   %-12s",           xIS_SET(ch->act, PLR_SHOVEDRAG )             ? "[+] DRAG"                                                        : "[-] drag",           xIS_SET(ch->act, PLR_NICE )                ? "[+] NICE"                                                      : "[-] nice" );       set_char_color( AT_DGREEN, ch );      send_to_char( "

Misc:      ", ch );      set_char_color( AT_GREY, ch );      ch_printf( ch, "%-12s   %-12s   %-12s",    xIS_SET(ch->act, PLR_TELNET_GA )  ? "[+] TELNETGA"                                                        : "[-] telnetga",           IS_SET( ch->pcdata->flags, PCFLAG_GROUPWHO ) ? "[+] GROUPWHO"                                                        : "[-] groupwho",           IS_SET( ch->pcdata->flags, PCFLAG_NOINTRO )  ? "[+] NOINTRO"                                                        : "[-] nointro" );       set_char_color( AT_DGREEN, ch );      send_to_char( "

Settings:  ", ch );      set_char_color( AT_GREY, ch );      ch_printf_color( ch, "Pager Length (%d)    Wimpy (&W%d&w)",      	ch->pcdata->pagerlen,              ch->wimpy );       if ( IS_IMMORTAL( ch ) )      {	set_char_color( AT_DGREEN, ch );        send_to_char( "

Immortal toggles:  ", ch );        set_char_color( AT_GREY, ch );        ch_printf( ch, "Roomvnum [%s]    Automap [%s]",   xIS_SET(ch->act, PLR_ROOMVNUM )  	? "+"      	: " ",          xIS_SET(ch->act, PLR_AUTOMAP  )  	? "+"      	: " " );      }       set_char_color( AT_DGREEN, ch );      send_to_char( "

Sentences imposed on you (if any):", ch );      set_char_color( AT_YELLOW, ch );      ch_printf( ch, "
%s%s%s%s%s%s",          xIS_SET(ch->act, PLR_SILENCE )  ?            " For your abuse of channels, you are currently silenced.
" : "",          xIS_SET(ch->act, PLR_NO_EMOTE ) ?            " The gods have removed your emotes.
"                      : "",           xIS_SET(ch->act, PLR_NO_TELL )  ?            " You are not permitted to send 'tells' to others.
"        : "",           xIS_SET(ch->act, PLR_LITTERBUG )?            " A convicted litterbug.  You cannot drop anything.
"       : "",           xIS_SET(ch->act, PLR_THIEF )    ?            " A proven thief, you will be hunted by the authorities.
"  : "",           xIS_SET(ch->act, PLR_KILLER )   ?            " For the crime of murder you are sentenced to death...
"   : "" );    }    else    {	bool fSet;	int bit = 0;      if ( arg[0] == '+' ) fSet = TRUE;	else if ( arg[0] == '-' ) fSet = FALSE;	else	{     send_to_char( "Config -option or +option?
", ch );     return;	}      if ( !str_prefix( arg+1, "autoexit" ) ) bit = PLR_AUTOEXIT;	else if ( !str_prefix( arg+1, "autoloot" ) ) bit = PLR_AUTOLOOT;	else if ( !str_prefix( arg+1, "autosac"  ) ) bit = PLR_AUTOSAC;	else if ( !str_prefix( arg+1, "autogold" ) ) bit = PLR_AUTOGOLD;	else if ( !str_prefix( arg+1, "blank"    ) ) bit = PLR_BLANK;	else if ( !str_prefix( arg+1, "brief"    ) ) bit = PLR_BRIEF;	else if ( !str_prefix( arg+1, "combine"  ) ) bit = PLR_COMBINE;	else if ( !str_prefix( arg+1, "prompt"   ) ) bit = PLR_PROMPT;	else if ( !str_prefix( arg+1, "telnetga" ) ) bit = PLR_TELNET_GA;	else if ( !str_prefix( arg+1, "ansi"     ) ) bit = PLR_ANSI;	else if ( !str_prefix( arg+1, "rip"      ) ) bit = PLR_RIP;	else if ( !str_prefix( arg+1, "compass"  ) ) bit = PLR_COMPASS;/*	else if ( !str_prefix( arg+1, "flee"     ) ) bit = PLR_FLEE; */	else if ( !str_prefix( arg+1, "nice"     ) ) bit = PLR_NICE;	else if ( !str_prefix( arg+1, "drag"     ) ) bit = PLR_SHOVEDRAG;	else if ( IS_IMMORTAL( ch )      &&   !str_prefix( arg+1, "vnum"     ) ) bit = PLR_ROOMVNUM;	else if ( IS_IMMORTAL( ch )      &&   !str_prefix( arg+1, "map"      ) ) bit = PLR_AUTOMAP;     /* maps */	if (bit)        {     if ( (bit == PLR_FLEE || bit == PLR_NICE || bit == PLR_SHOVEDRAG)    &&  IS_SET( ch->pcdata->flags, PCFLAG_DEADLY ) )          {     send_to_char( "Pkill characters can not config that option.
", ch );     return;          }             if ( fSet )     xSET_BIT   (ch->act, bit);   else     xREMOVE_BIT(ch->act, bit);   send_to_char( "Ok.
", ch );          return;        }        else        {        if ( !str_prefix( arg+1, "norecall" ) ) bit = PCFLAG_NORECALL;   else if ( !str_prefix( arg+1, "nointro"  ) ) bit = PCFLAG_NOINTRO;   else if ( !str_prefix( arg+1, "nosummon" ) ) bit = PCFLAG_NOSUMMON;          else if ( !str_prefix( arg+1, "gag"      ) ) bit = PCFLAG_GAG;           else if ( !str_prefix( arg+1, "pager"    ) ) bit = PCFLAG_PAGERON;   else if ( !str_prefix( arg+1, "nobeep"   ) ) bit = PCFLAG_NOBEEP;          else if ( !str_prefix( arg+1, "groupwho" ) ) bit = PCFLAG_GROUPWHO;   else if ( !str_prefix( arg+1, "@hgflag_" ) ) bit = PCFLAG_HIGHGAG;          else   {     send_to_char( "Config which option?
", ch );     return;       }          if ( fSet )     SET_BIT    (ch->pcdata->flags, bit);   else     REMOVE_BIT (ch->pcdata->flags, bit);   send_to_char( "Ok.
", ch );          return;        }    }    return;}
       
Post is unread #8 Oct 29, 2004, 10:22 pm
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

You post doesn't show that you changed the code to work, did you? There is a %-12s missing
       
Pages:<< prev 1 next >>