mIRC Home    About    Download    Register    News    Help

Print Thread
Color Aliases Script Won't Work in 6.03 #2569 19/12/02 09:26 AM
Joined: Dec 2002
Posts: 2
J
jwtx Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
J
Joined: Dec 2002
Posts: 2
Here's the aliases script :

; Aliases: Copy/paste this file right into an aliases file, or load up as 'new'
; To activate: Type /p# <message> For instance, /p10 Hello

/p1 pat 21.22.18.10.19.23 *1
/p2 pat 0,17.15,14.14,15.1,16.14,15.15,14 *1
/p3 pat 12,17.4,17.13,17.8,17.9,17.13,17.4,17.11,17 *1
/p4 pat 1,24.8,17 *1
/p5 pat 8,21.8,22.8,18.8,10.8,19.8,23 *1
/p6 pat ... *1
/p7 pat 18.10.19.6.15.6.19.10 *1
/p8 pat 1... *1
/p9 pat 8/17.7/17.4/17.5/17.4/17.7/17 *1
/p10 pat 0,2-.0,12-.0,10-.0,11-.0,10-.0,12- *1
/p11 pat 2/5.6/10.12/3.14/2.5/6.10/12 *1
/p12 pat 4,17.4,14.4,15.4,16.4,15.4,14 *1
/p13 pat 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.14.13.12.11.10.9.8.7.6.5.4.3.2.1 *1
/p14 pat 12,4.4,12 *1
/p15 pat 4,9.9,4 *1
/p16 pat 6,10.10,6 *1
/p17 pat 12,11.11,12 *1
/p18 pat 1,4.4,1 *1
/p19 pat 6,8.8,6 *1
/p20 pat 0,1.1,0 *1
/p21 pat 9,1.1,9 *1
/p22 pat 0,2.2,0 *1
/p23 pat 1,8.1,10.1,12.1,9.1,11.1,13 *1
/p24 pat 13,9.9,13 *1
/p25 pat 5,10.2,11.6,8.1,4.3,13.14,12 *1
/p26 pat 0,4.4,0 *1
/p27 pat 13,0.8,1 *1
/p28 pat 8,12.12,8 *1
/p29 pat 5,0.0,5 *1
/p30 pat 0,12.0,14 *1
/p31 pat 4,8.9,10 *1
/p32 pat 12.6.3.11.10.13 *1
/p33 pat 2,4.2,15.2,11.2,9.2,13.2,8 *1
/p34 pat 2.10.11.12.15.1 *1
/p35 pat 0,4.12,0.4,12.4,0.12,4.12,0.0,12 *1
/p36 pat 9,2.3,11.10,12.11,3.2,9.12,10 *1
/p37 pat 14,13.6,14.14,6.13,14 *1
/p38 pat 0,2.0,6.0,3.0,7.0,5.0,1.0,10 *1
/p39 pat 0,6-.0,15-.0,13-.0,10-.0,14- *1
/p40 pat 1,9-.1,8-.1,4-.1,11-.1,13-.1,15- *1
/p41 pat 11,13.13,11 *1
/p42 pat 13,10*1,10.8,10*1,10.11,10*1,10.4,10*1,10.9,10*1,10 *1
/p43 pat 13,1¤0,1.5,1¤0,1.11,1¤0,1.4,1¤0,1.9,1¤0,1.3,1¤0,1.6,1¤0,1.10,1¤0,1.12,1¤0,1 *1
/p44 pat 13,1°0,1.5,°0,1.11,1°0,1.4,1°0,1.9,1°0,1.3,1°0,1.6,1°0,1.10,1°0,1.12,1°0,1 *1
/p45 pat 13,11,0.5,11,0.11,11,0.4,11,0.9,11,0.3,11,0.6,11,0.10,11,0.12,11,0 *1
/p46 pat 4,1:)0,4 *1
/p47 pat 4,1.4,14.4,15 *1
/pat {
set %n $count($1,.) | inc %n | set %i 1 | set %p 1 | set %l $len(*2) | set %tc $replace(*2,$chr(32),¶) | set %ec  | :loop | set %ec %ec $+ $gettok($1,%i,46) $+ $mid(%p,1,%tc) | inc %i | inc %p | if (%i <= %n) goto part2 | set %i 1 | :tongue:art2 | if (%p <= %l) goto loop | say $replace(%ec,¶,$chr(32))
}

This triggers on entering /p# <text> but when I do, all it generates is "11" in various color combinations.

Any suggestions?

Thanks!

Last edited by jwtx; 19/12/02 09:37 AM.
Re: Color Aliases Script Won't Work in 6.03 #2570 19/12/02 11:48 AM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
1. Colors are horrible mad
2. Pipes are horrible way to create code mad
3. wtf are those *1 and *2 in your aliases? should those be $1 and $2 or what? confused
/pat {
set %n $count($1,.)
inc %n
set %i 1
set %p 1
set %l $len(*2)
;%l is always 2
set %tc $replace(*2,$chr(32),¶)
;%tc is always *2
set %ec 
:loop
set %ec %ec $+ $gettok($1,%i,46) $+ $mid(%p,1,%tc)
inc %i
inc %p
if (%i <= %n) goto part2
set %i 1
:tongue:art2
if (%p <= %l) goto loop
say $replace(%ec,¶,$chr(32))
}


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Color Aliases Script Won't Work in 6.03 #2571 19/12/02 01:12 PM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Suggestion: When you post code, surround your code with UBBCode code tags:

