Aardwolf prompt alias does something strange

Posted by Isildur on Fri 07 Sep 2007 02:16 PM — 10 posts, 40,322 views.

#0
I use the following as my "prompt" command on Aardwolf.

prompt <@R%p @Y%ggp @C%Xtnl %qqt @B%r @R%e>%c@w

When I type it or copy it from the alias "Send" box and paste it in the command box, it works fine.

My alias is named pprompt. When I type this instead, it sets the prompt, which then has a random string of about 4-5 characters after it, and then I get a lot of warnings from the server about "invalid commands" and such.

Is there a way to debug this easily? Or is my code needing some TLC to make it work? I thought escape sequences might be in order but was not sure at this point since it does work from the command box when type straight in.

Thanks.

Isildur
USA #1
I just tried it on Aard, and it works fine for me.


<aliases>
  <alias
   match="pprompt"
   enabled="y"
   sequence="100"
  >
  <send>prompt &lt;@R%p @Y%ggp @C%Xtnl %qqt @B%r @R%e&gt;%c@w</send>
  </alias>
</aliases>
#2
I removed my alias and pasted yours. I tried it and this is my output. I am perplexed to say the least.

Quote:


You put Sacramental Carafe in a demon school backpack.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU>

Shoeshine asks Questor for a quest.
prompt <@R%p @Y%ggp @C%Xtnl %qqt @B%r @R%e><aliases>
<alias
match="pprompt"
enabled="y"
sequence="100"
>
<send>prompt &lt;@R%p @Y%ggp @C%Xtnl %qqt @B%r @R%e&gt;%c@w</send>
</alias>
</aliases>@w
Prompt set to <%p %ggp %Xtnl %qqt %r %e><aliases>
Use the 'bprompt' to set a separate battle prompt.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Sorry Straxxus, I don't understand you.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Sorry Straxxus, I don't understand you.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Sorry Straxxus, I don't understand you.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Sorry Straxxus, I don't understand you.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Sorry Straxxus, you can't do that.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Unknown command. Please check the helpfiles.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Sorry Straxxus, I don't understand you.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases> Unknown command. Please check the helpfiles.
<100% 212422gp 345tnl 0qt Among the Philosophes NESU><aliases>



Notice my aardwolf prompt now has "<aliases>" at the end of it after trying the alias. Somehow the alias is "appended" to itself or is send twice, once the proper way immediately followed by the way it looks when I copied it from your post.

I did a screen capture of the alias in the configuration screen and you see there is no other commands appended. It looks like it pasted properly.

Here is a link to the capture:

http://www.flickr.com/photos/thethomasfamily/1341671243/

isildur


USA #3
Well, first off, the xml snipped posted should just be copied and pasted into the alias menu. The paste button is on the lower right hand corner when you press ctrl-shift-9.

Aside from that, looking at your screenshot, the alias looks like it's fine... I'm a bit confused by it.
#4
Thats what puzzled me. I didn't paste into the world or command field. I used the paste button in the alias configuration dialog like you said.

It seems almost like another trigger could be firing or a plugin or something is tacking on something after the alias fires. So the command goes to the mud twice.

I had another alias called pbprompt to set my battle prompt and it was doing exactly the same thing. Those are the only two that do it.

I know this may be a stretch, but is there a way to "debug" this or set some sort of breakpoint so we can see what's happening?

isildur
Australia Forum Administrator #5
Game menu -> Trace.

That tells you when aliases and triggers fire.
#6
Quote:


Thorgath holds The Head of Medusa in his hand.
PermA Tryp has left the game.
Thorgath holds The Head of Medusa in his hand.
You feel as if you are being watched.
TRACE: Trace on
TRACE: Matched alias "pprompt"
prompt <@R%p @Y%ggp @C%Xtnl %qqt @B%r @R%e>http://security.symantec.com/sscv6/default.asp?langid=ie&venid=sym@w
TRACE: Executing Plugin Aardwolf_TierClassesLUA script "OnPluginPacketReceived"
TRACE: Executing trigger script "OnHyperlink"
Prompt set to <%p %ggp %Xtnl %qqt %rTRACE: Executing trigger script "OnHyperlink"
%e>http://security.symantec.com/sscv6/default.asp?langid=ie&venid=sym

Use the 'bprompt' to set a separate battle prompt.
TRACE: Executing trigger script "OnHyperlink"
<100% 218563gp 307tnl 0qt The Grand City of AylorTRACE: Executing trigger script "OnHyperlink"
NESWUD>http://security.symantec.com/sscv6/default.asp?langid=ie&venid=sym

TRACE: Executing Plugin Aardwolf_TierClassesLUA script "OnPluginPacketReceived"



Looks like it is grabbing stuff from the clipboard and adding it to the alias when it fires. I had just copied the symantec url from one browser window to another. Then I switched over to Mushclient and enabled the trace.

This is the text that fired after runnin the alias again.

I am at wits end. I even disabled plugins. I am going to try to reinstall MC at this point to see if its maybe just a corrupt file or something.

thanks,
isildur
#7
Just confirmed the clipboard thing. I copied the just the letter "t" and then switched to MC and ran the alias:

Quote:

[(Reply: Thorgath) 3397/3397hp 2283/2283mn 2668/2668mv 307tnl] >
pprompt
TRACE: Matched alias "pprompt"
prompt <@R%p @Y%ggp @C%Xtnl %qqt @B%r @R%e>t@w
Prompt set to <%p %ggp %Xtnl %qqt %r %e>t
Use the 'bprompt' to set a separate battle prompt.
<100% 218563gp 307tnl 0qt The Grand City of Aylor NESWUD>t



Is that wierd or what?

isildur :)
Australia Forum Administrator #8
Quote:

Looks like it is grabbing stuff from the clipboard and adding it to the alias when it fires.


See: http://www.gammon.com.au/scripts/doc.php?dialog=IDD_EDIT_ALIAS

It mentions in there that %c is replaced by the clipboard contents, and you have %c in your alias.

In general, %x in aliases is replaced by wildcards (and in the case of %c, the clipboard), so you should double the %%, as in: %%c
#9
Man, I feel like a complete imbecile! Thanks for pointing that out. I now recall adding in that %c about the time the problem started and had just forgot the change. On Aardwolf it adds a carriage return to the prompt. Thanks again.

isildur :)