Guest User

Untitled

a guest
Apr 20th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. //Leave this as 0. Defines when your in combat and when your not. Used for other macros.
  2. @combattag = 0;
  3.  
  4. //Group chat the message will be sent to.
  5. @&group = "WPD";
  6.  
  7. //CombatLocator
  8. IFMATCHES(%CHATCLEAN%,"^(?:You have engaged in combat with )(.*?)(?:. Type /ct to check your timer.)$",&attacker,1)
  9. set(@combattag);
  10. IF(%HEALTH% < 10);
  11. DO;
  12. echo("/g %@&group% NEED HELP AT [x:%XPOS%, y:%YPOS%, z:%ZPOS%]: HEALTH: %HEALTH%. HEADING: %DIRECTION%. REASON: LOW HEALTH");
  13. wait(30);
  14. WHILE(%@combattag%);
  15. ELSE;
  16. IF(%&attacker% != "someone")
  17. echo("/g %@&group% Engaged in combat with %&attacker% at [x:%XPOS%, y:%YPOS%, z:%ZPOS%]. Health: %HEALTH%. Heading: %DIRECTION%");
  18. ELSE;
  19. ENDIF;
  20. ENDIF;
  21. ENDIF;
  22.  
  23. IFMATCHES(%CHATCLEAN%,"^(You have engaged in combat with someone. Type /ct to check your timer.)$")
  24. set(@combattag);
  25. ENDIF;
  26.  
  27. //Unsets @combattag
  28. IFMATCHES(%CHATCLEAN%,"^(You are no longer in combat.)$");
  29. unset(@combattag);
  30. ENDIF;
Advertisement
Add Comment
Please, Sign In to add comment