The Meaning of Life, the Universe, and Everything.
Join Date:
1/29/2012
Posts:
90
Minecraft:
rookie1024
Member Details
Two things:
One. Can I use IF(&string = "<your text here>"); or do I have to use IFMATCHES(&string, "\A<your text here>\B");? IF didn't seem to work for strings.
Two. Mumfrey, you may very well get me hooked on modding. I've caught myself trying to do things that were WAAAY outside of the scope you set for this mod. I'll have to get into Java programming... >.> Maybe when the API comes out. hmm....
Anyway, thank you for your helpfulness and (indirect) motivation! I'll still use your mod, of course! Why reinvent a wheel, especially Mumfrey's wheel (if you know what I mean)?
One. Can I use IF(&string = "<your text here>"); or do I have to use IFMATCHES(&string, "\A<your text here>\B");? IF didn't seem to work for strings.
Two. Mumfrey, you may very well get me hooked on modding. I've caught myself trying to do things that were WAAAY outside of the scope you set for this mod. I'll have to get into Java programming... >.> Maybe when the API comes out. hmm....
Anyway, thank you for your helpfulness and (indirect) motivation! I'll still use your mod, of course! Why reinvent a wheel, especially Mumfrey's wheel (if you know what I mean)?
OK, after trying to reply with the 'Report' button for the umpteenth time....
Mumfrey, I think that at this rate, it would be easier for you to add an in-game mod compiler! Everyone is requesting more and more advanced features!
You can, but it has to be a perfect match
i believe it was IF(%&string% = "string"), quotation marks and percent signs both mandatory
I can't see any mods in there that would cause problems, are you on a Mac by any chance? Also have you tried it with a better launcher like MultiMC?
I am using a mac (Mountain Lion) with the default Java VM. I haven't tried a different launcher yet. If that'll fix the problem I'll just ditch MagicLauncher. (I have to admit that I'm a little skeptical of its runtime approach to loading mods.)
I wonder if Mojang is ever going to support a plugin API? It feels like it's never going to happen....
The Meaning of Life, the Universe, and Everything.
Join Date:
1/29/2012
Posts:
90
Minecraft:
rookie1024
Member Details
For those of you RedPower users, here's a quick macro to use to set the time without upsetting RP blocks.
/time set 0|$${WAIT(5t)}$$|/time set $$?
What happens:
When run, the macro asks you for an input. Input a number. Then, you will see that the macro sets the time to 0, then shortly after sets the time to the number you specify. This method does not upset RP blocks because the time is set to 0 first and then FORWARD to whatever time you input. The normal method, /time set $$?, might set the time BACKWARD to what you specify, upsetting RP blocks.
One. Can I use IF(&string = "<your text here>"); or do I have to use IFMATCHES(&string, "\A<your text here>\B");? IF didn't seem to work for strings.
It's supposed to, but I just realised that it's broken because the evaluator is prioritising the & as an operator which makes it screw up parsing the string var. I'll fix this in the next version. Mart's solution will work though because it just forces a literal string comparison rather than a var<->string comparison, so it's a good work around for now
Two. Mumfrey, you may very well get me hooked on modding. I've caught myself trying to do things that were WAAAY outside of the scope you set for this mod. I'll have to get into Java programming... >.> Maybe when the API comes out. hmm....
The direction I've been going recently is very much to both bridge the gap between "nothing" and "you have to make an entire mod to do one tiny thing", in some ways some of the more complex scripts that people have devised are actually mini mods in and of themselves, which is cool. If it encourages people to investigate modding themselves, then all the better.
Anyway, thank you for your helpfulness and (indirect) motivation! I'll still use your mod, of course! Why reinvent a wheel, especially Mumfrey's wheel (if you know what I mean)?
Well in some ways macros represents a miniature modding API of sorts, so the beauty of scripts is that (notwithstanding my occasional screw-ups) they are version agnostic and allow people to make things that don't need to be re-invented each minecraft version. Plus believe me, re-inventing this particular wheel would be a pretty big undertaking.
You can, but it has to be a perfect match
i believe it was IF(%&string% = "string"), quotation marks and percent signs both mandatory
Spot on. Hopefully I can find a way to fix this though, I may just remove "&" as an operator and force the use of "&&", although that seems like a bit of a cheat.
I am using a mac (Mountain Lion) with the default Java VM. I haven't tried a different launcher yet. If that'll fix the problem I'll just ditch MagicLauncher. (I have to admit that I'm a little skeptical of its runtime approach to loading mods.)
The crash/hang you describe seems to be confined to macs, nothing LiteLoader does is especially clever and even serious errors should just result in it not working (rather than physically crashing) so it's a mystery why this happens but if you could establish whether it's Magic Launcher that's breaking things that would be useful to know.
I've bound this script to my mouse1 and tested it successfully on many blocks. The problem is with the pickaxe and axe conditionals which use more than ten ||OR operators; The script will parse to the tenth || and then move on from that conditional, it seems.
So using this script on the first ten blocks listed in the pickaxe conditional will switch to my pickaxe and log "pickaxe", but won't for HITID 28 or any IDs listed in that conditional beyond. Same goes for the axe conditional with HITID 72 and beyond.
I am not a programmer, so I'm not sure if it is understood that you can only have ten || operators in a conditional...or something like that. Or maybe I am going about scripting this the wrong way and there is a more stable way to perform this?
On a side note, is there another way to display the Buttons GUI besides SNEAK+GRAVE? I'm doing a toggle-sneak so my actual sneak key is the pagedown key.
On a side note, is there another way to display the Buttons GUI besides SNEAK+GRAVE? I'm doing a toggle-sneak so my actual sneak key is the pagedown key.
Ok, I haven't really been bothered by it before, but now that the server I'm on has actually cleaned up it's warps I'm somewhat sad it doesn't work.
Warp and Home lists are not received from the server. The GUI for it doesn't even show up:
Does something need to be done server-side to allow this, or am I just missing something in the configs? And yes, the command in the configs is /warp, and /warp is how you get the first page of warps on the server. I assume there is some command to add to the warp macro beyond "/warp $$w", but the readme is really quite outdated by this point.
Also, in case the PM didn't go through, I'd be interested in testing IC for liteloader. It was a prime plugin for our server staff when it was still updated, and it'd end up being about a dozen free testers.
Does something need to be done server-side to allow this, or am I just missing something in the configs? And yes, the command in the configs is /warp, and /warp is how you get the first page of warps on the server. I assume there is some command to add to the warp macro beyond "/warp $$w", but the readme is really quite outdated by this point.
It has varying success with auto detection but so much changes all the time and there are now a lot more warp plugins than there ever used to be so I need to rewrite the whole auto-detection thing but I just haven't got to it yet, there are so many things to do, and people want documentation more than they want features one second, and then want more features the next second so I try to make a balance. I will get to it though.
Also, in case the PM didn't go through, I'd be interested in testing IC for liteloader. It was a prime plugin for our server staff when it was still updated, and it'd end up being about a dozen free testers.
IFMATCHES(%CHAT%,"^§e.+? left the game.$")
Modify(leavecolor%CHATCLEAN%)
ENDIF
It doesn't read the variable, and just displays in chat "leavecolorPLAYER left the game."
Is there a correct way of calling variables in Modify?
Sorry I misunderstood, I thought you were making an example with the <>, Rene is correct, you have to use a string variable, his example shows the correct method to achieve what you want.
Sorry I misunderstood, I thought you were making an example with the <>, Rene is correct, you have to use a string variable, his example shows the correct method to achieve what you want.
Ahh, thank you both. I had typed in SET and it showed SET(<text>,[text]) so I followed that. Thanks for the help. This is by far my favourite mod not because of it's functions but because of the strong community/developer behind it. Thanks Mumfrey and community <3
P.S. I've seen a few recent posts about IC, guessing it's Improved Chat? Any idea when that'll be updated? Last I checked was a 1.2.5 update.
It has varying success with auto detection but so much changes all the time and there are now a lot more warp plugins than there ever used to be so I need to rewrite the whole auto-detection thing but I just haven't got to it yet, there are so many things to do, and people want documentation more than they want features one second, and then want more features the next second so I try to make a balance. I will get to it though.
Well, it works with Essentials with default, but only for the first page. I probably just need to edit the config to get it to call right.
Right after I sent the PM too, lol. Opps. Thanks for that, seriously. Same with WE CUI for liteloader and whatever events lead to it.
Sadly, IC is completely unusable even with just it and liteloader (like say something and client-side chat is just gone and you'll eventually time out unusable), but I get that you aren't trying to fix it's problems, and that's something for the other thread anyway. WE CUI and Macros play nice together now though, which is awesome.
Try this, i'm new to this but kinda understanding it.
IFMATCHES(%CHAT%,"^§([a-f0-9])(.+?) has requested to teleport to you.$");
WAIT(500ms);
ECHO("/tpaccept");
LOG("Auto Accepted");
ENDIF
And for tp you to them:
IFMATCHES(%CHAT%,"^§([a-f0-9])(.+?) has requested that you teleport to them.$"); WAIT(500ms); ECHO("/tpaccept"); LOG("Auto Accepted"); ENDIF
I've got that to work, but am unable to get Auto Accepted to display AFTER it says it was accepted
One. Can I use IF(&string = "<your text here>"); or do I have to use IFMATCHES(&string, "\A<your text here>\B");? IF didn't seem to work for strings.
Two. Mumfrey, you may very well get me hooked on modding. I've caught myself trying to do things that were WAAAY outside of the scope you set for this mod. I'll have to get into Java programming... >.> Maybe when the API comes out. hmm....
Anyway, thank you for your helpfulness and (indirect) motivation! I'll still use your mod, of course! Why reinvent a wheel, especially Mumfrey's wheel (if you know what I mean)?
OK, after trying to reply with the 'Report' button for the umpteenth time....
Mumfrey, I think that at this rate, it would be easier for you to add an in-game mod compiler! Everyone is requesting more and more advanced features!
You can, but it has to be a perfect match
i believe it was IF(%&string% = "string"), quotation marks and percent signs both mandatory
'Cause tomorrow spring is here
I am using a mac (Mountain Lion) with the default Java VM. I haven't tried a different launcher yet. If that'll fix the problem I'll just ditch MagicLauncher. (I have to admit that I'm a little skeptical of its runtime approach to loading mods.)
I wonder if Mojang is ever going to support a plugin API? It feels like it's never going to happen....
/time set 0|$${WAIT(5t)}$$|/time set $$?
What happens:
When run, the macro asks you for an input. Input a number. Then, you will see that the macro sets the time to 0, then shortly after sets the time to the number you specify. This method does not upset RP blocks because the time is set to 0 first and then FORWARD to whatever time you input. The normal method, /time set $$?, might set the time BACKWARD to what you specify, upsetting RP blocks.
well, yeah...but...it didn't work (i don't think) D:
It's supposed to, but I just realised that it's broken because the evaluator is prioritising the & as an operator which makes it screw up parsing the string var. I'll fix this in the next version. Mart's solution will work though because it just forces a literal string comparison rather than a var<->string comparison, so it's a good work around for now
The direction I've been going recently is very much to both bridge the gap between "nothing" and "you have to make an entire mod to do one tiny thing", in some ways some of the more complex scripts that people have devised are actually mini mods in and of themselves, which is cool. If it encourages people to investigate modding themselves, then all the better.
Well in some ways macros represents a miniature modding API of sorts, so the beauty of scripts is that (notwithstanding my occasional screw-ups) they are version agnostic and allow people to make things that don't need to be re-invented each minecraft version. Plus believe me, re-inventing this particular wheel would be a pretty big undertaking.
lol, well it's just more stuff to work on I guess. In many ways an in-game compiler would be much easier than the stuff I'm doing.
Spot on. Hopefully I can find a way to fix this though, I may just remove "&" as an operator and force the use of "&&", although that seems like a bit of a cheat.
The crash/hang you describe seems to be confined to macs, nothing LiteLoader does is especially clever and even serious errors should just result in it not working (rather than physically crashing) so it's a mystery why this happens but if you could establish whether it's Magic Launcher that's breaking things that would be useful to know.
They will, it's just going to take a while.
Hmm if that doesn't work try
So using this script on the first ten blocks listed in the pickaxe conditional will switch to my pickaxe and log "pickaxe", but won't for HITID 28 or any IDs listed in that conditional beyond. Same goes for the axe conditional with HITID 72 and beyond.
I am not a programmer, so I'm not sure if it is understood that you can only have ten || operators in a conditional...or something like that. Or maybe I am going about scripting this the wrong way and there is a more stable way to perform this?
On a side note, is there another way to display the Buttons GUI besides SNEAK+GRAVE? I'm doing a toggle-sneak so my actual sneak key is the pagedown key.
You can only make expressions with a depth of 10 or less, to make it parse more just reduce the depth by grouping sets of subexpressions.
To be honest it would be faster, more readable and easier to maintain to use:
Obviously expand with all the ID's you want to use.
yes use
I used SET(<LeaveColor>,[3]) to change the variable below, but it's not working. Am I calling the variable incorrectly?
IFMATCHES(%CHAT%,"^§e.+? left the game.$")
Modify(&LeaveColor%CHATCLEAN%)
ENDIF
Warp and Home lists are not received from the server. The GUI for it doesn't even show up:
Does something need to be done server-side to allow this, or am I just missing something in the configs? And yes, the command in the configs is /warp, and /warp is how you get the first page of warps on the server. I assume there is some command to add to the warp macro beyond "/warp $$w", but the readme is really quite outdated by this point.
Also, in case the PM didn't go through, I'd be interested in testing IC for liteloader. It was a prime plugin for our server staff when it was still updated, and it'd end up being about a dozen free testers.
User variables must be lower case.
The GUI is under the <Add Warp> menu item at the bottom of the list.
It has varying success with auto detection but so much changes all the time and there are now a lot more warp plugins than there ever used to be so I need to rewrite the whole auto-detection thing but I just haven't got to it yet, there are so many things to do, and people want documentation more than they want features one second, and then want more features the next second so I try to make a balance. I will get to it though.
Erm, I already posted it in the thread.
I believe you have to add all the warps individually, I may be incorrect though, but that's how I've done it on several servers.
Tried this:
SET(<leavecolor>,[&4])
IFMATCHES(%CHAT%,"^§e.+? left the game.$")
Modify(leavecolor%CHATCLEAN%)
ENDIF
It doesn't read the variable, and just displays in chat "leavecolorPLAYER left the game."
Is there a correct way of calling variables in Modify?
Sorry I misunderstood, I thought you were making an example with the <>, Rene is correct, you have to use a string variable, his example shows the correct method to achieve what you want.
Ahh, thank you both. I had typed in SET and it showed SET(<text>,[text]) so I followed that. Thanks for the help. This is by far my favourite mod not because of it's functions but because of the strong community/developer behind it. Thanks Mumfrey and community <3
P.S. I've seen a few recent posts about IC, guessing it's Improved Chat? Any idea when that'll be updated? Last I checked was a 1.2.5 update.
Ah, there we go.
Well, it works with Essentials with default, but only for the first page. I probably just need to edit the config to get it to call right.
waaaaait...
*goes to look*
Right after I sent the PM too, lol. Opps. Thanks for that, seriously. Same with WE CUI for liteloader and whatever events lead to it.
Sadly, IC is completely unusable even with just it and liteloader (like say something and client-side chat is just gone and you'll eventually time out unusable), but I get that you aren't trying to fix it's problems, and that's something for the other thread anyway. WE CUI and Macros play nice together now though, which is awesome.
I meant the button activation screen. %GUI% tells me it's called 'macroplayback'. But the GUI() function won't accept that.
Ah ok, sorry you mentioned sneak+grave which normally shows the binding screen, there's no command currently to show the playback screen.
What's the end result you're trying to accomplish? It seems as if you're trying to automatically accept tpa's to you, correct?
You can get the same result via ChatFilter Module by doing the following:
IFMATCHES(%CHAT%,"Text to match")
Try this, i'm new to this but kinda understanding it.
IFMATCHES(%CHAT%,"^§([a-f0-9])(.+?) has requested to teleport to you.$");
WAIT(500ms);
ECHO("/tpaccept");
LOG("Auto Accepted");
ENDIF
And for tp you to them:
IFMATCHES(%CHAT%,"^§([a-f0-9])(.+?) has requested that you teleport to them.$");
WAIT(500ms);
ECHO("/tpaccept");
LOG("Auto Accepted");
ENDIF
I've got that to work, but am unable to get Auto Accepted to display AFTER it says it was accepted