Henrybk

incity macro cindition

Oct 5th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.50 KB | None | 0 0
  1. Index: Macro/Automacro.pm
  2. ===================================================================
  3. --- Macro/Automacro.pm  (revision 8992)
  4. +++ Macro/Automacro.pm  (working copy)
  5. @@ -670,6 +670,14 @@
  6.     return 0
  7.  }
  8.  
  9. +sub checkCity {
  10. +   if (($_[0] && $field->isCity) || (!$_[0] && !$field->isCity)) {
  11. +       return 1;
  12. +   } else {
  13. +       return 0;
  14. +   }
  15. +}
  16. +
  17.  # parses automacros and checks conditions #################
  18.  sub automacroCheck {
  19.     my ($trigger, $args) = @_;
  20. @@ -764,6 +772,7 @@
  21.         next CHKAM if (defined $automacro{$am}->{eval} && !checkEval($automacro{$am}->{eval}));
  22.         next CHKAM if (defined $automacro{$am}->{whenGround} && !checkGround($automacro{$am}->{whenGround}));
  23.         next CHKAM if (defined $automacro{$am}->{notMonster} && !checkMonster($automacro{$am}->{notMonster}, 1));
  24. +       next CHKAM if (defined $automacro{$am}->{incity} && !checkCity($automacro{$am}->{incity}));
  25.  
  26.         foreach my $i (@{$automacro{$am}->{monster}})    {next CHKAM unless checkMonster($i)}
  27.         foreach my $i (@{$automacro{$am}->{aggressives}}){next CHKAM unless checkAggressives($i)}
  28. Index: Macro/Data.pm
  29. ===================================================================
  30. --- Macro/Data.pm   (revision 8992)
  31. +++ Macro/Data.pm   (working copy)
  32. @@ -42,7 +42,8 @@
  33.     'playerguild' => 1,  # check: player guilds
  34.     'eval' => 1,         # check : eval
  35.     'whenGround' => 1,   # check : when ground statuses
  36. -   'areaSpell' => 1     # check : area spell
  37. +   'areaSpell' => 1,     # check : area spell
  38. +   'incity' => 1
  39.  );
  40.  
  41.  our %amMulti = (
Advertisement
Add Comment
Please, Sign In to add comment