Skip to content

Instantly share code, notes, and snippets.

@Brottweiler
Last active April 25, 2024 00:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Brottweiler/6839216 to your computer and use it in GitHub Desktop.
Save Brottweiler/6839216 to your computer and use it in GitHub Desktop.
Report Macro Tools for reporters on PGM based servers

Report Macro Tools

What is this?

When you are in observers, this script for the Macro / Keybind Mod will provides you with items that will help you report rule breakers.

Items

Tripwire Hook - Teleporting & locking

While holding, punch a player to 'lock' onto them. When locked, you will teleport to that player every time you punch with the hook. To unlock, hold down Ctrl then punch.

You can also hold Ctrl and punch a player to instantly unlock, then lock onto the new player.

Stick - Reporting

Punch a player to report that specific player.

Punch while locked onto a player to report the specific player you are locked onto.

Ctrl + Punch to open a list of online players to report. You can also manually write the name in the GUI.

Note: After selecting a player, you have to confirm it's the right player. Next GUI is what you want to report the player for. Last GUI is for confirmation again.

Book - /lookup

Punch a player to look them up.

When 'locked', punch anything but a player to lookup the player you are locked onto.

Hold Ctrl then punch to /find the player you are locked on.

(Redstone) Torch - Fullbright - Thanks to zacharycraft777

