|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Fri Dec 25, 2009 2:43 am
Alias acting Different when using MXP <send> |
Have Alias rfind:
Code: |
<alias name="rfind" id="3">
<value>$rname = %mapquery( "[Name] like '%"%0"%'")
#FORALL $rname {
#MXP %concat( %ansi( 9) %ismember( %i, $rname) %ansi( 3), "<send ", %char( 34)rrun %i%char( 34), ">", %roomname( %i) %ansi( 12)%zonename( %roomzone( %i)) , "<send>", %ansi( 7))
#SAY ""
}</value>
</alias>
|
Have Alias rrun:
Code: |
<alias name="rrun" id="4">
<value>#LOCAL $PathtoRun $Path2
$PathtoRun=%walk( %1)
#ECHO %walk( %1)
$PathtoRun=%replace( $PathtoRun, ".", "run ")
$PathtoRun=%replace( $PathtoRun, "(", ";")
$PathtoRun=%replace( $PathtoRun, ")", ";run ")
$PathtoRun=%replace( $PathtoRun, "run ;")
$PathtoRun=%subregex( $PathtoRun, ";run $")
$Path2 = $PathtoRun
#ECHO $Path2
#EXEC $Path2</value>
</alias>
|
When I type in rrun 'room vnum' that is 2 rooms north of me with a door between both rooms I get this:
Code: |
.(open n;n);.(open n;n)
open n;n;open n;n
open n
open n
n
open n
open n
n |
The first 2 lines are the ECHO in the code, the rest is the output from the command. Works correctly (Except it sends open n twice on each room which is another bug, but doesn't hurt anything really).
Here is the output from clicking on the MXP link for the same room vnum, which would send the same command to the MUD:
Code: |
.(open n;n);.(open n;n)
open n;n;open n;n
open n
.(open n
n )
open n
open n
n |
Once again... the first 2 lines of output are the #ECHO's from the rrun alias. But as you can tell the actual output to the mud is totally wrong.
Any help would be appreciated! That is if its something I'm doing wrong...
Thanks
Davos |
|
_________________ The Seaworthy
Last edited by Davos on Thu Dec 31, 2009 10:46 pm; edited 2 times in total |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Thu Dec 31, 2009 10:05 pm |
Bump
|
|
_________________ The Seaworthy |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 31, 2009 11:27 pm |
I set the initial value directly instead of using %walk,
Code: |
$PathtoRun=".(open n;n);.(open n;n)" |
and I got the expected output
I don't know why it's not working for you. |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Thu Dec 31, 2009 11:48 pm |
As stated, when I type the alias rrun roomvnum it works fine but when its used within the MXP send is when the output is not correct.
|
|
_________________ The Seaworthy |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Fri Jan 01, 2010 12:15 am |
OK, what does your MXP link look like? I'm guessing something like
Code: |
<send "rrun 123">Room 123</send> |
? |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Fri Jan 01, 2010 12:18 am |
Its in the rfind alias above...
|
|
_________________ The Seaworthy |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Fri Jan 01, 2010 11:26 am |
OK, I see. Try this snippet:
Code: |
#MXP {%ansi( 9)%ismember( %i, $rname)%ansi( 3) <send 'rrun %i'>%roomname( %i) %zonename( %roomzone( %i))</send>%ansi( 7)} |
|
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Fri Jan 01, 2010 7:59 pm |
Same... I dont personally think its the <send> syntax Im using, I've tried it every way I can think of. The concat above was just the last way I tried because thats how its represented in the help files.
From what it looks like to me is that if $PathToRun starts with a .(open n) or any other command inside .() for that matter and use <send> to send it to the mud using RRUN then it doesnt do all the replaces on the first command, only on subsequent ones. So if $PathToRun is .(open n);run 3w;.(open s) it will correctly fix .(open s) and not .(open n) |
|
_________________ The Seaworthy |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Mon Jan 11, 2010 1:50 am |
Bump... Zugg, have you any input on this issue?
|
|
_________________ The Seaworthy |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jan 13, 2010 10:49 pm |
Can somebody please rewrite this into a simpler procedure that I can test in a blank session. I need to know if this depends upon a map or not. Thanks.
|
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Wed Jan 13, 2010 11:45 pm |
Tested these in a blank session using these commands...
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<alias name="rfind" copy="yes">
<value>$rname = ".(open n~;n)ne~;.es~;.(open s~;s)"
#FORALL $rname {
#MXP %ismember( %i, $rname)<send 'rrun %i'>$rname<send>
#SAY ""
}</value>
</alias>
</cmud>
|
and
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<alias name="rrun" copy="yes">
<value>#LOCAL $PathtoRun $Path2
$PathtoRun=%0
#ECHO %0
$PathtoRun=%replace( $PathtoRun, ".", "run ")
$PathtoRun=%replace( $PathtoRun, "(", ";")
$PathtoRun=%replace( $PathtoRun, ")", ";run ")
$PathtoRun=%replace( $PathtoRun, "run ;")
$PathtoRun=%subregex( $PathtoRun, ";run $")
$Path2 = $PathtoRun
#ECHO $Path2
#EXEC $Path2</value>
</alias>
</cmud>
|
I took out a bunch of stuff that was just fluff, like colors.. I got good output in a blank session... So this HAS to be my map settings or some sort.
Here is the output...
I'm not sure what about my map could be causing this...
Code: |
.(open n;n)ne;.es;.(open s;s)
open n;n;run ne;run es;open s;s
open n
n
run ne
run es
open s
s |
|
|
_________________ The Seaworthy |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Thu Jan 14, 2010 12:02 am |
After further testing... This is what I get if I load a NEW session of Aardwolf and then load my old map, so my only 2 settings are these...
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<alias name="rfind" copy="yes">
<value>$rname = 18121
#FORALL $rname {
#MXP %ismember( %i, $rname)<send 'rrun %i'>$rname</send>
#SAY ""
}</value>
</alias>
</cmud>
|
and
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<alias name="rrun" copy="yes">
<value>#LOCAL $PathtoRun $Path2
$PathtoRun=%walk(%1)
#ECHO %walk(%1)
$PathtoRun=%replace( $PathtoRun, ".", "run ")
$PathtoRun=%replace( $PathtoRun, "(", ";")
$PathtoRun=%replace( $PathtoRun, ")", ";run ")
$PathtoRun=%replace( $PathtoRun, "run ;")
$PathtoRun=%subregex( $PathtoRun, ";run $")
$Path2 = $PathtoRun
#ECHO $Path2
#EXEC $Path2</value>
</alias>
</cmud>
|
my output looks like this ...
Code: |
.(open n;n)ne;.es;.(open s;s)
open n;n;run ne;run es;open s;s
open n
open n
n
run ne
run es
open s
open s
s |
Which is technically correct output (aside from the double door opening thing.)
So Im at a total loss what this could be, unless its a preference or setting somewhere in cmud. But its not my map.
Any clues? |
|
_________________ The Seaworthy |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Thu Jan 14, 2010 12:15 am |
Ok one more post from me... I disabled every setting in my session except rrun and rfind and still get the origional results posted in the first post... So this HAS to be a setting somewhere that wouldn't be set in a new session but is set in mine. Is there a way I can delete a file to make it reset all my preferences at once? I dont have anything huge I couldnt replace with just a few minutes time.
|
|
_________________ The Seaworthy |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jan 14, 2010 6:42 am |
You should be able to export your package to an XML file, then create a new session and import your XML into it. That will give you all of your scripts but will have default settings for all preferences.
|
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Thu Jan 14, 2010 4:19 pm |
Not Fixed by doing this... But I did find the culprit. When I have the map on SAFE walk it does it, when the map is on FAST walk it doesn't.
|
|
_________________ The Seaworthy |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Thu Jan 14, 2010 4:28 pm |
Also (obviously) if you turn off Add Door Commands to saved paths then it eliminates the issues too but it also doesnt try to open any doors when you run the path.
|
|
_________________ The Seaworthy |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jan 14, 2010 5:01 pm |
Still not sure why CMUD would care if you execute this from the SEND menu vs an alias though. But it definitely seems to be very mapper dependent. Right now I'm more focused on bugs that effect both CMUD and TeSSH, so I'm not sure when I'll get to an obscure mapper issue like this, especially since it only effects using the SEND MXP tag with a specific mapper setup.
|
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Thu Jan 14, 2010 6:32 pm |
I 'patched' the issue by using oninput triggers to alter the info, so its not as if its a major issue for me now, but it is still obviously a bug.
|
|
_________________ The Seaworthy |
|
|
|
|
|