Spamfunet Nanny Forum

NannyMUD => Tips and Tricks => Topic started by: Ereshkigal on December 06, 2006, 04:35:42 PM



Title: zmud scripts
Post by: Ereshkigal on December 06, 2006, 04:35:42 PM
I think it would be a good idea to have a thread for zmud scripts. If you do something clever with your client and feel like sharing, please post a note.

To start off... something not terribly useful, but fun:

This is a partial hpbar setup. You would probably want it to carry more info, but I got too bored to work it all out.


Instructions:
-------------

First you need to set things up so that you will use the "hp" command every time you login. The easiest way to do this is by setting "alias .login hp". If you are already using the ".login" alias for something else, for example if you already have "alias .login = bounce", you could just modify it as "alias .login do bounce, hp". This is just so that your hp/sp gets set up when you login. The "hp" command is not available to all guilds (it works in the monks' guild) but all guilds have some short score command (like sc, xp, etc.) which can be used instead. In that case, you will need to modify the second trigger in the script below.

Set up a prompt as follows:

set_prompt My prompt-> Full: $full, Soak: $soak, Tox: $tox, Sat: $hsat\n>

(If you are already using a different prompt that you want to keep, you will need to modify the third trigger in the script below. Also, don't worry about getting your view cluttered by this big prompt since it gets gagged.)

Copy the following script into a text file.

Pull up the settings window and click File->Import text ... and choose the text file.

Do let me know if it does not work.

Eresh

================================================================================
#CLASS hpinfo
#VA cur_hp 0 {} hpinfo
#VA max_hp 0 {} hpinfo
#VA cur_sp 0 {} hpinfo
#VA max_sp 0 {} hpinfo
#VA full 0 {} hpinfo
#VA soak 0 {} hpinfo
#VA tox 0 {} hpinfo
#VA sat 0 {} hpinfo
#TRIGGER {^** HP: &{cur_hp}/&{max_hp}   SP: &{cur_sp}/&{max_sp}} {} {hpinfo}
#TRIGGER {Hp: &{cur_hp} ~(&{max_hp}~)  Sp: &{cur_sp} ~(&{max_sp}~)  *} {} {hpinfo}
#TRIGGER {My prompt-> Full: &{full}~%, Soak: &{soak}~%, Tox: &{tox}~%, Sat: &{hsat}~%} {#gag} {hpinfo}
#BUTTON sp_label {SP:} {} {} {} {} {} {} 0 25 20 0 20 0 {} {} {Separ} -1 {hpinfo} {} {} {} 1
#BUTTON hp_label {HP:} {} {} {} {} {} {} 0 25 20 0 0 0 {} {} {Separ} -1 {hpinfo} {} {} {} 1
#BUTTON hp_gauge {} {} {} {} {} cur_hp {} 0 200 15 0 0 25 {} {} {Gauge|"green"|"red"|@max_hp| @max_hp/2} -1 {hpinfo} {} {} {} 1
#BUTTON sp_gauge {} {} {} {} {} cur_sp {} 0 200 15 0 20 25 {} {} {Gauge|"blue"|"yellow"|@max_sp|@max_sp/2} -1 {hpinfo} {} {} {} 1
#BUTTON hp_display {@cur_hp/@max_hp} {} {} {} {} {} {} 0 50 20 0 0 225 {} {} {Separ} -1 {hpinfo} {} {} {} 1
#BUTTON sp_display {@cur_sp/@max_sp} {} {} {} {} {} {} 0 50 20 0 20 225 {} {} {Separ} -1 {hpinfo} {} {} {} 1
#BUTTON tox_display {Full: @full, Soak: @soak, Tox: @tox, Hsat: @hsat} {} {} {} {} {} {} 0 200 20 0 0 280 {} {} {Separ} -1 {hpinfo} {} {} {} 1