Unless you specify which capturing group you want, it matches the entire pattern
You can specify by including the fourth parameter
MATCH(%&say1%,"<(.*?)>",&say1,1); Or by using the extended MATCH syntax where you give a list of variables, for each capturing group (just one in this case)
MATCH(%&say1%;"<(.*?)>",{&say1});
Also, don't forget to include start and end anchors if you don't want to match from the middle of a larger message
Hello everybody.
Installed a mod for the version of maincraft 1.12.2
If you write a macro in the form:
$${keydown(use);wait(3000ms);keyup(use)}$$
the macro does not work! why?Where is the mistake?
With the command "jump" everything works fine.
$${keydown(jump);wait(3000ms);keyup(jump)}$$
I need to write a command so that the "use" command is executed, for some time, which I will point out.
@Cloud7050
you could either iterate over &local and store everything in @&global or do following:
//put sth you never use in strings
&glue = "-{-}-"
join(%&glue%,&local[],&store)
split(%&glue%,%&store%,@&global[])
@lazarevmike the difference is that use doesn't accept keydown, you can only use key(use) this is due to the way Minecraft handles key inputs
so do sth like
Also, I would like to draw your attention to the shortcoming that I described in this post, namely the lack of new functions in "cmd help", if they are not in the custom localization. For example, in version 0.15.4 a new TOAST command is added. But in the Russian localization (scripting/ru_ru.xml) there is no description of the team yet. As a result, people who play with Russian localization will not see the TOAST command in "Cmd help" in the new version mkb.
I also want to know if it is possible to add support case in parsing regular expressions for russian language? How much I understood ignoring case is included by default, but in russian language it does not work
By the way, while making the translation, I noticed a duplicate line with key repl.console.tasks.line (line 583 and 682)
p.s. Sorry for my bad english. I wrote a post through google translate
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.
@Joel yes that is possible however not that easy
1st go to unicode-table.com
2nd paste your char into the searchbar
3rd copy the unicode number (there should somewhere be sth like U+1234 written, only copy the numbers)
4th
ifmatches(%CHAT%,"\u[Number you got above]")
log("Char is in the String")
endif
For your char:
Unicode-number = U+2666
-> 2666
->
ifmatches(%CHAT%,"\u2666")
log("There's a black diamind suit in the line")
endif
I've been trying to get this script working for ages now, but I just can't get it to work. It's supposed to show you coordinates whenever you die, but it shows your coordinates whenever the GUI changes, unless the GUI changes to NONE. It's bound to onShowGui.
if (GUI == "GUIGAMEOVER");
log("You died at (%XPOS%, %YPOS%, %ZPOS%)");
endif;
Thanks in advance for help
I am not sure if it would work, but have you tried binding to a key, and pressing it after death?
I noticed that pressing the increase/decrease volume button on my in-line headset control causes macro-keybinds mod to open a console which allows you to use stuff like RM. What is the official bind to open that via the keyboard and is there a way to change that bind?
Is there no way to store / call a decimal or float? I'm trying to use direction in a summon macro and I cannot create a decimal vector direction. # Is float, & is string. How does one use decimals?
I know &5$$[chat] is the easiest way but I want to make sure that I can see through all the stuff I typed so I want the other one instead.
There are two ways that I think are easiest to accomplish this, both of which you bind to the letter T:
&5$$!
This will automatically type out the color code for you when you press T, leaving your cursor after the color code so you don't have to do any work other than type your message ;-)
&5$$?
This will automatically input the color code for you, and will prompt you to type an input and press enter before the chat is sent. You won't see the color code here.
Hi, i need to be able to read from a txt. What would you recommend? I know I can write with LOGTO(). I guess theres some way to use EXEC() to read the lines of a file but im not sure how.
Unless you specify which capturing group you want, it matches the entire pattern
You can specify by including the fourth parameter
Also, don't forget to include start and end anchors if you don't want to match from the middle of a larger message
MATCH(%&say1%;"^<(.*?)>$",{&say1});
'Cause tomorrow spring is here
Thank you so much!
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
Some CloudClient dude. Also some CloudPack dude.
Hello everybody.
Installed a mod for the version of maincraft 1.12.2
If you write a macro in the form:
$${keydown(use);wait(3000ms);keyup(use)}$$
the macro does not work! why?Where is the mistake?
With the command "jump" everything works fine.
$${keydown(jump);wait(3000ms);keyup(jump)}$$
I need to write a command so that the "use" command is executed, for some time, which I will point out.
@lazarevmike the difference is that use doesn't accept keydown, you can only use key(use) this is due to the way Minecraft handles key inputs so do sth like
Hello. This is an updated Russian translation for version 0.15.4 - Link to localization archive
Also, I would like to draw your attention to the shortcoming that I described in this post, namely the lack of new functions in "cmd help", if they are not in the custom localization. For example, in version 0.15.4 a new TOAST command is added. But in the Russian localization (scripting/ru_ru.xml) there is no description of the team yet. As a result, people who play with Russian localization will not see the TOAST command in "Cmd help" in the new version mkb.
I also want to know if it is possible to add support case in parsing regular expressions for russian language? How much I understood ignoring case is included by default, but in russian language it does not work
By the way, while making the translation, I noticed a duplicate line with key repl.console.tasks.line (line 583 and 682)
p.s. Sorry for my bad english. I wrote a post through google translate
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.
Some CloudClient dude. Also some CloudPack dude.
@Cloud7050 you should use strings instead of just writing stuff in the editor
"This is how a String looks like"
so you should use
replace(&chat,";",0)
if you want to replace " use
replace(&chat,"\"",0)
(\" will be seen as ")
Thank you.
Prompt a command for search in inventory of fish or meat? to then bind for use during hunger
And how do I disable the console?
It appears when you want to increase or decrease the volume of sound in Windows 7
Hey there, is it possible to test for symbols in the chat filter, such as ♦?
Some CloudClient dude. Also some CloudPack dude.
For your char: Unicode-number = U+2666 -> 2666 ->
Thank you so much!
Some CloudClient dude. Also some CloudPack dude.
I am not sure if it would work, but have you tried binding to a key, and pressing it after death?
I noticed that pressing the increase/decrease volume button on my in-line headset control causes macro-keybinds mod to open a console which allows you to use stuff like RM. What is the official bind to open that via the keyboard and is there a way to change that bind?
Until next time, immediacy.
Is there no way to store / call a decimal or float? I'm trying to use direction in a summon macro and I cannot create a decimal vector direction. # Is float, & is string. How does one use decimals?
Until next time, immediacy.
@Immediacy # is not float, # stores integer it is not really possible to set a float unless you use a ton of scripting power
So there's no way to calculate a decimal?
Until next time, immediacy.
There are two ways that I think are easiest to accomplish this, both of which you bind to the letter T:
&5$$!
This will automatically type out the color code for you when you press T, leaving your cursor after the color code so you don't have to do any work other than type your message ;-)
&5$$?
This will automatically input the color code for you, and will prompt you to type an input and press enter before the chat is sent. You won't see the color code here.
Hi, i need to be able to read from a txt. What would you recommend? I know I can write with LOGTO(). I guess theres some way to use EXEC() to read the lines of a file but im not sure how.
@Squarededs
EXEC() is used to run scripts (in a special way), you can't use it to read textfiles.
There is also no other way of doing this. You may want to install a module