Fight Check

From RoDpedia
Revision as of 17:44, 6 January 2015 by Stolichnaya (talk | contribs)
Jump to navigation Jump to search

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} {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 we