I can not figure out how to use MATCH for my own purposes. I would like to use it to detect chat messages, who were they sent by and what is written. To be more clear, let's take this part from the code
Is it possible to delete local variables after a script is run?
I had run some scripts set local variables e.g. #m, &m, &m[] and after stopping all scripts or even restarting minecraft,
if I check the variables its still filled with the same values - and no its not global variables.
This is a problem especially with arrays.
At one point a array is filled with 10 different values (index 0-9). If I want to use this variable name again, I first have to empty the array by hand with POP(), otherwise if I only put 4 values (index 0-3) into the array it would still iteraote over 10 values, because the old ones are still there, too.
Is there some setting I am missing or some command doing something like &m[]=NULL (this specific doesn't work) or &m[] = new Array() or only &m[]; to get a completly new/empty array?
Is it possible to delete local variables after a script is run?
I had run some scripts set local variables e.g. #m, &m, &m[] and after stopping all scripts or even restarting minecraft,
if I check the variables its still filled with the same values - and no its not global variables.
This is a problem especially with arrays.
At one point a array is filled with 10 different values (index 0-9). If I want to use this variable name again, I first have to empty the array by hand with POP(), otherwise if I only put 4 values (index 0-3) into the array it would still iteraote over 10 values, because the old ones are still there, too.
Is there some setting I am missing or some command doing something like &m[]=NULL (this specific doesn't work) or &m[] = new Array() or only &m[]; to get a completly new/empty array?
You can clear an array easily with `Unset(&myarray[])`
If that didn't exist you could still do something like `#n = ArraySize(&myarray[]);DO(%#n%);POP(&myarray[]);LOOP;`
You can clear an array easily with `Unset(&myarray[])`
If that didn't exist you could still do something like `#n = ArraySize(&myarray[]);DO(%#n%);POP(&myarray[]);LOOP;`
Wait, UNSET also works for other variables then boolean flags?
Thanks, thats good to know, but I am still a bit confused why local variables are globaly saved in a file and even survive a computer restart.
Wondering if anyone knows how to make attack stay pressed. e.g. key own(forward), however, this does not work with keydown(attack). my problem is coming from doing key(attack) occurs too little in a period of time and it is not fast enough. Help would be greatly appreciated, Thanks
Wondering if anyone knows how to make attack stay pressed. e.g. key own(forward), however, this does not work with keydown(attack). my problem is coming from doing key(attack) occurs too little in a period of time and it is not fast enough. Help would be greatly appreciated, Thanks
This post explains the reasons behind the different types of bindings and how to use them
Hey I'm trying to build a script for hypixel SB that involves cutting down trees using an axe, but i cant get my code to hold attack, and key(attack) is too quick to break any logs. Does anyone have a way around this? Please help me out
Hey I built a script which should completely work but for some reason and at this point it pissed me off so much I wanted to throw my mouse.
Basically the script i ran was
Do ()
key(attack)
loop
^Now this is supposed to left click forever, and it works 100% fine for my friend but for some frickin reason when i run it it like runs it fine for 1 second, waits a bit, runs another second and waits. I DONT KNOW WHY. It runs like this forever, THERE ARE NO PAUSES IN THIS SCRIPT. I'm sorry if im coming as rude but I'm so done at this point, Ive spent hours on this and I cant express the levels of anger that I have.
I said screw this and ran new scripts:
Do
Do(20)
key(attack)
loop
loop
^ still the same problem so i tried:
For(#a,20,60)
do(%#a%)
key(attack)
loop
next
^still, the same thing: holds left click for 1 sec, pauses, holds for another second, and pauses and repeat.
I DONT KNOW WHAT TO DO and i dont know what the fricking problem is at this point. Again I apologize if i came off as rude, i tried my best to refrain from cursing every other word in this message.
Hey I built a script which should completely work but for some reason and at this point it pissed me off so much I wanted to throw my mouse.
Basically the script i ran was
Do ()
key(attack)
loop
^Now this is supposed to left click forever, and it works 100% fine for my friend but for some frickin reason when i run it it like runs it fine for 1 second, waits a bit, runs another second and waits. I DONT KNOW WHY. It runs like this forever, THERE ARE NO PAUSES IN THIS SCRIPT. I'm sorry if im coming as rude but I'm so done at this point, Ive spent hours on this and I cant express the levels of anger that I have.
I said screw this and ran new scripts:
Do
Do(20)
key(attack)
loop
loop
^ still the same problem so i tried:
For(#a,20,60)
do(%#a%)
key(attack)
loop
next
^still, the same thing: holds left click for 1 sec, pauses, holds for another second, and pauses and repeat.
I DONT KNOW WHAT TO DO and i dont know what the fricking problem is at this point. Again I apologize if i came off as rude, i tried my best to refrain from cursing every other word in this message.
make 1.8.9 version please. I play on 1.8.9 and not 1.8 or 1.9 it would help me. Also I know a lot of people use 1.8.9 so it would be nice to have it on 1.8.9.
make 1.8.9 version please. I play on 1.8.9 and not 1.8 or 1.9 it would help me. Also I know a lot of people use 1.8.9 so it would be nice to have it on 1.8.9.
If you read earlier posts you'll see Mr. Mumphrey already said NO! NOT EVER!
Hey I built a script which should completely work but for some reason and at this point it pissed me off so much I wanted to throw my mouse.
Basically the script i ran was
Do ()
key(attack)
loop
^Now this is supposed to left click forever, and it works 100% fine for my friend but for some frickin reason when i run it it like runs it fine for 1 second, waits a bit, runs another second and waits. I DONT KNOW WHY. It runs like this forever, THERE ARE NO PAUSES IN THIS SCRIPT. I'm sorry if im coming as rude but I'm so done at this point, Ive spent hours on this and I cant express the levels of anger that I have.
The key function can only press any given key for 1 tick (Minecraft runs at 20 ticks per second, so 1 tick = 50ms). This means that any time you use key(attack) (or any other key control, for that matter), the key press is actually queued for the next tick that is processed by the game engine. To elaborate, there are 1000 milliseconds in a second. Say you are at 375 milliseconds deep into the second, and you ask Minecraft Macro Mod to attack (by calling key(attack), this is what you are doing). Since you are not asking to attack right at the moment of the next tick, Macro Mod has to queue that key press for the next available tick (which would be at 400 milliseconds, or 25 milliseconds after you ask for Macro Mod to attack).
That is, essentially, why you are encountering this issue. Using unsafe would not change this functionality, as all unsafe does is augment the speed to which the internal macro engine reads lines at (for this reason, unsafe is a tool you could use to speed up the rate to which you are doing array manipulation, but that is a discussion for another day). Unsafe cannot make the next tick come faster, so it is useless here.
There is no way to "fix" what you have encountered here, it is simply a limitation of Minecraft and/or Macro Mod at whole, and you will effectively just have to deal with it unfortunately.
@waleedov4k there is scriptit which is being developed by gorlem
Could someone explain how does MATCH() command work? For example, here is a script by jakeyrey18
I can not figure out how to use MATCH for my own purposes. I would like to use it to detect chat messages, who were they sent by and what is written. To be more clear, let's take this part from the code
What does each of the special character do and how exactly can I use it?
Match uses regex, I recommend to read up on that a bit to understand it better
(an excerpt from the faq of the discord:)
Q: Where can I learn about regex?
A:
http://www.regular-expressions.info/quickstart.html
https://regex101.com/
https://regexr.com/
(credits to Gorlem)
Is it possible to delete local variables after a script is run?
I had run some scripts set local variables e.g. #m, &m, &m[] and after stopping all scripts or even restarting minecraft,
if I check the variables its still filled with the same values - and no its not global variables.
This is a problem especially with arrays.
At one point a array is filled with 10 different values (index 0-9). If I want to use this variable name again, I first have to empty the array by hand with POP(), otherwise if I only put 4 values (index 0-3) into the array it would still iteraote over 10 values, because the old ones are still there, too.
Is there some setting I am missing or some command doing something like &m[]=NULL (this specific doesn't work) or &m[] = new Array() or only &m[]; to get a completly new/empty array?
You can clear an array easily with `Unset(&myarray[])`
If that didn't exist you could still do something like `#n = ArraySize(&myarray[]);DO(%#n%);POP(&myarray[]);LOOP;`
'Cause tomorrow spring is here
Wait, UNSET also works for other variables then boolean flags?
Thanks, thats good to know, but I am still a bit confused why local variables are globaly saved in a file and even survive a computer restart.
Because if you need a fresh var you can always clear them, but not vice versa - if they didn't persist there'd be no way to make them persist
'Cause tomorrow spring is here
Wondering if anyone knows how to make attack stay pressed. e.g. key own(forward), however, this does not work with keydown(attack). my problem is coming from doing key(attack) occurs too little in a period of time and it is not fast enough. Help would be greatly appreciated, Thanks
This post explains the reasons behind the different types of bindings and how to use them
Stateful vs trigger vs momentary bindings
'Cause tomorrow spring is here
Is it possible for you to update this to 1.8.9, as it's not working for that version! Thanks
@MyNameIsYellow mumfrey has stated multiple times he will not update to 1.8.9
Hey I'm trying to build a script for hypixel SB that involves cutting down trees using an axe, but i cant get my code to hold attack, and key(attack) is too quick to break any logs. Does anyone have a way around this? Please help me out
Hey I built a script which should completely work but for some reason and at this point it pissed me off so much I wanted to throw my mouse.
Basically the script i ran was
Do ()
key(attack)
loop
^Now this is supposed to left click forever, and it works 100% fine for my friend but for some frickin reason when i run it it like runs it fine for 1 second, waits a bit, runs another second and waits. I DONT KNOW WHY. It runs like this forever, THERE ARE NO PAUSES IN THIS SCRIPT. I'm sorry if im coming as rude but I'm so done at this point, Ive spent hours on this and I cant express the levels of anger that I have.
I said screw this and ran new scripts:
Do
Do(20)
key(attack)
loop
loop
^ still the same problem so i tried:
For(#a,20,60)
do(%#a%)
key(attack)
loop
next
^still, the same thing: holds left click for 1 sec, pauses, holds for another second, and pauses and repeat.
I DONT KNOW WHAT TO DO and i dont know what the fricking problem is at this point. Again I apologize if i came off as rude, i tried my best to refrain from cursing every other word in this message.
PLEASE HELP ME before I break my mouse
Wrong syntax...
Correct:
well, it shouldn't happen ;-;
try using
$${ unsafe;do();key(attack);loop;endunsafe; }$$
yeah, it may drop your fps a little
make 1.8.9 version please. I play on 1.8.9 and not 1.8 or 1.9 it would help me. Also I know a lot of people use 1.8.9 so it would be nice to have it on 1.8.9.
If you read earlier posts you'll see Mr. Mumphrey already said NO! NOT EVER!
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
The key function can only press any given key for 1 tick (Minecraft runs at 20 ticks per second, so 1 tick = 50ms). This means that any time you use key(attack) (or any other key control, for that matter), the key press is actually queued for the next tick that is processed by the game engine. To elaborate, there are 1000 milliseconds in a second. Say you are at 375 milliseconds deep into the second, and you ask Minecraft Macro Mod to attack (by calling key(attack), this is what you are doing). Since you are not asking to attack right at the moment of the next tick, Macro Mod has to queue that key press for the next available tick (which would be at 400 milliseconds, or 25 milliseconds after you ask for Macro Mod to attack).
That is, essentially, why you are encountering this issue. Using unsafe would not change this functionality, as all unsafe does is augment the speed to which the internal macro engine reads lines at (for this reason, unsafe is a tool you could use to speed up the rate to which you are doing array manipulation, but that is a discussion for another day). Unsafe cannot make the next tick come faster, so it is useless here.
There is no way to "fix" what you have encountered here, it is simply a limitation of Minecraft and/or Macro Mod at whole, and you will effectively just have to deal with it unfortunately.
Will Mumphrey ever update this to 1.12.2? I want to use 5zig reborn or labymod with it but I can't because they're a version apart.
There is a version that works with 1.12.2, I use it almost daily.
0.15.4 (12.1) works with 1.12.2 as does the LiteLoader installer 1.12.2-00 Snapshot installer.
To utilize these you need the 2705 version of Forge.
It may be possible to update Forge a little beyond 2705 but if so it won't be far beyond that version.
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