|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Thu Apr 24, 2008 1:23 am
A little help |
Ok this is an output from my mud
Name (Drow Elf)(medium) stands in mid-air here. (paralyzed) (Red Aura)
I want it to read as
====== Paralyzed ======== Name (Drow Elf)(medium) stands in mid-air here. (paralyzed) (Red Aura)
I tried a sub command but it didn't work.
I tried something like this
#trigger (*) ((*)) ((*)) (*) here. (paralyzed) ((*)) {#sub ======= Paralyzed ========== %1 %2 %3 %4 here. (paralyzed) %5}
but it didn't work. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Apr 24, 2008 2:13 am |
~(paralyzed~)
#TR {((%w) ~(Drow Elf~)~(medium~) stands in mid-air here. ~(paralyzed~) ~(Red Aura~))} {#SUB {====<color red>Paralyzed</color>==== %1}} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Apr 24, 2008 2:21 am |
better still
#TR {~(paralyzed~)} {#GAG;#SAY {====Paralyzed=== %line}} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Apr 24, 2008 6:48 am |
Not to mention you needed to escape the parentheses. Shalimar, your second example won't work. First of all, I believe it would be %trigger, not %line, and second of all, it'd loop because the pattern is being displayed again. Heh. I'd write something that works, but I'm on my blackberry, so can't really help out there.
Charneus |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Apr 24, 2008 8:08 am |
#SAY doesnt trigger i thought, or is that #SHOW?
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Thu Apr 24, 2008 1:37 pm |
Both do.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Apr 24, 2008 1:55 pm |
#Say, #Show, And #Echo all fire a trigger.
%line2 should work %line wouldn't.
%trigger works.
If you play with the %line variables you could find one that works but %trigger is the better choice.
If you anchor the pattern at the beginning it won't repeat itself.
Code: |
#TR {^%w ~(Drow Elf~)~(medium~) stands in mid-air here. ~(paralyzed~) ~(Red Aura~)} {#SUB {====<color red>Paralyzed</color>==== %trigger}} |
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Apr 24, 2008 4:20 pm |
Arminas wrote: |
%line2 should work %line wouldn't. |
At work at the moment, so I can't check, but afaik this this is wrong. %line is the most recent line, and obviously when a trigger fires, the line that made it fire is the most recent. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Apr 24, 2008 7:09 pm |
See, that's just the problem, when you start messing with sub/show/say the %line number often gets jacked.
I actually tried it out before I stated that. I've had experience with this in the past as well.
%trigger is better in this case because it just works regardless. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Apr 24, 2008 7:52 pm |
Arminas wrote: |
#Say, #Show, And #Echo all fire a trigger. |
#SHOW Helpfile wrote: |
The difference between #SAY and #SHOW is that #SHOW processes the text just as if it was received from the MUD. |
The helpfile is misleading then. Sounds to me as if its implying #SAY won't trigger triggers (be processed).
Is there a command for displaying text that wont trip triggers? |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Apr 24, 2008 9:43 pm |
Not that I know of sorry. As far as I can tell, currently if text shows on the screen and it isn't the timestamp.
Then that text affects triggers.
#oninput is needed for text that you entered that shows on the screen of course, but then that is a type of trigger.
#show displays in the default font as if it came from the mud.
#say/#echo have special colors associated with them. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
|
|