1. Play on the ImDeity Minecraft Multiplayer server -- Goto the "Multiplayer" section of Minecraft and type "mc.imdeity.com" to join!
    Dismiss Notice

MacroHelper - Create Macros with Ease

Discussion in 'Kingdoms General' started by KILL3RTACO, April 9, 2013.

  1. KILL3RTACO

    KILL3RTACO

    • Developer
    Joined:
    January 31, 2011
    Messages:
    621
    Likes Received:
    1,059
    Trophy Points:
    563
    In-Game Name:
    KILL3RTACO
    Most of us know of this macro mod. And there are some cool things you can do with them besides just making it run a command when you press a button.

    A while ago a made a macro that displayed who joined the server when someone joined. And not only that, I made the player's name have a different color depending on what their name was. This was easy for me to make, because I have a coding background as was able to find out how to do it very easily. However for others this can be hard, which is the reason for me making this application in this first place.

    About MacroHelper
    In the future I hope to add support for creating other kinda of macros (that's why you see the tabs at the top). But for now, it has support for creating a custom message for a certain player that joins the server.

    Using MacroHelper
    To Mac Users - Apple has apparently removed support of Java due to an unfortunate event I don't feel like explaining. Depending on your Mac version, you may be fine. However with older versions of Mac (I'm looking into 10.6.8), this application may not even open. If you have trouble opening the application, then for now you're just going to have to deal with it until I find a way to fix the issue, I'm sorry.

    The issue has been resolved, as of 1.0.1 :)

    Linux users: you may have to make the file executable for it to open (chmod +x MarcoHelper.jar) On some distros, you can right click on the file, select 'Properties' then go a Permissions tab and check the 'Allow this file to be run as a program' checkbox.

    The application creates folders to hold configuration data as well as for any scripts it creates. For your convenience, it is better that the application remain in its own folder.

    General Help Tab
    In this tab, you can see almost all information provided in the readme file provided with the mod

    README files are text files that usually give information on how to use a software. Because these are regular text files, they aren't pretty and formatted, and are sometimes hard to read or look at. The General Help tab takes information from the readme file and splits it up into different parts.

    [​IMG]
    (Same picture from my tweet)

    • Control flow commands involve things like conditional statements and loops
    • Events fire when something happens in the current world (like the weather changing)
    • Parameters can be added to macros so you can type in or choose a value to insert
    • Statements (also called Keywords by the mod) are predefined functions provided by the mod. For instance, SPRINT() makes the player sprint.
    • Variables are special words that are replaced by a value. For instance HEALTH can be used to find how much health. When used in a string (a sentence inside double-quotes), variables need to be enclosed in percent signs (%) to be recognized.
    Macro Editor
    In this tab you can edit a macro, with syntax highlighting included.
    [​IMG]
    The colors can be changed in options.
    onPlayerJoin Tab
    In this tab, you can create different messages depending on the player that joins.

    [​IMG]

    On the left side, you can add a player to the macro. The preview you see with the black background updates as you type. You can change both the message and the player's name you are going to add.

    On the right side you can edit messages of players you've already added previously. Again, the preview you see updates as you type (but only if a player is selected in the list). You can edit the message of a player and then click the 'Save' button to save it. You can delete a player from the list and from the macro with the delete button.

    You can change the background of a preview box by pressing either of the 'Black Background' or 'White Background' buttons.

    The 'Write Macro' button does exactly that. When you are done editing, press the button and the macro will be created in the 'scripts' folder. The file's name is onPlayerJoined.txt.

    Options
    To view options for the onPlayerJoined macros, go to MacroHelper > Options... (located in the menu bar). Alternatively, you can press CTRL + O (CMD + O on mac) to bring up the window.

    onPlayerJoined

    [​IMG]

    Default onPlayerJoin message - This is the default message that is used in the message textbox on the left side. This is also the message that is used if you want to be notified of all players being logged in.

    Notify me when any player joins the server - If this is checked, you will be sent a message when any player joins, not just the players you added to the list.

    Click 'Save' to save your settings and continue editing (You may want to make the script again if you changed anything).

    Macro Editor

    [​IMG]

    All colors of the syntax highlighting can be changed. The colors shown above are the default colors.

    Hovering your mouse over the words on the left will give you more information on what it means.

    You can restore the original color by pressing the 'Restore Default' button next to any color.

    Using a Macro
    Locate your minecraft data folder. A good easy way to do this is to go into minecraft, go into options > testure packs... And click 'open texture pack folder'. After your file manager opens this window, go back one folder. If you see folders like 'bin' and 'screenshots', you're in the right place. You should see a folder called 'mods', most mods use this folder. Go into it. You should see a folder called 'macros', go into it. This is where you put all your macros. Macros generated by MacroHelper are stored in '<MacroHelper folder>/scripts/<filename>.txt'

    Downloads
    Current version: 1.2.2

    Older Versions:
    Changelog

    Version 1.2.2
    • Added a macro editor
    • The macro editor has syntax coloring
    • Colors can be changed for the macro editor in options
    • CTRL + O (CMD + O on macs) can be used to bring up the options menu
    • Added more things the General help tab because the readme is out of date. Things that have been added are taken from the mod directly, though the wording may be changed a little.
    Version 1.1.0
    • Added a 'General Help' tab
    • Added a close button to the option window
    Version 1.0.1
    • Fixed Mac compatibility issue
    • Fixed some button alignments
    • You can now press enter when editing names to add a player instead of pressing the button
    Version 1.0.0
    • First release
    Source
    For the (less than) 10 of you on this server that might be interested in the source (and can understand it) *coughcoughcliff777coughcough* the source code is located at GitHub.
    Why am I not Posting this on MinecraftForums?
    I didn't feel like it.
     
    ngennaro, Stephfork, FaTd33r and 5 others like this.
  2. Majora_Unmasked

    Majora_Unmasked

    • Gold
    Joined:
    July 2, 2012
    Messages:
    3,648
    Likes Received:
    2,743
    Trophy Points:
    568
    In-Game Name:
    aCrowLookedAtMe
    Nice, is there a macro for when someone leaves? And also, maybe one to check which/how many of your friends are on? :)
     
  3. KILL3RTACO

    KILL3RTACO

    • Developer
    Joined:
    January 31, 2011
    Messages:
    621
    Likes Received:
    1,059
    Trophy Points:
    563
    In-Game Name:
    KILL3RTACO
    The mod doesn't have an event for when a player leaves.

    That requires integration with whatever database the Kingdoms plugin uses. Something I don't have access to (yet?).
     
  4. MrDotPredator

    MrDotPredator

    • Gold
    Joined:
    November 27, 2011
    Messages:
    758
    Likes Received:
    2,414
    Trophy Points:
    438
    In-Game Name:
    MrDotPredator
    This application would be a great use to me, if I hadn't already got a Macro system that tells me when somebody comes online. But if it would ever break then I would definitely come to use this first!
     
  5. MuttiMatti

    MuttiMatti

    • BANNED
    Joined:
    April 29, 2011
    Messages:
    0
    Likes Received:
    1
    Trophy Points:
    0
    In-Game Name:
    MuttiMatti
    Reminds me of my automatic cake macro xD 9 cakes at a time and had to just refill buckets :D
     
    FaTd33r likes this.
  6. cliff777

    cliff777

    • Gold
    Joined:
    April 17, 2011
    Messages:
    811
    Likes Received:
    688
    Trophy Points:
    598
    In-Game Name:
    cliff777
    Removed support for java? I'm running 10.6.8, and I have java running just fine. I'll have to test this program when I get home, but I don't see any reason why this application wouldn't work if it's written in plain java.

    Edit: Unsupported major.minor version 51.0

    Looks like you're compiling under a JDK higher than 1.6.0_43. I'll try and see if I can recompile it :)
     
  7. Tdawg598

    Tdawg598

    Joined:
    May 19, 2012
    Messages:
    216
    Likes Received:
    117
    Trophy Points:
    463
    In-Game Name:
    Tdawg598
    OMG you use linux. You sir have great taste :D
     
    ryan1911 and cliff777 like this.
  8. KILL3RTACO

    KILL3RTACO

    • Developer
    Joined:
    January 31, 2011
    Messages:
    621
    Likes Received:
    1,059
    Trophy Points:
    563
    In-Game Name:
    KILL3RTACO
    OMG I hope that's the issue... I'll see if compiling under Java 6 will fix it...

    Why didn't I think of that...
     
    cliff777 likes this.

Share This Page