Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Bing, Yahoo!, DotBot, Sogou

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Compass question
Forum Rules | Mark all | Recent Posts

Compass question
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 16, 2004, 9:23 pm
Go to the top of the page
Go to the bottom of the page

oblivion

GroupMembers
Posts14
JoinedJan 4, 2004

I am having some problems altering the comapss.. how would I make it so instead of just having the color also have a symbol # to signify its closed. I am using the latest afkmud release
       
Post is unread #2 Jan 18, 2004, 11:05 pm   Last edited Nov 13, 2005, 1:34 pm by Samson
Go to the top of the page
Go to the bottom of the page

Snowleaf

GroupMembers
Posts12
JoinedApr 13, 2003

I'm not the greatest coder but I got it to work this way.

I took this portion of code in act_info.c

                if( pexit->vdir == DIR_NORTH )
                   sprintf( dir_n, "%sN", exitcolor );

                if( pexit->vdir == DIR_EAST )
                   sprintf( dir_e, "%sE", exitcolor );

                if( pexit->vdir == DIR_SOUTH )
                   sprintf( dir_s, "%sS", exitcolor );

                if( pexit->vdir == DIR_WEST )
                   sprintf( dir_w, "%sW", exitcolor );

                if( pexit->vdir == DIR_UP )
                   sprintf( dir_u, "%sU", exitcolor );

                if( pexit->vdir == DIR_DOWN )
                   sprintf( dir_d, "%sD", exitcolor );

                if( pexit->vdir == DIR_NORTHEAST )
                   sprintf( dir_ne, "%sNE", exitcolor );

                if( pexit->vdir == DIR_NORTHWEST )
                   sprintf( dir_nw, "%sNW", exitcolor );

                if( pexit->vdir == DIR_SOUTHEAST )
                   sprintf( dir_se, "%sSE", exitcolor );

                if( pexit->vdir == DIR_SOUTHWEST )
                   sprintf( dir_sw, "%sSW", exitcolor );


and changed it to look like this..

                if( pexit->vdir == DIR_NORTH && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_n, "%sN", exitcolor );

                if( pexit->vdir == DIR_NORTH && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_n, "%s#", exitcolor );

                if( pexit->vdir == DIR_EAST && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_e, "%sE", exitcolor );

                if( pexit->vdir == DIR_EAST && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_e, "%s#", exitcolor );

                if( pexit->vdir == DIR_SOUTH && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_s, "%sS", exitcolor );

                if( pexit->vdir == DIR_SOUTH && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_s, "%s#", exitcolor );

                if( pexit->vdir == DIR_WEST && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_w, "%sW", exitcolor );

                if( pexit->vdir == DIR_WEST && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_w, "%s#", exitcolor );

                if( pexit->vdir == DIR_UP && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_u, "%sU", exitcolor );

                if( pexit->vdir == DIR_UP && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_u, "%s#", exitcolor );          

                if( pexit->vdir == DIR_DOWN && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_d, "%sD", exitcolor );

                if( pexit->vdir == DIR_DOWN && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_d, "%s#", exitcolor );

                if( pexit->vdir == DIR_NORTHEAST && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_ne, "%sNE", exitcolor );

                if( pexit->vdir == DIR_NORTHEAST && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_ne, "%s#", exitcolor );

                if( pexit->vdir == DIR_NORTHWEST && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_nw, "%sNW", exitcolor );

                if( pexit->vdir == DIR_NORTHWEST && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_nw, " %s#", exitcolor );

                if( pexit->vdir == DIR_SOUTHEAST && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_se, "%sSE", exitcolor );

                if( pexit->vdir == DIR_SOUTHEAST && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_se, "%s#", exitcolor );

                if( pexit->vdir == DIR_SOUTHWEST && !xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_sw, "%sSW", exitcolor );

                if( pexit->vdir == DIR_SOUTHWEST && xIS_SET( pexit->exit_info, EX_CLOSED ) )
                   sprintf( dir_sw, " %s#", exitcolor );


If there is a more elegant way to do this, which is highly likely, I'd like to see it.
       
Post is unread #3 Jan 21, 2004, 1:55 am
Go to the top of the page
Go to the bottom of the page

oblivion

GroupMembers
Posts14
JoinedJan 4, 2004

thanks snow btw see you on MM
       
Pages:<< prev 1 next >>