Difference between revisions of "Batclient triggers barbarian"

From BatWiki
Jump to: navigation, search
m
m (fix small bug.)
 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
SCRIPT_DESC = "generic barb triggers";
 
SCRIPT_DESC = "generic barb triggers";
 
SCRIPT_OFF = false;
 
SCRIPT_OFF = false;
 +
 +
// Save as barb.bcs in your scripts directory.
  
 
// Barbarian Triggers with regexes copied from various sources.
 
// Barbarian Triggers with regexes copied from various sources.
Line 20: Line 22:
 
     "party report Barbaric senses!", false, true, false,
 
     "party report Barbaric senses!", false, true, false,
 
     new Color[]{light_magenta}, Font.PLAIN);
 
     new Color[]{light_magenta}, Font.PLAIN);
 +
 
   triggerManager.newTrigger("barb_senses_3",
 
   triggerManager.newTrigger("barb_senses_3",
     "^YYour battle sense is at its peak!  Time seems to slow down, your enemy seems pitiful!",
+
     "^Your battle sense is at its peak!  Time seems to slow down, your enemy seems pitiful!",
 
     "party report Barbaric senses!!", false, true, false,
 
     "party report Barbaric senses!!", false, true, false,
 
     new Color[]{light_magenta}, Font.PLAIN);
 
     new Color[]{light_magenta}, Font.PLAIN);
Line 31: Line 34:
  
 
   triggerManager.newTrigger("barb_lure_f2",
 
   triggerManager.newTrigger("barb_lure_f2",
     "^...but you fail to outwit your enemy, which (he|she|it) notices!$",
+
     "^...but you fail to outwit your enemy, which (.*) notices!$",
 
     "party report Lure failed!  I was outwitted.", false, true, false,
 
     "party report Lure failed!  I was outwitted.", false, true, false,
 
     new Color[]{light_magenta}, Font.PLAIN);
 
     new Color[]{light_magenta}, Font.PLAIN);
Line 51: Line 54:
 
    
 
    
 
   triggerManager.newTrigger("barb_lure_4",
 
   triggerManager.newTrigger("barb_lure_4",
     "^You go \'GOTCHA!\'",
+
     "^You have (.*) in the exact position you want (him|her|it) to be\\.\\nYou go \\'GOTCHA!\\'",
 
     "party report 4 round Lure", false, true, false,
 
     "party report 4 round Lure", false, true, false,
 
     new Color[]{light_magenta}, Font.PLAIN);
 
     new Color[]{light_magenta}, Font.PLAIN);
Line 61: Line 64:
  
 
   triggerManager.newTrigger("barb_lure_m",
 
   triggerManager.newTrigger("barb_lure_m",
     "^But ([ A-ZÄÅÖa-zäå',._-]*)\'s extreme knowledge in stunned maneuvers",
+
     "^But (.*)\'s extreme knowledge in stunned maneuvers",
     "$"+SCRIPT_NAME+".alreadyLured", false, true, false,
+
     "$"+SCRIPT_NAME+".maneuveredLure", false, true, false,
 
     new Color[]{red}, Font.PLAIN);
 
     new Color[]{red}, Font.PLAIN);
  
 
   triggerManager.newTrigger("barb_lure_ig",
 
   triggerManager.newTrigger("barb_lure_ig",
 
     "^([A-Za-z '-]*) ignores your lure.",
 
     "^([A-Za-z '-]*) ignores your lure.",
     "$"+SCRIPT_NAME+".ignoredLured", false, true, false,
+
     "$"+SCRIPT_NAME+".ignoredLure", false, true, false,
 
     new Color[]{red}, Font.PLAIN);
 
     new Color[]{red}, Font.PLAIN);
  
 
   triggerManager.newTrigger("barb_lure_already",
 
   triggerManager.newTrigger("barb_lure_already",
     "^([A-Za-z '-]*) doesn\'t make a careless attack, (he|she|it) seems to know that trick already.",
+
     "^([A-Za-z '-]*) doesn't make a careless attack, (he|she|it) seems to know that trick already.",
 
     "$"+SCRIPT_NAME+".alreadyLured", false, true, false,
 
     "$"+SCRIPT_NAME+".alreadyLured", false, true, false,
 
     new Color[]{red}, Font.PLAIN);
 
     new Color[]{red}, Font.PLAIN);
