Author Topic: A hint: Prompt  (Read 8669 times)

Delirium

  • Helper
  • Posts: 11383
A hint: Prompt
« on: May 20, 2003, 03:02:02 AM »
Inspired by a stupid mistake that left me feeling like a day-old newb. :P Figure I'd throw this up for those who might not be aware of the 'prompt' command.. Its extremely helpful when keeping track of your character's condition - health, stamina, stun, etc.

Straight from the helpfiles:

Quote from: "help prompt"
PROMPT                                                            (Control)

   This command, when supplied with variable parameters, will display
information about your character every time any command (including a 'null'
command when you press RETURN) is issued.
   The available parameters for prompt are:

      %h   current health                        
%H   maximum health
      %m   current mana                        
%M   maximum mana
      %v   current stamina                      
%V   maximum stamina
      %t   current stun                            
%T   maximum stun
      %l   long description status            
%L   your long description
      %n   your name                            
%i   your invisibility status
      %s   your current position              
%f   your flying status
      %o   the language you're speaking  
%k   what you're riding
      %w   how fast you're walking

These parameters can be mixed with any normal text that you wish. For
instance, the command "prompt %hhp> " would produce a prompt such as
"14hp> ". You can also use "\n" to skip to a new line.

Example:
   > prompt %h/%H;%v/%V>
   101/112;149/151>

Note:
   If you want a space between the last character of your prompt and the
   first space in which you will be typing a command, you need to insert
   the space in your prompt command. In other words, "prompt > " and
   "prompt >" will not give exactly the same prompt.
"Our whole lives are just stories." - Vikings

you've seen more than they could ever know
no matter what they say, you've earned the right to be so bold

creeper386

  • Posts: 2583
A hint: Prompt
« Reply #1 on: May 20, 2003, 11:38:04 AM »
IMO... Since I tend to use the info bar, the only useful thing is the walk run... But personally, it's a big pain in the bum... Because it's really annoying. I wish I could get a more informative infobar personally :-p


Creeper
21sters Unite!

Plazgoth

  • Posts: 315
Mushclient
« Reply #2 on: May 20, 2003, 12:13:02 PM »
I had posted some info on this a while back but I will re-post since it seems relevant to this topic.

I use Mushclient and have gotten it to display a nice infobar for me. It's even color coded. So for example when a certain stat gets below a certain point it changes colors. Normally when all hp/st/mv are maxed they are green, when one of tem gets to about 70% of the max it changes color to orange, and when it drops below 50% it turns red.

The infobar also displays other information. It currently looks something like this:

120(120)hp___94(94)st___110(110)mv______Plazgoth is currently sitting, he is walking, and speaking Sirihish.

87(120)hp____30(94)st____99(110)mv______Plazgoth is currently resting, he is running, and speaking Allundean.

20(120)hp____56(94)st_____5(110)mv______Plazgoth is currently standing, he is sneaking, and speaking Bendune.


Anyway you get the idea. The underscore is there just to show the spacing it is not there in the infobar. And I applogize to anyone who will get offended by the color in this post, I am just trying to accurently explain myself.

You can tailor it to fit your needs. The only drawback is the fact that it only gets updated when the mud sends the prompt (i.e. it is not like the built in infobar) but for me that is a minor drawback. I can post the code and explanation if anyone is interested in seeing them. I will obviously change the numbers and names to protect the innocent.

Mushclient can also update its status bar. I currently use it to display my current long description. Its not color coded but it is still nice.

Marauder Moe

  • Posts: 12514
A hint: Prompt
« Reply #3 on: May 20, 2003, 01:10:25 PM »
Hey, do you think you could post a walk-through on how to get that infobar thingy to work in MUSHclient?  I'm still getting used to using that program and I haven't used many of its features yet.

Plazgoth

  • Posts: 315
A hint: Prompt
« Reply #4 on: May 20, 2003, 01:45:45 PM »
Set your prompt to the following:
prompt  %h %H %t %T %v %V %s %w %o\n -->


Then open your default script for editing  by  selecting Game->Configure->Scripting (Shift-Ctrl-6)
Click on the Edit Script button.

Paste in the following Sub:

