Macros for Grief Resolving

From MinecraftOnline
Jump to navigation Jump to search

On this page, I (getplayerhead.sh?Krenath&16.png Krenath) plan on documenting the MacroMod macros that I use for more easily resolving grief reports so that other admins can streamline the process

These macros were made for a QWERTY keyboard.

Screen Buttons

I have a number of panels and buttons configured for displaying data scraped from chat so I don't lose track of what the /grcheck command told me about a grief report.

These display both on the INCHAT and INGAME layers of the MacroMod GUI editor so I can see them whether I'm in chat or not.

Across the top, it tells me:

  • lbl_Prism - whether or not the Prism Inspect tool is enable or disabled so that I can avoid punching holes in builds while checking grief,
  • lbl_ReportNo - The Greport number
  • lbl_ReportBy - The Greport author name
  • lbl_ReportFacing - The blocktype the author was facing when reporting
  • lbl_ReportRemaining - The count of remaining grief reports

Below that, I have

  • lbl_ReportDescription - the text of the greport itself so I can refer back to it easily.


Down the right side of the screen, I have macro buttons which are also bound to hotkeys so I can easily resolve the report with one click.

These only display on the INCHAT layer of the screen so they don't clutter the screen all the time, and only appear when my cursor is enabled so I can click them.

  • F7: btn_Next - Go to the current grief report and load its data into the onscreen panels. This does not increment the report counter, so if you're called away, you can easily return to this report.
  • F8: btn_Fixed - Mark the current grief report as FIXED and automatically go on to the next grief report
  • F9: btn_NotFixed - Mark the current grief report as NOT FIXED and move on.
  • F10: btn_NotGrief- Mark the current grief report as NOT GRIEF and move on.
  • F11: btn_Unclear - Mark the current grief report as UNCLEAR and move on.
  • F12: btn_Duplicate - Mark the current grief report as a DUPLICATE of a previous report and move on.
GriefCheckDisplay.png

Events

I have a series of macro text files for handling chat events, which I use to capture the data from the /grcheck command to be displayed on the screen for easy reference.

In Macro Bindings:Events section of Macromod's GUI Editor, I select OnChat and bind it to $${$$<onchat.txt>}$$ which selects the Onchat textfile to be executed whenever chat arrives. This file is then used to scrape the chat for data to be displayed.

OnChat:

$${$$<onchat.txt>}$$

Keybinds

  • Z/pr near
  • F7 /grcheck next
  • F8 $${$$<greport-resolve-fixed.txt>}$$
  • F9 $${$$<greport-resolve-notfixed.txt>}$$
  • F10 $${$$<greport-resolve-notgrief.txt>}$$
  • F11 $${$$<greport-resolve-duplicate.txt>}$$
  • F12 $${$$<greport-resolve-unclear.txt>}$$
  • Keypad - /grcheck next
  • Keypad + /pr i
  • PgUp /minecraft:gamemode creative
  • PgDn /minecraft:gamemode spectator

Files

These are the macro files I created for handling the above features

onchat.txt

In the MacroMod Text Editor, I created an onchat.txt file that matches the pattern of the /grcheck and /gresolve commands' output and extracts various pieces of data into variable which are then used to update the display:

SET(&greportpattern,Teleporting to greport ([0-9]*) by (.*)\, facing (.*)\.);

