Change the macro to a key state macro, then put the SPRINT command into the KEY HELD event as well and set the repeat delay to 0. If you want to make it unsprint when you release Q just put $${UNSPRINT}$$ in the key up event. Simples.
Thanks! That's a lot closer to what I am going for. However, the sprint still stops when interrupted. Is there a way to fix that?
EDIT*
Oh actually, I already got the solution. I turned the delay off, and it worked like a charm.
When i try to install the 1.3.1 macro mod minecraft starts crashing. I have tried using both mc patcher and magic launcher which work with other mods but macros won't work. Even when I only use modload and macros, (modloader is first in the list) it causes minecraft to crash
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Unexpected error
This error has been saved to C:\Users\Kevin\AppData\Roaming\.minecraft\crash-reports\crash-2012-08-06_00.05.00-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT f754f1a7 --------
Generated 8/6/12 12:05 AM
- Minecraft Version: 1.3.1
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_05, Oracle Corporation
- Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 7587533560 bytes (7236 MB) / 8232042496 bytes (7850 MB) up to 8232042496 bytes (7850 MB)
- JVM Flags: 2 total; -Xms8192m -Xmx8192m
- ModLoader: Mods loaded: 2
ModLoader 1.3.1
mod_Macros 0.9.0.6
- LWJGL: 2.4.2
- OpenGL: GeForce GT 440/PCIe/SSE2 GL version 4.2.0, NVIDIA Corporation
- Is Modded: Probably not
- Type: Client
- Texture Pack: Default
- Profiler Position: N/A (disabled)
java.lang.NullPointerException
at ModLoader.onTick(ModLoader.java:1197)
at EntityRendererProxy.b(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.J(SourceFile:607)
at net.minecraft.client.Minecraft.run(SourceFile:535)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 4c693c29 ----------
IFMATCHES(%CHAT%,"§dWelcome §[a-f0-9](.+?)§f§d to the Server!");
MATCH(%CHAT%,"§dWelcome §[a-f0-9](.+?)§f§d to the Server!",&newplayer,1);
RANDOM(#greeting,2); // pick a number between 0 and 2
IF(#greeting = 2);
ECHO("Welcome &c%&newplayer%&f!");
ELSEIF(#greeting = 1);
ECHO("Welcome to the server &c%&newplayer%&f!");
ELSE;
ECHO("Hey there &c%&newplayer%&f, welcome!");
ENDIF;
ENDIF
I am getting "Script terminated with uncollapsed stack, check your script syntax"
an Uncollapsed Stack means that some commands that need to be paired are not
in your case, you have
IFMATCHES
...
IF
...
ENDIF
You need another ENDIF to close the IFMATCHES
The fix is in red, in the quote
When i try to install the 1.3.1 macro mod minecraft starts crashing. I have tried using both mc patcher and magic launcher which work with other mods but macros won't work. Even when I only use modload and macros, (modloader is first in the list) it causes minecraft to crash
Thanks for the help
You also need to have mumfrey's fixed modloader class file, should be in the large warning text below the main download
Can I get access to the module API? I still want to try my hand at adding some things.
Forget what I said above, it was very late and I wasn't really in a helpful mood. I've put together an API package for API v3, along with some notes on how to write actions and providers.
Not sure if this has been stated, but a bug when using the CRAFT command while in creative, it doesn't work with stuff that isn't actually craftable such as redstone, coal, ores etc. Basically everything that doesn't have a crafting recipe (Not tested with everything, but a few things to see if that's the problem.
That's a good point, CRAFT's first action is to search for a valid recipe but this check still applies in creative even though it doesn't bother actually crafting the recipe, it just stuffs the result directly into your inventory!
I think a better check would be to look through the creative inventory and check that the item exists (to prevent users giving themselves items which are not only not craftable but cannot be issued by the creative menu either, for example piston extensions or door blocks) and issue it.
Since this is not critical I'll put it as a feature for the next point release.
Nobody is going to help you if you provide no information, what steps have you taken, what version are you even using? Have you applied the modloader patch? What other mods are you using?
The ":P" is especially unwelcome, think about what you're posting.
I have written a Script that you can include in your script to know which blocks are around you.
After this Script is executed you have some gloval variables that are named like @#aa1 @#cd2 or @#ee4.
This are the blocks around you. For example @#cc1 is the block under you. and @#bc1 is the block in front of you IF you look to North.
Here is a download link because it is too much to just copy: terrain.txt
I have written a Script that you can include in your script to know which blocks are around you.
After this Script is executed you have some gloval variables that are named like @#aa1 @#cd2 or @#ee4.
This are the blocks around you. For example @#cc1 is the block under you. and @#bc1 is the block in front of you IF you look to North.
Here is a download link because it is too much to just copy: terrain.txt
Oh, you can scan blocks without HITID now?, that's awesome (and useful)
Thanks for the script
@knighty; what are you trying to do that isn't working?, set the macro override and activate buttons?, access the macro edit menu?, access a specific key edit menu?, at what point does it "not work"?
Sorry.
I´m using Zombe´s Modpck, Inv. Tweaks, Too many items andfor sure the macros mod. I tried to change keys, but still nothing happend. I´m using 1.3.1
Zombe's and Inv Tweaks are not compatible with ModLoader yet. That's what's causing your problem.
I have written a Script that you can include in your script to know which blocks are around you.
After this Script is executed you have some gloval variables that are named like @#aa1 @#cd2 or @#ee4.
This are the blocks around you. For example @#cc1 is the block under you. and @#bc1 is the block in front of you IF you look to North.
Nice work! Your next challenge is to convert it to use FOR loops for the looking around
One more problem is, I found out that this mod is no longer compatible with zombe's mod pack. Are one of teh mdos still updating to work with the recent mod loader update?
This mod does not work with any other mods. I have to remove every mod and clear out my mods folder just to use this mod. Also, I can only have modloader patched installed! Is there a way to fix this? I would like to use other mods besides this one.
This mod does not work with any other mods. I have to remove every mod and clear out my mods folder just to use this mod. Also, I can only have modloader patched installed! Is there a way to fix this? I would like to use other mods besides this one.
ModLoader will update eventually, then everything will be fine because other modders will update their mods, just be patient, it hasn't even been a week since the new version yet. I've provided a patch for modloader so that people using the preliminary release can run the mod, but obviously non-modloader mods are going to break things currently. I realise it's frustrating but honestly patience is all that's needed. I won't be releasing any fixes or patches to my own mod because it's not the mod that's broken/conflicting, it's purely conflicts with non-"base clean" mods which are causing issues with the functioning of ModLoader
This has probably been answered, I looked through the last 5 pages, couldn't find this: Is there a way to actually get the chat message in the onChat event? Recently we had a huge rush on our server, and I need to run a command for everyone joining as a mod on the server, and it's literally impossible to run it for everyone. The chat message that appears is "Welcome [Guest] %JOINEDPLAYER% to ServerName!", and I need to extract the %JOINEDPLAYER% from it to run the command. I can't use the OnPlayerJoin, because then it will issue the command, even though it's someone who has played on the server before. If anyone could help me, it'd be lovely.
The chat is available inside the onChat event in several variables:
CHAT which stores the raw chat message (unparsed)
CHATCLEAN which stores the chat with all formatting codes removed (useful for regex)
CHATPLAYER which is the mods "guess" of who sent the message, may be wrong or empty depending on your server chat format.
CHATMESSAGE if CHATPLAYER is matched correctly, this is the rest of the message.
So in your example you could use: onChat
IFMATCHES(%CHATCLEAN%,"Welcome \[Guest\] ([a-z0-9_\-]{2,16}) to ServerName!",&newplayer,1);
LOG("Matched &c%&newplayer%");
ECHO("/somecommand %&newplayer%");
ENDIF;
Macros: Loading macro templates...
Macros: Using config dir /mods/macros/
Failed to load mod from "mod_Macros.class"
Failed to load mod from "mod_Macros.class"
THROW
java.lang.NoClassDefFoundError: PlayerBase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at com.sk89q.mclauncher.launch.RogueClassLoader.defineClass(RogueClassLoader.java:121)
at com.sk89q.mclauncher.launch.RogueClassLoader.findClass(RogueClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.eq2online.macros.compatibility.Reflection.CheckAndAddClass(Reflection.java:219)
at net.eq2online.macros.compatibility.Reflection.EnumerateCompressedPackage(Reflection.java:170)
at net.eq2online.macros.compatibility.Reflection.GetSubclassesFor(Reflection.java:138)
at net.eq2online.macros.scripting.ScriptAction.Init(ScriptAction.java:528)
at net.eq2online.macros.core.Macros.<init>(Macros.java:205)
at net.eq2online.macros.core.MacroModCore.<init>(MacroModCore.java:277)
at mod_Macros.<init>(mod_Macros.java:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at ModLoader.addMod(ModLoader.java:353)
at ModLoader.readFromClassPath(ModLoader.java:1319)
at ModLoader.init(ModLoader.java:919)
at ModLoader.addAllRenderers(ModLoader.java:161)
at avx.<init>(RenderManager.java:86)
at avx.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.a(SourceFile:260)
at anv.a(MinecraftAppletImpl.java:33)
at net.minecraft.client.Minecraft.run(SourceFile:516)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: PlayerBase
at com.sk89q.mclauncher.launch.RogueClassLoader.findClass(RogueClassLoader.java:97)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 30 more
Latest version, running on 1.3.1. MC doesn't crash, but the mod does nothing. The only difference is a new keybind in the controls menu.
Mods I have installed:
Modloader
Modloader PrelimFix
Optifine U_A2
Zombe
X-Ray 1.3 (Optifine compatible version)
TMI 20120731
Macro mod
Minecraft Console (Has same problem as this mod, but does not print an error to the console
WE CUI
Some of the error up there looks like it's from WE CUI, but the same thing happens with or without it installed.
I generally keep my mods folder clean of everything but configuration files. All actual mods I apply to the minecraft.jar file directly. And I'm putting this in my signature so I don't have to put it in every post I make.
I'm having a problem whenever I click a key to be bound the chat color box pops up and I can't type jack in the bind box. Please help meh, only other installed mod is modloader, and your patch. Everything else is brand spanking new.
Oh this could be done for so many evil things just on the border of cheating and not in PvP. I think I may try this out a bit whenever Bukkit gets updated.
Thanks! That's a lot closer to what I am going for. However, the sprint still stops when interrupted. Is there a way to fix that?
EDIT*
Oh actually, I already got the solution. I turned the delay off, and it worked like a charm.
When i try to install the 1.3.1 macro mod minecraft starts crashing. I have tried using both mc patcher and magic launcher which work with other mods but macros won't work. Even when I only use modload and macros, (modloader is first in the list) it causes minecraft to crash
Thanks for the help
an Uncollapsed Stack means that some commands that need to be paired are not
in your case, you have
IFMATCHES
...
IF
...
ENDIF
You need another ENDIF to close the IFMATCHES
The fix is in red, in the quote
You also need to have mumfrey's fixed modloader class file, should be in the large warning text below the main download
'Cause tomorrow spring is here
Forget what I said above, it was very late and I wasn't really in a helpful mood. I've put together an API package for API v3, along with some notes on how to write actions and providers.
Download here: http://eq2.co.uk/minecraft/mods/macros_api/api3/macros_api_v3.zip
care to be more specific?
what happens when you try?
'Cause tomorrow spring is here
That's a good point, CRAFT's first action is to search for a valid recipe but this check still applies in creative even though it doesn't bother actually crafting the recipe, it just stuffs the result directly into your inventory!
I think a better check would be to look through the creative inventory and check that the item exists (to prevent users giving themselves items which are not only not craftable but cannot be issued by the creative menu either, for example piston extensions or door blocks) and issue it.
Since this is not critical I'll put it as a feature for the next point release.
Nobody is going to help you if you provide no information, what steps have you taken, what version are you even using? Have you applied the modloader patch? What other mods are you using?
The ":P" is especially unwelcome, think about what you're posting.
After this Script is executed you have some gloval variables that are named like @#aa1 @#cd2 or @#ee4.
This are the blocks around you. For example @#cc1 is the block under you. and @#bc1 is the block in front of you IF you look to North.
Here is a download link because it is too much to just copy: terrain.txt
Macro/Keybind mod Wiki
Oh, you can scan blocks without HITID now?, that's awesome (and useful)
Thanks for the script
@knighty; what are you trying to do that isn't working?, set the macro override and activate buttons?, access the macro edit menu?, access a specific key edit menu?, at what point does it "not work"?
'Cause tomorrow spring is here
Zombe's and Inv Tweaks are not compatible with ModLoader yet. That's what's causing your problem.
Nice work! Your next challenge is to convert it to use FOR loops for the looking around
Why do you keep posting here?
ModLoader will update eventually, then everything will be fine because other modders will update their mods, just be patient, it hasn't even been a week since the new version yet. I've provided a patch for modloader so that people using the preliminary release can run the mod, but obviously non-modloader mods are going to break things currently. I realise it's frustrating but honestly patience is all that's needed. I won't be releasing any fixes or patches to my own mod because it's not the mod that's broken/conflicting, it's purely conflicts with non-"base clean" mods which are causing issues with the functioning of ModLoader
The chat is available inside the onChat event in several variables:
onChat
Latest version, running on 1.3.1. MC doesn't crash, but the mod does nothing. The only difference is a new keybind in the controls menu.
Mods I have installed:
Modloader
Modloader PrelimFix
Optifine U_A2
Zombe
X-Ray 1.3 (Optifine compatible version)
TMI 20120731
Macro mod
Minecraft Console (Has same problem as this mod, but does not print an error to the console
WE CUI
Some of the error up there looks like it's from WE CUI, but the same thing happens with or without it installed.
Hmm... I don't understand how i should do it.
EDIT: Something like IDTONAME(#id,&name) & NAMETOID(&name,#id) would be nice
Macro/Keybind mod Wiki