Group Triggers

Scripts and support for your favorite MUD client.
Galok Icewolf
Sojourner
Posts: 510
Joined: Thu Feb 01, 2001 6:01 am

Group Triggers

Postby Galok Icewolf » Thu Apr 05, 2001 11:48 pm

A while ago, I had this great trigger set which i copied that would color the people in my group based on thier health, when i typed group. I was wondering if anyone has this trigger or can recreate it for me? Image
Galok Icewolf
Sojourner
Posts: 510
Joined: Thu Feb 01, 2001 6:01 am

Postby Galok Icewolf » Thu Apr 05, 2001 11:50 pm

Doh.. zmud 6.15+ triggers please... *whistle*
Sekon/Fanil
Sojourner
Posts: 31
Joined: Fri Mar 16, 2001 6:01 am
Location: Westminster, SC , USA

Postby Sekon/Fanil » Mon Apr 09, 2001 12:08 pm

okie. First what color = what health?
ya want health %? as in:

Everyone in group at 25% of thier max health or less = red
Everyone at 25-50 = Yellow
ect.....
Galok Icewolf
Sojourner
Posts: 510
Joined: Thu Feb 01, 2001 6:01 am

Postby Galok Icewolf » Tue Apr 10, 2001 6:29 am

exactly.. maybe like 33% of health less.. red.. 34-66% yellow.. and 67-100 normal color.. or maybe 4 seperations.. Image
Sekon/Fanil
Sojourner
Posts: 31
Joined: Fri Mar 16, 2001 6:01 am
Location: Westminster, SC , USA

Postby Sekon/Fanil » Wed Apr 11, 2001 8:31 am

I posted this one to the forum on the zMud site. this is what Troubabor came up with. it may need some tweaking.

#TR {(%d)/(%d) hit, %d/%d move, %d/%d psp %w$} {#MATH quad ((4 * %1)/%2)+1;#CASE @quad {#CW red} {#CW yellow} {#CW blue} {#CW green} {#CW green}}
Wobb
Sojourner
Posts: 389
Joined: Mon Oct 29, 2001 6:01 am
Contact:

Postby Wobb » Sun Apr 15, 2001 2:57 am

Here you puds go. Took me a while to work this one out cuz stupid aliases. But here's one way to color group based on their condition. This is useful for clerics, if they are 100-299 hps in the hole, it colors their group line yellow, if they are more than 300 it colors them red, if they are less than 100, it colors them green. This is all when you type "group" of course.


#al {gored} {#color red}
#al {goyel} {#color yellow}
#al {gogrn} {#color green}
#ac {(%d)/(%d)%shit,%s(%d)/(%d)%smove,%s(%d)/(%d)%spsp%s&sucker} {#math hpresult (%2-%1);%if( @hpresult>300, gored, %if( @hpresult>100, goyel, gogrn))} {groupstat}


I put the whole thing into a class called groupstat so you can use #t- groupstat to turn it off. I also have the variable @sucker in use if you want to make another trigger to highlight peoples names or whatever, just refer to that variable @sucker. You can of course, simply change the numbers to reflect your own personal preference for when their color should change.

Hehe I hope you enjoy!

Wobb
Oh, btw, if you want I can change it to make it do percents, so 33-66, etc...just let me know if thats what you want.


[This message has been edited by Wobb (edited 04-14-2001).]
Gindipple
Sojourner
Posts: 676
Joined: Fri Jan 26, 2001 6:01 am
Location: O' Fallon, MO. USA
Contact:

Postby Gindipple » Sun Apr 15, 2001 3:36 am

Slightly different approach I use, not for healing, but more for checking for stones and such. Could easilly be used for healers too.

#ALIAS cg {#T+ GroupCap;glist="";group;scratch}

#ALIAS gg {tog compact;#forall {@glist} {glance %{i}};tog compact}
#ALIAS wg {tog compact;#forall {@glist} {who %{i}};tog compact}

#TRIGGER {* psp (%w)} {#If {%1 != %char} {glist=%additem(%1,@glist)}} GroupCap
#TRIGGER {You scratch an itch. Hmmm.} {#T- GroupCap} GroupCap



------------------
Gindipple (Gnome) stands here.
namatoki
Sojourner
Posts: 164
Joined: Sat Jan 27, 2001 6:01 am
Location: Phoenix, Arizona

