ID:170228
 
How can you make a browser window? Take for example, DWMA2 (for those who played it) when you click on ur icon in the stat panel, it brings up a display of all of your stats and such. How can one do that?
browse()
In response to Crashed
Does it have anything to do with scripts? I was reading it in the referance and it said stuff about DM scripts
In response to Polantaris
Ok, if you you want it to only happen when you click in the stat panel, say so, but if you want it to happen whenever you click someone, it's goes like:

client/Click(mob/player/A in view())
if (!ismob(A) || istype(A,/mob/player))
usr << browse("Health: [A.maxhp]")


Of coarse, that is completely customizeable. All you basically need to know is line break, and font colors really.
In response to CaptFalcon33035
How would I do multiple lines?
Like
Line1
Line2
Line3

with all different stuff but still on the same browse?
In response to Polantaris
Use "
" (without spaces) or "\n".
In response to N1ghtW1ng
I'm pretty sure \n doesn't make a new line in HTML pages.
In response to Polantaris
Polantaris wrote:
Does it have anything to do with scripts? I was reading it in the referance and it said stuff about DM scripts

Well, basically you use browse() like this:

src<<browse("<B>This</B> <I>is</I> <U>a complete</U> waste of my time.","window=random")


Basically, you should know how to use HTML, the window: stuff is basically if you want to change that specific window or a new window.
In response to Polantaris
Use the following:

src << browse({"

Blah
Blah
Blah

"}
)
In response to AZA
Okay ill try it out, thanks alot
In response to AZA
How can I make it appear in a seperate popup and not the browser?
In response to Polantaris
Polantaris wrote:
How can I make it appear in a seperate popup and not the browser?

In the second argument of browse(), specify a name for the window. The name you specify is just a tag that you can use to refer to the window: not something that the player will see.

src << browse("You are looking at a popup window.","window=myWindow")
In response to Polantaris
Add
,"window=_new"
to the end of the browse() proc (inside the epilepse)