stripping out the prompt

Post Reply
Posts: 401
Joined: Thu Apr 09, 2009 4:45 am

stripping out the prompt

Post by Caled »

I'd really like to strip out my prompt and display it at the bottom, perhaps in a larger font than usual.

Zugg is apparently working on adding that as a feature to CMUD (which got me to thinking about it as a possibility), but I remember the early screenshots of Mudlet. That is probably already possible, right?
Lets say this is my prompt trig (in actuality, to capture the whole thing is going to take more effort, but I can work that out later.

^H:(\d+)\|(\d+) (\d+) \d+% Exp:\d+ <(\w+) ([eb-]{2})> \d+\|\d+

selectString( matches[1], 1 )
replace( "" )

^ That leaves a blank line behind, which I also want to remove. I also do not know how to display the prompt in a permanent location at the bottom of the main window.
Edit: I just discovered deleteline(), which might solve that part of the problem.

I'm not asking for someone to do the script for me, I mostly just want to know: is it possible? It will be a while before I'm ready to work on this script as I have a lot more crucial scripting to do, this is just a luxury. By the time I am ready, I'll hopefully be competent enough at Lua to tackle the more complex things liken this.

User avatar
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: stripping out the prompt

Post by Heiko »

Yes, it's possible. If you call deleteLine() from the prompt trigger the prompt will be gone without a trace. You'll be able to show it in a different font size or differnt font on a label which is something like a button, but meant for small custom image/text/graphics displays in the custom user interface area, i. e. the frame sourrounding the main text display. A label is pretty much the same as a button with the exception that you have better text formatting options e.g. print multi line text. Labels are intended for mini displays e. g. a label to show your current status, a label to show health gauges, prompt, status bar, bag content, compasses etc. However, labels still need a good deal of code. ETA: 2 weeks.

Post Reply