I managed to use the /speed command with a slider from 1 to 100 1 being 0.1 and 100 being 10.0, took a bit of work but works out great. Shame the mod doesn't support float values even tho XPOSF is a float. I basically turned a float into a 2 dimension array [0] is before the dot and [1] is after
It will not save Icons for homes in the macro. I have tried reinstalling and using other versions; all have the same results. Here is the homes.txt file when I make a new home: (the bottom is new)
IFMATCHES(%&variable%,"^(example|test)$"); //Does it though?
IFMATCHES(%&terminal%,"stuff|example");
that works but it would also also be true for a variable like "somestuff" because that contains the phrase "stuff". So to prevent that you'll have to do this:
that works but it would also also be true for a variable like "somestuff" because that contains the phrase "stuff". So to prevent that you'll have to do this:
-----
Also, I think having only one = sign works too. Is that true?
if you want [\s\S] on either side (Why?), you can just put it outside the selection like i did with the anchors
IFMATCHES(%&terminal%,"[\s\S]+(stuff|example)[\s\S]+");
But if we're assuming that the variable is exactly the word with nothing more, we can just use anchors there, no need to get overly complicated
IFMATCHES(%&terminal%,"^(stuff|example)$");
Note that the ^ and $ metacharacters mean "start of string" and "end of string" respectively!
----
Yes, i believe it works either way (?) - it definitely works with one though
I managed to use the /speed command with a slider from 1 to 100 1 being 0.1 and 100 being 10.0, took a bit of work but works out great. Shame the mod doesn't support float values even tho XPOSF is a float. I basically turned a float into a 2 dimension array [0] is before the dot and [1] is after
I use MC 1.7.10 for I am using not updated mods I love. I try to write some macros using Macro-Keybind which call WorldEdit through commands like "echo(//expand 2 s)". That works fine but I am annoyed by messages WorldEdit generates. Is it any way not to display such messages? I have try CHATFILTER and what I think I have understood about but nothing works. Even statements like "&chat=%CHAT%" don't (&chat is "").
I use single player mode.
Help me please.
Clovis9999
What you need to do for the "&chat=..." stuff if you really want to, is to use SET.
A bit of detail about how events and their respective variables work
Most events are fire and forget - something happens, the game handles it, and it also runs your script with all of the relevant facts (as environment variables) so you can handle it as well.
Note that the game does not wait for your script and the facts are read-only
For example suppose an onPlayerJoin script such as
${Wait(10);Log("Script: %PLAYERJOINED%");}$
A timeline of events might look like this
Note that even if we could edit the JOINEDPLAYER variable (We can't) - we still couldn't change what is displayed on screen and on the scoreboard because by the time our script is run, those things will have already updated.
We can't change the past
A similar thing happens with onChat - the CHAT environment variable isn't the message displayed *right now* - it's just the message that triggered this script
(indeed you could put a Wait(60) in your script and CHAT would still not change despite how many other messages you receive)
However, the Chat Filter DOES wait for your script to finish - which can delay messages if your script takes a while to finish - but it means you can prevent the message from appearing on screen in the first place (or change it before it does)
To do this, you have three additional commands in a Chat Filter script - MODIFY(value), PASS(), and FILTER()
By default, when your script finishes, the game will handle the incoming message normally by displaying it
If your script has called FILTER(), it will instead ignore the message and do nothing
If your script has called Pass(), it will again handle the message normally
If your script has called MODIFY(value), it will display "value" instead of the received message
If you use several of those, the last one you called takes precedence (IIRC)
For example, here's what might happen with a chat filter script like:
since basically any language supports == this would be the best/shortest
anyway regex is fine as long as you know how ... I would suggest you to use ifmatches only if you know for sure what you are doing since regex gets quite komplex when you use it the wrong way
since basically any language supports == this would be the best/shortest
anyway regex is fine as long as you know how ... I would suggest you to use ifmatches only if you know for sure what you are doing since regex gets quite komplex when you use it the wrong way
~ spthiel
Google + practice has given me the basic skills necessary, I've made a long ass Chat Filter script that uses IFMATCHES a few months back and have been adding to it/editing it ever since
@Joel
if((&variable == "example" )||( &variable == test)) //it has to be if!
log(true)
endif
$${setproperty(stafflist,background,#00000001)}$$
$${setproperty(stafflist,colour,#00000001)}$$
@Zath I actually don't know why
IFMATCHES(%&variable%,"^(example|test)$"); //Does it though?
'Cause tomorrow spring is here
I managed to use the /speed command with a slider from 1 to 100 1 being 0.1 and 100 being 10.0, took a bit of work but works out great. Shame the mod doesn't support float values even tho XPOSF is a float. I basically turned a float into a 2 dimension array [0] is before the dot and [1] is after
https://i.gyazo.com/daed23c64485020eb4691f6b29b4b2c8.mp4
It will not save Icons for homes in the macro. I have tried reinstalling and using other versions; all have the same results. Here is the homes.txt file when I make a new home: (the bottom is new)
But next time I start MC it removes the number and sets it to zero. When i try and edit one with the icon set to zero minecraft crashes.
If anyone can figure out why it is doing this lemme know!
I have optifine, dynamicsurrounds unofficial and tabbychat along side with macrokeybind. Thanks!
-Lukaka of landb.serv.nu
Good news @Zath I found your error!
It's actually quite simpel:
you put the wait infront of the match however &chat will update everytime you receive a message.
Since you'll receive a message within 3.36 annd 7.62 seconds after the reaction message showed it can't match the word anymore
So if you want to get it working again put the wait behind the match and you are basically done
What I ment with the code & pre stuff:
I think you are using the 'insert code' button (wich converts to [ code ]code [ code ]) however you should use [ pre ]code[ pre ] (without spaces)
Codetag:
Pretag
[/pre]
IFMATCHES(%&terminal%,"stuff|example");
that works but it would also also be true for a variable like "somestuff" because that contains the phrase "stuff". So to prevent that you'll have to do this:
IFMATCHES(%&terminal%,"[\s\S]+stuff[\s\S]+|[\s\S]+example[\s\S]+");
ELSE
IFMATCHES(%&terminal%,"stuff|example");
But at that point I might as well just copy and paste the whole script twice, one with IF(%&terminal%,"stuff"); and another with "example".
BUT,
with @SPThiel's new clarification, I now know that this should work (I haven't tested)
IF((%&terminal% == "stuff")||(%&terminal% == "example"));
-----
Also, I think having only one = sign works too. Is that true?
Some CloudClient dude. Also some CloudPack dude.
if you want [\s\S] on either side (Why?), you can just put it outside the selection like i did with the anchors
IFMATCHES(%&terminal%,"[\s\S]+(stuff|example)[\s\S]+");
But if we're assuming that the variable is exactly the word with nothing more, we can just use anchors there, no need to get overly complicated
IFMATCHES(%&terminal%,"^(stuff|example)$");
Note that the ^ and $ metacharacters mean "start of string" and "end of string" respectively!
----
Yes, i believe it works either way (?) - it definitely works with one though
'Cause tomorrow spring is here
How did you do that that?
Some CloudClient dude. Also some CloudPack dude.
What you need to do for the "&chat=..." stuff if you really want to, is to use SET.
But there's a better way, use IFMATCHES.
Some CloudClient dude. Also some CloudPack dude.
A bit of detail about how events and their respective variables work
Most events are fire and forget - something happens, the game handles it, and it also runs your script with all of the relevant facts (as environment variables) so you can handle it as well.
Note that the game does not wait for your script and the facts are read-only
For example suppose an onPlayerJoin script such as
${Wait(10);Log("Script: %PLAYERJOINED%");}$
A timeline of events might look like this
Note that even if we could edit the JOINEDPLAYER variable (We can't) - we still couldn't change what is displayed on screen and on the scoreboard because by the time our script is run, those things will have already updated.
We can't change the past
A similar thing happens with onChat - the CHAT environment variable isn't the message displayed *right now* - it's just the message that triggered this script
(indeed you could put a Wait(60) in your script and CHAT would still not change despite how many other messages you receive)
However, the Chat Filter DOES wait for your script to finish - which can delay messages if your script takes a while to finish - but it means you can prevent the message from appearing on screen in the first place (or change it before it does)
To do this, you have three additional commands in a Chat Filter script - MODIFY(value), PASS(), and FILTER()
By default, when your script finishes, the game will handle the incoming message normally by displaying it
If your script has called FILTER(), it will instead ignore the message and do nothing
If your script has called Pass(), it will again handle the message normally
If your script has called MODIFY(value), it will display "value" instead of the received message
If you use several of those, the last one you called takes precedence (IIRC)
For example, here's what might happen with a chat filter script like:
${
IFMATCHES(%CHAT%,"wait");
Wait(5);ENDIF;
IFMATCHES(%CHAT%,"filter");
FILTER();ENDIF;
IFMATCHES(%CHAT%,"pass");
PASS();ENDIF;
IFMATCHES(%CHAT%,"modify");
MODIFY("lol");ENDIF;
}$
'Cause tomorrow spring is here
@Joel
IF((%&terminal% == "stuff")||(%&terminal% == "example"));
it works , but is not quite good
IF((%&terminal% = "stuff")||(%&terminal% = "example"));
works too, but please please please don't learn it this way
IF((&terminal == "stuff")||(&terminal == "example"));
since basically any language supports == this would be the best/shortest
anyway regex is fine as long as you know how ... I would suggest you to use ifmatches only if you know for sure what you are doing since regex gets quite komplex when you use it the wrong way
~ spthiel
@Joel
IF((%&terminal% == "stuff")||(%&terminal% == "example"));
it works , but is not quite good
IF((%&terminal% = "stuff")||(%&terminal% = "example"));
works too, but please please please don't learn it this way
IF((&terminal == "stuff")||(&terminal == "example"));
since basically any language supports == this would be the best/shortest
anyway regex is fine as long as you know how ... I would suggest you to use ifmatches only if you know for sure what you are doing since regex gets quite komplex when you use it the wrong way
~ spthiel
Google + practice has given me the basic skills necessary, I've made a long ass Chat Filter script that uses IFMATCHES a few months back and have been adding to it/editing it ever since
Some CloudClient dude. Also some CloudPack dude.
Here's the code.
Here's the gui
Well I think following code will work too, @Im_Papa:
Holy damn that GUI is complex to me, some person with no official coding knowledge. Where do you paste all that GUI code into?
Some CloudClient dude. Also some CloudPack dude.
Yeah I wrote that code before I even knew arrays were a thing in the mod and i couldnt be asked to change it since it worked
in the .gui file
Hey guys, it might be a stupid question but is there a variable I can use like foreach(onlineplayers) to check who is online?
@Im_Papa yes it's basically what you wrote just foreach(players) you then get the playername with %PLAYERNAME%
~ spthiel