Punch with the redstone torch to set your brightness to 200% (it's the max), this also switches it out for an unlit redstone torch.

Punch with the torch to toggle fullbright off. Defaults to 0% (Moody) brightness. If you want to use 100% (Bright) you have to edit reportloader.txt and change GAMMA(0) to GAMMA(100).

How do I install this?

  1. Download and install LiteLoader & Macro / Keybind mod.

  2. Launch Minecraft once to generate folders and files for the macro mod.

  3. Download reportloader.txt and place the file inside .minecraft/liteconfig/common/macros/.

  4. Open up the Macros GUIEvents Bindings

  5. Set onWorldChange and onModeChange to the following

    $${STOP(reportloader);EXEC(reportloader.txt,reportloader);ENDIF;}$$

That should be it! If issues, just ask. You can comment on this gist.

Here's a (outdated) video demonstration and rough installation guide (going through point 5).

Note I'd like to note I am not the one who wrote this originally. YukonAppleGeek made the original admin macro tools, Barnyard_Owl later forked them, then I took over managing them. GrantaClause is very good at scripting macros, and he's helped a ton with it. I made this basically out of the admin macros staff already have.

Changelog

29 August 2017

- Change script back to working on Stratus, and detect server within the script itself

2 February 2017

- Changed script to be server neutral

15 July 2016

- Tweaked report LOG format

11 December 2015

- Use remote tp command incase suspect changes server

25 October 2015

- Added right clicking air open inventory for the locked player using the new `/inventory` command.
UNSET(overcast);
UNSET(run);
DO;
IFCONTAINS(%SERVER%,stratus.network);
SET(overcast);
SET(run);
ENDIF;
IFMATCHES(%SERVER%,"(dev\.|mapdev\.)");
UNSET(overcast);
UNSET(run);
ENDIF;
IF(run);
IF(MODE = 1);
IF(HEALTH = 0);
SET(active);
SET(respawn);
ELSE;
IF(respawn);
UNSET(active);
UNSET(respawn);
ENDIF;
ENDIF;
IF(active);
ELSE;
IF(MODE = 0);
STOP(reportloader);
ENDIF;
SETSLOTITEM(tripwire_hook,1,1);
SETSLOTITEM(stick,3,1);
SETSLOTITEM(book,4,1);
SETSLOTITEM(redstone_torch,5,1);
SLOT(1);
UNSET(run);
SET(active);
ENDIF;
SET(active);
ELSEIF(MODE = 0);
IF(active);
UNSET(active);
ELSE;
ENDIF;
STOP(reportloader);
ENDIF;
ENDIF;
WHILE(run);
IF(overcast);
ELSE;
STOP(reportloader);
ENDIF;
UNSET(lock);
UNSET(&lockname);
DO;
IF(MODE = 1);
SET(run);
IF(LMOUSE);
IF(holdingclick);
ELSE;
IF(GUI = "NONE");
SET(holdingclick);
SET(click);
ENDIF;
ENDIF;
IF(click);
IF(ITEM = "air");
IF(CTRL);
WAIT(50ms);
SETSLOTITEM(compass,0,1);
SETSLOTITEM(tripwire_hook,1,1);
SETSLOTITEM(stick,3,1);
SETSLOTITEM(book,4,1);
SETSLOTITEM(redstone_torch,5,1);
SLOT(1);
LOG("&7Refreshed hotbar");
ENDIF;
ENDIF;
IF(ITEM = "tripwire_hook");
IF(HIT = "PLAYER");
IF(lock);
IF(CTRL);
LOG("&7Unlocked &cfrom &6&l%&lockname%");
UNSET(lock);
UNSET(&lockname);
STRIP(&hitname,%HITNAME%);
SET(&lockname,%&hitname%);
LOG("&7Locked &aonto &6&l%&lockname%");
SET(lock);
ELSE;
ECHO("/rtp %&lockname%");
ENDIF;
ELSEIF(CTRL);
PROMPT(&tpto,"$$u","Select a user to teleport to","","DummyTeleport");
IFMATCHES(%&tpto%,"DummyTeleport");
LOG("&7No player selected");
ELSE;
SET(&lockname,%&tpto%);
LOG("&7Locked &aonto &6&l%&lockname%");
SET(lock);
ECHO("/rtp %&tpto%");
ENDIF;
ELSEIF;
STRIP(&hitname,%HITNAME%);
SET(&lockname,%&hitname%);
LOG("&7Locked &aonto &6&l%&lockname%");
SET(lock);
ENDIF;
ELSE;
IF(lock);
IF(CTRL);
LOG("&7Unlocked &cfrom &6&l%&lockname%");
UNSET(lock);
UNSET(&lockname);
ELSE;
ECHO("/rtp %&lockname%");
ENDIF;
ELSEIF(CTRL);
PROMPT(&tpto,"$$u","Select a user to teleport to","","DummyTeleport");
IFMATCHES(%&tpto%,"DummyTeleport");
LOG("&7No player selected");
ELSE;
SET(&lockname,%&tpto%);
LOG("&7Locked &aonto &6&l%&lockname%");
SET(lock);
ECHO("/rtp %&tpto%");
ENDIF;
ENDIF;
ENDIF;
ENDIF;
IF(ITEM = "stick");
IF(HIT = "PLAYER");
STRIP(&hitname,%HITNAME%);
PROMPT(&reason,"$$[[Type here]]", "Report %&hitname% for what?", true, "DummyReason");
IFMATCHES(%&reason%,"DummyReason");
LOG("&7No reason given");
ELSE;
PROMPT(&confirm,"$$[[Yes,No]]", "Confirm and report %&hitname% for %&reason%?", true, "DummyConfirm");
IFMATCHES(%&confirm,"DummyConfirm");
LOG("&7Not confirmed");
ELSEIF(&confirm = "No");
LOG("&7Cancelled");
ELSEIF(&confirm = "Yes");
LOG("&f[&6R&f] &b&l%PLAYER%&r&f ➔ &3%&hitname%&f: &d%&reason%");
ECHO("/report %&hitname% %&reason%");
ELSE;
LOG("&7Aborted");
ENDIF;
ENDIF;
ELSE;
IF(CTRL);
PROMPT(&player,"$$u","Select a user to report",true,"DummyPlayer");
IFCONTAINS(%&player%,"DummyPlayer");
LOG("&7No player selected");
ELSE;
PROMPT(&reason,"$$[[Type here]]", "Report %&player% for what?", true, "DummyReason");
IFMATCHES(%&reason%,"DummyReason");
LOG("&7No reason given");
ELSE;
PROMPT(&confirm,"$$[[Yes,No]]", "Confirm and report %&player% for %&reason%?", true, "DummyConfirm");
IFMATCHES(%&confirm%,"DummyConfirm");
LOG("&7Not confirmed");
ELSEIF(&confirm = "No");
LOG("&7Cancelled");
ELSEIF(&confirm = "Yes");
LOG("&f[&6R&f] &b&l%PLAYER%&r&f ➔ &3%&player%&f: &d%&reason%");
ECHO("/report %&player% %&reason%");
ELSE;
LOG("&7Aborted");
ENDIF;
ENDIF;
ENDIF;
ELSEIF(lock)
PROMPT(&reason,"$$[[Type here]]", "Report %&lockname% for what?", true, "DummyReason");
IFMATCHES(%&reason%,"DummyReason");
LOG("&7No reason given");
ELSE;
PROMPT(&confirm,"$$[[Yes,No]]", "Confirm and report %&lockname% for %&reason%?", true, "DummyConfirm");
IFMATCHES(%&confirm%,"DummyConfirm");
LOG("&7Not confirmed");
ELSEIF(&confirm = "No");
LOG("&7Cancelled");
ELSEIF(&confirm = "Yes");
LOG("&f[&6R&f] &b&l%PLAYER%&r&f ➔ &3%&lockname%&f: &d%&reason%");
ECHO("/report %&lockname% %&reason%");
//UNSET(lock);
//UNSET(&lockname);
ELSE;
LOG("&7Aborted");
ENDIF;
ENDIF;
ENDIF;
ENDIF;
ENDIF;
IF(ITEM = "book");
IF(HIT = "PLAYER");
STRIP(&hitname,%HITNAME%);
ECHO("/lookup %&hitname%");
ELSE;
IF(lock);
IF(CTRL);
ECHO("/seen %&lockname%");
ELSE;
ECHO("/lookup %&lockname%");
ENDIF;
ELSE;
ENDIF;
ENDIF;
ENDIF;
IF(ITEM = "redstone_torch");
LOG("&fFullbright &a&lActive!");
GAMMA(200);
SETSLOTITEM(torch,5,1);
ELSEIF(ITEM = "torch");
LOG("&fFullbright &c&lInactive!");
GAMMA(0);
SETSLOTITEM(redstone_torch,5,1);
ENDIF;
UNSET(click);
ENDIF;
ELSE;
UNSET(holdingclick);
ENDIF;
IF(RMOUSE);
IF(rholdingclick);
ELSE;
IF(GUI = "NONE");
SET(rholdingclick);
SET(rclick);
ENDIF;
ENDIF;
IF(rclick);
IF(ITEM = "tripwire_hook");
IF(lock);
IF(HIT = "NONE");
ECHO("/inventory %&lockname%");
ENDIF;
ENDIF;
ENDIF;
UNSET(rclick);
ENDIF;
ELSE;
UNSET(rholdingclick);
ENDIF;
ELSEIF;
UNSET(run);
ENDIF;
IF(MODE = 0);
STOP(reportloader)
ENDIF;
WHILE(overcast);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment