Hp Bar

By owl
Platform:  mIRC
Published  Mar 06, 2010
Updated  Mar 06, 2010
Just a short alias that creates a hp bar (196 bytes)


Use $hp(30,99)

30 being the hp left and 99 being the total hp

;Owls HpBar :]

alias hp return $regsubex($regsubex($str($chr(160),$int($calc($2 / 4 - $len($1) * 2))),/(.+)..(\1)/,\1 $+ [ $1 ] $+ \2),/(.{ $+ $int($calc($1 /4 -1)) $+ })/,$+(00,$chr(44),03\100,$chr(44),04))

Comments

Sign in to comment.
Purcell   -  Mar 17, 2010
I use this one:

Code

 
 Respond  
Korvin   -  Mar 07, 2010
dynamic length of the bar, like mine

Code

 
ex $bar(30,100,99) does the same thing as yours, but the length of the hp bar is 100 characters.
 Respond  
owl   -  Mar 07, 2010
What do you mean dynamic length Korvin?
 Respond  
Korvin   -  Mar 07, 2010
cool, try allowing a dynamic length.
 Respond  
Jethro   -  Mar 07, 2010
Be careful, Ghost-writer might be mocking you before you can say Jack Robinson. lol
 Respond  
sunslayer   -  Mar 06, 2010
@owl as a general rule of thumb, anything Ghost-writer tells you to do, do the opposite.
 Respond  
Jethro   -  Mar 06, 2010
Owwwwwwwwwlllll, I think Ghost-writer believes size does matter.
 Respond  
sunslayer   -  Mar 06, 2010

Quote

nice regsubex for your first post, try to make scripts a little longer in the future.
LOL

Quote

why longer when it does the job ? (shorter code ftw)
most efficient ftw
nice job tho
 Respond  
owl   -  Mar 06, 2010
why longer when it does the job ? (shorter code ftw)
 Respond  
Ghost-writer   -  Mar 06, 2010
nice regsubex for your first post, try to make scripts a little longer in the future.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.