Jump to content

How I've been evading all dem bans


Botre

Recommended Posts

doge.png

public class AutoPlayerResponder {
	
	private final Script script;
	
	private final int cooldownSeconds;
	
	private Map<PlayerMessageContentType, MilliTimer> cooldownMap;
	
	public AutoPlayerResponder(final Script script) {
		this.script = script;
		cooldownSeconds = 180;
		cooldownMap = new EnumMap<PlayerMessageContentType, MilliTimer>(PlayerMessageContentType.class);
	}
	
	public void respond(String message) {
		PlayerMessageContentType type = PlayerMessageInterpreter.getInstance().getContentType(message);
		if (type == null || (cooldownMap.containsKey(type) && cooldownMap.get(type).getElapsedSeconds() < cooldownSeconds)) return;
		String response = null;
		switch (type) {
		case BOT_ACCUSATION:
			response = "beep boop boop";
			break;
		case BOT_QUERY:
			response = "beep boop boop yes beep boop";
			break;
		case SKILL_QUERY:
			Skill skill = PlayerMessageInterpreter.getInstance().getSkillMention(message);
			response = script.getSkills().getStatic(skill) + ", beep boop boop";
			break;
		case TOTAL_LEVEL_QUERY:
			response = BotreMethodProvider.getMyTotalLevel(script) + " ...beep boop boop";
			break;
		}
		if (response != null) {
			script.getKeyboard().typeString(response, true);
			cooldownMap.put(type, new MilliTimer());
		}
	}
	
}
Edited by Botre
  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...