// Upon using the /grcheck next command, capture the report number, player, and block, then call the script to update the labels
IFMATCHES(%CHATCLEAN%,%&greportpattern%,@#greportnumber,1);
    MATCH(%CHATCLEAN%,%&greportpattern%,@&greportplayer,2);
    MATCH(%CHATCLEAN%,%&greportpattern%,@&greportblock,3);
    //log(&9Checking greport #&f%@#greportnumber%&9 by &f%@&greportplayer%&9 facing &f%@&greportblock%&9.&f);
    LOGTO(debug,%CHAT%);
    EXEC(greportcurrent.txt);
    FILTER();
ENDIF;

// on resolving the report, update the lbl_ReportRemaining count and move to the next report
IFMATCHES(%CHATCLEAN%,"Grief report ([0-9]*) marked as resolved.");
    //log(&9Greport #%@#greportnumber% saved.);
    echo(/grcheck count);
    echo(/grcheck next);
ENDIF;

// Update the lbl_ReportRemaiing count when someone adds a ew report
IFMATCHES(%CHATCLEAN%,"(.*) just submitted a new grief report.");   
    echo(/grcheck count);   
ENDIF;

// capture the description text and update lbl_ReportDescription by calling greportdetails.txt
IFMATCHES(%CHATCLEAN%,"    \"(.*)\"",@&greportdetails,1); 
    \\log(&9found description line: &f"%@&greportdetails%&9");
    exec(greportdetails.txt);
ENDIF;

// update the lbl_ReportRemaining count
IFMATCHES(%CHATCLEAN%,"There are ([0-9]*) unresolved grief reports.",@#greportcount,1); 
    LOGTO(debug,%CHAT%);
    exec(greportcount.txt);  
ENDIF;


IFMATCHES(%CHATCLEAN%,"Prism // Inspection wand enabled."); 
    LOGTO(debug,%CHAT%);
    SETPROPERTY(lbl_Prism,text,&4Enabled);
    FILTER();
ENDIF;

// Update lbl_Prism to display the wand status
IFMATCHES(%CHATCLEAN%,"Prism // Inspection wand disabled."); 
    LOGTO(debug,%CHAT%);
    SETPROPERTY(lbl_Prism,text,&3Disabled);
    FILTER();
ENDIF;


// blank the Greport details when we've cleaned everything out
IFMATCHES(%CHATCLEAN%,"There are no outstanding grief reports left.");
        LOGTO(debug,%CHAT%);
    SETPROPERTY(lbl_Prism,text, )
    SETPROPERTY(lbl_ReportNo,text, )
    SETPROPERTY(lbl_ReportBy,text, )
    SETPROPERTY(lbl_ReportFacing,text, )
    SETPROPERTY(lbl_ReportRemaining,text, )
    SETPROPERTY(lbl_ReportDescription,text, ) 
    FILTER();
ENDIF;

greportcurrent.txt

This file takes the variables that were set in the OnChat file above and populates the onscreen display panels in both the INGAME and INCHAT layers

I have this file set to handle most of the appearance of these buttons as well so I don't have to go to the GUI editor to update them if I choose:

//greportcurrent.txt
//update the labels to display the current grief report.
// we also re-update the appearance of the labels here because 
// editing this code is easier than using the 
// macromod GUI to set label appearances

//Grepair REPORTER Label INGAME
SETPROPERTY(lbl_ReportBy,align,middle center);
SETPROPERTY(lbl_ReportBy,background,#80000000); //Transparent
SETPROPERTY(lbl_ReportBy,colour,#ff0000); //Red
SETPROPERTY(lbl_ReportBy,shadow,1);
SETPROPERTY(lbl_ReportBy,text,&bby:\n&c%@&greportplayer%);
SETPROPERTY(lbl_ReportBy,visible,true);

//Grepair BLOCK Label INGAME
SETPROPERTY(lbl_ReportFacing,align,middle center);
SETPROPERTY(lbl_ReportFacing,background,#80000000); //Transparent
SETPROPERTY(lbl_ReportFacing,colour,#ff0000); //Red
SETPROPERTY(lbl_ReportFacing,shadow,1);
SETPROPERTY(lbl_ReportFacing,text,&bfacing:\n&c%@&greportblock%);
SETPROPERTY(lbl_ReportFacing,visible,true);

//Grepair CURRENT # Label INGAME
SETPROPERTY(lbl_ReportNo,align,middle center);
SETPROPERTY(lbl_ReportNo,background,#80000000); //Transparent
SETPROPERTY(lbl_ReportNo,colour,#ff0000); //Red
SETPROPERTY(lbl_ReportNo,shadow,1);
SETPROPERTY(lbl_ReportNo,text,&bGReport #:\n&c%@#greportnumber%);
SETPROPERTY(lbl_ReportNo,visible,true);
//SETPROPERTY(LABEL %#labelnumber%,binding);


//FIXED Button
SETPROPERTY(btn_Fixed,align,middle center);
SETPROPERTY(btn_Fixed,background,#40800000; //Transparent
SETPROPERTY(btn_Fixed,colour,#ff0000); //Red
SETPROPERTY(btn_Fixed,shadow,1);
SETPROPERTY(btn_Fixed,text,&cF8\n&bFixed);
SETPROPERTY(btn_Fixed,visible,true);


//NOT FIXED Button
SETPROPERTY(btn_NotFixed,align,middle center);
SETPROPERTY(btn_NotFixed,background,#40800000); //Transparent
SETPROPERTY(btn_NotFixed,colour,#ff0000); //Red
SETPROPERTY(btn_NotFixed,shadow,1);
SETPROPERTY(btn_NotFixed,text,&cF9\n&bNot Fixed);
SETPROPERTY(btn_NotFixed,visible,true);

//NOT GRIEF Button
SETPROPERTY(btn_NotGrief,align,middle center);
SETPROPERTY(btn_NotGrief,background,#40800000); //Transparent
SETPROPERTY(btn_NotGrief,colour,#ff0000); //Red
SETPROPERTY(btn_NotGrief,shadow,1);
SETPROPERTY(btn_NotGrief,text,&cF10\n&bNot Grief);
SETPROPERTY(btn_NotGrief,visible,true);

//UNCLEAR Button
SETPROPERTY(btn_Unclear,align,middle center);
SETPROPERTY(btn_Unclear,background,#40800000); //Transparent
SETPROPERTY(btn_Unclear,colour,#ff0000); //Red
SETPROPERTY(btn_Unclear,shadow,1);
SETPROPERTY(btn_Unclear,text,&cF11\n&bUnclear);
SETPROPERTY(btn_Unclear,visible,true);

//DUPLICATE Button
SETPROPERTY(btn_Duplicate,align,middle center);
SETPROPERTY(btn_Duplicate,background,#40800000); //Transparent
SETPROPERTY(btn_Duplicate,colour,#ff0000); //Red
SETPROPERTY(btn_Duplicate,shadow,1);
SETPROPERTY(btn_Duplicate,text,&cF12\n&bDuplicate);
SETPROPERTY(btn_Duplicate,visible,true);

STOP;

greport-resolve-fixed.txt

Now that I have buttons for resolving grief, I want a neat display when I mark grief as resolved.

These scripts are bound (I did this manually during setup) in each of the buttons created above.

This file is manually bound to the F8 key as well as to the onscreen button

log(Resolving Grepair number: %@#greportnumber%);
echo(/grcheck resolve %@#greportnumber% fixed);
WAIT(5t);

greport-resolve-notfixed.txt

This file is manually bound to the F9 key as well as to the onscreen button

log(Resolving Grepair number: %@#greportnumber%);
echo(/grcheck resolve %@#greportnumber% notfixed);
WAIT(5t);

greport-resolve-notgrief.txt

This file is manually bound to the F10 key as well as to the onscreen button

log(Resolving Grepair number: %@#greportnumber%);
echo(/grcheck resolve %@#greportnumber% notgrief);
WAIT(5t);

greport-resolve-duplicate.txt

This file is manually bound to the F11 key as well as to the onscreen button

log(Resolving Grepair number: %@#greportnumber%);
echo(/grcheck resolve %@#greportnumber% fixed nomail);
wait(5t);

greport-resolve-unclear.txt

This file is manually bound to the F12 button as well as to the onscreen button. You bind it

log(Resolving Grepair number: %@#greportnumber%);
echo(/grcheck resolve %@#greportnumber% unclear);
WAIT(5t);

greportdetails.txt

Update the onscreen display of grief report details when the grcheck command is used.

LOG(GreportDetails);
//Grepair DETAILS Label INGAME
SETPROPERTY(lbl_ReportDescription,align,middle center);
SETPROPERTY(lbl_ReportDescription,background,#80000000); //Transparent
SETPROPERTY(lbl_ReportDescription,colour,#ff0000); //Red
SETPROPERTY(lbl_ReportDescription,shadow,1);
SETPROPERTY(lbl_ReportDescription,text,&3%@&greportdetails%);
SETPROPERTY(lbl_ReportDescription,visible,true);

greportcount.txt

Update the onscreen display of the remaining count of reports when a report is resolved or another report is created

LOG(greport count remaining: &3%@#greportcount%);
SET(&greporttext,&3Remaining:\n&b%@#greportcount%);

//Grepair COUNT Label INGAME
SETPROPERTY(lbl_ReportRemaining,align,middle center);
SETPROPERTY(lbl_ReportRemaining,background,#80000000); //Transparent
SETPROPERTY(lbl_ReportRemaining,colour,#ff0000); //Red
SETPROPERTY(lbl_ReportRemaining,shadow,1);
SETPROPERTY(lbl_ReportRemaining,text,%&greporttext%);
SETPROPERTY(lbl_ReportRemaining,visible,true);