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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
mordalphus
Newbie


Joined: 15 Oct 2007
Posts: 9

PostPosted: Sat Jun 28, 2008 2:43 pm   

zMUD not sending true CR with #CR in triggers
 
Ok, so I have a trigger, it's to edit an object on a ROM mud.

But to exit the description editor, you need to press enter on a blank line... my trigger does that:

Here's the trigger:

Code:

ed obj 1611
ed add %1
a
Gold Gems: 0
Silver Gems: 0
Ruby Gems: 0
Sapphire Gems: 0
Total Points: 0
#CR
i
4
#CR
s
done
tell %1 Ok, you're all set!



Ok, now, neither of those #CR's for some reason do anything via trigger, but if I make an alias, and type the alias into the command prompt, it will do it.

But if I make the trigger use the alias, it DOESN'T!!!

Anyone have any ideas?

I've tried %cr, %crlf, #sendp {%cr}, #send {%cr}, pretty much every combination of those.

-- Mordalphus
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Jun 28, 2008 3:49 pm   
 
Why not just make the whole thing an alias?

Code:
#ALIAS doobj {ed obj %1;ed add %2;a;#CR;i;4;#CR;s;done;tell %2 Ok, you're all set!}


Otherwise I don't know.. I don't seem to have a problem getting a %cr out of a trigger, not tried a #CR, but I imagine it shouldn't be any different.

As for what to do.. the only idea I have is to use #EXEC %cr, or put the #CR into an alias like you said and #EXEC the alias.

I'm sure Fang or Vij knows more and will respond soon.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Jun 28, 2008 4:14 pm   
 
#CR doesn't send the CR character to the MUD, it prints it to the screen. You want #send %cr. You might have to use #send %crlf or #send "" or something to get it to work, I can't remember how zMUD does it - the MUD will require both CR and LF to think the line is a newline, but I'm pretty sure that #send appends them automatically.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
mordalphus
Newbie


Joined: 15 Oct 2007
Posts: 9

PostPosted: Sat Jun 28, 2008 11:32 pm   
 
None of these worked.

They wont send a blank line to the mud...

Basically to exit the line editor on the OLC, you need to press enter on a blank line.

#CR doesn't work
%cr doesn't work
#send "" doesn't work
#send "%cr" doesn't work
%crlf doesn't work

They all return nothing via trigger.

If I type #CR in manually and hit enter, it works fine, but when used by a trigger it does absolutely nothing.

Any more ideas?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Jun 28, 2008 11:41 pm   
 
I just checked the use of #CR within a trigger using 7.21 and everything appears correct. It seems to properly send a blank line to the mud. All of the other suggestion work as they should in my testing, although some of them are not what you want.

There is some other problem with your preferences, or the trigger options. I am sorry I can't help you diagnose these things. All I can suggest is copy the script and pattrern portions into a new trigger.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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