Hey mumphrey, I'm on macros 1.11.2's older version (latest version has an issue with the text editor's slider, so I reverted). I was wondering if the following behaviour was intended (documentation states that FILTER is supposed to terminate), and if there's a way to work around it:
Say there was a chat message "1". I wish for the chat filter script to end after the first FILTER, as my chat filter script is rather long and starts to lag me by running unnecessary tests. Yet, the following code still logs both "text1" and "text2", meaning the script appears to not terminate. I understand that "text3" will not log, because FILTER still somewhat terminates. My understanding of "terminate" is that the entire chat filter instance for that particular chat message will stop running, similar to STOP in a txt file.
Is there a way to not run the second IFMATCHES test altogether, if the chat message already gets filtered? (I understand that "[12]" simple regex would work, but the above code is just to demonstrate the issue. I actually have a bunch more different IFMATCHES tests that cannot be simply combined into a single test.)
Hey mumphrey, I'm on macros 1.11.2's older version (latest version has an issue with the text editor's slider, so I reverted). I was wondering if the following behaviour was intended (documentation states that FILTER is supposed to terminate), and if there's a way to work around it:
Say there was a chat message "1". I wish for the chat filter script to end after the first FILTER, as my chat filter script is rather long and starts to lag me by running unnecessary tests. Yet, the following code still logs both "text1" and "text2", meaning the script appears to not terminate. I understand that "text3" will not log, because FILTER still somewhat terminates. My understanding of "terminate" is that the entire chat filter instance for that particular chat message will stop running, similar to STOP in a txt file.
Is there a way to not run the second IFMATCHES test altogether, if the chat message already gets filtered? (I understand that "[12]" simple regex would work, but the above code is just to demonstrate the issue. I actually have a bunch more different IFMATCHES tests that cannot be simply combined into a single test.)
Where #perca would end up something like 0.5 and then #percax would be 50 (percent).
I had to use #perca to temporarily hold the value after the first division because "#percax = HELMDURABILITY / HELMDAMAGE * 100" doesn't appear to work.
Hey there, I realised that putting a semicolon anywhere inside a command will cause the command to cease functionality.
For example, this command here for replacing all semicolons with 0:
replace(&chat,;,0)
will break and act like this incomplete command, thus not working:
replace(&chat,;
Is it possible to use semicolons in commands through some form of workaround? Because similarly, attempting to log anything with a semicolon inside breaks the command.
if(CHATCLEAN == "<cloud7050> test") //best way to do
if(%CHATCLEAN% == "<cloud7050> test") //works to
if(%CHATCLEAN% = "<cloud7050> test") //also works
if(CHATCLEAN = "<cloud7050> test") //I think this works too, don't know though
the thing is, if there's a leading space or if the text ends with a space this won't work.
You can test that if you do
ifmatches(%CHATCLEAN%,"^<cloud7050> test$")
if this is false there's a space somewhere
Strangely, the four ways to use IF that you said should work, don't work in the chat filter. However, the IFMATCHES that you brought up using ^$ was exactly what I needed (just tried it, it worked for "test" but not "testing"). Thanks!
The only way I managed to make it work was with IFMATCHES:
ifmatches(%CHATCLEAN%,"<cloud7050> test")
But this meant "<cloud7050> testing" would also return positive results as the word "testing" contains "test". So I had to do this which is inconvenient as it required more code for each test:
Anyone else having the same issue or knows if this affects? I have macros 1.11 with optifine 1.11 added as a forge mod, but my optifine cape doesn't show up. It used to on macros 1.8.
Still stuck on this, any help would be much appreciated!
Hey I was wondering how to divide a number (including big numbers). I know a way to do this would be to minus the denominator each time till the value is < the denominator, to obtain a remainder, but for big numbers that's very slow so I was wondering how to do something like this:
#number is 13, I wish to divide it by 3. How would I obtain 4 as the answer and 1 as the remainder?
Hey I was wondering how to divide a number (including big numbers). I know a way to do this would be to minus the denominator each time till the value is < the denominator, to obtain a remainder, but for big numbers that's very slow so I was wondering how to do something like this:
#number is 13, I wish to divide it by 3. How would I obtain 4 as the answer and 1 as the remainder?
Still stuck on this, any help would be much appreciated!
Could anyone help me with chat filter? How can I achieve that when I type anything in chat it'll use a color code by default and I don't have to type the color code every time? Tried it with "OnChat" but that didn't work. I don't want to have a macro coming up every time I want to type something.
OnSendChatMessage or something like that is what you need to modify chat packets I believe. onchat and chat filter only filter what has already been sent, just that one acts before the message shows and the other acts after the message shows.
Hey I was wondering how to divide a number (including big numbers). I know a way to do this would be to minus the denominator each time till the value is < the denominator, to obtain a remainder, but for big numbers that's very slow so I was wondering how to do something like this:
#number is 13, I wish to divide it by 3. How would I obtain 4 as the answer and 1 as the remainder?
1
Glad to have you back, just logging in after ages to express my support. It is truly unfortunate what has transpired while you were away...
Left a reply on Vattic's associated Reddit thread with links to relevant resources: https://www.reddit.com/r/Minecraft/comments/riv4tf/comment/hpkejbe/
0
0
Hey mumphrey, I'm on macros 1.11.2's older version (latest version has an issue with the text editor's slider, so I reverted). I was wondering if the following behaviour was intended (documentation states that FILTER is supposed to terminate), and if there's a way to work around it:
Say there was a chat message "1". I wish for the chat filter script to end after the first FILTER, as my chat filter script is rather long and starts to lag me by running unnecessary tests. Yet, the following code still logs both "text1" and "text2", meaning the script appears to not terminate. I understand that "text3" will not log, because FILTER still somewhat terminates. My understanding of "terminate" is that the entire chat filter instance for that particular chat message will stop running, similar to STOP in a txt file.
Is there a way to not run the second IFMATCHES test altogether, if the chat message already gets filtered? (I understand that "[12]" simple regex would work, but the above code is just to demonstrate the issue. I actually have a bunch more different IFMATCHES tests that cannot be simply combined into a single test.)
0
Hey there, I was wondering if there was a way to do non-integer calculations in the macros mod? Eg, to get a percentage.
Where #perca would end up something like 0.5 and then #percax would be 50 (percent).
I had to use #perca to temporarily hold the value after the first division because "#percax = HELMDURABILITY / HELMDAMAGE * 100" doesn't appear to work.
0
Thank you so much!
0
Hey there, is it possible to test for symbols in the chat filter, such as ♦?
0
Hey there, I realised that putting a semicolon anywhere inside a command will cause the command to cease functionality.
For example, this command here for replacing all semicolons with 0:
replace(&chat,;,0)
will break and act like this incomplete command, thus not working:
replace(&chat,;
Is it possible to use semicolons in commands through some form of workaround? Because similarly, attempting to log anything with a semicolon inside breaks the command.
0
Hey there, is there a way to "transfer" array data?
For example, &local[] consists of:
&local[0] being 1
&local[1] being 2
How would I transfer this data into @&global[], such that:
@&global[0] is 1
@&global[1] is 2
0
Strangely, the four ways to use IF that you said should work, don't work in the chat filter. However, the IFMATCHES that you brought up using ^$ was exactly what I needed (just tried it, it worked for "test" but not "testing"). Thanks!
0
Hey there, I've tried experimenting with a variety of onChat IF tests and I can't get it to work. I've tried:
However unfortunately none of these worked.
The only way I managed to make it work was with IFMATCHES:
But this meant "<cloud7050> testing" would also return positive results as the word "testing" contains "test". So I had to do this which is inconvenient as it required more code for each test:
Any help with getting IF to work would be much appreciated. Thanks in advance!
0
Anyone else having the same issue or knows if this affects? I have macros 1.11 with optifine 1.11 added as a forge mod, but my optifine cape doesn't show up. It used to on macros 1.8.
0
Yeah still stuck
0
Still stuck on this, any help would be much appreciated!
0
OnSendChatMessage or something like that is what you need to modify chat packets I believe. onchat and chat filter only filter what has already been sent, just that one acts before the message shows and the other acts after the message shows.
0
Hey I was wondering how to divide a number (including big numbers). I know a way to do this would be to minus the denominator each time till the value is < the denominator, to obtain a remainder, but for big numbers that's very slow so I was wondering how to do something like this:
#number is 13, I wish to divide it by 3. How would I obtain 4 as the answer and 1 as the remainder?