Line 78: Line 81:
 
void alreadyLured() {
 
void alreadyLured() {
 
     String who = vars.get(1);
 
     String who = vars.get(1);
     clientGUI.doCommand("party report Drat! " + who + " was already lured.");
+
     clientGUI.doCommand("@@party report Drat! " + who + " was already lured.");
 
}
 
}
 
void maneuveredLure() {
 
void maneuveredLure() {
 
     String who = vars.get(1);
 
     String who = vars.get(1);
     clientGUI.doCommand("party report Damn! " + who + " maneuvered lure!");
+
     clientGUI.doCommand("@@party report Damn! " + who + " maneuvered lure!");
 
}
 
}
 
void ignoredLure() {
 
void ignoredLure() {
 
     String who = vars.get(1);
 
     String who = vars.get(1);
     clientGUI.doCommand("party report Aargh! " + who + " ignored lure!");
+
     clientGUI.doCommand("@@party report Aargh! " + who + " ignored lure!");
 
}
 
}
 
</pre>
 
</pre>

Latest revision as of 23:46, 1 July 2017

SCRIPT_NAME = "barb";
SCRIPT_DESC = "generic barb triggers";
SCRIPT_OFF = false;

// Save as barb.bcs in your scripts directory.

// Barbarian Triggers with regexes copied from various sources.
// Please report bugs/improvements to Pisano.

Color red = new Color(127, 0, 0);
Color light_magenta = new Color(255, 0, 255);

void bootup() {
  triggerManager.newTrigger("barb_senses",
    "^Your barbaric senses take over you.",
    "party report Barbaric senses.", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_senses_2",
    "^You feel your barbaric senses taking over you.",
    "party report Barbaric senses!", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_senses_3",
    "^Your battle sense is at its peak!  Time seems to slow down, your enemy seems pitiful!",
    "party report Barbaric senses!!", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_f",
    "^You fail to make any use of your opportunity!$",
    "party report Lure failed!", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_f2",
    "^...but you fail to outwit your enemy, which (.*) notices!$",
    "party report Lure failed!  I was outwitted.", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_1",
    "^You have trouble but manage to",
    "party report 1 round Lure", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_2",
    "^You valiantly strike back at",
    "party report 2 round Lure", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_3",
    "^You see opportunity and butt the shaft",
    "party report 3 round Lure", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);
  
  triggerManager.newTrigger("barb_lure_4",
    "^You have (.*) in the exact position you want (him|her|it) to be\\.\\nYou go \\'GOTCHA!\\'",
    "party report 4 round Lure", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_5",
    "^And brutally shove your weapon down",
    "party report 5 round Lure", false, true, false,
    new Color[]{light_magenta}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_m",
    "^But (.*)\'s extreme knowledge in stunned maneuvers",
    "$"+SCRIPT_NAME+".maneuveredLure", false, true, false,
    new Color[]{red}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_ig",
    "^([A-Za-z '-]*) ignores your lure.",
    "$"+SCRIPT_NAME+".ignoredLure", false, true, false,
    new Color[]{red}, Font.PLAIN);

  triggerManager.newTrigger("barb_lure_already",
    "^([A-Za-z '-]*) doesn't make a careless attack, (he|she|it) seems to know that trick already.",
    "$"+SCRIPT_NAME+".alreadyLured", false, true, false,
    new Color[]{red}, Font.PLAIN);
}

void alreadyLured() {
     String who = vars.get(1);
     clientGUI.doCommand("@@party report Drat! " + who + " was already lured.");
}
void maneuveredLure() {
     String who = vars.get(1);
     clientGUI.doCommand("@@party report Damn! " + who + " maneuvered lure!");
}
void ignoredLure() {
     String who = vars.get(1);
     clientGUI.doCommand("@@party report Aargh! " + who + " ignored lure!");
}