Postby namatoki » Sun Apr 15, 2001 1:43 pm

Wobb, can you show the change for doing percentages instead of hps? Because some classes are in deep trouble just 100 hps out (like squidies) plus it would help at all levels (since no one has more than 100 hps at lvl 1). I think having the colors change at evey 33% hp loss is cool. Thanks!

Nizrath
Wobb
Sojourner
Posts: 389
Joined: Mon Oct 29, 2001 6:01 am
Contact:

Postby Wobb » Sun Apr 15, 2001 7:20 pm

here is for the percents...33 or lower=red
34-66=yellow, 67-100= green


#al {gored} {#color red}
#al {goyel} {#color yellow}
#al {gogrn} {#color green}
#ac {(%d)/(%d)%shit,%s(%d)/(%d)%smove,%s(%d)/(%d)%spsp%s&sucker} {#math hpresult ((%1*100)/%2);%if( @hpresult<=33, gored, %if( @hpresult<=66, goyel, gogrn))} {groupstat}


[This message has been edited by Wobb (edited 04-15-2001).]
Wobb
Sojourner
Posts: 389
Joined: Mon Oct 29, 2001 6:01 am
Contact:

Postby Wobb » Tue Apr 17, 2001 5:02 pm

Is anyone using this stuff? Hehe i post stuff out here but no one ever lets me know if they use it...or have problems with it.

Let me know!

Wobb
namatoki
Sojourner
Posts: 164
Joined: Sat Jan 27, 2001 6:01 am
Location: Phoenix, Arizona

Postby namatoki » Tue Apr 17, 2001 5:27 pm

Hey Wobb,

The trigger is working great! If I wanted to change the percentages to say 25% and add a color, how would that go? Image
Elseenas
Sojourner
Posts: 755
Joined: Thu Feb 01, 2001 6:01 am
Location: Golden, CO US

Postby Elseenas » Tue Apr 17, 2001 5:48 pm

Haven't got a chance to, we'll see what happens :-p

------------------

Elseenas of No House Worth Mentioning
Wobb
Sojourner
Posts: 389
Joined: Mon Oct 29, 2001 6:01 am
Contact:

Postby Wobb » Tue Apr 17, 2001 6:34 pm

Namatoki, I'll show you exactly how once I get home tonite.

I will have to think about the best way to do it, right now, i'm sort of using these "nested" if statements, which isn't the best way to program. I have an if statement within an if statement, which gives me the ability to output 3 different sets of actions. In order to change what I currently wrote, you would have to change the numbers from "<33" and "<66" to "<25" and "<50". But I would have to nest another If statement inside for the fourth color and the fourth percentile. Let me go home and think about this a bit, I'll come up with something for you tonite.

Thanks for the feedback!
Wobb
Wobb
Sojourner
Posts: 389
Joined: Mon Oct 29, 2001 6:01 am
Contact:

Postby Wobb » Wed Apr 18, 2001 7:45 pm

Here is the code for

1-25%=red
26-50%=blue
51-75%=yellow
76-100= green

If you want different colors, check the zmud help file on colors...you can use numbers to get a wider range of colors. Just change your aliases accordingly.


#al {goblu} {#color blue}
#al {gored} {#color red}
#al {goyel} {#color yellow}
#al {gogrn} {#color green}
#ac {(%d)/(%d)%shit,%s(%d)/(%d)%smove,%s(%d)/(%d)%spsp%s&sucker} {#math hpresult ((%1*100)/%2;%if( @hpresult<=25, gored, %if( @hpresult<=50, goblu, %if( @hpresult<=75, goyel, gogrn)))} {groupstat}

Again, I don't really like this code, it has 3 if statements inside itself..which is weird..but it works. I am contemplating putting the whole thing into a class, and making an alias called "g" or something, that will only turn the trigger on while its being used...so typing "g" would do the following:

turn on the triggers, type group, see the info, turn off the triggers. That way, every line of text from the mud isn't being checked against this code--which in turn will help your machine run better.

Let me know what you think, suggestions etc..

Wobb
Gindipple
Sojourner
Posts: 676
Joined: Fri Jan 26, 2001 6:01 am
Location: O' Fallon, MO. USA
Contact:

Postby Gindipple » Wed Apr 18, 2001 7:51 pm

