|
racolon Beginner
Joined: 27 Apr 2003 Posts: 25 Location: USA
|
Posted: Sat May 24, 2003 4:31 pm
Whats wrong with these? |
#IF (%null(%1)) {#SHOW {%char(10)@ansi(White)Please choose one of the following.%char(10)%char(10)@ansi(dGreen)Type @ansi(bMagenta)spconfig spells @ansi(dGreen)to choose what spells to cast during spellup.%char(10)Type @ansi(bMagenta)spconfig options @ansi(dGreen)to configure how this script works.}};#IF ("%1" = "spells") {#VARIABLE listSpells.pick {%null};#FORALL @listSpells.all {#IF (%ismember(%i,@listSpells.spellup)) {#ADDITEM listSpells.pick {~*%i}} {#ADDITEM listSpells.pick {%i}}};#VARIABLE listSpells.spellup {%pick('p:Select the spells you wish to use in your spellup.',@listSpells.pick)}};#IF ("%1" = "options") {#VARIABLE spOptions.pick {%null};#FORALL @spOptions.all {#IF (%ismember(%trim(%right(%i,%pos(":",%i))),@spOptions.selected)) {#ADDITEM spOptions.pick {~*%i}} {#ADDITEM spOptions.pick {%i}}};#VARIABLE spOptions.selected {%pick('p:Spellup Options List',@spOptions.pick)};#IF (%ismember(spemote,@spOptions.selected)) {#PROMPT spOptions.emote "Please enter the message you wish to emote before spelling up."}}
Plain simple its not giving me any color and what is doing is this:
@ansi(White)Please choose one of the following.
@ansi(dGreen)Type @ansi(bMagenta)spconfig spells @ansi(dGreen)to choose what spells to cast during spellup.
Type @ansi(bMagenta)spconfig options @ansi(dGreen)to configure how this script works.
Randy |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat May 24, 2003 6:48 pm |
quote:
#IF (%null(%1)) {#SHOW {%char(10)@ansi(White)Please choose one of the following.%char(10)%char(10)@ansi(dGreen)Type @ansi(bMagenta)spconfig spells @ansi(dGreen)to choose what spells to cast during spellup.%char(10)Type @ansi(bMagenta)spconfig options @ansi(dGreen)to configure how this script works.}};#IF ("%1" = "spells") {#VARIABLE listSpells.pick {%null};#FORALL @listSpells.all {#IF (%ismember(%i,@listSpells.spellup)) {#ADDITEM listSpells.pick {~*%i}} {#ADDITEM listSpells.pick {%i}}};#VARIABLE listSpells.spellup {%pick('p:Select the spells you wish to use in your spellup.',@listSpells.pick)}};#IF ("%1" = "options") {#VARIABLE spOptions.pick {%null};#FORALL @spOptions.all {#IF (%ismember(%trim(%right(%i,%pos(":",%i))),@spOptions.selected)) {#ADDITEM spOptions.pick {~*%i}} {#ADDITEM spOptions.pick {%i}}};#VARIABLE spOptions.selected {%pick('p:Spellup Options List',@spOptions.pick)};#IF (%ismember(spemote,@spOptions.selected)) {#PROMPT spOptions.emote "Please enter the message you wish to emote before spelling up."}}
Plain simple its not giving me any color and what is doing is this:
@ansi(White)Please choose one of the following.
@ansi(dGreen)Type @ansi(bMagenta)spconfig spells @ansi(dGreen)to choose what spells to cast during spellup.
Type @ansi(bMagenta)spconfig options @ansi(dGreen)to configure how this script works.
Randy
There is no @ansi() function in ZMud. What you are looking for is %ansi().
li'l shmoe of Dragon's Gate MUD |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 24, 2003 8:26 pm |
Another thing to change is the color names. zMUD doesn't recognize dGreen, bMagenta, etc. You'll have to use green, hi,magenta, etc. instead (see below).
The #COLOR helpfile used to include a nice list of the standard colors (recognized by %ansi, %color, #COLOR, #CW, etc.) which gave the corresponding numbers and the formulas to generate the number for a particular combo. I've done my best to reproduce it here:
0 black
1 blue
2 green
3 cyan
4 red
5 magenta
6 brown
7 gray
For bright colors, add 8 (Special color names, 14 = yellow, 15 = white)
For background color, multiply by 16
For bold font (if enabled), add 128
For underline add 256
For blink add 512
Your number will be the sum of all the color/attribute choices you've made.
Examples:
#COLOR 1 //blue (1)
#COLOR 10 //bright green (8 + 2)
#COLOR 75 //bright cyan with red background (8 + 3 + (8 * 4))
#COLOR 135 //bold grey (usually mapped to bright grey) (128 + 7)
#COLOR 269 // underlined bright magenta (256 + 8 + 5)
#COLOR 526 // blinking bright brown (yellow) (512 + 8 + 6)
#COLOR 558 // blinking yellow with green background (512 + 14 + (16 *2))
It's usually easier to just use the names, though. The same examples using text. NOTE: No spaces between words.
#COLOR blue
#COLOR hi,green
#COLOR hi,cyan,red
#COLOR bold,grey
#COLOR under,hi,magenta
#COLOR blink,hi,brown
#COLOR blink,yellow,green
Unfortunately, the last time the helpfile was revised this table was either removed or moved to another topic which isn't referenced in any of these commands/functions. It would be nice to have it restored.
LightBulb
Advanced Member |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|