Site hosted by Angelfire.com: Build your free website today!
Tested only with Zmud version 5.55.
Please mud-mail me questions, comments or suggestions.

New and Improved 'New and Improved HUD':
Example:
	=====================[ Lookout Room on top of the Castle [n]. ]=====================
	Hp: 3300(3300) [#########################] Gp: 5492(5492) [#########################]
	Xp: 12419928(16800000)          Fighting: 2 10 0

Alias:	update_hud

	hud_location = %ansi(grey)@room%ansi(green) @roomdirs%ansi(grey).
	hud_blank_str = %ansi(cyan,bold)""
	#LOOP %eval((100-%len(@hud_location))/2) {hud_blank_str = %concat(@hud_blank_str, "=")}
	hp_percent = %eval(100*@Hp/@MaxHp)
	gp_percent = %eval(100*@Gp/@MaxGp)
	xp_percent = %eval(100*@Xp/@MaxXp)
	#if (@hp_percent < 14) {hp_color = red} {#if (@hp_percent < 28) {hp_color = red,bold} {#if (@hp_percent < 42) {hp_color = magenta} {#if (@hp_percent < 56) {hp_color = green} {#if (@hp_percent < 70) {hp_color = green,bold} {#if (@hp_percent < 84) {hp_color = yellow} {#if (@hp_percent < 100) {hp_color = cyan} {hp_color = cyan,bold}}}}}}}
	#if (@gp_percent < 14) {gp_color = red} {#if (@gp_percent < 28) {gp_color = red,bold} {#if (@gp_percent < 42) {gp_color = magenta} {#if (@gp_percent < 56) {gp_color = green} {#if (@gp_percent < 70) {gp_color = green,bold} {#if (@gp_percent < 84) {gp_color = yellow} {#if (@gp_percent < 100) {gp_color = cyan} {gp_color = cyan,bold}}}}}}}
	#if (@xp_percent < 14) {xp_color = red} {#if (@xp_percent < 28) {xp_color = red,bold} {#if (@xp_percent < 42) {xp_color = magenta} {#if (@xp_percent < 56) {xp_color = green} {#if (@xp_percent < 70) {xp_color = green,bold} {#if (@xp_percent < 84) {xp_color = yellow} {#if (@xp_percent < 100) {xp_color = cyan} {xp_color = cyan,bold}}}}}}}
	hp_bar_string = %ansi(red,red,bold)""
	#LOOP %eval(@hp_percent/4) {hp_bar_string = %concat(@hp_bar_string,"#")}
	hp_bar_string = %concat(@hp_bar_string,%ansi(grey,black))
	#if (@hp_percent < 100) {#LOOP %eval(25-(@hp_percent/4)) {hp_bar_string = %concat(@hp_bar_string," "}}
	gp_bar_string = %ansi(blue,blue,bold)""
	#LOOP %eval(@gp_percent/4) {gp_bar_string = %concat(@gp_bar_string,"#")}
	gp_bar_string = %concat(@gp_bar_string,%ansi(grey,black))
	#if (@gp_percent < 100) {#LOOP %eval(25-(@gp_percent/4)) {gp_bar_string = %concat(@gp_bar_string," "}}
	hud_fighting_string = " "
	Misc1 = %replace(@Misc1,"*", "")
	Misc1 = %replace(@Misc1," ", "")
	hud_fighting = %remove("Fighting:", @hud_fighting)
	hud_fighting = %trimleft(@hud_fighting)
	hud_num_fighting = %numwords(@hud_fighting)
	#if (%len(@Misc1) > 0 and @hud_num_fighting = 0) {hud_fighting = %concat(@Misc1" ", @hud_fighting)
	#add hud_num_fighting 1}
	#loop @hud_num_fighting {hud_targhp = %word(@hud_fighting,%{i})
	#if (@hud_targhp = "10" or @hud_targhp = "9") {hud_targclr = "cyan,bold"} {#if (@hud_targhp = "8" or @hud_targhp = "7" or @hud_targhp = "6") {hud_targclr = "green,bold"} {#if (@hud_targhp = "5" or @hud_targhp = "4" or @hud_targhp = "3") {hud_targclr = "brown,bold"} {hud_targclr = "red,bold"}}}
	hud_fighting_string = %concat(@hud_fighting_string, %ansi(@hud_targclr)@hud_targhp" ")}
	#WIN status @hud_blank_str%ansi(white)~[ %ansi(grey)@room %ansi(green)@roomdirs~]%ansi(grey). %ansi(white)~]%ansi(cyan,bold)@hud_blank_str
	#WIN status %ansi(grey)Hp: %ansi(@hp_color)@Hp%ansi(grey)(%ansi(cyan,bold)@MaxHp%ansi(grey)) %ansi(white)~[%ansi(red,bold)@hp_bar_string%ansi(white)~] %ansi(grey)Gp: %ansi(@gp_color)@Gp%ansi(grey)(%ansi(cyan,bold)@MaxGp%ansi(grey)) %ansi(white)~[%ansi(green,bold)@gp_bar_string%ansi(white)~]
	#WIN status %ansi(grey)Xp: %ansi(@xp_color)@Xp%ansi(grey)(%ansi(cyan,bold)@MaxXp%ansi(grey)) "        " %ansi(grey)Fighting:@hud_fighting_string
Important Triggers:
Pattern:	&room &%x{roomdirs}].
Commands:	(none)


Pattern:	^Hp: &%d{Hp}~(&%d{MaxHp}~)(&Misc1)Gp: &%d{Gp}~(&%d{MaxGp}~)(*)Xp: &%d{Xp}~(&%d{MaxXp}~)&hud_fighting
Commands:
	#gag
	#wait 50
	update_hud
	hud_fighting = ""


Note:	I also call an alias called 'round' in the commands of these triggers. Feel free
	to create a round alias for code you'd like to have executed every mud-round.



Description:
This creates a new window called 'status', and the new hud outputs to this window. Size the status window so the hud fits nicely inside, and place it at the bottom of the screen, below your main zmud window. If you have problems moving/resizing windows in zmud, check your Windows->Layout settings in Preferences, and make sure that you have it set to 'None'. This works only when 'hud linemode' is on. The screen gets jerky when 'hud rate' is low, so you may want to set it to 15 or 20 when you're idle. Make sure you take the time to understand how these triggers work, so you can make changes based on your personal preferences or guild. Gathering information from other triggers is also important, such as the triggers I have to set variables for the number of winds I have, as well as those that keep track of my visibility. And yeah, I know that adding color makes it way more complicated than it needs to be, but dammit.. I like color. =P Thanks to Sphynx, this stuff is built on top of code/ideas I got from him, and we're learning a lot from each other. As always, you can mud-mail me with questions, comments, or suggestions. Hope you enjoy, learn from, and add to this stuff. =] Back