One simple solution to the nested ifs is mod the result with 25 and use a case statement.
Wargar
Sojourner
Posts: 48
Joined: Wed Feb 07, 2001 6:01 am

Postby Wargar » Thu Apr 19, 2001 12:19 am

Ok ok, here's a good one. Unfortunately its not mine, I just edited it some to work on Sojo (originally written by Drevarr of Duris). By far the best i've seen anywhere.
As far as speed.. its iffy, but I haven't had any trouble with speed on zmud (ever) soo.. up to you!

Pattern:
(%d)/(%d)%shit,%s(%d)/(%d)%smove,%s(%d)/(%d)%spsp (%w)


Command:
#var Gm1H %1
#var Gm1MH %2
#Var newrep %line
#math Gm1Stat (@Gm1H*100/@Gm1MH)
#if (@Gm1Stat<16) {#SAY %ansi( gray)(P: %ansi( bold, red)%7%ansi( gray) C: %ansi( red)awful %ansi( yellow)@Gm1Stat % %ansi( gray))} {#if (@Gm1Stat<31) {#SAY %ansi( gray)(P: %ansi( bold, red)%7%ansi( gray) C: %ansi( bold,red)pretty hurt %ansi( yellow)@Gm1Stat % %ansi( gray))} {#if (@Gm1Stat<51) {#SAY %ansi( gray)(P: %ansi( bold, red)%7%ansi( gray) C: %ansi( magenta)nasty wounds %ansi( yellow)@Gm1Stat % %ansi( gray))} {#if (@Gm1Stat<76) {#SAY %ansi( gray)(P: %ansi( bold, red)%7%ansi( gray) C: %ansi( high,magenta)few wounds %ansi( yellow)@Gm1Stat % %ansi( gray))
}}}}


Example of Output Created:

Group information for The Morgg
Unsplit Coins: 0 platinum 0 gold 0 silver 0 copper
(Head) 4/35 hit, 102/105 move, 0/0 psp Khakaldrak
(P: Khakaldrak C: awful 11 % )


Makes it INSANELY easy to pick out the tank name/condition (% hps remaining) immediately. If you have speed problems, you can always put it in a class that turns on with this trigger: Group information for. Enjoy, all thanks to the original creator!

Wargar/Sarlend
cherzra
Sojourner
Posts: 1868
Joined: Fri Jan 26, 2001 6:01 am
Location: Holland

Postby cherzra » Thu Apr 19, 2001 6:10 am

I like Trekon's solution the best. It's one simple tiny trigger, yet it works (after 1 tiny modification I had to make). In big battles I don't have time/don't feel like reading percentages, I just want to see the names in the group colored, makes it easier to rescue/heal someone as the text flashes by.
Wargar
Sojourner
Posts: 48
Joined: Wed Feb 07, 2001 6:01 am

Postby Wargar » Mon Apr 23, 2001 8:25 pm

Hrm. Has anybody had any problems/success with the trigger I posted? Only received feedback from 1 person and he couldn't get it working.

I created a new file and cut/paste it to there and seems to be working properly in that file also.

Wargar/Sarlend
Roza
Sojourner
Posts: 16
Joined: Fri Aug 24, 2001 5:01 am
Location: Virginia Beach, Va
Contact:

Postby Roza » Fri Oct 25, 2002 5:21 pm

this work for 4.62? if not what needs changed
friend needs it and i dunno how to change it to work
Sebrae
Sojourner
Posts: 8
Joined: Wed Dec 18, 2002 6:01 am

Postby Sebrae » Wed Dec 18, 2002 8:29 pm

This is all great, but does anyone use JMC or have a similar script for it? I'm gonna try to fiddle with these, but I'd rather get someone else's working version to save me time.

Thanks in advance.
Zouve
Sojourner
Posts: 59
Joined: Fri Apr 27, 2001 5:01 am
Location: San Jose, CA
Contact:

Postby Zouve » Fri Dec 20, 2002 7:19 pm

I tried out both Wobb's and Wargar's sets successfully with ZMud 6.16. I ended up using Wobb's with some slight modifications.

Wargar's actually provides more information, but I found that in the field, the simplicity of Wobb's was better suited to my own needs.

Thanks to both of you for posting your triggers.

Zouve

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 3 guests