THREED

Parent: lib

Library (lib/3d.lpc) used in SWLPC with functions specifically to output 3D tags.

query_youstat
query_youstat(type, name)

Returns 3dtags for a player statistics. Eg query_youstat("h",10) will return the player has full health ({uih10}). Refer to statistics for more information

query_objectstat
query_objectstat(name,type,stat)

Returns 3dtags for an objects statistics. For example query_objectstat("dog","h",10) will return 3dtags for a dog with full health ({odog,ih10}). Refer to statistics for more information

query_youaction

query_youaction(action)

Returns an action yourself have performed. For example:

query_youaction("fart");

will return {uafart}.

query_objectaction
query_objectaction(name,action)

Returns an action performed by an object. For example

query_objectaction("dog","fart");

for a dog farting ie {odog,afart}

query_panelcommand
Generates a panel command. This is discussed in Captions Panels in SWLPC.

query_messagebox
query_messagebox(filename, caption, hlp,buttons,panelcolor,fontsize,halign,valign,fontname,width,height,fontcolor)

Displays a message box in the 3D client. Returns the following messagebox 3d tags. Tags start with 'bv'.

filename if displaying a file in the messagebox then specify the filename (otherwise use hlp

caption title of the messagebox

hlp text in messagebox if 'filename' isnt used

buttons array of buttons. If 1D array then command and title are the same. If 2D array then first element of element is the button title and the second element is the command.

panelcolor color of the message box

fontsize size of the font used

halign horizontal alignment of messagebox l,r,c

valign vertical alignment of messagegox t,c,b

fontname font face of messagebox

width, height width and height of messagebox

fontcolor font color of messagebox

query_messagebox(0,"News","Today is the day of days");

query_htmlbox
query_htmlbox(url,title,width,height)

Displays a html box in the 3D client. Returns these html box 3d tags. Tag starts with 'bh'.

url is the URL to display in the html box

title is the title of the html box

width and height is the width and height of the html box

For example:
query_htmlbox("www.skinhat.com","Skinhats website");

query_editbox
Displays an edit box in the mud client. Returns edit box 3d tags

Has tag starting with 'be'

query_editbox(title,send,cancel,fontname,fontcolor, panelcolor,width,height,msg,subject,fontsize)

title: caption of the editbox
send: command to send to mud when sent the text from the mud client
cancel: command to send to the mud if the player has cancelled sending text to the mud
fontname: font face of the edit box
fontcolor: font color of the edit box
panelcolor: color of the edit box
height, width: height and width of the edit box
msg: text to load into the edit box before editing. Allows for example a newspaper article to be edited
subject: if true then edit box will have a subject line
fontsize: font size

An example is:
write(THREED->query_editbox("Enter Bulletin Board Message:","**","~q",0,0,0,0,0,0,1));

This will generate an editbox with the title 'Enter Bulletin Board Messages' and a subject edit box.

query_weather
query_weather(weathertype,amt)

Function returns weather 3d tags for weather. For example:

query_weather("r",10);

returns tags for rain at full strength ie {wr10}.