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
shalimar
GURU


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

PostPosted: Mon May 30, 2011 10:08 pm   

#SAYADD
 
After using #SAYADD to concatenate several lines from the game together... is there away i can have the new superline retested as if it was just sent from the mud?
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jun 20, 2011 2:18 pm   
 
no?
_________________
Discord: Shalimarwildcat
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Mon Jun 20, 2011 2:33 pm   
 
I was thinking lines that #sayadd had been used on were retested. I made two triggers to give it a test and the second trigger fires off the new line #sayadd was used on.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger priority="360" copy="yes">
    <pattern>^Test line</pattern>
    <value>#sayadd { with #sayadd}</value>
  </trigger>
  <trigger priority="370" copy="yes">
    <pattern>^Test line with #sayadd</pattern>
    <value>#co bright,red</value>
  </trigger>
</cmud>


Is this what you are asking about?
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jun 20, 2011 2:48 pm   
 
I have an OOC window, inside of which i made a simple test trigger:

#TR {^test} {#CO red}

Then i entered the following on the command line:

#WIN OOC {test}

which works fine... then i tried the following command:

:OOC:#SAYADD { hi}

Firstoff... for some reason the sayadd is going to a seperate line instead of appending...
then if i do the #WIN again... it appends instead of starting a new line

So I try the following:

#EXECWIN OOC {#say {test};#WAIT 2000;#SAYADD { hi}}

and the same can be seen

If i put the #SAYADD into the trigger it appends properly

The same commands and trigger in the main window work fine, but as you can see, #SAYADDing does not cause the trigger to refire
_________________
Discord: Shalimarwildcat
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Jun 21, 2011 11:29 pm   
 
Hmm, this looks like a bug to me. #sayadd is tacking on a carriage return before your entered text, instead of after. Not only is the #sayadd going to a separate line instead of appending (which really kinda defeats the purpose... Razz) the next line in that window is going onto the same line as the #sayadd-ed line. Using your example:
Code:
#clr ooc
#win ooc {test}
produces:
Code:
test

Code:
:ooc:#sayadd { hi}
produces:
Code:
test
 hi

Code:
#win ooc {test}
produces:
Code:
test
 hitest


So in sum, #sayadd is displaying a carriage return followed by the input. It should display the input followed by a carriage return.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 22, 2011 4:12 pm   
 
It's not #sayadd that is the problem. The problem is you are using the #window command to send the initial text and #sayadd is designed to follow a #say command. For example, this works fine:
Code:
#win ooc
:ooc:#say test
:ooc:#sayadd hi

And no, using #sayadd does not cause the trigger to refire. The only command that causes triggers to refire on the line is using the #SUB command.
Reply with quote
shalimar
GURU


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

PostPosted: Wed Jun 22, 2011 4:18 pm   
 
My original question was weather i could force the new superline to be retested.
That it doesn't currently I already know.
Maybe let #SAYADD have a second boolean parameter?

Also... why the limitation on what #SAYADD can follow?
it follows regular mud text and #CAPTURE just fine, that it doesnt work following #WIN seems like a bug.
and it doesnt explain why the #EXECWIN fails
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Wed Jun 22, 2011 4:50 pm   
 
All of these issues have come to light from my trying to kludge the #CAPADD command i had suggested.
_________________
Discord: Shalimarwildcat
Reply with quote
DraxDrax
Apprentice


Joined: 22 Mar 2009
Posts: 149

PostPosted: Thu Jun 23, 2011 9:10 am   
 
You might be able to rig something together by storing the lines you want to have concatenated together in to a variable, then sending them to the child window all at once rather than capturing them piecemeal. By sending the concatenated lines to the child window with a single #SHOW command, rather than a combination of #CAP and #SAYADD they'll be tested by triggers the way you desire.
Reply with quote
shalimar
GURU


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

PostPosted: Thu Jun 23, 2011 9:28 am   
 
The above example was contrived, to explain what i was talking about.
And to illustrate abnormal behavior (which doesn't seem to be getting recognized as such by Zugg).

What i truly want is:
1. a means to retain mud color (ala #CAPTURE)
2. while appending it to the end of a line in another window (ala #SAYADD),
3. preferably while also %trim ing away all but a single character of whitespace

(3 could be done by using a #SUB command prior to my suggested #CAPADD command, linked to in my post prior to this one)
_________________
Discord: Shalimarwildcat
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