|
Ethershade Beginner
Joined: 17 Oct 2008 Posts: 11
|
Posted: Sun Nov 09, 2008 7:04 pm
Searching for an easier solution |
I've made a alias for a mud that replaces the say command. The following code is
Code: |
temp1 = %1+" "+%2+" "+%3+" "+%4+" "+%5+" "+%6+" "+%7+" "+%8+" "+%9+" "+%10+" "+%11+" "+%12+" "+%13+" "+%14+" "+%15+" "+%16+" "+%17+" "+%18+" "+%19+" "+%20+" "+%21+" "+%22+" "+%23+" "+%24+" "+%25+" "+%26+" "+%27+" "+%28+" "+%29+" "+%30+" "+%31+" "+%32+" "+%33+" "+%34+" "+%35+" "+%36+" "+%37+" "+%38+" "+%39+" "+%40+" "+%41+" "+%42+" "+%43+" "+%44+" "+%45+" "+%46+" "+%47+" "+%48+" "+%49+" "+%50
#send "say (Quietly) "@temp1
temp1="" |
Im curious if there is an easier solution for the first line |
|
|
|
Tarken Aurelius Apprentice
Joined: 23 Oct 2008 Posts: 120 Location: Cincinnati, Ohio
|
Posted: Sun Nov 09, 2008 7:25 pm |
What exactly are you trying to get it to do?
|
|
_________________ Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org) |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Nov 09, 2008 7:29 pm |
Try using %-n, which contains the nth parameter and every parameter after it. So you could do something like:
#alias say {say ~(Quietly~) %-1}
Also, I'd like to commiserate in advance with you on your typing that mass of text out :( |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun Nov 09, 2008 7:33 pm |
I'm still finding a problem where using %-1 or whatever will cut out text after a certain point for no reason.
|
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sun Nov 09, 2008 9:52 pm |
does your mud wrap text? I think that %-1 doesn't work if there is a carriage return in the text the mud sends. I know IRE allowed people to go around this but not if others have a way to.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Nov 09, 2008 10:58 pm |
This isn't a trigger, though, it's an alias, so that restriction doesn't apply.
|
|
|
|
Ethershade Beginner
Joined: 17 Oct 2008 Posts: 11
|
Posted: Sun Nov 09, 2008 11:13 pm thanks |
thank you, it works perfectly
|
|
|
|
Mandelbrot Newbie
Joined: 19 Oct 2008 Posts: 8
|
Posted: Tue Nov 11, 2008 7:37 pm |
If you want a simpler way, I believe this would do the exact same thing as all that:
Code: |
#send "say (Quietly) " %1 |
|
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Tue Nov 11, 2008 7:43 pm |
Except it won't, it would only take the first word. You would STILL have to use %-1
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Nov 11, 2008 7:45 pm |
No, it wouldn't - you'd need to use %-1 to get all the parameters. Otherwise, that'd only append the first parameter, which in most cases is the first word of your say and thus not what you're after. Also, it'd have an extra space in it between the closing bracket of "Quietly)" and the start of the parameter.
Also, beaten :( |
|
|
|
|
|