Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing

Members: 0
Guests: 23
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
638
IgnacioBol
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » colors
Forum Rules | Mark all | Recent Posts

colors
< Newer Topic :: Older Topic > colors

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

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

Hey, I'm using smaugFUSS(thanks for the advice samson )
It has the &Y color system, which rocks. But there is one thing:
how can i use the colors in score and in for example buy lists(in shops ya know)

greetz dre

P.S.Thanx in advance
       
Post is unread #2 Jan 3, 2004, 1:38 pm
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

Assuming you mean from the source files (i.e.: modifying the source code to score and lists)...

You'd simply use the color code in the output.

example:
ch_printf( ch, "&cYou have &C%d&c out of &C%d&c mana.&D
", ch->mana, ch->max_mana );


Note: I think the &D code isn't in FUSS. Might be. It's a reset color code.
That above snippet would produce a multi-colored line of text, involving two shades of cyan.

-- X
       
Post is unread #3 Jan 3, 2004, 2:14 pm
Go to the top of the page
Go to the bottom of the page

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

Yes, fuss does use &Y and stuff, but what i meant is, when you see the list in a shop, you see:
[Lv Price] Item
[ 5 4257] &ya silver-bladed &yelven rapier.
[ 5 4257] &ya shirt made of mithril.

how can i alter this?(exactly, cause im no good at coding)
       
Post is unread #4 Jan 3, 2004, 2:37 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

By making sure the "Y" is capitalized. Color tags are case sensitive.

Oh, and Xorith, yes. FUSS has the complete color system. So &D works too.
       
Post is unread #5 Jan 3, 2004, 2:45 pm
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

Dasickone - Using &y repeatedly would cause your players to truely hate you. *g* Actually, &y would not have any color code as samson said - you'd need &Y which would equal yellow.

I recommend, in game, reading HELP PCOLORS.

-- X
       
Post is unread #6 Jan 4, 2004, 5:51 am
Go to the top of the page
Go to the bottom of the page

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

Hmm, this is weird... when i look at the shopkeeper it is holding:
(PROTO) A Silver-bladed Elven Rapier . so with color. But when you are at the
shop and you type list, it says:
[Lv Price] Item
[ 5 4257] &ya silver-bladed &yelven rapier.
[ 5 4257] &ya shirt made of mithril.

So it removes al capitalletters. how can i fix this??

greetz dre
       
Post is unread #7 Jan 4, 2004, 6:05 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

Your problem here lies in shops.c, under do_list.

You'll find the following line:

                pager_printf( ch, "[%2d %5d] %s.
",                    obj->level, cost, capitalize( obj->short_descr ) );


The problem is coming from the capitalize call. Capitalize returns a string with the first letter capitalized and the rest in lower case. So for your item listings you just want to send obj->short_descr directly instead of using capitalize on them.
       
Post is unread #8 Jan 4, 2004, 6:07 am
Go to the top of the page
Go to the bottom of the page

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

Oke, i changed it and it WORKED!
thx both

P.S.Samson rulez
       
Post is unread #9 Jan 4, 2004, 11:18 am
Go to the top of the page
Go to the bottom of the page

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

Oke, i can use colors in the list, but it looks like this:
[Lv Price] Item
[12 338] a space space space Meriadoc Short Sword.(lots o spaces )
at Meriadoc i used a color for first time, so i think that's the prob.
But how can i fix this?

greetz dre
       
Post is unread #10 Jan 4, 2004, 4:33 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

Got me there. Nothing in the formatting suggests it should be realigning spaces on stuff unless you've done some other mods I don't know about.
       
Post is unread #11 Jan 5, 2004, 9:05 am
Go to the top of the page
Go to the bottom of the page

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

I haven't. When i use say &Y lo it does the same thing.....
say &Ylo

results in you say(<-in blue)'space space lo(<-yellow)'

EDIT:I just connected to alsherok and saw that it is the same there... I'll just ask my builders not to use color in items
       
Post is unread #12 Jan 5, 2004, 3:11 pm
Go to the top of the page
Go to the bottom of the page

Zhamel

GroupMembers
Posts68
JoinedApr 5, 2005

This may just be a wild guess but ask around on your mud and see if it's happening to everyone. If not, it might be your client. I know gMUD does things like that.
       
Post is unread #13 Jan 6, 2004, 3:10 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

I would agree with the client assessment if &Y was an actual ANSI sequence that had failed to be translated. But he's seeing it display as &Y. The only problem I have is that it's not possible for it to be misdisplaying the codes on Alsherok since it would be doing so for everyone and not just one person. I also just tested it with and without ANSI being on and everything works as it should. Since FUSS uses the same color code, I can't offer an explanation. The behaviour shouldn't be possible.
       
Post is unread #14 Jan 7, 2004, 8:09 am
Go to the top of the page
Go to the bottom of the page

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

It was a client problem (GMUD SUX! )
       
Post is unread #15 Jan 11, 2004, 6:37 pm
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

You sir, need a spell checker.
'Sucks' is not spelt 'Sux'.

Damn GitSpeak.

-- X
       
Post is unread #16 Jan 19, 2004, 9:20 am
Go to the top of the page
Go to the bottom of the page

Dasickone

GroupMembers
Posts29
JoinedDec 23, 2003

Dude, I know, but sux is internet language
       
Pages:<< prev 1 next >>