mIRC Home    About    Download    Register    News    Help

Print Thread
N
nafsnipe685
nafsnipe685
N
/f11 { /$rand(1,15) {
if (# == 1) { /msg $chan 12:¬) }
elseif (# == 2) { /msg $chan 13:¬) }
elseif (# == 3) { /msg $chan 14:¬) }
elseif (# == 4) { /msg $chan 15:¬) }
elseif (# == 5) { /msg $chan 11:¬) }
elseif (# == 6) { /msg $chan 10:¬) }
elseif (# == 7) { /msg $chan 9:¬) }
elseif (# == 8) { /msg $chan 8:¬) }
elseif (# == 9) { /msg $chan 7:¬) }
elseif (# == 10) { /msg $chan 6:¬) }
elseif (# == 11) { /msg $chan 5:¬) }
elseif (# == 12) { /msg $chan 4:¬) }
elseif (# == 13) { /msg $chan 3:¬) }
elseif (# == 14) { /msg $chan 2:¬) }
elseif (# == 15) { /msg $chan 1:¬) }
}
}
Is basicly the script i have, but it odviousely doesnt work!!!
How do i make a script that will use a random number and select a color smiley? It doesnt have to be in elseif terms, just needs to work!!!

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
/f11 msg # $+(,$rand(0,15),:¬,$chr(41))

I marked the 0 red because your script would never give a white smiley, I don't know if that was deliberate or not, change it back to 1 if it was.

N
nafsnipe685
nafsnipe685
N
I still dont understand how you would use that though!

N
nafsnipe685
nafsnipe685
N
oh i figured it out, Thanks!!!!

N
nafsnipe685
nafsnipe685
N
One More question though, how would you get
/f11 msg # $+(,$rand(0,15),:¬,$chr(41))
to include :¬(
instead of :¬)

N
nafsnipe685
nafsnipe685
N
never mind i figued it out
/f11 msg # $+(,$rand(0,15),:¬,$chr(40))
delivers :¬(

N
nafsnipe685
nafsnipe685
N
I do have one more question though, how did you know that
$chr(41) == )
Or i might ask where can i look to see what every characters number is?

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
Goto www.asciitable.com. Characters can vary from font to font, but the important ones stay the same.

N
nafsnipe685
nafsnipe685
N
Ok Cool!!!! And Thanks!!! Ive been looking for a place like that anyways!!!

A
Alien736
Alien736
A
or if you in a hurry and you want to know an ascii value of a key that is on the keyboard while in mIRC just type //echo $asc(a) and exchange whatever you wanted in for the 'a'.


Link Copied to Clipboard