Group Control
The following creates 12 small buttons on the right toolbar, obviously change the button sizes, positions and ID numbers to suit your own zMUD environment. I've found them very useful more than once.
When you are ina group and ask for group information using 'info', the buttons are populated on triggers by names of those in your group in the right positions and an indication of their healths are also shown by button colour:
100% is black
80% to 100% is brown
50% to 80% is magenta
less than 50% is red
In addition, clicking a button with a name on it, changes the text on the button to '???', then click another button on the group buttons and the characters will move to that position (obviously if you are leader and the position is valid).
The other thee little buttons, on top of the grid of nine, are, from left to right: a button to create and disband your group, a button to leave someone elses group and a button to quick output 'info'.
Code:
#CLASS {btnsGroups} {disable}
#BUTTON 79 {} {group My Group;info} {} {disband;#VAR varPos11 {};#VAR varPos12 {};#VAR varPos13 {};#VAR varPos21 {};#VAR varPos22 {};#VAR varPos23 {};#VAR varPos31 {};#VAR varPos32 {};#VAR varPos33 {}} {} {1} {GROUP} {Size} {24} {24} {Pos} {446} {7} {} {} {} {} "" {} {Create or disband your group} {} {2}
#BUTTON 80 {} {leave} {} {leave} {} {} {PERSON} {Size} {24} {24} {Pos} {446} {30} {} {} {} {} "" {} {Leave the group} {} {2}
#BUTTON 81 {} {#VAR varHP11 100;#VAR varHP12 100;#VAR varHP13 100;info} {} {leave} {} {} {ZOOMIN} {Size} {24} {24} {Pos} {446} {85} {} {} {} {} "" {} {Leave the group} {} {2}
#BUTTON 82 {@varPos11} {#if {@varPosFrom = ""} {@varPosFrom = @varPos11;@varPos11 = "???"} {posit '@varPosFrom' 11;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {473} {0} {15} {} {} {} "" {} {} {p11} {2}
#BUTTON 83 {@varPos12} {#if {@varPosFrom = ""} {@varPosFrom = @varPos12;@varPos12 = "???"} {posit '@varPosFrom' 12;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {473} {49} {15} {} {} {} "" {} {} {p12} {2}
#BUTTON 84 {@varPos13} {#if {@varPosFrom = ""} {@varPosFrom = @varPos13;@varPos13 = "???"} {posit '@varPosFrom' 13;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {473} {98} {15} {} {} {} "" {} {} {p13} {2}
#BUTTON 85 {@varPos21} {#if {@varPosFrom = ""} {@varPosFrom = @varPos21;@varPos21 = "???"} {posit @varPosFrom 21;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {496} {0} {15} {} {} {} "" {} {} {p21} {2}
#BUTTON 86 {@varPos22} {#if {@varPosFrom = ""} {@varPosFrom = @varPos22;@varPos22 = "???"} {posit @varPosFrom 22;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {496} {49} {15} {} {} {} "" {} {} {p22} {2}
#BUTTON 87 {@varPos23} {#if {@varPosFrom = ""} {@varPosFrom = @varPos23;@varPos23 = "???"} {posit @varPosFrom 23;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {496} {98} {15} {} {} {} "" {} {} {p23} {2}
#BUTTON 88 {@varPos31} {#if {@varPosFrom = ""} {@varPosFrom = @varPos31;@varPos31 = "???"} {posit @varPosFrom 31;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {519} {0} {111} {} {} {} "" {} {} {p31} {2}
#BUTTON 89 {@varPos32} {#if {@varPosFrom = ""} {@varPosFrom = @varPos32;@varPos32 = "???"} {posit @varPosFrom 32;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {519} {49} {15} {} {} {} "" {} {} {p32} {2}
#BUTTON 90 {@varPos33} {#if {@varPosFrom = ""} {@varPosFrom = @varPos33;@varPos33 = "???"} {posit @varPosFrom 33;@varPosFrom = "";info}} {} {} {} {} {} {Size} {50} {24} {Pos} {519} {98} {15} {} {} {} "" {} {} {p33} {2}
#CLASS 0
#CLASS {btnsGroups|varPositions}
#VAR varPos11 {} {}
#VAR varPos12 {} {}
#VAR varPos13 {} {}
#VAR varPos21 {} {}
#VAR varPos22 {} {}
#VAR varPos23 {} {}
#VAR varPos31 {} {}
#VAR varPos32 {} {}
#VAR varPos33 {} {}
#VAR varPosFrom {} {}
#VAR varHP11 {100} {100}
#VAR varHP12 {100} {100}
#VAR varHP13 {100} {100}
#VAR varHP21 {100} {100}
#VAR varHP22 {100} {100}
#VAR varHP23 {100} {100}
#VAR varHP31 {100} {100}
#VAR varHP32 {100} {100}
#VAR varHP33 {100} {100}
#TRIGGER {~(11:F1~) %s~[&varPos11~]%s~(12:F2~)%s~[&varPos12]%s~(13:F3~)%s~[&varPos13~]} {#VAR varPos11 %trim( %if( %numWords( @varPos11)> 1 , %word( @varPos11, %numWords( @varPos11)), @varPos11));#VAR varPos12 %trim( %if( %numWords( @varPos12)> 1 , %word( @varPos12, %numWords( @varPos12)), @varPos12));#VAR varPos13 %trim( %if( %numWords( @varPos13)> 1 , %word( @varPos13, %numWords( @varPos13)), @varPos13))}
#TRIGGER {~(21:M1~) %s~[&varPos21~]%s~(22:M2~)%s~[&varPos22~]%s~(23:M3~)%s~[&varPos23~]} {#VAR varPos21 %trim( %if( %numWords( @varPos21)> 1 , %word( @varPos21, %numWords( @varPos21)), @varPos21));#VAR varPos22 %trim( %if( %numWords( @varPos22)> 1 , %word( @varPos22, %numWords( @varPos22)), @varPos22));#VAR varPos23 %trim( %if( %numWords( @varPos23)> 1 , %word( @varPos23, %numWords( @varPos23)), @varPos23))}
#TRIGGER {~(31:B1~) %s~[&varPos31~]%s~(32:B2~)%s~[&varPos32]%s~(33:B3~)%s~[&varPos33~]} {#VAR varPos31 %trim( %if( %numWords( @varPos31)> 1 , %word( @varPos31, %numWords( @varPos31)), @varPos31));#VAR varPos32 %trim( %if( %numWords( @varPos32)> 1 , %word( @varPos32, %numWords( @varPos32)), @varPos32));#VAR varPos33 %trim( %if( %numWords( @varPos33)> 1 , %word( @varPos33, %numWords( @varPos33)), @varPos33))}
#TRIGGER {@varPos11*%s%w%s&varHP11~%} {#NOOP %btncol( "p11", black, white);#IF (%number( @varHP11) < 100) {#NOOP %btncol( "p11", brown, white)};#IF (%number( @varHP11) < 80) {#NOOP %btncol( "p11", magenta, white)};#IF (%number( @varHP11) < 50) {#NOOP %btncol( "p11", red, white)}}
#TRIGGER {@varPos12*%s%w%s&varHP12~%} {#NOOP %btncol( "p12", black, white);#IF (%number( @varHP12) < 100) {#NOOP %btncol( "p12", brown, white)};#IF (%number( @varHP12) < 80) {#NOOP %btncol( "p12", magenta, white)};#IF (%number( @varHP12) < 50) {#NOOP %btncol( "p12", red, white)}}
#TRIGGER {@varPos13*%s%w%s&varHP13~%} {#NOOP %btncol( "p13", black, white);#IF (%number( @varHP13) < 100) {#NOOP %btncol( "p13", brown, white)};#IF (%number( @varHP13) < 80) {#NOOP %btncol( "p13", magenta, white)};#IF (%number( @varHP13) < 50) {#NOOP %btncol( "p13", red, white)}}
#TRIGGER {@varPos21*%s%w%s&varHP21~%} {#NOOP %btncol( "p21", black, white);#IF (%number( @varHP21) < 100) {#NOOP %btncol( "p21", brown, white)};#IF (%number( @varHP21) < 80) {#NOOP %btncol( "p21", magenta, white)};#IF (%number( @varHP21) < 50) {#NOOP %btncol( "p21", red, white)}}
#TRIGGER {@varPos22*%s%w%s&varHP22~%} {#NOOP %btncol( "p22", black, white);#IF (%number( @varHP22) < 100) {#NOOP %btncol( "p22", brown, white)};#IF (%number( @varHP22) < 80) {#NOOP %btncol( "p22", magenta, white)};#IF (%number( @varHP22) < 50) {#NOOP %btncol( "p22", red, white)}}
#TRIGGER {@varPos23*%s%w%s&varHP23~%} {#NOOP %btncol( "p23", black, white);#IF (%number( @varHP23) < 100) {#NOOP %btncol( "p23", brown, white)};#IF (%number( @varHP23) < 80) {#NOOP %btncol( "p23", magenta, white)};#IF (%number( @varHP23) < 50) {#NOOP %btncol( "p23", red, white)}}
#TRIGGER {@varPos31*%s%w%s&varHP31~%} {#NOOP %btncol( "p31", black, white);#IF (%number( @varHP31) < 100) {#NOOP %btncol( "p31", brown, white)};#IF (%number( @varHP31) < 80) {#NOOP %btncol( "p31", magenta, white)};#IF (%number( @varHP31) < 50) {#NOOP %btncol( "p31", red, white)}}
#TRIGGER {@varPos32*%s%w%s&varHP32~%} {#NOOP %btncol( "p32", black, white);#IF (%number( @varHP32) < 100) {#NOOP %btncol( "p32", brown, white)};#IF (%number( @varHP32) < 80) {#NOOP %btncol( "p32", magenta, white)};#IF (%number( @varHP32) < 50) {#NOOP %btncol( "p32", red, white)}}
#TRIGGER {@varPos33*%s%w%s&varHP33~%} {#NOOP %btncol( "p33", black, white);#IF (%number( @varHP33) < 100) {#NOOP %btncol( "p33", brown, white)};#IF (%number( @varHP33) < 80) {#NOOP %btncol( "p33", magenta, white)};#IF (%number( @varHP33) < 50) {#NOOP %btncol( "p33", red, white)}}
#CLASS 0