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
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Oct 17, 2003 11:59 pm   

image
 
Can somebody help me with what I think is a simple image trigger.


I want to display the image downloaded from
http://www.dartmud.com/braman.jpg

I would like it to display in a seperate window when the mud sends
{He|She|It} is a young braman

I am mainly having trouble with the image command. If its not possible to put it in a seperate window, even putting it in the main window will help.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Sat Oct 18, 2003 12:56 am   
 
#image braman.jpg url=http://www.dartmud.com/braman.jpg does not seem to display it.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 18, 2003 1:31 am   
 
Download the file to your computer. On my browser that would be:
Go to the URL with browser. Right-click the picture. Save Picture as...
Your browser may differ slightly, but it should be easy to figure out.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Sat Oct 18, 2003 6:53 am   
 
Thank for the suggestion LightBulb but this is not going to work.

Well, it will work, but I don't want to have to download the file manually. I want to be able to give this script to other people who play on my mud. According to the help files the image tag is supposed to support a URL link to download the image on the fly. This is really what I want. The help file mentions that this is the same as how MCP handles sound files, but it does not provide a image example. If tried a number of things, perhaps if somebody could give me the code for downloading and playing a sound file on the fly, then I should be able to figure out how to do the same with a image file.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Sat Oct 18, 2003 7:48 am   
 
I also gave this a try, no good

#MXP <IMAGE catfolk.jpg FNAME=catfolk.jpg URL="http://www.dartmud.com/">
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 18, 2003 2:19 pm   
 
quote:
IMAGE

Syntax: #IM [filename]

Display the graphic image in the specified file in a popup window. If filename is omitted, the popup window is closed. The following graphics formats are supported: BMP, GIF, JPG.


IMAGE examples

#IM image.gif

displays the image.gif file in a popup window.

#IM

remove the popup image window.

Since I don't see any reference to either URLs or MCP, this can't be the helpfile you meant.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Sat Oct 18, 2003 2:54 pm   
 
http://www.zuggsoft.com/zmud/mxp.htm

Note the URL flag

Images
MXP supports an <IMAGE> tag to display inline graphics images. GIF or BMP images are supported. Additional image types or encrypted images can be supported with MUD-specific Filters as described in the next section.

This is similar to the <IMG> HTML tag but doesn't implement some of the HTML options. The <IMAGE> tag is very similar to the <SOUND> tag (or !!SOUND command) in MSP. The attributes of the <IMAGE> tag are:

FName
The name of the graphics file to display.
URL
The URL of the path for the graphic if it should be downloaded on the fly. This is not recommended for large graphics but is supported to be compatible with the MSP URL parameter for sounds. The classname is appended to the URL, along with the name of the graphics file itself.
T (type)
The class for the image. Same as classes used in MSP.
H (height)
The height of the image (in pixels, character heights, or percentage). If omitted, the height is computed from the actual image. If the specified height is different from the image, the image is stretched.
W (width)
The width of the image. Same syntax as height.
HSPACE
Additional space to add before and after the image
VSPACE
Additional space to add above and below the image.
ALIGN (left|right|top|middle|bottom)
Controls the alignment of the image on the line. For example, if ALIGN=Bottom is used, the rest of the text on the line will align with the bottom of the image.
ISMAP
Indicates that the image is an image-map. When an image-map is included within a <SEND> tag, the command sent to the MUD is appended with "?X,Y" where X,Y is the position clicked on the image.
Note that when using images, the act as large individual characters as far as the client is concern. Text cannot wrap on multiple lines next to an image...an image always takes up the entire height of the line. Text wrapping to the next line will wrap at the normal left margin of the screen until the graphics image. So, if inline graphics are used, you should make them similar in size to the surrounding text line. Also remember that the user might be using a different screen font.

The <IMAGE> command is intended to be used with graphic images already loaded to the client's disk. Using the URL attribute to download graphics on the fly can cause a severe burden to the MUD server. However, even if the URL attribute is used, the image file is not downloaded if it already exists on the disk. So, since the image is only downloaded once, the MUD server might be able to handle it. Also, as with MSP, the downloading will never overwrite an existing file with the same name as a security precaution, or allow any absolute path information. The file will be stored in a location determined by the client. To update an image to a new version, you need to specify a new filename.

To implement a clickable image map (server-side map), include an image with the ISMAP attribute within a <SEND> tag. For example:

<SEND showmap><IMAGE map.jpg ISMAP></SEND>
will create a clickable image map of the map.jpg graphic. When the user clicks on the image, the command given in <SEND> will be sent to the MUD with the ?X,Y appended to it. So, for example, if the user clicked on the X=10, Y=20 point on the image, the command:

showmap?10,20
will be sent to the MUD.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 18, 2003 3:36 pm   
 
quote:
URL
The URL of the path for the graphic if it should be downloaded on the fly. This is not recommended for large graphics but is supported to be compatible with the MSP URL parameter for sounds. The classname is appended to the URL, along with the name of the graphics file itself.


After looking at other examples on the page, this only took a few minutes of experimentation. And perhaps you don't consider this to be a large graphic, but I think most people would. However, here's the command.

#MXP <IMAGE braman.jpg URL='http://www.dartmud.com/'>

Details on MSP can be found on the MSP Specification page.

quote:
The <IMAGE> command is intended to be used with graphic images already loaded to the client's disk. Using the URL attribute to download graphics on the fly can cause a severe burden to the MUD server. However, even if the URL attribute is used, the image file is not downloaded if it already exists on the disk.

Since the image will be downloaded to a file on the user's disk anyway, and that file will then be used for future IMAGE calls, I think most MUDs implement this by creating a package of images which can be downloaded via browser.
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