|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Apr 04, 2007 5:38 am
MXP use with #walk |
<u><send "#walk %db(@mlist,%1)">%1</send></u> worked great in zmud, for cmud i changed it to <u><send "#walk %db(@mlist,%1)">%1</send></u>
however, it does'nt do anything when i click the links now. anything i'm missing in the transition? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Apr 04, 2007 10:20 am |
It shouldn't have worked in zMUD - the fact that it does is a serious bug. MXP links aren't able to execute zScript commands directly - it's a huge security risk since zScript can read and write files, access COM servers and a host of other things that can really balls up your computer. The workaround I use is to create an alias (it can be as simple as "#walk %-1" if you want) and have the <send> tag execute the alias.
EDIT: Oh, and CMUD won't like the use of quotes - it'll remove the quotes and parse them as if their contents was a literal string. You can either ~ escape them, or change them to apostrophes. Either works. |
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Apr 04, 2007 2:09 pm |
well i just included part of my trigger, the full one is like this (done from memory)
mlist looks like, path2541ground2546moon2580forest260
#tr {(%w) ~: incomplete} {#if (%db( @mlist, %1)) {#sub {<u><send href="#walk %db(@mlist,%1)">%1</send></u> : incomplete}}}
can anyone fix up anyting with that? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Apr 04, 2007 2:27 pm |
#alias MXPWalk {#walk %-1}
#trig #tr {(%w) ~: incomplete} {#if (%db( @mlist, %1)) {#sub {<u><send ~"MXPWalk %db(@mlist,%1)~">%1</send></u> : incomplete}}}
Should be all you need to do. |
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Apr 04, 2007 9:47 pm |
nope, still when i clickl on it there is no walking done
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Wed Apr 04, 2007 11:09 pm |
*grumbles something about the <> being removed for immediate expansion.*
Here you go.
#exec {"#mxp {<send '#walk "%db(@mlist,%1)"'>"%1"</send>}"}
I'm finding that more and more often I'm forced to use #execute.
Fang, You don't EVEN want to know the things I figured out how to do with MXP tags in Zmud they were downright evil Most of them I deemed too dangerous to exist in a form that others could read, so I never used em in a mud. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Apr 05, 2007 4:48 am |
Actually, commands *are* allowed in MXP menus if you have the option in the MXP preferences for this enabled. But the option should be disabled by default. So check your preferences and see. I don't recommend that people enable this option unless they really need it because of the security risks that have been mentioned. But the demand for this option was high enough that it was added a long time ago to zMUD, and CMUD has it too.
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu Apr 05, 2007 6:07 pm |
well i guess i'll put this post here, i have another idea that i'm not too sure exists already. Perhaps have the option to expand something on the screen when clicked? I don't mean after the fact either, so if i scroll up a few pages and have something looking like this:
Powers
Backstab (?)
Trip (?)
ect...
If i click on the ?, it will be replaced by text on what it does, cost, ect. whatever you placed in there
If there is a way to do this already then please give details too. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Apr 05, 2007 7:21 pm |
No, you can't print something on a line in the buffer. You could create an MXP link to print it at the bottom of the screen when it's clicked in the buffer with ease, though.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Apr 05, 2007 8:56 pm |
If that were kept in a different window you could fake the effect using the various print methods and #CLR. Other than that, tooltips are your friends in this case.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|