MUSH SUPPORT
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Ansi check code

Go down

Ansi check code Empty Ansi check code

Post  Void Sat Sep 05, 2009 2:55 am

so you want different things to happen if a person is flagged ANSI or not.

[switch(1,[hasflag(%#,ansi)],[eval(v(OPTION_IF_ANSI))],[v(OPTION_NO_ANSI)])]

you'll have to add two attributes to your object, one that contains what is shown to people with ansi support, and one for those without.

example:

@create clicker
&Option_if_ansi clicker=[ansi(gh,A green clicker.)]
&Option_no_ansi clicker=A clicker.

a person with the ansi flag set will see it in green, and ones without wont. This is more a wetfiction technicallity, since you're probably wonder what's the use in this. In wetfiction, the majority (heh) of users connect using a chatbox that uses a font where not all the letters are the same width. Therefore it's useful to enable ansi art for those who use a client to connect, but let everyone else chat away.

Suggested use btw: changing descriptions
Example: person with ansi on looks at Barrel and sees some ansi art, while another without it looks and sees text. Just include it in the desc command

@desc Barrel=[switch(1,[hasflag(%#,ansi)],[eval(v(OPTION_IF_ANSI))],[v(OPTION_NO_ANSI)])]

kbai
Void
Void
Admin

Posts : 14
Join date : 2009-08-17

https://mush.board-directory.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum