ID:178697
 
... using verbs.
can someone tell me how to make verbs that change the appearance of chat verbs (like how to make a verb that when used can make the line of text bold, italic, different color.ect.
-thank you-
--tauron--
Tauron wrote:
... using verbs.
can someone tell me how to make verbs that change the appearance of chat verbs (like how to make a verb that when used can make the line of text bold, italic, different color.ect.
-thank you-
--tauron--

Thursday arrives.

To format text in BYOND, use HTML tags: Like <B>...</B> for bold, <I>...</I> for italics, <U>...</U> for underlined. For changing the color you can use <FONT COLOR=red>...</FONT>, and you can change size with <FONT SIZE=+1>...</FONT> (to go a size higher), etc. (You can also include links, using <A>, and graphics with \icon or <IMG>.)

Like for example, suppose you want your chat text from a Say() verb to look like this:

Tauron: Hi, everybody!

Then you'd do this:
mob
verb/Say(msg as text)
set src=usr
.... // put in anti-spam stuff here; trust me, you'll need it
world << "<B>[name]:</B> [msg]"

Just to demonstrate FONT a bit, I'll show you an obj that outputs specially formatted text:
obj/sign
var/msg

verb/Read()
usr << "" // skip a line
usr << "[src] says:"
usr << "[msg]"
usr << "" // skip a line

warning
msg="<center><FONT FACE="Arial" SIZE=+2 COLOR=red>WARNING</FONT>\n\
<center><FONT FACE="
Arial" COLOR=red>This is a restricted area. \
Only authorized persons are permitted past this point.</FONT>"

Normally with <center> you'd include a closing </center> tag, but BYOND's text output acts a little funky if you do that, so I just left it off.

Lummox JR