Code: [Select]
sub infobar(thename, theoutput, data)
 world.infoclear
 world.infoBackground "black"
 world.infoColour "lime"
 world.infoFont "Verdana",10,1

 if Cint(data(1)) < 60 then
world.infoColour "red"
 elseif Cint(data(1)) < 70 then
world.infoColour "orange"
 elseif Cint(data(1)) < 82 then
world.infoColour "khaki"
 else
world.infoColour "lime"
 end if
 world.info data(1) + "(" + data(2) + ")hp     "


 if Cint(data(3)) < 40 then
world.infoColour "red"
 elseif Cint(data(3)) < 60 then
world.infoColour "orange"
 elseif Cint(data(3)) < 80 then
world.infoColour "khaki"
 else
world.infoColour "lime"
 end if

 world.info data(3) + "(" + data(4) + ")st     "


 if Cint(data(5)) < 70 then
world.infoColour "red"
 elseif Cint(data(5)) < 120 then
world.infoColour "orange"
 elseif Cint(data(5)) < 140 then
world.infoColour "khaki"
 else
world.infoColour "lime"
 end if
 world.info data(5) + "(" + data(6)+ ")mv     "




 world.infoFont "Verdana",10,0
 world.infoColour "khaki"
 world.info "  Plazgoth is currently "

 world.infoFont "Verdana",10,1
 world.infoColour "lime"
 world.info data(7)

 world.infoFont "Verdana",10,0
 world.infoColour "khaki"
 world.info " , he is "

 world.infoFont "Verdana",10,1
 select case data(8)
case "running"
world.infoColour "lime"
case "walking"
  world.infoColour "red"
case "sneaking"
world.infoColour "lightblue"
 end select
 world.info data(8)

 world.infoFont "Verdana",10,0
 world.infoColour "khaki"
 world.info " ,and speaking "

 world.infoFont "Verdana",10,1
 world.infoColour "lime"
 world.info data(9)

end sub


Save the script and when asked about parsing it say yes.

Then create a trigger in Mushclient by  selecting Game->Configure->Triggers (Shift-Ctrl-8)
Click on the Add button.

