For some reason there're no environmental variables for mouse scroll keys? I couldn't find them in the mod's variables and when i tried to use the name from the key binding screen it didn't work:
${if(MWHEELDOWN);log(test);endif}$
//Doesn't return anything
${log(%KEYNAME%)}$
//Returns "MWHEELDOWN", so technically the code above should have worked?
For some reason there're no environmental variables for mouse scroll keys? I couldn't find them in the mod's variables and when i tried to use the name from the key binding screen it didn't work:
${if(MWHEELDOWN);log(test);endif}$
//Doesn't return anything
${log(%KEYNAME%)}$
//Returns "MWHEELDOWN", so technically the code above should have worked?
Could this be fixed please @Mumfrey
I too have seen a problem with using the mouse scroll key that wasn't there initially.
This worked with the scroll switch until recently (1.3 upgrades):
/pick|/refill
It now does nothing as written.
Adding a CTRL to the macro makes it work.
Not a major problem, more of a gee-whiz for Mr. M.
For some reason there're no environmental variables for mouse scroll keys? I couldn't find them in the mod's variables and when i tried to use the name from the key binding screen it didn't work:
${if(MWHEELDOWN);log(test);endif}$
//Doesn't return anything
${log(%KEYNAME%)}$
//Returns "MWHEELDOWN", so technically the code above should have worked?
Could this be fixed please @Mumfrey
But if KEYNAME is MWHEELDOWN that means that the macro was triggered by the mouse wheel event, but because mouse wheel events are momentary it's thus very unlikely that the MWHEELDOWN will still be down when reaching that line in the macro.
Macros snapshots all keys pressed at the time the macro is triggered and these states can be accessed by prefixing the state variable with tilde:
IF(~MWHEELDOWN);LOG("Mouse wheel was down when macro was triggered");ENDIF
So maybe give that a try if you're trying to access the state of the key which triggered the macro. Accessing the state of the "key" may not work though, because the mouse wheel events are pulses and it may be difficult to observe the actual key down state within a macro.
Hey, despite barely scratching at the surface of what this can do I've become really attached to this mod, but the server I build on has just switched to 1.12.2 ONLY, basically locking me out if I want to use this mod. Sorry if you've already said this, but I haven't found anything in the last 4 pages about it.
Will you be updating this mod to 1.12.2? I expect that IF 1.13 support ever arrives that it will take ages, since its been mostly rewritten, but I'd love to see 1.12.2 support.
Anyone know how to create a script that has a variable (number) and when you press the up key it +1 to the var and down key -1 to the var. L will show the score and P will reset it to 0. Please help thanks!
Anyone know how to create a script that has a variable (number) and when you press the up key it +1 to the var and down key -1 to the var. L will show the score and P will reset it to 0. Please help thanks!
But if KEYNAME is MWHEELDOWN that means that the macro was triggered by the mouse wheel event, but because mouse wheel events are momentary it's thus very unlikely that the MWHEELDOWN will still be down when reaching that line in the macro.
Macros snapshots all keys pressed at the time the macro is triggered and these states can be accessed by prefixing the state variable with tilde:
IF(~MWHEELDOWN);LOG("Mouse wheel was down when macro was triggered");ENDIF
So maybe give that a try if you're trying to access the state of the key which triggered the macro. Accessing the state of the "key" may not work though, because the mouse wheel events are pulses and it may be difficult to observe the actual key down state within a macro.
The thing is I've already tried this with other keys and it works.. Plus using the code you gave me crashed my game for some reason.
I'm pretty sure its not in the environmental variables of the mod, you see i ran this code:
Anyone know how to create a script that has a variable (number) and when you press the up key it +1 to the var and down key -1 to the var. L will show the score and P will reset it to 0. Please help thanks!
Arguably a simpler solution is to have four scripts
Key_up:
$${Inc(@#score);}$$
Quick question: Can I find the XPOS and ZPOS (x coords and z coords) of the player at different points in time while the script is running?
Like, if the script was about walking, could I find the XPOS of the player at the start of the script, use that value at some point, and then find the XPOS of the player again later on in the script and use the NEW XPOS value?
Another attempt at explaining:
Would you be able to find the exact value of XPOS at the brick block (start), use that value, and then find a new value for XPOS at the sponge block and use that new value from the sponge in the script?
Quick question: Can I find the XPOS and ZPOS (x coords and z coords) of the player at different points in time while the script is running?
Like, if the script was about walking, could I find the XPOS of the player at the start of the script, use that value at some point, and then find the XPOS of the player again later on in the script and use the NEW XPOS value?
Another attempt at explaining:
Would you be able to find the exact value of XPOS at the brick block (start), use that value, and then find a new value for XPOS at the sponge block and use that new value from the sponge in the script?
Whenever you read XPOS/YPOS/ZPOS, it contains the current position, not the position when the script was started
Simply put those values in a variable if you need to use them later
$${
#x1=XPOS;
#z1=ZPOS;
Whenever you read XPOS/YPOS/ZPOS, it contains the current position, not the position when the script was started
Simply put those values in a variable if you need to use them later
$${
#x1=XPOS;
#z1=ZPOS;
Log("Saved position 1")
Wait(5);
#x2=XPOS;
#z2=ZPOS;
Log("Saved position 2")
Wait(5);
#x3=XPOS;
#z3=ZPOS;
Log("Saved position 3")
Log("Saved positions are");
Log("%#x1% %#y1%");
Log("%#x2% %#y2%");
Log("%#x3% %#y3%");
}$$
Thank you so, so much. I was struggling with this for almost two days 🙏
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
Thanks guys for helping me out few years ago!
Now I am busy with another script. I want to cast a command with echo(/command) with keycombo's and rapid succession. Any way how to do that? Like the skillapi plugin. I would imagine it going a little like:
If Leftclick, < 100 ms leftclick , < 100 ms rightclick, < 100 ms rightclick, < 100 ms sneak, < 100 ms "m" key
do
echo(/cast earthquake)
or something like that.
How would I do this and to what trigger would I set this?
Looking for a script that replaces the tool (pickaxe) with another tool (pickaxe) when the durability is at under 5.
Currently there is this that I found on the internet:
${
IF(DURABILITY < 2);
LOG("This item only has %DURABILITY% durability remaining!!");
PICK(0);
IF(ITEM=0);
LOG("Swapped items to prevent item breakage.");
key(use);
ELSE;
LOG("Warning - opening inventory to prevent usage!");
GUI(inventory);
ENDIF;
ELSEIF(DURABILITY < 20);
LOG("This item only has %DURABILITY% durability left!");
ENDIF;
}$
but this opens the inventory when it's belove 2 durability, but I want it to replace the low durability tool (pickaxe) with another tool (pickaxe)
Inventory Tweaks mod would be a better option, but this is totally possible with macros mod, a very simple version would be to put this is OnDurabilityChange:
You could also write a script that scans your slots until it finds another tool, but that would be long and pointless as there are already mods for that.
Sorry for the double post but just a quick question..
so we got the do ... while(conditions) structure but do we have while(conditions) ... structure as well? the former runs the code at least once which is unwanted at certain circumstances..
Another important question for @Mumfrey, Why the hell can't i edit some GUI properties like icons?
I used Setproperty(GUIname,icon,"minecraft:grass") and it didn't work.. problem occurs for some other properties as well.
Works perfectly fine with properties like background color and visibility so.. somethings wrong here; I suggest a complete overhaul of whatever function checks the validity of the setproperty command to avoid future mistakes as well.
PS i get the property names from here:Path\To\Roaming\.minecraft\liteconfig\common\macros\.gui
I've been having this issue recently when I decided I finally needed to go through and clean up my configs, since I have a bunch of them that I don't use/need anymore. But when I click on the red X in the Config drop down, it doesn't delete the config, so I have to go into the file and remove them manually.
Am I doing something wrong/have a setting setup wrong?
For some reason there're no environmental variables for mouse scroll keys? I couldn't find them in the mod's variables and when i tried to use the name from the key binding screen it didn't work:
Could this be fixed please @Mumfrey
I too have seen a problem with using the mouse scroll key that wasn't there initially.
This worked with the scroll switch until recently (1.3 upgrades):
/pick|/refill
It now does nothing as written.
Adding a CTRL to the macro makes it work.
Not a major problem, more of a gee-whiz for Mr. M.
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf
But if KEYNAME is MWHEELDOWN that means that the macro was triggered by the mouse wheel event, but because mouse wheel events are momentary it's thus very unlikely that the MWHEELDOWN will still be down when reaching that line in the macro.
Macros snapshots all keys pressed at the time the macro is triggered and these states can be accessed by prefixing the state variable with tilde:
So maybe give that a try if you're trying to access the state of the key which triggered the macro. Accessing the state of the "key" may not work though, because the mouse wheel events are pulses and it may be difficult to observe the actual key down state within a macro.
Just download and use the 1.12.1. It works.
Edit:
Source: https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1275039-macro-keybind-mod?comment=16855
GoogleFoo: Enter this into google and look thru results: 1.12.2 site:minecraftforum.net inurl:1275039
---------------
Join the Macro/Keybind mod Discord
>> http://discord.me/Macromod <<
---------------
Hello,
Anyone know how to create a script that has a variable (number) and when you press the up key it +1 to the var and down key -1 to the var. L will show the score and P will reset it to 0. Please help thanks!
The thing is I've already tried this with other keys and it works.. Plus using the code you gave me crashed my game for some reason.
I'm pretty sure its not in the environmental variables of the mod, you see i ran this code:
And this was the output
ALT
AMBIENTVOLUME
ARMOUR
ATTACKPOWER
ATTACKSPEED
BIOME
BLOCKVOLUME
BOOTSDAMAGE
BOOTSDURABILITY
BOOTSID
BOOTSNAME
BOWCHARGE
CAMERA
CANFLY
CARDINALYAW
CHESTPLATEDAMAGE
CHESTPLATEDURABILITY
CHESTPLATEID
CHESTPLATENAME
CHUNKUPDATES
CONFIG
CONTAINERSLOTS
COOLDOWN
CTRL
DATE
DATETIME
DAY
DAYTICKS
DAYTIME
DIFFICULTY
DIMENSION
DIRECTION
DISPLAYHEIGHT
DISPLAYNAME
DISPLAYWIDTH
DURABILITY
FLYING
FOV
FPS
GAMEMODE
GAMMA
GUI
HEALTH
HELMDAMAGE
HELMDURABILITY
HELMID
HELMNAME
HIT
HITDATA
HITID
HITNAME
HITPROGRESS
HITSIDE
HITUUID
HITX
HITY
HITZ
HIT_AGE
HIT_ATTACHED
HIT_AXIS
HIT_BITES
HIT_CHECK_DECAY
HIT_COLOR
HIT_CONDITIONAL
HIT_CONTENTS
HIT_DAMAGE
HIT_DECAYABLE
HIT_DELAY
HIT_DISARMED
HIT_DOWN
HIT_EAST
HIT_ENABLED
HIT_EXPLODE
HIT_EXTENDED
HIT_EYE
HIT_FACING
HIT_HALF
HIT_HAS_BOTTLE_0
HIT_HAS_BOTTLE_1
HIT_HAS_BOTTLE_2
HIT_HAS_RECORD
HIT_HINGE
HIT_IN_WALL
HIT_LAYERS
HIT_LEGACY_DATA
HIT_LEVEL
HIT_LOCKED
HIT_MODE
HIT_MOISTURE
HIT_NODROP
HIT_NORTH
HIT_OCCUPIED
HIT_OPEN
HIT_PART
HIT_POWER
HIT_POWERED
HIT_ROTATION
HIT_SEAMLESS
HIT_SHAPE
HIT_SHORT
HIT_SNOWY
HIT_SOUTH
HIT_STAGE
HIT_TRIGGERED
HIT_TYPE
HIT_UP
HIT_VARIANT
HIT_WEST
HIT_WET
HOSTILEVOLUME
HUNGER
INVSLOT
ITEM
ITEMCODE
ITEMDAMAGE
ITEMIDDMG
ITEMNAME
ITEMUS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MICOLON
KEY_SLASH
KEY_SLEEP
KEY_SPACE
KEY_STOP
KEY_SUBTRACT
KEY_SYSRQ
KEY_T
KEY_TAB
KEY_U
KEY_UNDERLINE
KEY_UNLABELED
KEY_UP
KEY_V
KEY_W
KEY_X
KEY_Y
KEY_YEN
KEY_Z
LEGGINGSDAMAGE
LEGGINGSDURABILITY
LEGGINGSID
LEGGINGSNAME
LEVEL
LIGHT
LMOUSE
LOCALDIFFICULTY
MAINHANDCOOLDOWN
MAINHANDDURABILITY
MAINHANDITEM
MAINHANDITEMCODE
MAINHANDITEMDAMAGE
MAINHANDITEMIDDMG
MAINHANDITEMNAME
MAINHANDSTACKSIZE
MAXPLAYERS
MIDDLEMOUSE
MODE
MUSIC
NEUTRALVOLUME
OFFHANDCOOLDOWN
OFFHANDDURABILITY
OFFHANDITEM
OFFHANDITEMCODE
OFFHANDITEMDAMAGE
OFFHANDITEMIDDMG
OFFHANDITEMNAME
OFFHANDSTACKSIZE
ONLINEPLAYERS
OXYGEN
PITCH
PLAYER
PLAYERVOLUME
RAIN
RECORDVOLUME
RESOURCEPACKS
RMOUSE
SATURATION
SCREEN
SCREENNAME
SEED
SENSITIVITY
SERVER
SERVERMOTD
SERVERNAME
SHADERGROUP
SHIFT
SOUND
STACKSIZE
TICKS
TIME
TIMESTAMP
TOTALTICKS
TOTALXP
UNIQUEID
UUID
VEHICLE
VEHICLEHEALTH
WEATHERVOLUME
XP
XPOS
XPOSF
YAW
YPOS
YPOSF
ZPOS
ZPOSF
~ALT
~CTRL
~KEY_0
~KEY_1
~KEY_2
~KEY_3
~KEY_4
~KEY_5
~KEY_6
~KEY_7
~KEY_8
~KEY_9
~KEY_A
~KEY_ADD
~KEY_APOSTROPHE
~KEY_APPS
~KEY_AT
~KEY_AX
~KEY_B
~KEY_BACK
~KEY_BACKSLASH
~KEY_C
~KEY_CAPITAL
~KEY_CIRCUMFLEX
~KEY_CLEAR
~KEY_COLON
~KEY_COMMA
~KEY_CONVERT
~KEY_D
~K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_Y
~KEY_YEN
~KEY_Z
~LMOUSE
~MIDDLEMOUSE
~RMOUSE
~SHIFT
As you can see no sign of Mouse wheels anywhere(MOUSE3 and MOUSE4 are different)
Oh and might i ask for more info on what the tilde prefix does? I've tried another example with and without it and got the same results:
Thanks for taking time to read, This mod is awesome.
Arguably a simpler solution is to have four scripts
Key_up:
$${Inc(@#score);}$$
Key_down:
$${Dec(@#score);}$$
P:
$${@#score=0;}$$
L:
$${Log(%@#score%);}$$
'Cause tomorrow spring is here
This is amazing I love how simple everything is now! but I can't find out how to take certain things out of chests. Plese help.
You'll want to use the SLOTCLICK command. If you go into Settings, you turn on: "Show slot ID's in containers" to see what slot is what slot ID.
When in a double chest the following will SHIFT CLICK on the item in the first slot.
SLOTCLICK(0,LMOUSE,true)
Hope that gets you started.
---------------
Join the Macro/Keybind mod Discord
>> http://discord.me/Macromod <<
---------------
Thank you for the quick reply :D.....My situation is a little more complicated. Can I DM you on discord? I'm Mr. Legendary
Quick question: Can I find the XPOS and ZPOS (x coords and z coords) of the player at different points in time while the script is running?
Like, if the script was about walking, could I find the XPOS of the player at the start of the script, use that value at some point, and then find the XPOS of the player again later on in the script and use the NEW XPOS value?
Another attempt at explaining:
Would you be able to find the exact value of XPOS at the brick block (start), use that value, and then find a new value for XPOS at the sponge block and use that new value from the sponge in the script?
Praise the Sun! \[T]/
Whenever you read XPOS/YPOS/ZPOS, it contains the current position, not the position when the script was started
Simply put those values in a variable if you need to use them later
$${
#x1=XPOS;
#z1=ZPOS;
Log("Saved position 1")
Wait(5);
#x2=XPOS;
#z2=ZPOS;
Log("Saved position 2")
Wait(5);
#x3=XPOS;
#z3=ZPOS;
Log("Saved position 3")
Log("Saved positions are");
Log("%#x1% %#y1%");
Log("%#x2% %#y2%");
Log("%#x3% %#y3%");
}$$
'Cause tomorrow spring is here
Thank you so, so much. I was struggling with this for almost two days 🙏
Praise the Sun! \[T]/
Thanks guys for helping me out few years ago!
Now I am busy with another script. I want to cast a command with echo(/command) with keycombo's and rapid succession. Any way how to do that? Like the skillapi plugin. I would imagine it going a little like:
If Leftclick, < 100 ms leftclick , < 100 ms rightclick, < 100 ms rightclick, < 100 ms sneak, < 100 ms "m" key
do
echo(/cast earthquake)
or something like that.
How would I do this and to what trigger would I set this?
Thanks in advance!
[SSSS]
Are you sure you're not looking for InventoryTweaks?
Inventory Tweaks mod would be a better option, but this is totally possible with macros mod, a very simple version would be to put this is OnDurabilityChange:
where you can change 2 to any slot you want.
You could also write a script that scans your slots until it finds another tool, but that would be long and pointless as there are already mods for that.
Sorry for the double post but just a quick question..
so we got the do ... while(conditions) structure but do we have while(conditions) ... structure as well? the former runs the code at least once which is unwanted at certain circumstances..
Another important question for @Mumfrey, Why the hell can't i edit some GUI properties like icons?
I used Setproperty(GUIname,icon,"minecraft:grass") and it didn't work.. problem occurs for some other properties as well.
Works perfectly fine with properties like background color and visibility so.. somethings wrong here; I suggest a complete overhaul of whatever function checks the validity of the setproperty command to avoid future mistakes as well.
PS i get the property names from here:Path\To\Roaming\.minecraft\liteconfig\common\macros\.gui
Because the author of the mod is the author of the mod loader LiteLoader. The two are compatible and can be installed together. Here for instructions: https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1290155-liteloader
---------------
Join the Macro/Keybind mod Discord
>> http://discord.me/Macromod <<
---------------
I've been having this issue recently when I decided I finally needed to go through and clean up my configs, since I have a bunch of them that I don't use/need anymore. But when I click on the red X in the Config drop down, it doesn't delete the config, so I have to go into the file and remove them manually.
Am I doing something wrong/have a setting setup wrong?