Advertisement
Henrybk

Macro exclusive inheritance example

Jul 13th, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. automacro base_<_15_&_job_<_5 {
  2. BaseLevel < 15
  3. JobLevel < 5
  4. priority 9
  5. exclusive 1
  6. run-once 1
  7. call FirstMacro
  8. }
  9.  
  10. macro FirstMacro {
  11. do c hey
  12. do c this macro is working
  13. do c YEAAH!!
  14. do sit
  15. do c Now i am sitting
  16. do stand
  17. do c Not anymore
  18. do c Macro FirstMacro is exclusive 1, so automacros are not being checked.
  19. do c Now I will call another macro
  20. call otherMacro
  21. do c We Have returned to FirstMacro
  22. do c Now on Macro FirstMacro is exclusive 1 again, so automacros are not being checked.
  23. do c end
  24. }
  25.  
  26. macro otherMacro {
  27. do c Now we are in otherMacro
  28. do c Macro otherMacro inherited exclusive 1 from FirstMacro so automacros are not being checked.
  29. do c Now we will set exclusive to 0
  30. set exclusive 0
  31. do c Macro otherMacro now has it's own exclusive value which is 0, so while on otherMacro automacros are being checked.
  32. do c When we get back to Macro FirstMacro exclusive will be set to it's own value which is 1
  33. do c Returning
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement