Discussion:
newbie
(too old to reply)
Grumpy
2004-04-04 07:34:05 UTC
Permalink
Hi Ppl,

I am new to scripting and am trying something but cannot seem to get it
right. I have a line of text and have defined each char a different colour
using the CTRL K function. I now have created a line that generates a random
number from 1-14 and an trying to substitute the %i for the colour number
in the line. And yes I get the random number. but in the say line get a ton
of %i and all the same colour text.

Any help would be appreciated.

Many thanks
Alan
PT Wang
2004-04-05 03:13:59 UTC
Permalink
Post by Grumpy
Hi Ppl,
I am new to scripting and am trying something but cannot seem to get it
right. I have a line of text and have defined each char a different colour
using the CTRL K function. I now have created a line that generates a random
number from 1-14 and an trying to substitute the %i for the colour number
in the line. And yes I get the random number. but in the say line get a ton
of %i and all the same colour text.
Each person defines each "thing" differently. It would be best if you post
your script here.
Grumpy
2004-04-05 04:18:12 UTC
Permalink
Good idea
Very simple, it's my firt, but a try none the less


/vie {
set %i = $rand(1,14)
echo %i
/say %iS13n10i8C7k10ê14r9Ss 2l4IkÊ aN Ëlf
}
Post by Grumpy
Post by Grumpy
Hi Ppl,
I am new to scripting and am trying something but cannot seem to get it
right. I have a line of text and have defined each char a different
colour
Post by Grumpy
using the CTRL K function. I now have created a line that generates a
random
Post by Grumpy
number from 1-14 and an trying to substitute the %i for the colour number
in the line. And yes I get the random number. but in the say line get a
ton
Post by Grumpy
of %i and all the same colour text.
Each person defines each "thing" differently. It would be best if you post
your script here.
PT Wang
2004-04-07 15:36:45 UTC
Permalink
Post by Grumpy
Good idea
Very simple, it's my firt, but a try none the less
/vie {
set %i = $rand(1,14)
echo %i
/say %iS13n10i8C7k10ê14r9Ss 2l4IkÊ aN Ëlf
}
In English, what do you want this alias to do? With minor modification, this
alias says out a line with the first "S" being randomly colored. Is that
what you wanted? Note that you should leave spaces around a variable
(although some characters are allowed to stick with a variable, which you'll
know sooner or later). Also, %i seems to be a temporary variable, you should
use var, which lasts only in this alias.

/vie {
var %i = $rand(1,14)
echo %i
/say %i $+ S $+ 13n10i8C7k10ê14r9Ss 2l4IkÊ aN Ëlf
}
Grumpy
2004-04-07 22:11:13 UTC
Permalink
Hi Paul,

Thanks for the feedback,
Post by PT Wang
In English, what do you want this alias to do? With minor modification, this
alias says out a line with the first "S" being randomly colored. Is that
what you wanted? Note that you should leave spaces around a variable
(although some characters are allowed to stick with a variable, which you'll
know sooner or later). Also, %i seems to be a temporary variable, you should
use var, which lasts only in this alias.
/vie {
var %i = $rand(1,14)
echo %i
/say %i $+ S $+ 13n10i8C7k10ê14r9Ss 2l4IkÊ aN Ëlf
}
U are correct I just want to randomly select the 1st colour and will then
include it along the line, I am using Mirc 6.03. I get the same result with
your version as with mine, at the beginning of the line I get %i$S etc etc,
if I use the set command I can echo the value of %i, not so with the var
command. Colour of the character is always red,

Regards
PT Wang
2004-04-07 23:42:21 UTC
Permalink
Post by Grumpy
U are correct I just want to randomly select the 1st colour and will then
include it along the line, I am using Mirc 6.03. I get the same result with
your version as with mine, at the beginning of the line I get %i$S etc etc,
if I use the set command I can echo the value of %i, not so with the var
command. Colour of the character is always red,
I must have missed a space bar. There should be a space between the color
code and %i . Or you can combine them with $+ .

/vie {
var %i = $rand(1,14)
echo %i
say  $+ %i $+ S $+ 13n10i8C7k10ê14r9Ss 2l4IkÊ aN Ëlf
}
Grumpy
2004-04-08 02:45:44 UTC
Permalink
Many thanks for that, worked a treat, had to remove the echo as it gave an
insufficient parameters error, but I will sort it from there

Thanks
Alan
Post by PT Wang
Post by Grumpy
U are correct I just want to randomly select the 1st colour and will then
include it along the line, I am using Mirc 6.03. I get the same result
with
Post by Grumpy
your version as with mine, at the beginning of the line I get %i$S etc
etc,
Post by Grumpy
if I use the set command I can echo the value of %i, not so with the var
command. Colour of the character is always red,
I must have missed a space bar. There should be a space between the color
code and %i . Or you can combine them with $+ .
/vie {
var %i = $rand(1,14)
echo %i
say  $+ %i $+ S $+ 13n10i8C7k10ê14r9Ss 2l4IkÊ aN Ëlf
}
Loading...