I have tried to use your template (with a few modifications to match the output text) but I probably messed up something. The Progression bar works with the test script you have provided in the first step.
The message that appears on screen is: "Level: <integer> Exp: <float>/<float>"
Example: Level: 10 Exp: 233.0/414.0
I have tried it with this script:
IFMATCHES(%CHAT%,"Level: (\d+) Exp:(\d+)/(\d+)");
MATCH(%CHAT%,"Level: (\d+) Exp:(\d+)/(\d+)",{@#xp_level,@#xp_experience_current,@#xp_experience_max});
Log("Received xp message, current level is %@#xp_level%, current xp is %@#xp_experience_current%/%@#xp_experience_max%");
ENDIF;
Then I realised that since it is a float, I would need a decimal expression. So I tried Googling one.
IFMATCHES(%CHAT%,"Level: (\d+) Exp: (\d+\.?\d*)/(\d+\.?\d*)");
MATCH(%CHAT%,"Level: (\d+) Exp: (\d+\.?\d*)/(\d+\.?\d*)",{@#xp_level,@#xp_experience_current,@#xp_experience_max});
Log("Received xp message, current level is %@#xp_level%, current xp is %@#xp_experience_current%/%@#xp_experience_max%");
ENDIF;
Maybe you know what I did wrong. I really appreciate your help so far. Thank you.
Edit: I have also tried your original script with just typing what you posted it into the chat, that did not work either.
Did the log message appear for any of your tests?
Especially the plain one i posted, i can't really think of anything that would break it..
Did you get the logs? perhaps those might shed some light on what's going on, if the server's messing with our messages somehow
Does it work in singleplayer?
The script is bound to onChat, right? - under the events tab?
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
It was bound OnChat, but I figured it out thanks to you I looked for the 6th time and found out that I set up the script run wrong. $${$$Scriptfile.txt}$$ Instead of $${$$<Scriptfile.txt>}$$
That was really stupid of me. The code you have provided worked. I will try to make mine again tomorrow. I'll keep you posted. Thanks for the help!
The Meaning of Life, the Universe, and Everything.
Join Date:
12/23/2014
Posts:
104
Member Details
Does anyone know if you can have 1 macro activate after another and repeatedly at that? What I am trying to say is have my character look in 1 direction, the after a certain amount of time, look another direction, the after a certain amount of time, look to the direction it began with etc. Does anyone know how to do this?
It was bound OnChat, but I figured it out thanks to you I looked for the 6th time and found out that I set up the script run wrong. $${$$Scriptfile.txt}$$ Instead of $${$$<Scriptfile.txt>}$$
That was really stupid of me. The code you have provided worked. I will try to make mine again tomorrow. I'll keep you posted. Thanks for the help!
Here's something that may help both of you.
Deep in ~/liteconfig/common/macros is .macros.txt. I found a file that Mart3323 was trying to help me with. There was no way I could within macro/keybind create § (ALT21 on an English keyboard). I can write that character directly to that *.txt file. Even better, I can copy and paste Mart3323's written text directly in that macros.txt file. It's a whole bunch easier to copy and paste than to try and duplicate his text.
HTH
Lou
Here's something that may help both of you.
Deep in ~/liteconfig/common/macros is .macros.txt. I found a file that Mart3323 was trying to help me with. There was no way I could within macro/keybind create § (ALT21 on an English keyboard). I can write that character directly to that *.txt file. Even better, I can copy and paste Mart3323's written text directly in that macros.txt file. It's a whole bunch easier to copy and paste than to try and duplicate his text.
HTH
Lou
You can copy paste into both script files as well as every textarea in the game - no need to mess with .macros.txt =P
Does anyone know if you can have 1 macro activate after another and repeatedly at that? What I am trying to say is have my character look in 1 direction, the after a certain amount of time, look another direction, the after a certain amount of time, look to the direction it began with etc. Does anyone know how to do this?
Yes, if you rephrase that a bit
Repeat:
Look one direction
Wait a time
Look another direction
Wait a time
End repeat
For example, say we want to do this a total of 20 times (20 looks in each direction), with a wait time of 5s (total script time 100s), and the directions are 0,0 and 90,0
Do(20);
Look(0.0);
Wait(5);
Look(90,0);
Wait(5);
Loop;
Edit: What fluro said, except 500ms is not 5 seconds, it's 0.5 - and it looks in the original direction for twice as long =P
Does anyone know if you can have 1 macro activate after another and repeatedly at that? What I am trying to say is have my character look in 1 direction, the after a certain amount of time, look another direction, the after a certain amount of time, look to the direction it began with etc. Does anyone know how to do this?
Have you tried using the "WAIT(...)" command in the line?
The Meaning of Life, the Universe, and Everything.
Join Date:
12/23/2014
Posts:
104
Member Details
Oh yes, I figured that out today, now I want to ask if it's possible to do a "tesblock" command, so essentially, I want to make it so everytime I mine a certain block my view changes, so like if the way I'm facing has a bedrock wall, I want the perspective to change everytime it mines bedrock, is this possible?
Oh yes, I figured that out today, now I want to ask if it's possible to do a "tesblock" command, so essentially, I want to make it so everytime I mine a certain block my view changes, so like if the way I'm facing has a bedrock wall, I want the perspective to change everytime it mines bedrock, is this possible?
What do you mean perspective change?, third person?, Look()?
Does it need to detect you manually mining a block or only as part of a mining script?
What do you mean perspective change?, third person?, Look()?
Does it need to detect you manually mining a block or only as part of a mining script?
yes, look(). What I am saying is, if I'm mining bedrock(because afk prison mining and all that fun stuff), my view automatcially changes to the opposite side, is this achievable with macros?
yes, look(). What I am saying is, if I'm mining bedrock(because afk prison mining and all that fun stuff), my view automatcially changes to the opposite side, is this achievable with macros?
Y..yes? HITID contains the ID of the block (or entity) you're targetting
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
I have managed to make the full functional script. I am really thankful for your template Mart3323. Now I have a very cool levelbar for these RPG skills. I am already busy making multiple progression bars for skills etc. and timer bars.
For the people using the same plugin as me (Levelme) here is the full script for the progression bars and leveling.
I kinda want to make more scripts now, since the possibilities are endless. Like making a hallucination area in my server where when you enter it sets the shadergroup and when you go outside it sets it back to normal. I already had an idea how to do this: Commandblock sends: "You are hallucinating". Ifmatches this text sets shadergroup.
I have managed to make the full functional script. I am really thankful for your template Mart3323. Now I have a very cool levelbar for these RPG skills. I am already busy making multiple progression bars for skills etc. and timer bars.
For the people using the same plugin as me (Levelme) here is the full script for the progression bars and leveling.
I kinda want to make more scripts now, since the possibilities are endless. Like making a hallucination area in my server where when you enter it sets the shadergroup and when you go outside it sets it back to normal. I already had an idea how to do this: Commandblock sends: "You are hallucinating". Ifmatches this text sets shadergroup.
Again thanks.
If you do this, use the ChatFilter and the Filter() command to make it so the player never even sees the message (well, unless you want them to)
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
I actually tried to use the chat filter (disabled that you get "exp added" after you got xp which spammed the chat) then I tried to add the Level: (\d+) etc. to the filter. It filters the message, but doing so breaks the progress bar, because it tries to read the chat for the bar.
I tried to copy the chat filter script inside the levelbar script, but didn't work. It worked when I added ifmatches %chatclean% <levelmessage>
and then clearchat. But that removed my whole chat.
I actually tried to use the chat filter (disabled that you get "exp added" after you got xp which spammed the chat) then I tried to add the Level: (\d+) etc. to the filter. It filters the message, but doing so breaks the progress bar, because it tries to read the chat for the bar.
I tried to copy the chat filter script inside the levelbar script, but didn't work. It worked when I added ifmatches %chatclean% <levelmessage>
and then clearchat. But that removed my whole chat.
Any script that works on onChat should work just as fine on ChatFilter (except for long-running ones, which delay the chat)
Are you sure you copied it all over?, unbound from onChat, bind the same script to ChatFilter, add the Filter() command?
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
Thank you for explaining it, was kinda confused. Now I have learned enough to script other cool stuff, already started on working on a screen with buttons that when you click on it will print a guide in the chatbox and a label that keeps track of your skill levels. So far so good!
Anyone know why all of a sudden I can't delete my buttons? I updated to 1.10, and I no longer have that capability. I've attached a screenshot. Thanks.
What is the use case exactly?
Most likely file includes work for this..
So there is this Macro mods directiory (common/Macros)
anything that is in Macros/ will be read by Macromod anything that is in Macros/Logs will be ignored
now I want a way to read .txt documents out of Macros/Logs for Example Macros/Logs/25-08-2016-Log.txt
thats the matter
Did the log message appear for any of your tests?
Especially the plain one i posted, i can't really think of anything that would break it..
Did you get the logs? perhaps those might shed some light on what's going on, if the server's messing with our messages somehow
Does it work in singleplayer?
The script is bound to onChat, right? - under the events tab?
'Cause tomorrow spring is here
It was bound OnChat, but I figured it out thanks to you I looked for the 6th time and found out that I set up the script run wrong. $${$$Scriptfile.txt}$$ Instead of $${$$<Scriptfile.txt>}$$
That was really stupid of me. The code you have provided worked. I will try to make mine again tomorrow. I'll keep you posted. Thanks for the help!
[SSSS]
Does anyone know if you can have 1 macro activate after another and repeatedly at that? What I am trying to say is have my character look in 1 direction, the after a certain amount of time, look another direction, the after a certain amount of time, look to the direction it began with etc. Does anyone know how to do this?
Here's something that may help both of you.
Deep in ~/liteconfig/common/macros is .macros.txt. I found a file that Mart3323 was trying to help me with. There was no way I could within macro/keybind create § (ALT21 on an English keyboard). I can write that character directly to that *.txt file. Even better, I can copy and paste Mart3323's written text directly in that macros.txt file. It's a whole bunch easier to copy and paste than to try and duplicate his text.
HTH
Lou
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
lovin this mod
You can copy paste into both script files as well as every textarea in the game - no need to mess with .macros.txt =P
Yes, if you rephrase that a bit
Repeat:
End repeat
For example, say we want to do this a total of 20 times (20 looks in each direction), with a wait time of 5s (total script time 100s), and the directions are 0,0 and 90,0
Do(20);
Loop;
Edit: What fluro said, except 500ms is not 5 seconds, it's 0.5 - and it looks in the original direction for twice as long =P
'Cause tomorrow spring is here
Have you tried using the "WAIT(...)" command in the line?
$${DO([amount you wish to loop this]);
LOOK(<yaw>,[pitch]);
WAIT(500ms); That's 5 seconds
LOOK(<yaw>,[pitch]);
WAIT(500ms);
LOOP;
}$$
Oh yes, I figured that out today, now I want to ask if it's possible to do a "tesblock" command, so essentially, I want to make it so everytime I mine a certain block my view changes, so like if the way I'm facing has a bedrock wall, I want the perspective to change everytime it mines bedrock, is this possible?
What do you mean perspective change?, third person?, Look()?
Does it need to detect you manually mining a block or only as part of a mining script?
'Cause tomorrow spring is here
yes, look(). What I am saying is, if I'm mining bedrock(because afk prison mining and all that fun stuff), my view automatcially changes to the opposite side, is this achievable with macros?
Y..yes? HITID contains the ID of the block (or entity) you're targetting
'Cause tomorrow spring is here
I have managed to make the full functional script. I am really thankful for your template Mart3323. Now I have a very cool levelbar for these RPG skills. I am already busy making multiple progression bars for skills etc. and timer bars.
For the people using the same plugin as me (Levelme) here is the full script for the progression bars and leveling.
IFMATCHES(%CHAT%,"Level: (\d+) Exp: (\d+).0/(\d+).0");
MATCH(%CHAT%,"Level: (\d+) Exp: (\d+).0/(\d+).0",{@#xp_level,@#xp_experience_current,@#xp_experience_max});
SETLABEL(xpletters,"Current Skill: Lvl %@#xp_level%");
SETLABEL(xpletters2," %@#xp_experience_current%/%@#xp_experience_max%");
ENDIF;
I kinda want to make more scripts now, since the possibilities are endless. Like making a hallucination area in my server where when you enter it sets the shadergroup and when you go outside it sets it back to normal. I already had an idea how to do this: Commandblock sends: "You are hallucinating". Ifmatches this text sets shadergroup.
Again thanks.
[SSSS]
If you do this, use the ChatFilter and the Filter() command to make it so the player never even sees the message (well, unless you want them to)
'Cause tomorrow spring is here
I actually tried to use the chat filter (disabled that you get "exp added" after you got xp which spammed the chat) then I tried to add the Level: (\d+) etc. to the filter. It filters the message, but doing so breaks the progress bar, because it tries to read the chat for the bar.
I tried to copy the chat filter script inside the levelbar script, but didn't work. It worked when I added ifmatches %chatclean% <levelmessage>
and then clearchat. But that removed my whole chat.
[SSSS]
Any script that works on onChat should work just as fine on ChatFilter (except for long-running ones, which delay the chat)
Are you sure you copied it all over?, unbound from onChat, bind the same script to ChatFilter, add the Filter() command?
'Cause tomorrow spring is here
You sir, are a pro.
I tried this which didn't work:
IFMATCHES(%CHATCLEAN%,"Level: (\d+) Exp: (\d+).0/(\d+).0");
FILTER()
ENDIF;
but copying the script and add FILTER() did work!
I am trying to see what's going on here. Correct me if I am wrong.
Does the %chatclean% remove the text before it is processed by the script?
[SSSS]
%CHATCLEAN% is just a variable that contains the message received by the script, with all color codes removed
----
ChatFilter stands between the server and the rest of the game (probably including onChat)
It is the only thing that receives the message, and then gets to decide whether to pass it on to the others
if you Filter(), it's as if the message never appeared
if you Modify(txt), it's as if the received message was really "txt" all along
If you Pass() (or simply don't use the two previous commands), the message is passed on to the others as it was received
So the message moves something like this:
Some consequences of this:
Why your first attempt didn't work:
Why copy paste did:
'Cause tomorrow spring is here
Thank you for explaining it, was kinda confused. Now I have learned enough to script other cool stuff, already started on working on a screen with buttons that when you click on it will print a guide in the chatbox and a label that keeps track of your skill levels. So far so good!
[SSSS]
Anyone know why all of a sudden I can't delete my buttons? I updated to 1.10, and I no longer have that capability. I've attached a screenshot. Thanks.
So there is this Macro mods directiory (common/Macros) anything that is in Macros/ will be read by Macromod anything that is in Macros/Logs will be ignored now I want a way to read .txt documents out of Macros/Logs for Example Macros/Logs/25-08-2016-Log.txt thats the matter