Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Leave this as 0. Defines when your in combat and when your not. Used for other macros.
- @combattag = 0;
- //Group chat the message will be sent to.
- @&group = "WPD";
- //CombatLocator
- IFMATCHES(%CHATCLEAN%,"^(?:You have engaged in combat with )(.*?)(?:. Type /ct to check your timer.)$",&attacker,1)
- set(@combattag);
- IF(%HEALTH% < 10);
- DO;
- echo("/g %@&group% NEED HELP AT [x:%XPOS%, y:%YPOS%, z:%ZPOS%]: HEALTH: %HEALTH%. HEADING: %DIRECTION%. REASON: LOW HEALTH");
- wait(30);
- WHILE(%@combattag%);
- ELSE;
- IF(%&attacker% != "someone")
- echo("/g %@&group% Engaged in combat with %&attacker% at [x:%XPOS%, y:%YPOS%, z:%ZPOS%]. Health: %HEALTH%. Heading: %DIRECTION%");
- ELSE;
- ENDIF;
- ENDIF;
- ENDIF;
- IFMATCHES(%CHATCLEAN%,"^(You have engaged in combat with someone. Type /ct to check your timer.)$")
- set(@combattag);
- ENDIF;
- //Unsets @combattag
- IFMATCHES(%CHATCLEAN%,"^(You are no longer in combat.)$");
- unset(@combattag);
- ENDIF;
Advertisement
Add Comment
Please, Sign In to add comment