That's super cool, and a very long gif, lol! That bonus feature will be super useful considering I have lots of buttons/labels where I want the same color!
It actually copies all supported properties from the source control to others, so if you don't want to overwrite the text for example, it's best to copy from a control whose properties aren't supported on the others. Eg. copy from a progressbar to buttons, because the only "common" properties are the colours.
It's very hard to search about this because it would strip the dollar signs, but I have a button bound to //replace $i:d $i:d|//deselect. I expect this to open one GUI to select a block, then after that open another GUI to select a 2nd block, but it just opens one GUI and then runs the command. Why does this not work?
It's very hard to search about this because it would strip the dollar signs, but I have a button bound to //replace $i:d $i:d|//deselect. I expect this to open one GUI to select a block, then after that open another GUI to select a 2nd block, but it just opens one GUI and then runs the command. Why does this not work?
First, i'd like to thank you Mumfrey, your mod looks really nice, it makes things really easier, I can't wait to learn how to script because the possibilities are infinite with scripts !
Here is the problem i'm coping with : I want to make a simple toggle gamma button, but I don't know why it's not working, it's not like it's complicated or whatever, but I'm just discovering scripting.
It looks like you're looking at a command reference to do GAMMA, but interpreting <> and [] literally
They're not, it's just common practice in syntax guides to highlight parameters (things you must fill in) with <>, and optional parameters with []
GAMMA(1000,6); //Note that 200 is the maximum
GAMMA(1,6) // and 0 is the minimum
Thank you very much, it's working !
Now I have an other problem : when I set gamma to 200 with the mod, it's not as luminous as if I set it to 200 in the option file in .minecraft...
It's a bit lighter.
I tried to set gamma to 1000, 10 000, but it's still not working, Could you please help me again ?
Are you sure it's not interpreting 200ms as 200 seconds?, it takes seconds by default
with 10000 especially it's no wonder it looks identical to 0 - you probably didn't wait for three hours for it to finish brightening
try just Gamma(200), then Gamma(200,1), then Gamma(200,0.1), and if it still works, extrapolate from that ^^
Not working :/
I also tried to set the time to 0 etc, but it feels like the gamma command can't go over 1.0 gamma, because I tried to set the gamma to 1 with the option file, and it looks similar to when I set the gamma to 200 with the mod !
My english is terrible, sorry, but I think you can understand what I say.
I guess I choosed the wrong command to start scripting
Just tried it and it worked fine, 200 goes all the way up to options' 2.0
if i turn my gamma all the way down to "moody" and then i use GAMMA(100,5) it changes the brightness fully up to "bright" over 5 seconds, so it is at 100% then.....
Ok guys, thanks for your answers, I understood what was wrong !
I wanted to change the gamma more than the game allows us to do in game. The gamma command can't override the gamma IG limit.
The only way is to modify the value of the options file, but we need to restart the game, and the gamma command isn't changing the gamma levels with this file.
I'm pretty sure, before 1.9, this used to work with macro mod, and 200 would be the highest possible which with vanilla lightmap gives you fullbright.
Is there a way to craft more than just one item as a time? (Like an gold ingot?)
So far if I do:
do;
craft(gold_ingot, 64);
loop
It will do 64, but it will only put one gold nugget into each slot of the crafting table. Is there anyway to put a stack of gold nuggets into each spot and thencraft a stack of gold ingots?
I'm actually using Minecraft 1.7, but it's ok, I don't need this script, I just wanted to make a script and it's working (not as expected but still).
Now I'm having an other issue : I have a script including LOG(stuff); WAIT(10); then ECHO($$[whatever]).
The problem is that when I run the script, it doesn't wait the 10 seconds, it asks me for $$[whatever], then it runs all the script : log, wait 10 seconds, and say whatever.
Everything with a double-dollar (with one exception) is a preprocessor directive
What this means is before the mod actually reads your code.., it goes through the file and replaces things like file includes and parameters...
to replace $$[whatever] it needs to prompt you
Because this happens before the script is interpreted - the mod has no way to know that $$[whatever] won't be necessary until later
not sure if it's in the 1.7 version (check the changelogs), but you can use the Prompt() command for this
Also, is there a way to put specials symbols like accents (é, è, à) in scripts ? I tried to modify the .txt to unicode, but it's flooding the chat. :/
Leave the script tags outside of the file, bind $${$$<filename.txt>}$$, that way you know you're safe, it's easy to add/compose files, etc.
Anyway, i don't think it should be a problem? Last i checked my script files were encoded with "UTF-8 with BOM"
Is there a way to craft more than just one item as a time? (Like an gold ingot?)
So far if I do:
do;
craft(gold_ingot, 64);
loop
It will do 64, but it will only put one gold nugget into each slot of the crafting table. Is there anyway to put a stack of gold nuggets into each spot and thencraft a stack of gold ingots?
Yes and no.., the CRAFT command (you probably want to use CRAFTANDWAIT btw) always crafts one at a time.., but you can write low level inventory code as well
Use the following commands (see gorlem's wiki or the changelogs for reference)
GetSlot(item,#id,...) // searches the open GUI for first slot that contains item
GetSlotItem(slot,&item,#amount,...) // returns the name and amount (and other details) of the item in slot (slot being the slot number)
SlotClick(slot,button,shift); //click a slot (button is l (left) or r (right), shift does a shift click if true - defaults are l and false)
To get slot IDs, turn on "show slot ID's in containers" in the options and it'll show up in a tooltip if you hover over one
&target should be &target.., it's a string variable
Lots of commands require the name of a variable so they have some place to store their results
paramstring is you specifying what you want to prompt for, it's safe to put the double-dollar-thing in there (this is the exception the preprocessor has, it doesn't read the entire script but it can tell if a parameter is inside PROMPT())
Quote from undefined »
Ignore that (specific tutorial) for now, it's some more advanced stuff
Quote from undefined »
CHAT definitely has nothing to do with anything
in fact, unless you're in onChat or chatFilter.., "CHAT" has no meaning whatsoever
You can't nest things like you're doing here.., either you Echo, or you Prompt.., you don't Echo a Prompt (not unless you want to literally say the word)
ECHO("test"); // valid
Prompt($[foo],&var); //valid
Echo(Prompt($[foo],&var) ); //invalid
Also, use a SINGLE set of script tags in your binding =P, it's much easier to read without them in the way
$${Prompt("$$[name]",&name);Prompt("$$[msg]",&msg);Echo("/m %&name% %&msg%");}$$
^^^^^^^^ ^^^^^ ↑ ↑ ^_____^
Prompt for a name ↑ Same as previous ↑
↑ ↑
Save the result in a string variable called &name ↑
Replace with the value of &name
I'm try to make an auto mining program for a prison server. I'm wondering if someone has already created a mining bot program that you can put in the cords and how what todo if your inventory if full. Just curious if something like this has been created. Thank you
Thank you again, I understood your points and it's working !
In your red example and in your quotation, you reversed the target and the string so it was (Prompt(&name,"$$[name]"), i'm just saying if someone's reading this.
Now that I can send my message, I added lines so it asks me for a confirmation like "you are gonna send %&msg% to %&name%, are you sure you want to do that ?".
Then it uses the %&answer% to say LOG(you said %&answer%). It should be sending the message if the player answers "yes".
I wanted to use IFMATCHES(%CHAT%,you said yes), to cause the ECHO("/m %&name% %&msg%), and then close the ifmatches with whatever it tells me to (endiff, else etc).
How can I do that ?
CHAT still has absolutely no meaning because it's not onChat or the chatFIlter
on those two events, but not here, CHAT means "the message of chat, as sent by the server, that caused this script to run"
Since you're running from a buttonpress.., there's no such message, the script was caused to run by the press of the button
if you want to use IFMATCHES.., think about what you want to compare..., you want to compare &answer.., and see whether it contains the literal string "yes"
so you want IFMATCHES(%&answer%,"yes")
..Note that the second parameter of IFMATCHES is not a string to compare to, but rather a case insensitive regular expression
just letters it takes literally, but many other characters have special meaning
See google for more information (no really, there's a ton of really good sites for leaning/testing regex, and the best just depends on what layout you like most)
alternatively, if you control the options (for example by prompting something along the lines of $$[send %&msg% to %&name% - confirm[yes,no]]), you can use IF(&answer = "yes") to do a simple comparison
IFMATCHES work like a regular IF, they close with ENDIF and you can also put an ELSE in between..
I'm try to make an auto mining program for a prison server. I'm wondering if someone has already created a mining bot program that you can put in the cords and how what todo if your inventory if full. Just curious if something like this has been created. Thank you
Can you be a bit more specific?, how does prison mining work exactly, what would such a bot do?
It's possible it has been made, yes
I made an autosoup script in 1.8 that does not work in 1.10. It involves using the PICK() function. I cannot seem to get it to pick anything, possibly due to it being broken or a change in naming conventions.
It actually copies all supported properties from the source control to others, so if you don't want to overwrite the text for example, it's best to copy from a control whose properties aren't supported on the others. Eg. copy from a progressbar to buttons, because the only "common" properties are the colours.
Soon™
It's very hard to search about this because it would strip the dollar signs, but I have a button bound to //replace $i:d $i:d|//deselect. I expect this to open one GUI to select a block, then after that open another GUI to select a 2nd block, but it just opens one GUI and then runs the command. Why does this not work?
Un-tick "replace all occurrences"
That would really be quite spectacularly hard to do with the current setup sorry.
It looks like you're looking at a command reference to do GAMMA, but interpreting <> and [] literally
They're not, it's just common practice in syntax guides to highlight parameters (things you must fill in) with <>, and optional parameters with []
GAMMA(1000,6); //Note that 200 is the maximum
GAMMA(1,6) // and 0 is the minimum
'Cause tomorrow spring is here
This one is doable.
I seem to be unable to find this in the Settings, and I cannot find it if I edit the button/keybinding either. Where is this located?
When you are prompted for the parameter, there's a tick-box right there which says "replace all occurrences".
Ah, there we go. Thanks!
Are you sure it's not interpreting 200ms as 200 seconds?, it takes seconds by default
with 10000 especially it's no wonder it looks identical to 0 - you probably didn't wait for three hours for it to finish brightening
try just Gamma(200), then Gamma(200,1), then Gamma(200,0.1), and if it still works, extrapolate from that ^^
'Cause tomorrow spring is here
Just tried it and it worked fine, 200 goes all the way up to options' 2.0
'Cause tomorrow spring is here
He wants it to go beyond 100 aka bright.
You're using 1.8, DangitBloodyHell is probably using 1.9, and I've noticed that 200 gamma in 1.9 is the same as 100, can't go beyond that.
I'm pretty sure, before 1.9, this used to work with macro mod, and 200 would be the highest possible which with vanilla lightmap gives you fullbright.
Is there a way to craft more than just one item as a time? (Like an gold ingot?)
So far if I do:
It will do 64, but it will only put one gold nugget into each slot of the crafting table. Is there anyway to put a stack of gold nuggets into each spot and thencraft a stack of gold ingots?
Everything with a double-dollar (with one exception) is a preprocessor directive
What this means is before the mod actually reads your code.., it goes through the file and replaces things like file includes and parameters...
to replace $$[whatever] it needs to prompt you
Because this happens before the script is interpreted - the mod has no way to know that $$[whatever] won't be necessary until later
not sure if it's in the 1.7 version (check the changelogs), but you can use the Prompt() command for this
Leave the script tags outside of the file, bind $${$$<filename.txt>}$$, that way you know you're safe, it's easy to add/compose files, etc.
Anyway, i don't think it should be a problem? Last i checked my script files were encoded with "UTF-8 with BOM"
Yes and no.., the CRAFT command (you probably want to use CRAFTANDWAIT btw) always crafts one at a time.., but you can write low level inventory code as well
Use the following commands (see gorlem's wiki or the changelogs for reference)
GetSlot(item,#id,...) // searches the open GUI for first slot that contains item
GetSlotItem(slot,&item,#amount,...) // returns the name and amount (and other details) of the item in slot (slot being the slot number)
SlotClick(slot,button,shift); //click a slot (button is l (left) or r (right), shift does a shift click if true - defaults are l and false)
To get slot IDs, turn on "show slot ID's in containers" in the options and it'll show up in a tooltip if you hover over one
'Cause tomorrow spring is here
&target should be &target.., it's a string variable
Lots of commands require the name of a variable so they have some place to store their results
paramstring is you specifying what you want to prompt for, it's safe to put the double-dollar-thing in there (this is the exception the preprocessor has, it doesn't read the entire script but it can tell if a parameter is inside PROMPT())
Ignore that (specific tutorial) for now, it's some more advanced stuff
CHAT definitely has nothing to do with anything
in fact, unless you're in onChat or chatFilter.., "CHAT" has no meaning whatsoever
You can't nest things like you're doing here.., either you Echo, or you Prompt.., you don't Echo a Prompt (not unless you want to literally say the word)
ECHO("test"); // valid
Prompt($[foo],&var); //valid
Echo(Prompt($[foo],&var) ); //invalid
Also, use a SINGLE set of script tags in your binding =P, it's much easier to read without them in the way
'Cause tomorrow spring is here
I'm try to make an auto mining program for a prison server. I'm wondering if someone has already created a mining bot program that you can put in the cords and how what todo if your inventory if full. Just curious if something like this has been created. Thank you
CHAT still has absolutely no meaning because it's not onChat or the chatFIlter
on those two events, but not here, CHAT means "the message of chat, as sent by the server, that caused this script to run"
Since you're running from a buttonpress.., there's no such message, the script was caused to run by the press of the button
if you want to use IFMATCHES.., think about what you want to compare..., you want to compare &answer.., and see whether it contains the literal string "yes"
so you want IFMATCHES(%&answer%,"yes")
..Note that the second parameter of IFMATCHES is not a string to compare to, but rather a case insensitive regular expression
just letters it takes literally, but many other characters have special meaning
See google for more information (no really, there's a ton of really good sites for leaning/testing regex, and the best just depends on what layout you like most)
alternatively, if you control the options (for example by prompting something along the lines of $$[send %&msg% to %&name% - confirm[yes,no]]), you can use IF(&answer = "yes") to do a simple comparison
IFMATCHES work like a regular IF, they close with ENDIF and you can also put an ELSE in between..
Can you be a bit more specific?, how does prison mining work exactly, what would such a bot do?
It's possible it has been made, yes
'Cause tomorrow spring is here
I made an autosoup script in 1.8 that does not work in 1.10. It involves using the PICK() function. I cannot seem to get it to pick anything, possibly due to it being broken or a change in naming conventions.