Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

10 443 Posts in 5 818 Topics- by 1 216 Members - Latest Member: santini862

16 October 2019, 11:48
Select Language English | Russian ru | German
Main PageIRC Client KVIrc forumKVIrc discussionKVIrc scriptingRainbow script
Pages: [1]
Print
Author Topic: Rainbow script  (Read 7632 times)
0 Members and 1 Guest are viewing this topic.
b0nk
Новичок
*

Репутация: 0
Gender: Male
Posts: 13



View Profile
« on: 26 October 2012, 04:55 »

I'm trying to write a script to output a given string with a series of colors

I thought about splitting the string and putting each character inside an array and then build a new string with each char from the array with a different color.

Code:
%str[] = $str.split(*,$0-,w);
%length = $str.length($0-);
echo %length;

for(%i = 0; %i <= %length; %i++){

echo %str[%i]\n;
}

say %newstr;

The echo in the cycle is for testing purposes
Help me on this.
Logged
alexzulu
Постоялец
***

Репутация: 34
Posts: 211



View Profile Email
« Reply #1 on: 26 October 2012, 16:28 »

Code:
alias(diksi_slaps::RainbowText)
{
%data = $string($0-);
%colors = $array(4,7,8,3,12,2,6);
%len = $length(%data);
%count = $length(%colors);
for(%i = 0; %i <=$(%len - 1); %i++)
{
if(%i >= %count)
{
%num = $(%i - %count);
while(%num >= %count)
{
%num = $(%num - %count);
}
} else {
%num = %i;
}
%tmp_str = $k(%colors[%num])$b$b$str.mid(%data,%i,1)$k();
%colored_str = $str.append(%colored_str,%tmp_str);
}
return %colored_str;
}
Logged

Network: freenode. Channels: #kvirc and #kvirc-ru
Rizon
Новичок
*

Репутация: 0
Posts: 17


Noctis


View Profile WWW Email
« Reply #2 on: 6 December 2012, 07:46 »

congtratulations xD  Cheesy
Logged

Yeah =) time zero : http://kvircode.blogspot.com
extio
Новичок
*

Репутация: 0
Posts: 7


View Profile
« Reply #3 on: 16 November 2015, 05:53 »

my texteffects script has a rainbow function built in also, you can set the colors and have it randomly make all your text such colors.  in addition it does other things...  but the colors are random and not a true rainbow fashion.  and it makes everyone else see those colors ... so possible to get kicked from a channel.

http://www.jroisocial.com/file/view/18558/extios-texteffects-92-script
Logged
ninest123
Ветеран
*****

Репутация: 0
Posts: 1 382


View Profile Email
« Reply #4 on: 25 June 2019, 07:40 »

coach outlet store online
air jordan
true religion jeans
louis vuitton purses
nike outlet online
eagles jersey
pandora outlet
true religion outlet store
coach outlet online
falcons jerseys
air max 2017
coach outlet online
ralph lauren outlet
uggs outlet
stone island sale
nba jerseys
fitflops sale clearance
kate spade outlet online
coach handbags
true religion jeans outlet
ralph lauren pas cher
michael kors outlet
puma shoes
ugg pas cher
converse英国官网
canada goose coats
kendra scott
pandora jewelry outlet
nike outlet online
yeezy shoes
coach outlet online
gymshark clothing
patriots jerseys
mac makeup
coach outlet store online
cheap air jordans
rolex replica watches
pandora jewelry outlet
hydro flask cup
miu miu shoes
adidas wings shoes
cheap jordan shoes
pandora canada
kate spade outlet
kate spade outlet
coach factory outlet online
cheap mlb jerseys
coach outlet store
nike max
cardinals jerseys
cheap snapbacks
nike factory store
canada goose outlet store
kate spade outlet sale
uggs outlet
nike outlet store
canada goose jackets
coach outlet store online
coach outlet online
fitflops
pandora charms sale clearance
durant shoes
stone island hoodie
adidas store
coach factory outlet
polo ralph lauren outlet
dolce & gabbana sunglasses
michael kors outlet online
costa sunglasses sale
ralph lauren outlet
cheap jordans free shipping
air max plus
coach outlet store online
michael kors outlet clearance
phillies jerseys
cardinals jerseys
kyrie 2
canada goose outlet
coach factorty outlet store
coach factory outlet online
coach outlet online
nhl jerseys
yeti
michael kors outlet clearance
coach factory outlet
pandora charms
coach outlet online
nike free run
canada goose coats
kate spade outlet online
rolex replica watches for sale
michael kors bags
louboutin outlet
louis vuitton outlet online
pandora jewelry
converse shoes
mbt shoes
marc jacobs handbags
nike outlet store online
coach outlet clearance
air jordan retro
fitflops outlet
valentino
coach factory outlet online
ralph lauren polo
kate spade outlet online
jaguars jersey
north face outlet
birkenstock sandals
ugg boots
air jordan 3
louboutin outlet
adidas nmd r1
north face jackets
ed hardy
off-white clothing
ferragamo outlet
uggs outlet
david yurman
coach factory outlet
browns jerseys
fitflop sale
coach outlet store
uggs canada
polo ralph lauren outlet online
coach factory outlet online
coach outlet clearance
michael kors outlet store
minnesota vikings jersey
canada goose coats
yolo
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic