Fight Check: Difference between revisions
Stolichnaya (talk | contribs) No edit summary |
No edit summary |
||
| (4 intermediate revisions by one other user not shown) | |||
| Line 12: | Line 12: | ||
With the variables set up, these triggers fire when you attack an enemy. There's multiples because it allows for you attacking armed or unarmed and also in case of the mob dodging or parrying the attack. It removes the spaces so the full name of the mob you are fighting can be stored neatly in a variable, then checks to see if you were already fighting. If you weren't, it sends an echo alerting you to the fact. | With the variables set up, these triggers fire when you attack an enemy. There's multiples because it allows for you attacking armed or unarmed and also in case of the mob dodging or parrying the attack. It removes the spaces so the full name of the mob you are fighting can be stored neatly in a variable, then checks to see if you were already fighting. If you weren't, it sends an echo alerting you to the fact. | ||
#TRIGGER {^Your (%w) (%w) (*){.|!}} {#IF %ismember(%1,@attacktype) {#IF %ismember(%2,@attacks) {#VA fightingmob %replace( %lower( "%3"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}}} {fighting} | #TRIGGER {^Your (%w) (%w) (*){.|!}} {#IF %ismember(%1,@attacktype) {#IF %ismember(%2,@attacks) {#VA fightingmob %replace( %lower( "%3"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}}}} {fighting} | ||
#TRIGGER {^You (%w) (*){.|!}} {#IF %ismember(%1,@attacks) {#VA fightingmob %replace( %lower( "%2"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}} {fighting} | #TRIGGER {^You (%w) (*){.|!}} {#IF %ismember(%1,@attacks) {#VA fightingmob %replace( %lower( "%2"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}}} {fighting} | ||
#TRIGGER {^(*) dodges your attack.$} {#VA fightingmob %replace( %lower( "%1"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!} {fighting} | #TRIGGER {^(*) dodges your attack.$} {#VA fightingmob %replace( %lower( "%1"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}} {fighting} | ||
#TRIGGER {^(*) parries your attack.$} {#VA fightingmob %replace( %lower( "%1"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!} {fighting} | #TRIGGER {^(*) parries your attack.$} {#VA fightingmob %replace( %lower( "%1"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}} {fighting} | ||
These two triggers fire when something attacks you and check whether that mob is the same one that you're attacking. If so, it will check who the tank is. Again, there is only two of them because one uses the syntax for an unarmed attack, the other for an armed attack. | These two triggers fire when something attacks you and check whether that mob is the same one that you're attacking. If so, it will check who the tank is. Again, there is only two of them because one uses the syntax for an unarmed attack, the other for an armed attack. | ||
| Line 31: | Line 31: | ||
#TRIGGER {^(*) is DEAD!!$} {#VA linebefore1 %line2;#VA fightingmobcheck %replace( %lower( "%1"), " ", "");#VA killedit %word( @linebefore1, 1);#IF (%pos( "You", @killedit) > 0) {#SAY You got the killblow.};#IF (@fightingmobcheck = @fightingmob) {#SAY Your target is dead.;#VA fighting 0;#VA fightingmob "";#VA tank "";}} {fighting} | #TRIGGER {^(*) is DEAD!!$} {#VA linebefore1 %line2;#VA fightingmobcheck %replace( %lower( "%1"), " ", "");#VA killedit %word( @linebefore1, 1);#IF (%pos( "You", @killedit) > 0) {#SAY You got the killblow.};#IF (@fightingmobcheck = @fightingmob) {#SAY Your target is dead.;#VA fighting 0;#VA fightingmob "";#VA tank "";}} {fighting} | ||
== Syldir's fixed version for zMud 7.21 == | |||
<pre> | |||
#CLASS {fighting} {setdef} | |||
#VAR attacktype {slash|stab|pierce|hit|whip|claw|blast|pound|crush|bite|pierce|suction|bolt|arrow|dart|stone|pea|backstab} | |||
#VAR attacks {misses|brushes|barely scratches|barely scuffs|scratches|scuffs|grazes|nicks|pelts|cuts|bruises|jolts|hits|strikes|wounds|tears|thrashes|injures|rips|batters|gashes|flogs|jars|lacerates|pummels|hacks|smashes|mauls|decimates|rends|bludgeons|traumatizes|devastates|mangles|shatters|maims|demolishes|cleaves|butchers|cripples|MUTILATES|MASSACRES|DISEMBOWELS|PULVERIZES|DISFIGURES|DESTROYS|GUTS|EVISCERATES|OBLITERATES|SLAUGHTERS|ANNIHILATES|SMITES|miss|brush|barely scratch|barely scuff|scratch|scuff|graze|nick|pelt|cut|bruise|jolt|hit|strike|wound|tear|thrash|injur|rip|batter|gash|flog|jar|lacerate|pummel|hack|smash|maul|decimate|rend|bludgeon|traumatize|devastate|mangle|shatter|maim|demolishes|cleave|butcher|cripple|MUTILATE|MASSACRE|DISEMBOWEL|PULVERIZE|DISFIGURE|DESTROY|GUT|EVISCERATE|OBLITERATE|SLAUGHTER|ANNIHILATE|SMITE} | |||
#TRIGGER {^(*) dodges your attack.$} { | |||
#VAR fightingmob %replace( %lower( "%1"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VAR fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
#TRIGGER {^(*) parries your attack.$} { | |||
#VA fightingmob %replace( %lower( "%1"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
#TRIGGER {^You flee head over heels from combat!$} { | |||
#VA fighting 0 | |||
#VA fightingmob "" | |||
#VA tank "" | |||
} | |||
#TRIGGER {You recall from combat!$} { | |||
#VA fighting 0 | |||
#VA fightingmob "" | |||
#VA tank "" | |||
} | |||
#TRIGGER {^(*) is DEAD!!$} { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#SAY Your target is dead. | |||
#VA fighting 0 | |||
#VA fightingmob "" | |||
#VA tank "" | |||
} | |||
} | |||
#TRIGGER {^Your (%w) (%w) (*){.|!}} { | |||
#IF %ismember( %1, @attacktype) { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmob %replace( %lower( "%3"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^Your (%w) _(%w)_ (*){.|!}} { | |||
#IF %ismember( %1, @attacktype) { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmob %replace( %lower( "%3"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^Your (%w) ~* (%w) ~* (*){.|!}} { | |||
#IF %ismember( %1, @attacktype) { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmob %replace( %lower( "%3"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^Your (%w) ~*~*~*~* (%w) ~*~*~*~* (*){.|!}} { | |||
#IF %ismember( %1, @attacktype) { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmob %replace( %lower( "%3"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^You (%w) (*){.|!}} { | |||
#IF %ismember( %1, @attacks) { | |||
#VA fightingmob %replace( %lower( "%2"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
#TRIGGER {^You _(%w)_ (*){.|!}} { | |||
#IF %ismember( %1, @attacks) { | |||
#VA fightingmob %replace( %lower( "%2"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
#TRIGGER {^You ~* (%w) ~* (*){.|!}} { | |||
#IF %ismember( %1, @attacks) { | |||
#VA fightingmob %replace( %lower( "%2"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
#TRIGGER {^You ~*~*~*~* (%w) ~*~*~*~* (*){.|!}} { | |||
#IF %ismember( %1, @attacks) { | |||
#VA fightingmob %replace( %lower( "%2"), " ", "") | |||
#IF (@fighting = 0) { | |||
#VA fighting 1 | |||
#ECHO %char is in a fight! | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*)'s (%w) (%w) (%w){.|!}} { | |||
#IF %ismember( %2, @attacktype) { | |||
#IF %ismember( %3, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*)'s (%w) _(%w)_ (%w){.|!}} { | |||
#IF %ismember( %2, @attacktype) { | |||
#IF %ismember( %3, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*)'s (%w) ~* (%w) ~* (%w){.|!}} { | |||
#IF %ismember( %2, @attacktype) { | |||
#IF %ismember( %3, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*)'s (%w) ~*~*~*~* (%w) ~*~*~*~* (%w){.|!}} { | |||
#IF %ismember( %2, @attacktype) { | |||
#IF %ismember( %3, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*) (%w) (%w){.|!}} { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*) _(%w)_ (%w){.|!}} { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*) ~* (%w) ~* (%w){.|!}} { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#TRIGGER {^(*) ~*~*~*~* (%w) ~*~*~*~* (%w){.|!}} { | |||
#IF %ismember( %2, @attacks) { | |||
#VA fightingmobcheck %replace( %lower( "%1"), " ", "") | |||
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3} | |||
#IF (@fightingmobcheck = @fightingmob) { | |||
#IF (@tank = "") {#VAR tank @tankcheck} { | |||
#IF (@tankcheck != @tank) { | |||
#VAR tank @tankcheck | |||
#SAY Tank switch detected! | |||
#SAY The new tank is @tank! | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#CLASS 0 | |||
</pre> | |||
[[Category:Tokai]] | [[Category:Tokai]] | ||
[[Category:Triggers]] | [[Category:Triggers]] | ||
[[Category:Scripts]] | |||
Latest revision as of 05:45, 6 July 2023
This elaborate set of triggers does several things. Firstly, it detects whether you are in a fight, and which mob you are attacking. When the fight starts, it sends a message to the active window letting you know that, for example, Tokai is in a fight. It then checks who that mob is attacking and identifies that player as the tank. If the mob switches tanks, the value changes and the prog will alert you. It's not particularly useful on its own, though the big clear notices that the tank has switched are a good precaution for me (one less way to get killed). I mostly use this trigger as a basis for other ones, like one that makes sure I don't automatically re-cast fly if I'm fighting, or one that only quaffs another true sight potion if I'm still in the fight.
This trigger assumes you have a variable, @name, with your character's name in it.
To start off with, we set up two large string lists in variables containing all the possible variations of attack messages (armed an unarmed).
#VA attacktype {slash|stab|pierce|hit|whip|claw|blast|pound|crush|bite|pierce|suction|bolt|arrow|dart|stone|pea|backstab} {fighting}
#VA attacks {misses|brushes|barely scratches|barely scuffs|scratches|scuffs|grazes|nicks|pelts|cuts|bruises|jolts|hits|strikes|wounds|tears|thrashes|injures|rips|batters|gashes|flogs|jars|lacerates|pummels|hacks|smashes|mauls|decimates|rends|bludgeons|_traumatizes_|_devastates_|_mangles_|_shatters_|_maims_|_demolishes_|_cleaves_|_butchers_|_cripples_|MUTILATES|MASSACRES|DISEMBOWELS|PULVERIZES|DISFIGURES|DESTROYS|GUTS|EVISCERATES|* OBLITERATES *|* SLAUGHTERS *|*** ANNIHILATES ***|**** SMITES ****|miss|brush|barely scratch|barely scuff|scratch|scuff|graze|nick|pelt|cut|bruise|jolt|hit|strike|wound|tear|thrash|injur|rip|batter|gash|flog|jar|lacerate|pummel|hack|smash|maul|decimate|rend|bludgeon|_traumatize_|_devastate_|_mangle_|_shatter_|_maim_|_demolishe_|_cleave_|_butcher_|_cripple_|MUTILATE|MASSACRE|DISEMBOWEL|PULVERIZE|DISFIGURE|DESTROY|GUT|EVISCERATE|* OBLITERATE *|* SLAUGHTER *|*** ANNIHILATE ***|**** SMITE ****} {fighting}
With the variables set up, these triggers fire when you attack an enemy. There's multiples because it allows for you attacking armed or unarmed and also in case of the mob dodging or parrying the attack. It removes the spaces so the full name of the mob you are fighting can be stored neatly in a variable, then checks to see if you were already fighting. If you weren't, it sends an echo alerting you to the fact.
#TRIGGER {^Your (%w) (%w) (*){.|!}} {#IF %ismember(%1,@attacktype) {#IF %ismember(%2,@attacks) {#VA fightingmob %replace( %lower( "%3"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}}}} {fighting}
#TRIGGER {^You (%w) (*){.|!}} {#IF %ismember(%1,@attacks) {#VA fightingmob %replace( %lower( "%2"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}}} {fighting}
#TRIGGER {^(*) dodges your attack.$} {#VA fightingmob %replace( %lower( "%1"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}} {fighting}
#TRIGGER {^(*) parries your attack.$} {#VA fightingmob %replace( %lower( "%1"), " ", "");#IF (@fighting = 0) {#VA fighting 1; #ECHO @name is in a fight!}} {fighting}
These two triggers fire when something attacks you and check whether that mob is the same one that you're attacking. If so, it will check who the tank is. Again, there is only two of them because one uses the syntax for an unarmed attack, the other for an armed attack.
#TRIGGER {^(*) (%w) (%w){.|!}} {#IF %ismember(%2,@attacks) {#VA fightingmobcheck %replace( %lower( "%1"), " ", "");#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3};#IF (@fightingmobcheck = @fightingmob) {#IF (@tank = "") {#VAR tank @tankcheck} {#IF (@tankcheck != @tank) {#VAR tank @tankcheck;#SAY Tank switch detected!;#SAY The new tank is @tank!}}}}} {fighting}
#TRIGGER {^(*)'s (%w) (%w) (%w){.|!}} {#IF %ismember(%2,@attacktype) {#IF %ismember(%3,@attacks) {#VA fightingmobcheck %replace( %lower( "%1"), " ", "");#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4};#IF (@fightingmobcheck = @fightingmob) {#IF (@tank = "") {#VAR tank @tankcheck} {#IF (@tankcheck != @tank) {#VAR tank @tankcheck;#SAY Tank switch detected!;#SAY The new tank is @tank!}}}}}} {fighting}
These two reset the variables if you flee or recall out of combat.
#TRIGGER {^You flee head over heels from combat!$} {#VA fighting 0;#VA fightingmob "";#VA tank ""} {fighting}
#TRIGGER {You recall from combat!$} {#VA fighting 0;#VA fightingmob "";#VA tank ""} {fighting}
This trigger fires upon the death of any mob and checks if it was the one you were fighting, and if so, resets the variables. It checks whether you got the killblow too, just because it's nifty.
#TRIGGER {^(*) is DEAD!!$} {#VA linebefore1 %line2;#VA fightingmobcheck %replace( %lower( "%1"), " ", "");#VA killedit %word( @linebefore1, 1);#IF (%pos( "You", @killedit) > 0) {#SAY You got the killblow.};#IF (@fightingmobcheck = @fightingmob) {#SAY Your target is dead.;#VA fighting 0;#VA fightingmob "";#VA tank "";}} {fighting}
Syldir's fixed version for zMud 7.21
#CLASS {fighting} {setdef}
#VAR attacktype {slash|stab|pierce|hit|whip|claw|blast|pound|crush|bite|pierce|suction|bolt|arrow|dart|stone|pea|backstab}
#VAR attacks {misses|brushes|barely scratches|barely scuffs|scratches|scuffs|grazes|nicks|pelts|cuts|bruises|jolts|hits|strikes|wounds|tears|thrashes|injures|rips|batters|gashes|flogs|jars|lacerates|pummels|hacks|smashes|mauls|decimates|rends|bludgeons|traumatizes|devastates|mangles|shatters|maims|demolishes|cleaves|butchers|cripples|MUTILATES|MASSACRES|DISEMBOWELS|PULVERIZES|DISFIGURES|DESTROYS|GUTS|EVISCERATES|OBLITERATES|SLAUGHTERS|ANNIHILATES|SMITES|miss|brush|barely scratch|barely scuff|scratch|scuff|graze|nick|pelt|cut|bruise|jolt|hit|strike|wound|tear|thrash|injur|rip|batter|gash|flog|jar|lacerate|pummel|hack|smash|maul|decimate|rend|bludgeon|traumatize|devastate|mangle|shatter|maim|demolishes|cleave|butcher|cripple|MUTILATE|MASSACRE|DISEMBOWEL|PULVERIZE|DISFIGURE|DESTROY|GUT|EVISCERATE|OBLITERATE|SLAUGHTER|ANNIHILATE|SMITE}
#TRIGGER {^(*) dodges your attack.$} {
#VAR fightingmob %replace( %lower( "%1"), " ", "")
#IF (@fighting = 0) {
#VAR fighting 1
#ECHO %char is in a fight!
}
}
#TRIGGER {^(*) parries your attack.$} {
#VA fightingmob %replace( %lower( "%1"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
#TRIGGER {^You flee head over heels from combat!$} {
#VA fighting 0
#VA fightingmob ""
#VA tank ""
}
#TRIGGER {You recall from combat!$} {
#VA fighting 0
#VA fightingmob ""
#VA tank ""
}
#TRIGGER {^(*) is DEAD!!$} {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (@fightingmobcheck = @fightingmob) {
#SAY Your target is dead.
#VA fighting 0
#VA fightingmob ""
#VA tank ""
}
}
#TRIGGER {^Your (%w) (%w) (*){.|!}} {
#IF %ismember( %1, @attacktype) {
#IF %ismember( %2, @attacks) {
#VA fightingmob %replace( %lower( "%3"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
}
#TRIGGER {^Your (%w) _(%w)_ (*){.|!}} {
#IF %ismember( %1, @attacktype) {
#IF %ismember( %2, @attacks) {
#VA fightingmob %replace( %lower( "%3"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
}
#TRIGGER {^Your (%w) ~* (%w) ~* (*){.|!}} {
#IF %ismember( %1, @attacktype) {
#IF %ismember( %2, @attacks) {
#VA fightingmob %replace( %lower( "%3"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
}
#TRIGGER {^Your (%w) ~*~*~*~* (%w) ~*~*~*~* (*){.|!}} {
#IF %ismember( %1, @attacktype) {
#IF %ismember( %2, @attacks) {
#VA fightingmob %replace( %lower( "%3"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
}
#TRIGGER {^You (%w) (*){.|!}} {
#IF %ismember( %1, @attacks) {
#VA fightingmob %replace( %lower( "%2"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
#TRIGGER {^You _(%w)_ (*){.|!}} {
#IF %ismember( %1, @attacks) {
#VA fightingmob %replace( %lower( "%2"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
#TRIGGER {^You ~* (%w) ~* (*){.|!}} {
#IF %ismember( %1, @attacks) {
#VA fightingmob %replace( %lower( "%2"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
#TRIGGER {^You ~*~*~*~* (%w) ~*~*~*~* (*){.|!}} {
#IF %ismember( %1, @attacks) {
#VA fightingmob %replace( %lower( "%2"), " ", "")
#IF (@fighting = 0) {
#VA fighting 1
#ECHO %char is in a fight!
}
}
}
#TRIGGER {^(*)'s (%w) (%w) (%w){.|!}} {
#IF %ismember( %2, @attacktype) {
#IF %ismember( %3, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
}
#TRIGGER {^(*)'s (%w) _(%w)_ (%w){.|!}} {
#IF %ismember( %2, @attacktype) {
#IF %ismember( %3, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
}
#TRIGGER {^(*)'s (%w) ~* (%w) ~* (%w){.|!}} {
#IF %ismember( %2, @attacktype) {
#IF %ismember( %3, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
}
#TRIGGER {^(*)'s (%w) ~*~*~*~* (%w) ~*~*~*~* (%w){.|!}} {
#IF %ismember( %2, @attacktype) {
#IF %ismember( %3, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%4 = you) {#VA tankcheck self} {#VA tankcheck %4}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
}
#TRIGGER {^(*) (%w) (%w){.|!}} {
#IF %ismember( %2, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
#TRIGGER {^(*) _(%w)_ (%w){.|!}} {
#IF %ismember( %2, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
#TRIGGER {^(*) ~* (%w) ~* (%w){.|!}} {
#IF %ismember( %2, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
#TRIGGER {^(*) ~*~*~*~* (%w) ~*~*~*~* (%w){.|!}} {
#IF %ismember( %2, @attacks) {
#VA fightingmobcheck %replace( %lower( "%1"), " ", "")
#IF (%3 = you) {#VA tankcheck self} {#VA tankcheck %3}
#IF (@fightingmobcheck = @fightingmob) {
#IF (@tank = "") {#VAR tank @tankcheck} {
#IF (@tankcheck != @tank) {
#VAR tank @tankcheck
#SAY Tank switch detected!
#SAY The new tank is @tank!
}
}
}
}
}
#CLASS 0