Code:

alias aliasname {
  var %i = 1
  inc %i
  echo -a I: %i
}


This will prevent the server from losing your indentation as well as from interpretting anything inside the code as something it should interpret, like a smiley or a tongue.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: Color Aliases Script Won't Work in 6.03 #2572 19/12/02 03:11 PM
Joined: Dec 2002
Posts: 143
A
Aubs Offline
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
I would presume this is his script:

Code:
; Aliases: Copy/paste this file right into an aliases file, or load up as 'new'
; To activate: Type /p# &lt;message&gt; For instance, /p10 Hello

/p1 pat 21.22.18.10.19.23 *1
/p2 pat 0,17.15,14.14,15.1,16.14,15.15,14 *1
/p3 pat 12,17.4,17.13,17.8,17.9,17.13,17.4,17.11,17 *1
/p4 pat 1,24.8,17 *1
/p5 pat 8,21.8,22.8,18.8,10.8,19.8,23 *1
/p6 pat ... *1
/p7 pat 18.10.19.6.15.6.19.10 *1
/p8 pat 1... *1
/p9 pat 8/17.7/17.4/17.5/17.4/17.7/17 *1
/p10 pat 0,2-.0,12-.0,10-.0,11-.0,10-.0,12- *1
/p11 pat 2/5.6/10.12/3.14/2.5/6.10/12 *1
/p12 pat 4,17.4,14.4,15.4,16.4,15.4,14 *1
/p13 pat 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.14.13.12.11.10.9.8.7.6.5.4.3.2.1 *1
/p14 pat 12,4.4,12 *1
/p15 pat 4,9.9,4 *1
/p16 pat 6,10.10,6 *1
/p17 pat 12,11.11,12 *1
/p18 pat 1,4.4,1 *1
/p19 pat 6,8.8,6 *1
/p20 pat 0,1.1,0 *1
/p21 pat 9,1.1,9 *1
/p22 pat 0,2.2,0 *1
/p23 pat 1,8.1,10.1,12.1,9.1,11.1,13 *1
/p24 pat 13,9.9,13 *1
/p25 pat 5,10.2,11.6,8.1,4.3,13.14,12 *1
/p26 pat 0,4.4,0 *1
/p27 pat 13,0.8,1 *1
/p28 pat 8,12.12,8 *1
/p29 pat 5,0.0,5 *1
/p30 pat 0,12.0,14 *1
/p31 pat 4,8.9,10 *1
/p32 pat 12.6.3.11.10.13 *1
/p33 pat 2,4.2,15.2,11.2,9.2,13.2,8 *1
/p34 pat 2.10.11.12.15.1 *1
/p35 pat 0,4.12,0.4,12.4,0.12,4.12,0.0,12 *1
/p36 pat 9,2.3,11.10,12.11,3.2,9.12,10 *1
/p37 pat 14,13.6,14.14,6.13,14 *1
/p38 pat 0,2.0,6.0,3.0,7.0,5.0,1.0,10 *1
/p39 pat 0,6-.0,15-.0,13-.0,10-.0,14- *1
/p40 pat 1,9-.1,8-.1,4-.1,11-.1,13-.1,15- *1
/p41 pat 11,13.13,11 *1
/p42 pat 13,10*1,10.8,10*1,10.11,10*1,10.4,10*1,10.9,10*1,10 *1 
/p43 pat 13,1¤0,1.5,1¤0,1.11,1¤0,1.4,1¤0,1.9,1¤0,1.3,1¤0,1.6,1¤0,1.10,1¤0,1.12,1¤0,1 *1 
/p44 pat 13,1°0,1.5,°0,1.11,1°0,1.4,1°0,1.9,1°0,1.3,1°0,1.6,1°0,1.10,1°0,1.12,1°0,1 *1 
/p45 pat 13,11,0.5,11,0.11,11,0.4,11,0.9,11,0.3,11,0.6,11,0.10,11,0.12,11,0 *1 
/p46 pat 4,1:)0,4 *1
/p47 pat 4,1.4,14.4,15 *1
/pat {
  set %n $count($1,.)
  inc %n
  set %i 1
  set %p 1
  set %l $len(*2)
  set %tc $replace(*2,$chr(32),¶)
  set %ec 
  :loop
  set %ec %ec $+ $gettok($1,%i,46) $+ $mid(%p,1,%tc)
  inc %i
  inc %p
  if (%i &lt;= %n) goto part2
  set %i 1
  :part2
  if (%p &lt;= %l) goto loop
  say $replace(%ec,¶,$chr(32))
}



Not got time to go through code, not that I cna see what you are trying to do with it though...sorry!

Last edited by Aubs; 19/12/02 03:33 PM.

Aubs.
cool