In the trigger space paste in the following regular expression:^.*?(\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (.*?) (\w+) (\w+)$

Make sure the following check marks are clicked: Enabled, Omit from Output, Regular Expression.

Down on the bottom right of that dialog in the script box type in infobar

Hit OK

That should get you the infobar exactly the same as mine. You can obviously change the colors and fonts, and even the treshholds. Put your own's character's name in there unless you like seen Plazgoth in your infobar.

spawnloser

  • Posts: 7313
A hint: Prompt
« Reply #5 on: May 20, 2003, 03:01:07 PM »
Quote from: "Plazgoth"
Put your own's character's name in there unless you like seen Plazgoth in your infobar.

Heheh.  Also change the 'he is' for those female characters that don't feel transgendered.
Quote from: Malifaxis
We need to listen to spawnloser.
Quote from: Reiteration
spawnloser knows all

Quote from: Spoon
A magicker is kind of like a mousetrap, the fear is the cheese. But this cheese has an AK47.

Bestatte

  • Posting Privileges Revoked
  • Posts: 2861
A hint: Prompt
« Reply #6 on: May 20, 2003, 05:26:33 PM »
Before I try this (since I've had a hell of a time trying to get the infobar to work and ended up just plain disabling it)...would you mind pasting a screen shot? Edited of course so we see only the infobar itself and nothing to tell us what PC you play...

If it looks like something I can live with, I'll give it a try. Otherwise I'll just continue hitting the enter key every 30 seconds whenever I want to see if my stats have gone up after doing something to lower them.

tortall

  • Posts: 2112
My weird way
« Reply #7 on: May 20, 2003, 05:36:14 PM »
Ok, here's what I usually use.

<Current HP-Max HP/Current Stanma-Max Stanma/Current Stun-Max-Stun/Name/riding/speed>

Ok, yes, I put the name in there! I always random type out weird names because they're always the coolest. Here's an examble I used on another MUD: Veranshual, Slanshual, Lickanshual.

Here's some I just made up: Gashtul, Fernaine, Mahlines....
The man asks you:
     "'Bout damn time, lol.  She didn't bang you up too bad, did she?"
The man says, ooc:
     "OG did i jsut do that?"

Quote from: Shalooonsh
I love the players of this game.
That's not a random thought either.

Plazgoth

  • Posts: 315
A hint: Prompt
« Reply #8 on: May 20, 2003, 08:23:12 PM »
Quote from: "Bestatte"
Before I try this (since I've had a hell of a time trying to get the infobar to work and ended up just plain disabling it)...would you mind pasting a screen shot? Edited of course so we see only the infobar itself and nothing to tell us what PC you play...

If it looks like something I can live with, I'll give it a try. Otherwise I'll just continue hitting the enter key every 30 seconds whenever I want to see if my stats have gone up after doing something to lower them.


The walk through above does not use the build in infobar ArmageddonMud provides. It uses a feature of your client to display a different infobar created by the script listed above. For it to update you still have to press enter or receive/send text to the mud. So if Today all you do is have a prompt displayed and hit enter every 30 seconds to see if it changed the walkthrough above would move the display of that prompt to a one-line infobar window on the bottom of your screen and it will ad cool color features as well as more verbosity.

I'll work on getting the screen capture for you and will send it to your e-mail because I don't have a place to put large images.

Hope that helps...

[EDIT] I guess you do not provide your e-mal. If you wish e-mail me and I can reply back with the sceen capture{/EDIT]

I found a place to host the screen capture  :twisted:

***WARNING***
The image is really big in size but small in filesize :) The numbers and name have obviously been changed to protect the innocent.

http://us.f1.yahoofs.com/users/ecf06ec2/bc/Yahoo!+Photo+Album/__hr_screencapture.jpg?bcXIty.Axs.7gIYQ

Delirium

  • Helper
  • Posts: 11383
A hint: Prompt
« Reply #9 on: August 12, 2004, 12:44:17 AM »
Dug this up out of obscurity trying to figure out how to set my infobar..

Uh, whaddya do if you can't click the 'edit script' button (as in, you have no scripts to edit)? Granted, I've never used scripts before and I've only recently figured out how the hell to set color triggers. ;)

Yes, I use MUSHclient.

Edit: Nevermind. Thanks, Zacharai.
"Our whole lives are just stories." - Vikings

you've seen more than they could ever know
no matter what they say, you've earned the right to be so bold

creeper386

  • Posts: 2583
A hint: Prompt
« Reply #10 on: February 01, 2005, 08:12:45 PM »
And if you don't have a script file started what should it have in it?


Creeper
21sters Unite!

Maybe42or54

  • Posts: 4170
A hint: Prompt
« Reply #11 on: February 01, 2005, 08:39:30 PM »
And how would I make my prompt do all those magickal Ansi colors?

I'm using Gmud here.
Arm is evil.  And I love it.  It's like the softest, cuddliest, happy smelling teddy bear in the world, except it is stuffed with meth needles that inject you everytime

Delirium

  • Helper
  • Posts: 11383
A hint: Prompt
« Reply #12 on: February 01, 2005, 08:42:51 PM »
Quote from: "creeper386"
And if you don't have a script file started what should it have in it?


Paste that code into a text program like notepad, and save it with the extension .vbs, so for example infobar.vbs, stick it in a folder where you'll be able to remember where it is.

Then when you hit 'Configure -> Scripting', you can browse for it and open it from there. Viola.


Quote from: "Maybe42or54"
I'm using Gmud here.


That's your problem. The script is for MUSHclient. ;)
"Our whole lives are just stories." - Vikings

you've seen more than they could ever know
no matter what they say, you've earned the right to be so bold

creeper386

  • Posts: 2583
A hint: Prompt
« Reply #13 on: February 01, 2005, 09:17:27 PM »
Correction, got it to work but every time the screen scrolls I get a scripting error.

Code: [Select]
Expected statement
Line in error:
"my prompt is here"


As to what it means, I'm lost.

Creeper
21sters Unite!

Delirium

  • Helper
  • Posts: 11383
A hint: Prompt
« Reply #14 on: February 01, 2005, 09:41:14 PM »
Did you set up the trigger and prompt?
"Our whole lives are just stories." - Vikings

you've seen more than they could ever know
no matter what they say, you've earned the right to be so bold

creeper386

  • Posts: 2583
A hint: Prompt
« Reply #15 on: February 01, 2005, 09:52:59 PM »
Thats what  I get for editing.


Anyways, I got everything working. Kind of . I get an error everytime the script tries to run.

Which says ...
Code: [Select]
Expected statement
Line in error:
000 000 000 000 000 000 walking standing language


So, I don't know.... Something doesn't work right.


Creeper
21sters Unite!

Trenidor

  • Posts: 599
    • Oakeson Pictures
A hint: Prompt
« Reply #16 on: February 01, 2005, 10:57:55 PM »
Only problem I have with the prompt is you can't have it be longer than something like 60 characters....not too fun when you need about 10 things in yours
Crackageddon.... once an addict, always an addict

Xamminy

  • Posts: 564
A hint: Prompt
« Reply #17 on: February 02, 2005, 12:18:59 PM »
Magicker prompt:
prompt %h/%H %v/%V %t/%T %o-%s-%w\n%m-%L>

Non magicker prompt:
prompt %h/%H %v/%V %t/%T %o-%s-%w\n%L>

See, you don't need to label the numbers...once you get used to it, you know what they all mean.  You just need to divide them up.
-X-_

> sing (dancing around with a wand in one hand) Put that together and what do you got?  Ximminy Xamminy, Ximminy Xamminy, Ximminy Xamminy Xoo!

creeper386

  • Posts: 2583
A hint: Prompt
« Reply #18 on: February 02, 2005, 08:41:30 PM »
Yeah I can read the prompt just fine Xammy.

The problem is I HATE it being there EVERY SINGLE FUCKING LINE. It makes me want to go mad.


Creeper
21sters Unite!

SewerRat_inTheOpen

  • Posts: 230
A hint: Prompt
« Reply #19 on: February 03, 2005, 08:47:54 AM »
Mine's like

Quote
[H:%h E:%t S:%v]%m|%k|%w*>


Looks nice as well. They key is for it to look neat on your screen, otherwise it's really frustrating.
Lovehina- Ken Akamatsu

Agent_137

  • Posts: 5532
    • a crapy clawn
A hint: Prompt
« Reply #20 on: February 03, 2005, 08:02:33 PM »
Wow. I got to the point to where I had a city prompt and a combat prompt. I made aliases out of them.

City prompt:

%s>

is %s stun? or is it percent v? Either way, I just used the stun prompt.

Then, for combat, I had the big one with health|stamina|stun|position>

I hate how long the prompts are. hate hate hate. It gets in the way and it's always there. It's always ugly, and you don't need that information 95% of the time.

Maybe42or54

  • Posts: 4170
A hint: Prompt
« Reply #21 on: February 03, 2005, 09:11:19 PM »
At the end of your prompt, be sure to add \n

That way it will starts the room descriptions and everything else on a new line.
Arm is evil.  And I love it.  It's like the softest, cuddliest, happy smelling teddy bear in the world, except it is stuffed with meth needles that inject you everytime

creeper386

  • Posts: 2583
A hint: Prompt
« Reply #22 on: February 03, 2005, 09:38:17 PM »
two /n work better then there is ussually a space before your prompt and after it so it doesn't blend in with everything else. That at least hurts my eyes more then seeing it there. Trying to dig it out of the room description.


Creeper
21sters Unite!

Maybe42or54

  • Posts: 4170
A hint: Prompt
« Reply #23 on: February 03, 2005, 09:44:35 PM »
Heh. one \n does that for me.
Arm is evil.  And I love it.  It's like the softest, cuddliest, happy smelling teddy bear in the world, except it is stuffed with meth needles that inject you everytime

Xamminy

  • Posts: 564
A hint: Prompt
« Reply #24 on: February 03, 2005, 11:01:42 PM »
Quote from: "help prompt"
     %h   current health                %H   maximum health
      %m   current mana                  %M   maximum mana
      %v   current stamina               %V   maximum stamina
      %t   current stun                  %T   maximum stun
      %l   long description status       %L   your long description
      %n   your name                     %i   your invisibility status
      %s   your current position         %f   your flying status
      %o   the language you're speaking  %k   what you're riding
      %w   how fast you're walking
-X-_

> sing (dancing around with a wand in one hand) Put that together and what do you got?  Ximminy Xamminy, Ximminy Xamminy, Ximminy Xamminy Xoo!