Addgroup autorescue trigger

Scripts and support for your favorite MUD client.
Teralyn
Sojourner
Posts: 60
Joined: Wed Nov 27, 2002 6:01 am
Contact:

Addgroup autorescue trigger

Postby Teralyn » Wed Jun 28, 2006 8:40 am

So my triggers got fried, and 3 nights ago I finally got my addgroup triggerset working correctly, and now I can't remember how in the hell I did it. It used the 'who ingroup' list. The triggers would differentiate between warriors and the other classes. For instance...

Listing of the Mortals!
-=-=-=-=-=-=-=-=-=-=-=-=-
[36 War] Lurra (Troll)
[31 War] Kukux (Troll) (RP)
[47 Ele] Abib (Human)
[43 Bar] Zoti (Human)

Let's say that I am already on the tanklist. The triggers would look at the warriors, if the warrior was already on the tank list, it would skil over them, if not, it would add them to the tank list. Same with all other classes. If the char was any other class but warrior, it would check to see if they were on my rescue list, if not, it would add them. Basically, I wanna know how to write the trigger to make Zmud read the 'who' line. This is what I have, but it's obviously wrong since it's not working.


#TRIGGER {~[%d War~] (%w) *} {#IF %isgroup( %1, @tanklist) {} {addtank %1}}
#TRIGGER {~[*%d *~] (%w) %w *} {#IF %isgroup( %2, @tanklist, @rescuelist) {} {addres %2}}
Disoputlip
Sojourner
Posts: 956
Joined: Thu Feb 21, 2002 6:01 am
Location: Copenhagen

Postby Disoputlip » Wed Jun 28, 2006 10:57 am

This post doesn't answer your question but does the same job more specific:

#tr {{War|Pal}] (%w)} {#IF %isgroup( %1, @tanklist) {} {addtank %1}}
#tr {{Enc|Psi|Dru|Cle}}] (%w)} {#IF %isgroup( %1, @rescuelist) {} {addrescue %1}}


You need to add more classes to the triggers though.

Often shortening triggers remove these issues with them not firering. Having a * in the end of a trigger sometimes makes more bad than good, thats why I prefer as small trigger texts as possible.
Teralyn
Sojourner
Posts: 60
Joined: Wed Nov 27, 2002 6:01 am
Contact:

Postby Teralyn » Wed Jun 28, 2006 5:27 pm

Well I gave that a try, and for some reason it doesn't work. I can't understand why

I even tried to be more specific, since I saw a 42lvl drow rogue on so I did...

#TRIGGER {~[42 Rog~] (%w) (Drow Elf)} {addres %1}

Yeah that didn't work either
Teralyn
Sojourner
Posts: 60
Joined: Wed Nov 27, 2002 6:01 am
Contact:

Postby Teralyn » Wed Jun 28, 2006 6:17 pm

Woot, got it to work, here's what I got.

#TRIGGER {~[* War~] (%w)} {#IF %ismember( %1, @tanklist) {} {addtank %1}}

#TRIGGER {~[* (*)~] (%w)} {#IF %ismember( %1, {Enc|Cle|Sha|Dru|Inv|Ill|Ele|Psi|Lic|Nec|Inv|Ill|Ele|Psi|Lic|Nec|Rog|Dir|Bar|Ran|Ctr}) {#if %ismember( %2, @rescuelist) {} {addres %2}}}

I don't have seperate rescue lists or anything like that so it's pretty basic. Thanks for your help, and thanks to Ifin since I used his to put it together.
Teralyn
Sojourner
Posts: 60
Joined: Wed Nov 27, 2002 6:01 am
Contact:

Postby Teralyn » Wed Jun 28, 2006 6:18 pm

Woot, got it to work, here's what I got.

#TRIGGER {~[* War~] (%w)} {#IF %ismember( %1, @tanklist) {} {addtank %1}}

#TRIGGER {~[* (*)~] (%w)} {#IF %ismember( %1, {Enc|Cle|Sha|Dru|Inv|Ill|Ele|Psi|Lic|Nec|Inv|Ill|Ele|Psi|Lic|Nec|Rog|Dir|Bar|Ran|Ctr}) {#if %ismember( %2, @rescuelist) {} {addres %2}}}

I don't have seperate rescue lists or anything like that so it's pretty basic. Thanks for your help, and thanks to Ifin since I used his to put it together.
Gizep
Sojourner
Posts: 150
Joined: Thu Mar 10, 2005 4:34 pm
Location: Menzoberranzan
Contact:

Postby Gizep » Sun Jul 02, 2006 12:44 am

Mines more elaborate, but serves many purposes...

#CLASS 0
#ALIAS rgadd {#VARIABLE GroupList {@Name};#VARIABLE GroupClerics {};#VARIABLE GroupHealers {};#VARIABLE GroupCasters {};#VARIABLE GroupEnchanter {};#VARIABLE GroupHitters {};#VARIABLE GroupTanks {};#T+ Group;who ingr}
#CLASS {Group} {disable}
#TRIGGER {There are &%dGroupNumber mortal~(s~) on~.} {#T- Group;#VARIABLE GroupList {%dups( @GroupClerics|@GroupEnchanter|@GroupHealers|@GroupCasters|@GroupHitters|@GroupTanks)};#IF (@AutoRescue = 1) {#VARIABLE RescueList {%dups( @GroupClerics|@GroupEnchanter|@GroupHealers|@GroupCasters|@GroupHitters|@GroupTanks)}} {#VARIABLE RescueList {}}}
#TRIGGER {&%dGLevel &%wGClass~] &%wGMember} {#IF (%ismember( @GClass, @ClericAbbr) > 0) {#ADDITEM GroupClerics @GMember};#IF (%ismember( @GClass, @EnchAbbr) > 0) {#ADDITEM GroupEnchanter @GMember};#IF (%ismember( @GClass, @HealerAbbr) > 0) {#ADDITEM GroupHealers @GMember};#IF (%ismember( @GClass, @CasterAbbr) > 0) {#ADDITEM GroupCasters @GMember};#IF (%ismember( @GClass, @HitterAbbr) > 0) {#ADDITEM GroupHitters @GMember};#IF (%ismember( @GClass, @TankAbbr) > 0) {#ADDITEM GroupTanks @GMember}}
#TRIGGER {~[ Anon ~] &%wGMember} {#ADDITEM GroupHitters @GMember}
#CLASS 0
#VAR CasterAbbr {Ill|Inv|Psi|Ele|Lic}
#VAR ClericAbbr {Cle}
#VAR EnchAbbr {Enc}
#VAR HealerAbbr {Sha|Dru}
#VAR HitterAbbr {Rog|Bar}
#VAR TankAbbr {War|Pal|A-P}
As long as we live in this world we are bound to encounter problems. If, at such times, we lose hope and become discouraged, we diminish our ability to face difficulties. If, on the other hand, we remember that it is not just ourselves but everyone who has to undergo suffering, this more realistic perspective will increase our determination and capacity to overcome troubles.
-- The Dali Lama

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 4 guests