Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: 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.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: 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
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Thu Apr 24, 2008 2:21 am   
 
better still

#TR {~(paralyzed~)} {#GAG;#SAY {====Paralyzed=== %line}}
_________________
Discord: Shalimarwildcat
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: 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
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Thu Apr 24, 2008 8:08 am   
 
#SAY doesnt trigger i thought, or is that #SHOW?
_________________
Discord: Shalimarwildcat
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Thu Apr 24, 2008 1:37 pm   
 
Both do.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: 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
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: 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
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net