Could somone please explain iterators and how to use them, im looking for a way to read all potion effects, and if i have something like poison, do something, i think iterators is the way to go but im not sure, but iterators would be fun it figure out
Hey Mumfrey, It looks like Not Enough items is causing a memory leak. it could be either, NEI core, NeiPlugins or NEI redpower item set
That's kind of strange, I'll check it out and see if I can find out what's causing that to happen. I've not personally used Not Enough Items so I haven't had personal experience of the issue but I'm assuming you mean that it causes a memory leak when Macros is installed if you're posting here.
Not sure if just me, but using this mod on OSX for me breaks the sound in the game. I have tried everything i can think of, tried f3 and s, tried deleting whole game, reinstalling, sound worked, reinstalled mod with fresh downloads and sound is gone yet again. Please let me know if this is known / there is a fix. Thanks
It's not the mod, it's the archiver in MacOS that causes the issue, instead of merging the "com" folder when installing liteloader it over-writes it! Just back up the "com" folder before installing liteloader and then restore the contents afterwards.
Is there anyone that has this mod thats willing to put their .jar on like mediafire or something for me, i've tried for ages to install this mod even went on youtube and tried with a fresh .jar and i'm really at the point of done. So if anyone can that'd be great.
This is illegal under the Minecraft terms and conditions, it's really not that hard to install if you follow the instructions, what problem are you having? If you really genuinely can't install it, then you can always use The Voxel ModPack which includes it (if you don't want any of the other mods you can just uncheck them when you install, or alternatively get The Voxel ModPack via the Feed The Beast Launcher, which also lets you selectively enable/disable mods after they're installed, so you can choose to keep just macros, or of course install other mods using their launcher (which is based heavily on the same technology that powers MultiMC). But asking for jars, and providing jars is both against the T&C's and against forum rules, so I advise you to not make the request again.
Could somone please explain iterators and how to use them, im looking for a way to read all potion effects, and if i have something like poison, do something, i think iterators is the way to go but im not sure, but iterators would be fun it figure out
Iterators are a way of creating a loop over a certain property set, inside the loop one or more globals are provided that describe the attributes of a single entry in the set. There are currently three named iterators available which are "players" over the players on the server which provides PLAYERNAME for each loop; "enchantements" over the enchantments on the item in hand and provides ENCHANTMENT, ENCHANTMENTNAME and ENCHANTMENTPOWER for each loop; and "effects" over currently active potion effects which provides EFFECT, EFFECTID, EFFECTNAME, EFFECTPOWER and EFFECTTIME.
Here's a simple example that uses the effects iterator to list active potion effects to the console:
Of course you can use an iterator to check for a condition by setting a flag before the foreach and putting a conditional inside the loop. Or you could create a "snapshot" of the iterator values by PUSH()ing them into an array.
Is it possible to use enchantment table slots? I mean when I put the item in the slot on table GUI it should always enchant at level 30 (or the highest value).
Is it possible to use enchantment table slots? I mean when I put the item in the slot on table GUI it should always enchant at level 30 (or the highest value).
Is there a way to change the chat log transparency? I'm trying to disable the chat log, and only show the last chat message in a text area until I want to type a reply, but I can't then turn the transparency off so I can see what I'm typing.
The problem I have is when declaring the array when I login into the server
I don't think that you can mix and match variable types within an array, I think you have to have an all number array or all string array.
If you want to create a number array of #size length every time you run the code:
unset(#array[]);
do(%#size%);
push(#array,0); //Add a bunch of zeros to the array
loop;
arraysize(#array,#var); //Get the size of the array
log(The array size is %#var%);
Good luck, I think mcmmo macros are the most fun to make.
Try using PUSH and ARRAYSIZE without using the [] qualifier, I think I derped and the original array commands don't correctly interpret arrays specified using that syntax.
Also, you will need to use a string array for your cd_type (so prefix with &) and
a counter array for the cd_time (prefix with #) so try:
I think that should work. Basically I added the [] qualifier to places that it would be ambiguous (like in FOREACH and UNSET) but I forgot to go back and add support for it to commands that expect an array, so it's inconsistent right now. Sorry about that.
Nice work with your script though! Sounds pretty clever.
Anyway I found other issue with the code, the timming.
I tried a loop that is executed every 1000ms, but they are not real seconds =( also tried with 20t (ticks) and still is too slow, tried with 19t and yet too slow. I can try-and-err to find a balance, but yet I don't know what will happen if the server experiences lag.
EDIT: Mumphrey, thanks for the fast reply as always, great work, this mod is awesome!
Every stack pop operation (endif,loop,etc) causes the script to pause for 1 game tick, so if you have a loop containing any pops then you need to subtract those from the number of ticks you wait, eg:
DO;
IF(something)
// some stuff
ENDIF; // waits for 1 tick
WAIT(18t);
LOOP; // also a 1 tick wait
I need to know how to make variables, that includes the way to make ints and strings. I need this for a script im making, and cant seem to find the explanation in the read me or the changelogs
Hey Mumfrey - I'm getting an issue when I loadup a client with macro mod, it closes on the mojang screen. Has this happened before to anyone else? Or do you know a solution? I've reinstalled it many times, and found out that the problem comes from macro mod, not liteloader. I've been able to install other mods such as optifine, rei's, etc. Any fix would be much appreciated. My java and gfx drivers are up to date.
Hey Mumfrey - I'm getting an issue when I loadup a client with macro mod, it closes on the mojang screen. Has this happened before to anyone else? Or do you know a solution? I've reinstalled it many times, and found out that the problem comes from macro mod, not liteloader. I've been able to install other mods such as optifine, rei's, etc. Any fix would be much appreciated. My java and gfx drivers are up to date.
you have some security software that is blocking it for some reason, this happened to me and i just clicked allow, and it worked fine
also, to mumfrey or someone else:
im trying to make a large program that runs a certain bit of code when im holding certain items and when im not holding such items it just acts like the normal key (ps:the key its bound to is the mouse button)
so a situation, i click with my item and then i want to eat something, nothing happens because i had to force override any help would be appreciated
im trying to make a large program that runs a certain bit of code when im holding certain items and when im not holding such items it just acts like the normal key (ps:the key its bound to is the mouse button)
so a situation, i click with my item and then i want to eat something, nothing happens because i had to force override any help would be appreciated
I'll make an example with the use key
CONDITIONAL MACRO
CONDITION: <holding your item>
IF TRUE: <your script>
IF FALSE: $${Key(use)}$$
SATURATION doesn't update properly. It only updates when it inreases or drops all down to 0.
Oh, it updates when I take damage, too.
Are you sure?, if you're using onHungerChange it's not supposed to react to saturation changes
i have a label showing me saturation and i see it going down just fine, i'm pretty sure
it would also make sense because the mod doesn't "measure" things, it just shows things the game already measures for you
Edit: you're right, i saw it happen now, sometimes it shows fine, sometimes it doesn't
I need to know how to make variables, that includes the way to make ints and strings. I need this for a script im making, and cant seem to find the explanation in the read me or the changelogs
variables are automatically created as needed
for example, if you were to make a simple script $${Set(&string,potatoes)}$$, it would create the string variable if it doesn't exist
all the commands that can create variables, that i know of, are
Set()
UnSet()
MATCH()
IFMatches()
maybe Inc() and Dec()
#var = #var + 250
Push()
if you haven't seen how variables work yet, they can have letters and numbers in their name, and by default are local booleans
this means they can only have two values, true and false (boolean) and only exist within the same key (local)
other keys can have variables with the same name, but because they're local they're still different variables
prefixes can change variable type
@ makes it global, shared between keys
# for a counter (numbers)
& for a string
always put the global prefix before the type prefix.., i don't think it works well the other way around
@&string, instead of &@string
Volume control for playsound, so it's easier to get the sounds to work well
ability to specify coordinates for the sound to play at, absolute or relative, static in the world or static relative to you (if both are possible)
if easily possible, anyway..., not exactly sure how the sound engine works so =P
--
Offtopic, but do you know how to change the vertical FoV, or if it's possible...
i've been raising it and not looking straight makes everything look really tall, even in the middle of the screen
i presume it's because the vertical FoV is too far off and doesn't match the screen aspect ratio...
I can't find any information on how to change it though, or even where the limitation is
is such a thing possible, or does Java (OpenGL?) not allow it
Is there a variable for the number of players online? Also, I'm trying to run a script that performs a command using every online players name. Would this code work for this?
$${
SET(#place,1)
DO(5) //replace the 5 with the playercount variable (if there is one)
PRESS(T)
WAIT(500ms)
TYPE("$$[Prefix]")
PRESS(SPACE)
DO(%#place%)
WAIT(500ms)
PRESS(TAB)
LOOP
INC(#place)
PRESS(SPACE)
WAIT(500ms)
TYPE("$$[Suffix]")
WAIT(500ms)
PRESS(RETURN)
WAIT(1)
LOOP
}$$
Here's an idea for a feature: being able to send a messege/command while using a already binded key. Example: Pressing Q(Drop) and then a message says "I justed dropped something". Or is this already implemented?
Hello, I'm interested in:
I want to remove the button to open the menu that people would not be able to change binds.
How do I do, where the string with writing a button * ~ (tilde)?
That's kind of strange, I'll check it out and see if I can find out what's causing that to happen. I've not personally used Not Enough Items so I haven't had personal experience of the issue but I'm assuming you mean that it causes a memory leak when Macros is installed if you're posting here.
It's not the mod, it's the archiver in MacOS that causes the issue, instead of merging the "com" folder when installing liteloader it over-writes it! Just back up the "com" folder before installing liteloader and then restore the contents afterwards.
This is not possible yet.
This is illegal under the Minecraft terms and conditions, it's really not that hard to install if you follow the instructions, what problem are you having? If you really genuinely can't install it, then you can always use The Voxel ModPack which includes it (if you don't want any of the other mods you can just uncheck them when you install, or alternatively get The Voxel ModPack via the Feed The Beast Launcher, which also lets you selectively enable/disable mods after they're installed, so you can choose to keep just macros, or of course install other mods using their launcher (which is based heavily on the same technology that powers MultiMC). But asking for jars, and providing jars is both against the T&C's and against forum rules, so I advise you to not make the request again.
Iterators are a way of creating a loop over a certain property set, inside the loop one or more globals are provided that describe the attributes of a single entry in the set. There are currently three named iterators available which are "players" over the players on the server which provides PLAYERNAME for each loop; "enchantements" over the enchantments on the item in hand and provides ENCHANTMENT, ENCHANTMENTNAME and ENCHANTMENTPOWER for each loop; and "effects" over currently active potion effects which provides EFFECT, EFFECTID, EFFECTNAME, EFFECTPOWER and EFFECTTIME.
Here's a simple example that uses the effects iterator to list active potion effects to the console:
Of course you can use an iterator to check for a condition by setting a flag before the foreach and putting a conditional inside the loop. Or you could create a "snapshot" of the iterator values by PUSH()ing them into an array.
Hope that explains it.
http://media-mcw.cursecdn.com/4/49/Enchanting_grid.png
No that's not possible at the moment.
I don't think that you can mix and match variable types within an array, I think you have to have an all number array or all string array.
If you want to create a number array of #size length every time you run the code:
Good luck, I think mcmmo macros are the most fun to make.
Try using PUSH and ARRAYSIZE without using the [] qualifier, I think I derped and the original array commands don't correctly interpret arrays specified using that syntax.
Also, you will need to use a string array for your cd_type (so prefix with &) and
a counter array for the cd_time (prefix with #) so try:
I think that should work. Basically I added the [] qualifier to places that it would be ambiguous (like in FOREACH and UNSET) but I forgot to go back and add support for it to commands that expect an array, so it's inconsistent right now. Sorry about that.
Nice work with your script though! Sounds pretty clever.
Every stack pop operation (endif,loop,etc) causes the script to pause for 1 game tick, so if you have a loop containing any pops then you need to subtract those from the number of ticks you wait, eg:
is a 1 second loop.
you have some security software that is blocking it for some reason, this happened to me and i just clicked allow, and it worked fine
also, to mumfrey or someone else:
im trying to make a large program that runs a certain bit of code when im holding certain items and when im not holding such items it just acts like the normal key (ps:the key its bound to is the mouse button)
so a situation, i click with my item and then i want to eat something, nothing happens because i had to force override any help would be appreciated
on w, bind a key state macro (and tick "always override conflicting key binds")
Key Down: $${KeyDown(forward)}$$
Key Hold: (repeat delay 100ms): $${Sprint()}$$
Key Up: $${KeyUp(forward)}$$
I'll make an example with the use key
CONDITIONAL MACRO
CONDITION: <holding your item>
IF TRUE: <your script>
IF FALSE: $${Key(use)}$$
Are you sure?, if you're using onHungerChange it's not supposed to react to saturation changes
i have a label showing me saturation and i see it going down just fine, i'm pretty sure
it would also make sense because the mod doesn't "measure" things, it just shows things the game already measures for you
Edit: you're right, i saw it happen now, sometimes it shows fine, sometimes it doesn't
variables are automatically created as needed
for example, if you were to make a simple script $${Set(&string,potatoes)}$$, it would create the string variable if it doesn't exist
all the commands that can create variables, that i know of, are
Set()
UnSet()
MATCH()
IFMatches()
maybe Inc() and Dec()
#var = #var + 250
Push()
if you haven't seen how variables work yet, they can have letters and numbers in their name, and by default are local booleans
this means they can only have two values, true and false (boolean) and only exist within the same key (local)
other keys can have variables with the same name, but because they're local they're still different variables
prefixes can change variable type
@ makes it global, shared between keys
# for a counter (numbers)
& for a string
always put the global prefix before the type prefix.., i don't think it works well the other way around
@&string, instead of &@string
any questions? =)
'Cause tomorrow spring is here
nope, that covers everything i needed to know
This doesn't seem to work, i cant eat anything because it isnt holding down the use key :/
My bad...
hmm..., Key state macro?
Key Down: $${IF(holding your item);(your script);ENDIF}$$
Key Hold $${Key(use)}$$ (delay is 1t)
Key Up:
this won't place blocks correctly though, i just remembered someone else tried this earlier...
the only real other option is a background script that constantly runs and checks if you're pressing use and holding an item...
Do()
IF(holding item)
IF(Key_Use?)
ENDIF
ENDIF
Loop
--------
Ideas/questions
Volume control for playsound, so it's easier to get the sounds to work well
ability to specify coordinates for the sound to play at, absolute or relative, static in the world or static relative to you (if both are possible)
if easily possible, anyway..., not exactly sure how the sound engine works so =P
--
Offtopic, but do you know how to change the vertical FoV, or if it's possible...
i've been raising it and not looking straight makes everything look really tall, even in the middle of the screen
i presume it's because the vertical FoV is too far off and doesn't match the screen aspect ratio...
I can't find any information on how to change it though, or even where the limitation is
is such a thing possible, or does Java (OpenGL?) not allow it
'Cause tomorrow spring is here
SET(#place,1)
DO(5) //replace the 5 with the playercount variable (if there is one)
PRESS(T)
WAIT(500ms)
TYPE("$$[Prefix]")
PRESS(SPACE)
DO(%#place%)
WAIT(500ms)
PRESS(TAB)
LOOP
INC(#place)
PRESS(SPACE)
WAIT(500ms)
TYPE("$$[Suffix]")
WAIT(500ms)
PRESS(RETURN)
WAIT(1)
LOOP
}$$
I want to remove the button to open the menu that people would not be able to change binds.
How do I do, where the string with writing a button * ~ (tilde)?