23 Sep 10, 08:51AM
(16 Sep 10, 08:30AM)VallDiGna Wrote: I test it, it works fine, but writing 2 parameteres (2nd with"") is a little bit annoying. Maybe it'll be better only change name to '@' or '*' for example, and all sentence in same parameter.
Something like this:
Use: /me2 "All sentence here"
It will display -> * All sentence here
[SELECT ALL] Code:
alias me2 [
alias s (at $arg1 1)
alias n $curname
name (at $arg1 0)
loop i (- (listlen $arg1) 2) [s = (concat $s (at $arg1 (+ $i 2)))]
me $s
name $n
]
But it was still annoying, having to put quotes or square brackets before and after the entire message.
I tried making it work directly with arguments, kind of like in "say". After loads of experimenting, this is what I came up with:
[SELECT ALL] Code:
alias me2 [
alias s $arg2
alias n $curname
alias arbit ""
name $arg1
loop i (- $numargs 2) [arbit = (concatword "$arg" (+ $i 3)); s = (concat $s (arbit))]
me $s
name $n
]