All users will need to merge their Minecraft Forum account with a new or existing Twitch account starting October 23rd. You can merge your accounts by clicking here. Have questions? Learn more here.
  • 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});
         ECHO("Welcome %&player%!");

    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
  • 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
  • 1

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

    Do you have a simple example?

    if actually should be $$[1].



    &string = "echo(Hello)"



    This should work, but now that I think about it, it could be possible that this was fixed, but currently I'm not sure.

    Posted in: Minecraft Mods
  • 1

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

    I'm just experimenting with it on my own for now. I only wanted it to read it off the internet in case it's updated, it doesn't have to be updated on the computer running them, as well. Currently the executable is my alternative if I can't figure out a simple way to do what I want to do, and have an update notification in-game. A custom module is too much work for me at the moment, not really that big of a deal. :P Thanks for the help though :D

    Actually it is possible to execute an String as a script, even if the way is a bit hacky.
    You basically have to give your string as an argument to an exec'd file, this file should only contain

    The way this works is that any parameter is replaced before the script runs, so the interpreter actually runs your inserted string.

    Posted in: Minecraft Mods
  • 1

    posted a message on Macro / Keybind Mod

    mod dev here, i want to make a module for this mod to add some variables. i looked around and i haven't been able to find an updated version of the API source code or documentation anywhere, so after a bit of decompiling i inspected the API code directly but still wasn't able to get my module working, is there any updated tutorial or other sort of explanation on how to add variables available anywhere?

    P.S. i am using the 1.8 beta 2 version

    The api is currently hosted on the voxelmodpack's gitlab server.
    It should be open to the public.

    If you want to add some variables your class has to extend the IVariableProvider Interface. If you have more questions you can ask us in #liteloader on EsperNet.
    Posted in: Minecraft Mods
  • 1

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

    Been quite a while since I've asked for help, but I'm stumped so here I am again. haha

    Here's where I'm not too sure, since it wasn't 100% explicit on

    Is it:

    IFMATCHES(%&value%,"^Tripwire Hook$|^Cobbelstone$")

    Or is it:

    IFMATCHES(%&value%,"^Tripwire Hook|Cobbelstone$")

    Or maybe even something I didn't think of? xD

    Thanks ahead.

    The best way would be

    IFMATCHES(%&value%,"^(Tripwire Hook|Cobblestone)$")
    Posted in: Minecraft Mods
  • 1

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


    file.txt - required - name of file to read/run

    taskname - optional - name to give to the new process (name of file by default, i think)

    param1 - optional - first value to pass into the new process

    param2 - optional - second value to pass into the new process

    ...and so on

    values passed into an exec'd process can be accessed by including $$[1], $$[2], etc, in the script
    &var1, &var2 works too i think?

    Theoretically they should be available as var1, var2, etc but currently there is a bug in macros, which prevents that.

    I've reported the problem to Mumfrey, and it should hopefully be fixed once a offical release for 1.8 comes.

    Posted in: Minecraft Mods
  • 1

    posted a message on Macro / Keybind Mod
    Quote from Nitephyre»
    Alright, so now we're cooking with gas... with thanks to Mart333 for regex help and Gorlem for his module and both for scripting help I now have friend highlighting in chat, as per below:

    IFMATCHES(%CHAT%,"^\xa7r\[\xa7r\xa7.(.+?)\xa7r\xa7f\]\xa7r<\xa7r\xa7.(.+?)\xa7r>\xa7r (.+?)\xa7r$");
     MATCH(%CHAT%,"^\xa7r\[\xa7r\xa7(.)(.+?)\xa7r\xa7f\]\xa7r<\xa7r\xa7(.)(.+?)\xa7r>\xa7r (.+?)\xa7r$",{&worldcolor,&world,&namecolor,&name,&msg});
     #i = indexof(FRIENDS[],%&friendname%,%&name%)
     IF(#i != -1)
     MODIFY(&6%TIME% &%&worldcolor%%&world% &%&namecolor%%&friendname% &6%&msg%)
     MODIFY(%TIME% &%&worldcolor%%&world% &%&namecolor%%&name% &f%&msg%)

    On the point of the module, when I add new friends now it throws up the following error in the log, with the last two lines also showing in chat. Upon game restart, the module recognises the newly added friend.

    [23:50:21] [Client thread/INFO]: java.lang.NullPointerException
    at ml.gorlem.modules.params.VariableProviderParams.getValues(
    at ml.gorlem.modules.params.VariableProviderParams.updateVariables(
    at net.eq2online.macros.scripting.variable.VariableManager.updateVariableProviders(
    at net.eq2online.macros.core.Macros.onTick(
    at net.eq2online.macros.core.MacroModCore.onTickInGame(
    at net.eq2online.macros.LiteModMacros.onTick(
    at com.mumfrey.liteloader.core.event.HandlerList$Tickable9.onTick(HandlerList$
    at com.mumfrey.liteloader.client.LiteLoaderEventBrokerClient.onTick(
    at com.mumfrey.liteloader.client.CallbackProxyClient.onTick(
    at com.mumfrey.liteloader.core.event.EventProxy.$event00005(
    at net.minecraft.client.Minecraft.func_71411_J(
    at net.minecraft.client.Minecraft.func_99999_d(
    at net.minecraft.client.main.Main.main(SourceFile:120)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at net.minecraft.launchwrapper.Launch.launch(
    at net.minecraft.launchwrapper.Launch.main(

    [23:50:21] [Client thread/INFO]: [CHAT] §4[MACROS] Critical error, removing variable provider VariableProviderParams
    [23:50:21] [Client thread/INFO]: [CHAT] §4[MACROS] Error was: null

    Thanks for the report, I just fixed that. Here is the new link. Additionally you can now also use push() and pop() on the arrays.
    Posted in: Minecraft Mods
  • 1

    posted a message on Macro / Keybind Mod
    Quote from Nitephyre»
    Ok, I'm confused.. how do I use your module in a script, ie: match a name on the friends list and output it to chat... I'm lost already sorry! :(

    You've to check if the name exists in the friend list, you would do so like this:
    &friendname = "??"
    #i = indexof(FRIENDS[],%&friendname%)
    if(#i != -1)
      // Friend
      // Normal Player
    Posted in: Minecraft Mods
  • 1

    posted a message on Macro / Keybind Mod
    I just made a module which adds global arrays for the values of different prompts.
    For now I've added FRIENDS[], PLACES[], WARPS[], HOMES[] and TOWNS[].

    I don't really have time to test it now but I will still let you try it.

    Here is the download link, but it is currently only for mc 1.8
    Posted in: Minecraft Mods
  • To post a comment, please or register a new account.