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
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: 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?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: 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.
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: 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?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Wed Apr 04, 2007 9:47 pm   
 
nope, still when i clickl on it there is no walking done
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: 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 Twisted 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
Reply with quote
Zugg
MASTER


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

PostPosted: 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.
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: 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.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
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