• 0

    posted a message on Macro / Keybind Mod

    What is your expected behaviour and what happens?

    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod

    There is still a problem with the item type hint for user-defined custom params.

    All items are display twice.


    I'm using v0.15.4


    Example:

    $$[[gold_ingot,gold_block,gold_nugget]i]

    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from TaurineOrange3»

    Hi. I'm not sure how to do this (I've attempted it with no success so far). I want a macro which when I click a button, it toggles on a timer, which sends a message in chat every 2 minutes. And when the button is clicked again the message is toggled off. Thanks!




    toggle(flag)
    if(!flag)
      stop
    endif
    do
      echo("message")
      wait(120)
    loop
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from alcik98»



    $${
    IF(bool);
    UNSET(bool);
    ECHO(/h s);
    ELSE();
    SET(bool);
    ECHO(/h d);
    ENDIF();
    }$$


    As a shortcut you can use TOGGLE([flag]) combined with IIF(<condition>,<truetext>,[falsetext])


    TOGGLE(bool)
    IIF(bool,"/h s","/h d")
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from supers0lar»

    Can someone help me with this?

    Is there ANY way i can toggle a GUI being active or not? for example say i have an armor HUD GUI set up and i would like to show/hide it with a key.

    Its on the "ingame" screen, and in the "ingame" slot.

    I've tried:

    GUI(ingame)


    Which is supposed to show/hide a GUI screen(in this case my HUD GUI) but it doesn't work! Is this a bug or not?

    Someone please try this and respond.. I've been looking for this for a long time now


    GUI() works with minecrafts builtin screens.
    SHOWGUI() should work with macros custom gui screens.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from sakanadesuyo»


    1. Is there an official docs other than this readme.txt? I can't for the life of me figure out the syntax for FOREACH and thus can't even simply figure out how to print online players to the console. Let alone populate a label with it. Also I can't even find any documentation on the iterator "players", so I don't know how I would have even known that iterator existed.


    There is http://mkb.gorlem.ml/wiki/commands but it is not up to date.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Fireblazer»

    Hi Mumfrey,


    I can't seem to find documentation to see if it's possible to see how many mobs are nearby, or a count, or the mobs in the area.


    Do you know if this is a feature?

    I have a spare account standing near a mob farm, it would be nice to notify me and other players in chat when it reaches a certain level, or by command


    Thank you ( and also thanks for this great mod )


    No currently there is no such feature
    Quote from AdinD»



    Is there any event that is triggered by receiving a message? Thx!

    Currently not
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod

    I have a few bugs which I think were not already reported:


    CRAFT Action: Seems to give you two items while you are in creative and don't already have the item.


    PICK Action: Doesn't seem to work with enchanted or named tools.


    VEHICLE Variable: Returns entity.MinecartRideable.name for Minecarts.


    SEED Variable: Returns 0 even in Single Player.

    Posted in: Minecraft Mods
  • 1

    posted a message on Macro / Keybind Mod
    Quote from fudrocket777»

    Since I don't know the exact formatting, I can only check that the text was displayed. The downside to this is, if a player types the server welcome message, your script would also trigger. To fix this, you would check for a colored message instead of the plain text. If you can provide the formatting with symbols, then I can help with a colored version. Otherwise, the stuff below should work for now - put the code into a text file, then type $${$$<yourtextfilename.txt>}$$ in the onChat event.


    IFMATCHES(%CHATCLEAN%,"Welcome \[Vagabond] (.+?) to Golden Sands!");
         MATCH("%CHATCLEAN%,"Welcome \[Vagabond] (.+?) to  Golden Sands!",{&player});
         WAIT(2);
         ECHO("Welcome %&player%!");
    ENDIF;


    You could also prepend the regex pattern with ^ and append it with $. That should make sure that there is nothing in front and nothing after.
    Like so:
    "^Welcome \[Vagabond] (.+?) to Golden Sands!$"
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from STZ_PVP»

    Is there a limit to how many text files the mod can run, or maybe specifically that onCHAT can run? I have a config that tries to use 7 text files but it only runs the first 5. I have a main script file that onCHAT uses. This script file looks like this:

    $${$$<File1.txt>}$$|

    $${$$<File2.txt>}$$|

    $${$$<File3.txt>}$$|

    $${$$<File4.txt>}$$|

    $${$$<File5.txt>}$$|

    $${$$<File6.txt>}$$|

    $${$$<File7.txt>}$$|

    The problem is not with the script files themselves; if I switch them around, the top 5 will be run and not the bottom 2.


    Any way to get around this?


    I think it runs the first 10 by default. it should be changeable in .minecraft/liteconfig/common/macros/.macros.txt under compiler.maxinclude
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from redlap2»

    Thanks, it works. I'll keep "inventing" things for my kid. :)


    I decided to go for:

    +summon small herd of cows

    +summon big herd of cows


    with fixed values, to make thigs easier for him (not really hahaha).


    And one last question for today:


    I did this to avoid code duplication:


    IFMATCHES(%CHAT%,"\+give me diamond armour");
    $$<diamond_armor.txt>
    FILTER(); ENDIF;

    IFMATCHES(%CHAT%,"\+give me diamond armor");
    $$<diamond_armor.txt>
    FILTER(); ENDIF;


    Is there any other way (better, of course) of doing this?


    I'm going to deal with lots of synonyms, and I'd like to avoid code duplication as much as possible.


    Thanks for your patience. :)


    Yes, IFMATCHES uses regex. That means you can use "\+give me diamond armou?r" which should match armor and armour
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Nitephyre»

    Hey lads, LTNP...


    Has the way INDEXOF interacts with the Friends list changed? I'm having trouble with previously working code now not. I'm also having the same problem with PLAYSOUND.


    Example:


    ${
        //Match Friend Joining
        #i = INDEXOF(FRIENDS[],%&jpfn%,%JOINEDPLAYER%)
        IF(#i != -1)
            ACHIEVEMENTGET(%JOINEDPLAYER% Joined!)
            PLAYSOUND(mob.villager.yes)
        ENDIF
    }$


    I'm pretty sure the array FRIENDS[] is not available in macros. But I made a module with that array a while back, which you probably used. Sadly I didn't have time to update that module.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Mumfrey»

    This happens when an outdated version of LWJGL ends up on the classpath. This was (in the past) caused because the liteloader dev POM file on my maven had a reference to Mixin, which in its POM file had a reference to launchwrapper 1.11 (not 1.12) and launchwrapper 1.12 has a reference to LWJGL 2.9.1. Because ForgeGradle puts deobf artefacts higher in the classpath than other gradle dependencies, the version of LWJGL indirectly linked via deobf was placed higher in the classpath than the (correct) 2.9.4.

    Basically this is resolved at the liteloader maven end now, but can be caused if:

    • You have an outdated liteloader POM anywhere in your dependency tree
    • You have a (cached by ForgeGradle) outdated liteloader versions.json in your dependency tree
    • You have added any artefact to the compile dependencies which indirectly causes launchwrapper 1.11 to be referenced.

    To resolve it


    • You can fix it temporarily (eg. every time you run gradle eclipse you will need to redo) by just editing the project properties and removing LWJGL 2.9.1 from the libraries
    • You can fix it for good by:
    • cleaning out cached versions.json (in .gradle/caches/minecraft/com)
    • cleaning out cached liteloader versions in your .m2 or .gradle caches

    It's easy to determine when this is going to happen because you can just run gradle dependencies and grep it for LWJGL 2.9.1, if you see it appear in the list then something is broken, you can walk the POM tree (via gradle dependencies) and see where it's coming from, you can also use gradle's dependencyInsight to find out more.


    I cleared the .gradle/caches/com folder and now it works. Thanks :)
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Mumfrey»
    "Good news everyone!"

    So I finally got a chance to properly create a Macros Module SDK. The SDK takes the form of an example ForgeGradle project which you can use as a template for your own modules. It has the following features:

    • Stand-alone ForgeGradle project which automatically fetches:
      • LiteLoader
      • Macros Mod (dev version)
      • Macros API
    • Currently supports only Eclipse, if you want to use a different IDE it'll be up to you to customise the gradle script
    • Provides a test environment for your module and builds a compatible artefact with no customisation required
    • Only supports 0.14.0 for 1.11 currently, as new versions are released in the future I will now always provide a compatible dev artefact on the maven

    You can download the SDK zip from here:

    The SDK works just like any other ForgeGradle project, you will need Eclipse installed on your system. To use the module SDK:

    1. Extract the zip file to your eclipse workspace directory
    2. Import the project using File -> Import -> Gradle -> Project
    3. In the gradle tasks tab run the setupDecompWorkspace task
    4. In the gradle tasks tab run the eclipse task
    5. Right-click the project and choose Gradle -> Refresh Gradle Project

    The SDK project can be configured by the gradle.properties file. If making any changes to the file run the eclipse task again and then refresh the gradle project. The source code for the ExampleModule is available here as well, if you prefer to checkout from git.




    I have set up everything accordingly, but I have some issues with launching minecraft from eclipse.
    Basically after launching the minecraft window is very small, like this:


    And after resizing it looks like this:


    I'm not really sure what could be the problem. I hope you can help me

    Posted in: Minecraft Mods
  • 1

    posted a message on Macro / Keybind Mod
    Quote from Brecert»

    Already had protection set up and just needed a way to actually read and execute the chat.

    "notices the sayAfterMe command, and echoes what is after it into the chat"
    I dont know how to do that is my problem.

    Thanks for giving a warning though. Could have been bad for someone else :p.


    Since you seem experienced, it actually is possible to execute scripts from the chat.
    Basically you have to create another .txt file which should only contain $$[1]
    If you now want to execute some script just start the file with exec and the script as the third parameter EXEC(file.txt,file,<script here>)
    You don't need to add $${ and }$$
    Posted in: Minecraft Mods
  • To post a comment, please .