Is there any way that I could configure a command to either mouse key? e.x. "Attach" "/home" to my right mouse button?
Just open the binding screen and select the mouse button, it should be right there.
You should see a picture of a mouse with lines connecting to buttons. If you do not see the buttons, then they have been removed for some reason. To get them back, open the macros.txt file and on line 111 there should be a long list of numbers. Close MC and add the following to the end of the line:
{250,34,104}{251,164,112}{252,168,152}
If there are sets starting with numbers higher than 252, put the above before them. So that all the sets are in order by there first number.
Can enyone post a script for do a rapid attack with the sword? Like evry 50ms a left click.
Sorry for my eng.
That's what key-state macros are for.
A few suggestions:
- (I'm not first on this one) RANDOM(min,max); would be great.
- TIME("formatting string", returnVar); Returns the current date/time according to the formatting string.
- Ability to get a players name from looking at them
- WAIT(); for less than a second. (milliseconds?)
- IFMATCHES with multiple patterns (like using && and || in an IF statement)
- DROP(id, quantity); Drops items from inventory
- control of weather and time of day in single player
- PACKETSEND(); Sends various packets directly to the server.
- NEAR(id/playername/entitiyname,returnX,returnY,returnZ); Returns the X,Y,Z of the nearest block of id, or of a player/entity
- arrays
- all functions dealing with position compatible with arrays (so we can store X,Y,Z data easy)
- SOUND(soundname); plays a sound
Is there any way that I could configure a command to either mouse key? e.x. "Attach" "/home" to my right mouse button?
Yes, just click on the mouse button binding and bind the macro, unless you re-bind USE to another key you'll have to use macro override (default is CTRL) to override the normal function when needed.
A few suggestions:
- (I'm not first on this one) RANDOM(min,max); would be great.
- TIME("formatting string", returnVar); Returns the current date/time according to the formatting string.
Every time I post in this thread I must say your mod is GREAT, Mumfrey !!!! :-)
Can you expand the count of predefined lists ? I have quickly hit the limit $$9. What about $$A, $$B, ... ,$$Z - 27 more lists ? With capital it doesn't collide with macro codes $$i $$u etc...
Actually the current params are case-insensitive so adding A-Z would collide with existing params where people have capitalised them, I have some interesting stuff planned for lists which will basically give you unlimited lists so watch this space.
I copied it from memory, but it's simple enough that i think it should be okay
Do(#) ... LOOP #-number of times to loop
repeats everything in between # times, or always if no number is specified Key(#) #-Key name, see readme for a list of them
Simulates a keypress like use, attack, jump, etc. Wait(#) #-Time, in seconds if not specified
Waits a specified amount of time before moving on with the script Stop(#) #-key name or "all"
Stops a script running on the key specified, or all scripts
If nothing is specified then stops itself (stops macros on the same key?)
Suppose I want to run a block of code only if 3 things are true, or one of 3 things is true.
IF((true) && (true) && (true));
IF((true) || (true) || (true));
But what if I want to do the same with regular expressions?
Actually the current params are case-insensitive so adding A-Z would collide with existing params where people have capitalised them, I have some interesting stuff planned for lists which will basically give you unlimited lists so watch this space.
I copied it from memory, but it's simple enough that i think it should be okay
I find that using DO; WHILE(@someflag); and adding a TOGGLE(@someflag); as the first command makes a great toggle-able script. With only one key used. Since pressing the key to turn it off kills the flag, the second instance of the script just dies, as well as killing the first.
Ya, it no longer seems to trigger. Used to work, but my recent attempt at a automatic TP acceptor failed, because the script would never trigger. onChat appears to be very much broken somehow.
Suppose I want to run a block of code only if 3 things are true, or one of 3 things is true.
IF((true) && (true) && (true));
IF((true) || (true) || (true));
But what if I want to do the same with regular expressions?
I tried this, but it failed, so asume there is not any way ti do it other than nesting a lot of IFMATCHES statements within each other.
This would be rather tricky to implement and since 99% you're matching against a single subject string it's far more efficient to do the matching logic in the regex:
IFMATCHES(%ITEMNAME%,"^(diamond|iron) (swo|pi|ax|sho|ho)\w+$");ECHO("You're holding a awesome tool!");ENDIF;
The whole reason for building the scripting language from scratch is to provide a very structured wrapper around the minecraft functionality with a degree of intelligence built in to make it simple and easy to work with. It's designed for providing automation and generic macro capability to help players and admins carry out repetitive tasks. Whilst some of the stuff you can (and will in the future) be able to achieve with it kind of falls into the realms of making mini-mods, or mod-within-a-mod, I'm not out to create some kind of all-singing all-dancing API which is as problematic to maintain as the coming mod API and ultimately, these are useful scripts not full-blown mods.
Sending raw packets is just too close to the metal for what I'm aiming for and I will never add this kind of functionality into the main mod.
I find that using DO; WHILE(@someflag); and adding a TOGGLE(@someflag); as the first command makes a great toggle-able script. With only one key used. Since pressing the key to turn it off kills the flag, the second instance of the script just dies, as well as killing the first.
DO...WHILE is a fairly new construct, so some people are still not familiar with its usage.
Ya, it no longer seems to trigger. Used to work, but my recent attempt at a automatic TP acceptor failed, because the script would never trigger. onChat appears to be very much broken somehow.
onChat is working fine here, the 1.2.4 onChat is powered directly by ModLoader's chat hook functionality so there should be no issues with it. Also works fine in 1.2.5 pre-release, I'll be uploading the 1.2.5 version shortly.
The whole reason for building the scripting language from scratch is to provide a very structured wrapper around the minecraft functionality with a degree of intelligence built in to make it simple and easy to work with.
Making a script mentioned above, that could tell you when entities are near would be interesting.
So like if a creeper is 10 blocks away, it notifies you.
I have a instant-use script that can throw a stack of eggs(64) in a matter of 2-3 seconds.
I tried getting a script that uses the sword or pickaxe like that, to get a faster mining or something, but it may not be possible.
I should learn scripting myself, as it doesn't look too hard, and it can be helpful, but I really like the drop idea.
So say DROP(sugarcane,64) binded to z would be cool, or maybe you could leave the id out, and have it just drop 64 of what you are holding.
I used to use improved chat for everything, but now I see this mod has everything I used from it, except for like chat scrolling, which is in vanilla.
It would be nice if you could change chat history capacity, or 1-3 lines instead of 7 when scrolling, but that is a future feature of improved chat I think.
Also, an idea for the sound string, possibly you could add a function, where it loads an ogg from a certain directory, that way you can add sounds into the game.
So like onlevelup(D:minecraftsounds>levelup)
Rollback Post to RevisionRollBack
I began minecraft ~July 7 2011 1.7.3 Beta
My username used to be Creative_Dalek but is now Dalek since 2/4/2015
I find that using DO; WHILE(@someflag); and adding a TOGGLE(@someflag); as the first command makes a great toggle-able script. With only one key used. Since pressing the key to turn it off kills the flag, the second instance of the script just dies, as well as killing the first.
Would that work with a non-global flag, sounds like it should
i might just make that change =D
Anyway, yeah, i didn't know exactly how WHILE works and i didn't care to test it as i haven't had a specific need for that
So you just replace the LOOP with WHILE(#) and it becomes an <IF # THEN LOOP>?
As for your IFMATCHES question, you can do nearly everything with regex, but here's a reference in hopes that it'll help
If you need to match against different strings, then i guess you'd have to have more of them yeah...
Unless you have a specific string of characters that you KNOW will not appear in any of the variables you're matching against, for example >>>
Then you can just do:
IFMATCHES(%@&string1%>>>%@&string2%>>>%@&string3%,((<Regex1>(?:>>>.+>>>))|((?:>>>.+)<Regex2>(.+>>>))|((>>>.+>>>)<Regex3>)
Oh dear god that's messy (and probably filled with mistakes)
I tried getting a script that uses the sword or pickaxe like that, to get a faster mining or something, but it may not be possible.
If you mean to automatically change to an appropriate tool, that's possible, presuming you keep it in the same slot at all times
It's gonna be a long code though, comparing the block you're targetting to every single block you want it to change tools for =P
You can override the compilation behaviour for some params but only globally, and I don't recommend it as it can under certain circumstances create infinite loops. But you'll see in the config file there's a setting called compiler.flags which has no documentation: this can actually be used to signal the macro compiler different things. The multi-prompt flags are i, t, w, h, u and f. So if you wanted $$i $$i and $$u $$u to actually prompt you twice then set
This would be rather tricky to implement and since 99% you're matching against a single subject string it's far more efficient to do the matching logic in the regex:
IFMATCHES(%ITEMNAME%,"^(diamond|iron) (swo|pi|ax|sho|ho)\w+$");ECHO("You're holding a awesome tool!");ENDIF;
The whole reason for building the scripting language from scratch is to provide a very structured wrapper around the minecraft functionality with a degree of intelligence built in to make it simple and easy to work with. It's designed for providing automation and generic macro capability to help players and admins carry out repetitive tasks. Whilst some of the stuff you can (and will in the future) be able to achieve with it kind of falls into the realms of making mini-mods, or mod-within-a-mod, I'm not out to create some kind of all-singing all-dancing API which is as problematic to maintain as the coming mod API and ultimately, these are useful scripts not full-blown mods.
Sending raw packets is just too close to the metal for what I'm aiming for and I will never add this kind of functionality into the main mod.
Though it could probably be done with a module, anyone with better Java skills than me out there want to give it a shot?
onChat is working fine here, the 1.2.4 onChat is powered directly by ModLoader's chat hook functionality so there should be no issues with it. Also works fine in 1.2.5 pre-release, I'll be uploading the 1.2.5 version shortly.
Hmm, after further inspection it seems that another of my mods overlaps modloader. I fixed it and now onChat works. Anyone using autoreconect mod may have trouble, as it is the one with the problem.
Suggestion: Macros that run in the menu, to automate server connection/reconnection and other stuff.
Would that work with a non-global flag, sounds like it should
i might just make that change =D
Anyway, yeah, i didn't know exactly how WHILE works and i didn't care to test it as i haven't had a specific need for that
So you just replace the LOOP with WHILE(#) and it becomes an <IF # THEN LOOP>?
Pretty much, I tried with non global and it did not work. Perhaps it is supposed to, but it failed when I tested it.
As for your IFMATCHES question, you can do nearly everything with regex, but here's a reference in hopes that it'll help
If you need to match against different strings, then i guess you'd have to have more of them yeah...
Ya, different strings, and vastly differing patterns.
Is it possible to have a dynamic variable? Like, if I made a script that warns a user the first time they swore on my server, then kicked them the first time, could I use a variable in a variable name? So, would if(haswarned%&playername%) work? Sorry if that doesn't make much sense, I'm on my phone at school, so it may be kind of a mess.
Just open the binding screen and select the mouse button, it should be right there.
You should see a picture of a mouse with lines connecting to buttons. If you do not see the buttons, then they have been removed for some reason. To get them back, open the macros.txt file and on line 111 there should be a long list of numbers. Close MC and add the following to the end of the line:
{250,34,104}{251,164,112}{252,168,152}
If there are sets starting with numbers higher than 252, put the above before them. So that all the sets are in order by there first number.
WAIT(RANDOM(LowestNumber,HighestNumber)ms);
I would like to randomize my Marcos more :3.
I like this mod, much better than AutoHotKey, I don't have to start it each time I start Minecraft :D.
That's what key-state macros are for.
A few suggestions:
- (I'm not first on this one) RANDOM(min,max); would be great.
- TIME("formatting string", returnVar); Returns the current date/time according to the formatting string.
- Ability to get a players name from looking at them
- WAIT(); for less than a second. (milliseconds?)
- IFMATCHES with multiple patterns (like using && and || in an IF statement)
- DROP(id, quantity); Drops items from inventory
- control of weather and time of day in single player
- PACKETSEND(); Sends various packets directly to the server.
- NEAR(id/playername/entitiyname,returnX,returnY,returnZ); Returns the X,Y,Z of the nearest block of id, or of a player/entity
- arrays
- all functions dealing with position compatible with arrays (so we can store X,Y,Z data easy)
- SOUND(soundname); plays a sound
This is possible with %HITNAME%
I think this is possible with WAIT(1ms)
Macro/Keybind mod Wiki
Yes, just click on the mouse button binding and bind the macro, unless you re-bind USE to another key you'll have to use macro override (default is CTRL) to override the normal function when needed.
Yes, will add
Both of these are already supported.
This makes no sense at all.
This will come with the inventory management functions I have planned.
Will add this.
Absolutely not.
Possibly.
This isn't likely to happen in the near future as it would require some pretty large changes but I may add it at some point.
This is simple I think, I can add this.
Actually the current params are case-insensitive so adding A-Z would collide with existing params where people have capitalised them, I have some interesting stuff planned for lists which will basically give you unlimited lists so watch this space.
Subscribe to my YouTube Channel
Follow me on Twitter
Seriously?
its possible with Wait(.001)
Try and learn how the scripts work for yourself, it's not that hard and SO worth it...
But okay, as a complete example, i already have one of those
for me, mouse 4 starts it and mouse 5 stops it
(mouse4): $${DO();Key(Attack);Wait(20ms);Loop}$$
(mouse5): $${Stop(Mouse4)}$$
I copied it from memory, but it's simple enough that i think it should be okay
repeats everything in between # times, or always if no number is specified
Key(#) #-Key name, see readme for a list of them
Simulates a keypress like use, attack, jump, etc.
Wait(#) #-Time, in seconds if not specified
Waits a specified amount of time before moving on with the script
Stop(#) #-key name or "all"
Stops a script running on the key specified, or all scripts
If nothing is specified then stops itself (stops macros on the same key?)
'Cause tomorrow spring is here
yeah, I love using the key Macro to set to the /explode command, it's fun
Subscribe to my YouTube Channel
Follow me on Twitter
Really? I see what I missed with player names, but how do I wait less than a second? I tried a WAIT(.1); and my script failed.
Suppose I want to run a block of code only if 3 things are true, or one of 3 things is true.
IF((true) && (true) && (true));
IF((true) || (true) || (true));
But what if I want to do the same with regular expressions?
IFMATCHES((string,pattern) && (string,pattern) && (string,pattern));
I tried this, but it failed, so asume there is not any way ti do it other than nesting a lot of IFMATCHES statements within each other.
Great, can't wait.
Awe. . . Care to elaborate?
Cool, would be nice.
Ya, I can see where it would be a big change.
Cool
Interesting stuff eh? *watches intently. . .
I find that using DO; WHILE(@someflag); and adding a TOGGLE(@someflag); as the first command makes a great toggle-able script. With only one key used. Since pressing the key to turn it off kills the flag, the second instance of the script just dies, as well as killing the first.
Ya, it no longer seems to trigger. Used to work, but my recent attempt at a automatic TP acceptor failed, because the script would never trigger. onChat appears to be very much broken somehow.
Specify the wait time in milliseconds, eg. WAIT(10ms)
This would be rather tricky to implement and since 99% you're matching against a single subject string it's far more efficient to do the matching logic in the regex:
The whole reason for building the scripting language from scratch is to provide a very structured wrapper around the minecraft functionality with a degree of intelligence built in to make it simple and easy to work with. It's designed for providing automation and generic macro capability to help players and admins carry out repetitive tasks. Whilst some of the stuff you can (and will in the future) be able to achieve with it kind of falls into the realms of making mini-mods, or mod-within-a-mod, I'm not out to create some kind of all-singing all-dancing API which is as problematic to maintain as the coming mod API and ultimately, these are useful scripts not full-blown mods.
Sending raw packets is just too close to the metal for what I'm aiming for and I will never add this kind of functionality into the main mod.
DO...WHILE is a fairly new construct, so some people are still not familiar with its usage.
onChat is working fine here, the 1.2.4 onChat is powered directly by ModLoader's chat hook functionality so there should be no issues with it. Also works fine in 1.2.5 pre-release, I'll be uploading the 1.2.5 version shortly.
It also makes you feel like a god.
So like if a creeper is 10 blocks away, it notifies you.
I have a instant-use script that can throw a stack of eggs(64) in a matter of 2-3 seconds.
I tried getting a script that uses the sword or pickaxe like that, to get a faster mining or something, but it may not be possible.
I should learn scripting myself, as it doesn't look too hard, and it can be helpful, but I really like the drop idea.
So say DROP(sugarcane,64) binded to z would be cool, or maybe you could leave the id out, and have it just drop 64 of what you are holding.
I used to use improved chat for everything, but now I see this mod has everything I used from it, except for like chat scrolling, which is in vanilla.
It would be nice if you could change chat history capacity, or 1-3 lines instead of 7 when scrolling, but that is a future feature of improved chat I think.
Also, an idea for the sound string, possibly you could add a function, where it loads an ogg from a certain directory, that way you can add sounds into the game.
So like onlevelup(D:minecraftsounds>levelup)
I began minecraft ~July 7 2011 1.7.3 Beta
My username used to be Creative_Dalek but is now Dalek since 2/4/2015
Would that work with a non-global flag, sounds like it should
i might just make that change =D
Anyway, yeah, i didn't know exactly how WHILE works and i didn't care to test it as i haven't had a specific need for that
So you just replace the LOOP with WHILE(#) and it becomes an <IF # THEN LOOP>?
As for your IFMATCHES question, you can do nearly everything with regex, but here's a reference in hopes that it'll help
If you need to match against different strings, then i guess you'd have to have more of them yeah...
Unless you have a specific string of characters that you KNOW will not appear in any of the variables you're matching against, for example >>>Then you can just do:
IFMATCHES(%@&string1%>>>%@&string2%>>>%@&string3%,((<Regex1>(?:>>>.+>>>))|((?:>>>.+)<Regex2>(.+>>>))|((>>>.+>>>)<Regex3>)
Oh dear god that's messy (and probably filled with mistakes)
If you mean to automatically change to an appropriate tool, that's possible, presuming you keep it in the same slot at all times
It's gonna be a long code though, comparing the block you're targetting to every single block you want it to change tools for =P
'Cause tomorrow spring is here
Ah! Thank you!
Okay, was worth asking. . .
Though it could probably be done with a module, anyone with better Java skills than me out there want to give it a shot?
Which is why I pointed it out.
Hmm, after further inspection it seems that another of my mods overlaps modloader. I fixed it and now onChat works. Anyone using autoreconect mod may have trouble, as it is the one with the problem.
Suggestion: Macros that run in the menu, to automate server connection/reconnection and other stuff.
Pretty much, I tried with non global and it did not work. Perhaps it is supposed to, but it failed when I tested it.
Ya, different strings, and vastly differing patterns.