|
Smokabul Novice
Joined: 27 Sep 2002 Posts: 37 Location: USA
|
Posted: Fri Jul 18, 2003 12:49 am
random colors |
im trying to make a scrpit that will make each of the words in the line of text in a certain channel a differnt color (random color each time), i have gotten it to work already but there are only 20 different words i can use and if i dont use the 20 words there are still alot of empty spaces where a wod should go to fill the spaces....
anyway i was just wodering if anyone knows a way to make a script that will count how many word you typed and then assign a random color to each word. there are 14 colors and im pretty sure they are basic colors on any mud. @r @R @b @B @g @G @y @Y @m @M @w @W @c @C
im sorry if this is hard to understand |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Jul 18, 2003 12:54 am |
%numwords("%-1")
|
|
|
|
Smokabul Novice
Joined: 27 Sep 2002 Posts: 37 Location: USA
|
Posted: Fri Jul 18, 2003 1:03 am |
this is what i have sofar if it helps at all the talk is the channel it goes to
oneword=%1
twoword=%2
threeword=%3
fourword=%4
fiveword=%5
sixword=%6
sevenword=%7
eightword=%8
nineword=%9
tenword=%10
elevenword=%11
twelveword=%12
thirteenword=%13
fourteenword=%14
fifteenword=%15
sixteenword=%16
seventeenword=%17
nineteenword=%19
twentyword=%20
talk %item( ?colorlist, %random( 1, 14))?oneword %item( ?colorlist, %random( 1, 14))?twoword %item( ?colorlist, %random( 1, 14))?threeword %item( ?colorlist, %random( 1, 14))?fourword %item( ?colorlist, %random( 1, 14))?fiveword %item( ?colorlist, %random( 1, 14))?sixword %item( ?colorlist, %random( 1, 14))?sevenword %item( ?colorlist, %random( 1, 14))?eightword %item( ?colorlist, %random( 1, 14))?nineword %item( ?colorlist, %random( 1, 14))?tenword %item( ?colorlist, %random( 1, 14))?elevenword %item( ?colorlist, %random( 1, 14))?twelveword %item( ?colorlist, %random( 1, 14))?thirteenword %item( ?colorlist, %random( 1, 14))?fourteenword %item( ?colorlist, %random( 1, 14))?fifteenword %item( ?colorlist, %random( 1, 14))?sixteenword %item( ?colorlist, %random( 1, 14))?seventeenword %item( ?colorlist, %random( 1, 14))?eightteenword %item( ?colorlist, %random( 1, 14))?nineteenword %item( ?colorlist, %random( 1, 14))?twentyword |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jul 18, 2003 5:01 am |
#AL randomcolortalk {#SENDP "talk ";#LOOP 1,%numparam() {#SENDP "@"%case( %random( 1, 14), r, R, b, B, g, G, y, Y, m, M, w, W, c, C)%param( %i)};#CR}
|
|
|
|
Smokabul Novice
Joined: 27 Sep 2002 Posts: 37 Location: USA
|
Posted: Fri Jul 18, 2003 11:46 am |
oh thats badass man it world almost flawlessly.. just no spaces between words but i fixed it
#SENDP "talk
#LOOP 1,%numparam( ) {#SENDP "@"%case( %random( 1, 14), r, R, b, B, g, G, y, Y, m, M, w, W, c, C)%param( %i)" "}
#CR
what was added in putple |
|
|
|
|
|
|
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
|
|