Oh, yeah, i think you're right...
I keep forgetting because it just seems to make so much more sense with it, especially now that CHAT is just another editable textarea
SUGGESTION: CLEARCHAT(chat_container_name)
"slot of an item"?, what?, can you provide an example?
I mean it gets the information about an item in a certain slot.
Would it be possible for someone to guide me through how to use either textareas or labels, i would like to make a small box that shows the current id durability etc( i already have the macro for the item info, i just need to know how to display it )
Hi Toma,
I'm not sure how to do such a thing in this mod, but did you know that by pressing F3+H, an unmodded Minecraft client can give you this information natively? Pressing it will bring up the debug screen, but if you press F3 on it's own again to toggle the debug screen off, the durability information will remain.
I need help. i tried to add this because with tukmc you need to / twice to enter a normal command but when i tried to load minecraft using multimc, it loaded up to the mojang screen then instantly closed. I tried using a new instance on a fresh minecraft unmodded loaded it. Closed minecraft then installed the mod to this one. When i tried to load it, the same thing happens. And its not generating a crash report in the crash-reports folder. what do i do?
I've searched this thread for information regarding this, but after sorting through 100+ posts using the search feature, I've determined that it hasn't been answered.
I'm trying to make a crafting macro that takes into consideration items you currently have in your inventory (i.e. using mixed materials), as well as use prompts to set the total quantity you want. What I've been using to make bookshelves is:
but it makes 144 paper regardless of if you already had paper in your inventory, 48 books regardless of inventory, and 96 wood planks (again) regardless of inventory. It also only makes bookshelves in quantities of 16.
So I'm trying to make a script that will first prompt you for the quantity you want, but if you type "help" as the quantity, I want it to tell the amount of most-raw materials are needed per unit of final product. I think I have the prompting part down correctly (it's terribly incomplete).
$${
PROMPT(&quantity,"$$[quantity]","How many do you want to make?");
IF(&quantity = "help");
LOG("9 Sugarcane, 3 Leather, and 1.5 Logs are needed for each unit");
ELSE;
From there, I am wanting to determine the amount of materials present in the player's inventory (i.e. # of paper, books, and wood planks) and temporarily save those values (like A, B, C, etc. on a graphing calculator). But I can't figure out how to determine the quantity of an item you have in your inventory and how to save the value.
For example, if someone has a stack of 34 oak wood planks (ID=5) and a stack of 7 jungle wood planks (ID=5:3), I can't figure out how to get the quantity unless it's in my hotbar using the GETSTACK command. As for the GETSLOTITEM command, I really can't figure out if it's relevant or what the various values it can find are.
But once we've determined that the player has 41 wood planks, I would like to save the value as [planks] for referencing later in the script. I'm wanting to do the same with the sugarcane, leather, books, and logs so it can calculate if you will be able to make the quantity prompted and return a message stating more of what you need. I came up with a rough code for it, but I'm not 100% on how the mod does order of operations calculations or how flags SET/UNSET work. I'm also running on the assumption that if something is between %s, it is run as a calculation and only the final result is displayed to the user. If I knew how to save values, it'd be a lot more compact.
//Assuming:
//Logs = 'logs'
//Wood planks = 'planks'
//Sugarcane = 'sugarcane'
//Paper = 'paper'
//Books = 'books'
//Leather = 'leather'
IF(((4*&logs)+&planks) < (6*&quantity);
LOG("You need %(((6*&quantity)-((4*&logs)+&planks))/4)% more logs.");
ELSE;
SET(enough_logs);
IF(((3*&sugarcane)+(3*&paper)+&books) < (3*$quantity));
LOG("You need %((3*&quantity)-((&sugarcane/3)+(&paper/3)+&books))% more sugarcane.");
ELSE;
SET(enough_sugarcane);
IF(&books < (3*&quantity));
IF(&leather < ((((3*&quantity)-((&sugarcane/3)+(&paper/3)+&books))+&sugarcane))/3)
LOG("You need %(((((3*&quantity)-((&sugarcane/3)+(&paper/3)+&books))+&sugarcane))/3)-&leather)% more leather.");
ELSE;
SET(enough_leather);
ELSE;
SET(enough_leather);
//Assuming
//Flags work like true/false variables
//Having a pipe between flags means all must be true to return a 'true' IF value
IF(enough_logs | enough_sugarcane | enough_leather);
CRAFT(5,((6*&quantity)-&planks));
CRAFT(339,(3*((3*&quantity)-((&paper/3)+*&books))));
CRAFT(340,((3*&quantity)-&books));
CRAFT(47,(&quantity));
UNSET(enough_logs | enough_sugarcane | enough_leather);
LOG("You have sucessfully crafted %&quantity% bookshelves!");
ELSE;
ENDIF;
}$$
If there is a rounding function, I'd love to know about it; in several of those overly complex equations, having a quantity of paper that is not a multiple of 3 would cause the resulting value to be a fraction, and I don't know if/how the mod might round those.
I really have no idea what I'm doing and am just making code based off what I have seen in other people's posts as an example, since there's no mentioning of a lot of things in the readme.txt and not a whole lot of documentation on features added since it was written.
I've searched this thread for information regarding this, but after sorting through 100+ posts using the search feature, I've determined that it hasn't been answered.
I'm trying to make a crafting macro that takes into consideration items you currently have in your inventory (i.e. using mixed materials), as well as use prompts to set the total quantity you want. What I've been using to make bookshelves is:
but it makes 144 paper regardless of if you already had paper in your inventory, 48 books regardless of inventory, and 96 wood planks (again) regardless of inventory. It also only makes bookshelves in quantities of 16.
So I'm trying to make a script that will first prompt you for the quantity you want, but if you type "help" as the quantity, I want it to tell the amount of most-raw materials are needed per unit of final product. I think I have the prompting part down correctly (it's terribly incomplete).
$${
PROMPT(&quantity,"$$[quantity]","How many do you want to make?");
IF(&quantity = "help");
LOG("9 Sugarcane, 3 Leather, and 1.5 Logs are needed for each unit");
ELSE;
From there, I am wanting to determine the amount of materials present in the player's inventory (i.e. # of paper, books, and wood planks) and temporarily save those values (like A, B, C, etc. on a graphing calculator). But I can't figure out how to determine the quantity of an item you have in your inventory and how to save the value.
For example, if someone has a stack of 34 oak wood planks (ID=5) and a stack of 7 jungle wood planks (ID=5:3), I can't figure out how to get the quantity unless it's in my hotbar using the GETSTACK command. As for the GETSLOTITEM command, I really can't figure out if it's relevant or what the various values it can find are.
But once we've determined that the player has 41 wood planks, I would like to save the value as [planks] for referencing later in the script. I'm wanting to do the same with the sugarcane, leather, books, and logs so it can calculate if you will be able to make the quantity prompted and return a message stating more of what you need. I came up with a rough code for it, but I'm not 100% on how the mod does order of operations calculations or how flags SET/UNSET work. I'm also running on the assumption that if something is between %s, it is run as a calculation and only the final result is displayed to the user. If I knew how to save values, it'd be a lot more compact.
//Assuming:
//Logs = 'logs'
//Wood planks = 'planks'
//Sugarcane = 'sugarcane'
//Paper = 'paper'
//Books = 'books'
//Leather = 'leather'
IF(((4*&logs)+&planks) < (6*&quantity);
LOG("You need %(((6*&quantity)-((4*&logs)+&planks))/4)% more logs.");
ELSE;
SET(enough_logs);
IF(((3*&sugarcane)+(3*&paper)+&books) < (3*$quantity));
LOG("You need %((3*&quantity)-((&sugarcane/3)+(&paper/3)+&books))% more sugarcane.");
ELSE;
SET(enough_sugarcane);
IF(&books < (3*&quantity));
IF(&leather < ((((3*&quantity)-((&sugarcane/3)+(&paper/3)+&books))+&sugarcane))/3)
LOG("You need %(((((3*&quantity)-((&sugarcane/3)+(&paper/3)+&books))+&sugarcane))/3)-&leather)% more leather.");
ELSE;
SET(enough_leather);
ELSE;
SET(enough_leather);
//Assuming
//Flags work like true/false variables
//Having a pipe between flags means all must be true to return a 'true' IF value
IF(enough_logs | enough_sugarcane | enough_leather);
CRAFT(5,((6*&quantity)-&planks));
CRAFT(339,(3*((3*&quantity)-((&paper/3)+*&books))));
CRAFT(340,((3*&quantity)-&books));
CRAFT(47,(&quantity));
UNSET(enough_logs | enough_sugarcane | enough_leather);
LOG("You have sucessfully crafted %&quantity% bookshelves!");
ELSE;
ENDIF;
}$$
If there is a rounding function, I'd love to know about it; in several of those overly complex equations, having a quantity of paper that is not a multiple of 3 would cause the resulting value to be a fraction, and I don't know if/how the mod might round those.
I really have no idea what I'm doing and am just making code based off what I have seen in other people's posts as an example, since there's no mentioning of a lot of things in the readme.txt and not a whole lot of documentation on features added since it was written.
Any help would be greatly appreciated!
You have a few things needing fixing, let me get that for you.
1) The logical or works like Java, it's '||' not '|'
2) Variables aren't just strings (&). Mart made a great explanation and the readme also has an explanation. The problem you have is using strings as counters (#) which are the numerical system in Macros that work as integers (I don't know how they round, but presumably using HALF_UP/round up if over 5)
3) The changelog holds most of the new info, go check it out! Mumfrey is working on a wiki, and Mart has a website somewhere in the last page or two.
I'll work on your script and see if I can make it work.
Feature Request:
The ability to manipulate the multiplayer chat options (turn the chat field on and off, adjust opacity and size of box, etc.)
I think it would be a good feature to turn off the chat easily without having to fumble around in menus to give more room for text areas
To elaborate on this, as far as i understand you mean something like
Jesus that's a lot of parameters...
What should it do if there's a conflict though? if you give coordinates and size where there's something already in the way?
or more width/height than there's space in the grid?
Can we get rid of some of these parameters that are not really important; if so, which ones?
---
I'm not sure what you're trying to do, but you can probably get pretty close with the chatfilter module
You have a few things needing fixing, let me get that for you.
1) The logical or works like Java, it's '||' not '|'
2) Variables aren't just strings (&). Mart made a great explanation and the readme also has an explanation. The problem you have is using strings as counters (#) which are the numerical system in Macros that work as integers (I don't know how they round, but presumably using HALF_UP/round up if over 5)
3) The changelog holds most of the new info, go check it out! Mumfrey is working on a wiki, and Mart has a website somewhere in the last page or two.
I'll work on your script and see if I can make it work.
One more thing, the assumption
//Having a pipe between flags means all must be true to return a 'true' IF value*
is incorrect, you need an AND (&&) operator, not an OR (||)
Jesus that's a lot of parameters...
What should it do if there's a conflict though? if you give coordinates and size where there's something already in the way?
or more width/height than there's space in the grid?
Can we get rid of some of these parameters that are not really important; if so, which ones?
Yeah, something like that, although I was thinking it could be more like the FOV() or the FOG() where there are multiple commands that each change one thing. So maybe commands like:
CHATOPACITY(#number); //To change the opacity of the text
CHATTOGGLE(); //To turn the chat on or off
or maybe it could even utilize already implemented commands (like SET) and just make variables that we could change, so something like:
UNSET(COLORCHAT); //Make the chat all white
SET(CHAT); //Turn the chat on
SET(CHATWIDTH,#number) //Change the width of the chat
Yeah, something like that, although I was thinking it could be more like the FOV() or the FOG() where there are multiple commands that each change one thing. So maybe commands like:
CHATOPACITY(#number); //To change the opacity of the text
CHATTOGGLE(); //To turn the chat on or off
or maybe it could even utilize already implemented commands (like SET) and just make variables that we could change, so something like:
UNSET(COLORCHAT); //Make the chat all white
SET(CHAT); //Turn the chat on
SET(CHATWIDTH,#number) //Change the width of the chat
Definately not SET, that's for setting variables, it'd get confusing
Separate commands maybe, but it may get crowded seeing how many there are..., i don't know
maybe.., yeah
like three or four
GUIPOS for size and position
GUIColor for coloring information
and maybe scrap the settings like "text align"
hmm.., i'll try and think of something to make this more intuitive if i can =P
---
As for yourself, you're still not saying what you want to do, but ChatToggle() actually kinda exists with the chatfilter module
Chatfilter:
IF(!@chat)
Filter()
ENDIF
on a key or macro to turn it off
UnSet(@chat)
ClearChat()
on a key or macro to turn it back on
Set(@chat)
Almost.., only difference is that it clears memory, when you turn it on you only see new messages
Is there anyway to get pick to select colored wool?
I can't get it to differentiate between green wool and white.
I am successfully able to determine what's in front of me via the HITDATA.
But I can't pick the right wool using PICK
I have a script that auto welcomes NEW players to our server, it does this with ONCHAT and looks for the specific text that NEW players get. How could I parse through the text to get the players name to include it in my welcome message?
And is there a site with all the variables, parameters and scripting info? Something more complete than the readme.
Definately not SET, that's for setting variables, it'd get confusing
Separate commands maybe, but it may get crowded seeing how many there are..., i don't know
maybe.., yeah
like three or four
GUIPOS for size and position
GUIColor for coloring information
and maybe scrap the settings like "text align"
hmm.., i'll try and think of something to make this more intuitive if i can =P
---
As for yourself, you're still not saying what you want to do, but ChatToggle() actually kinda exists with the chatfilter module
Chatfilter:
IF(!@chat)
Filter()
ENDIF
on a key or macro to turn it off
UnSet(@chat)
ClearChat()
on a key or macro to turn it back on
Set(@chat)
Almost.., only difference is that it clears memory, when you turn it on you only see new messages
Yeah, 10 or so commands might be overwhelming... I think that the most useful one by far would be the changing the chat size as that seems to be what limits the in game gui screen. And I use filter so much my chat might as well be off
Is there anyway to get pick to select colored wool?
I can't get it to differentiate between green wool and white.
I am successfully able to determine what's in front of me via the HITDATA.
But I can't pick the right wool using PICK
Since pick doesn't look at meta data, this will have to use GETSLOTITEM. Although its a bit clunkier, this should work:
DO;
LOG(%ITEM% : %DURABILITY%);
IF(%HITDATA%=0);
GETSLOTITEM(35:5,#slot,36); //Get the slot with id 35:2 starting from slot 36 and store it in #slot (slot 36 should be the start of the hotbar)
#slot=#slot-35; //Get the relative hotbar slot location
SLOT(%#slot%); //Choose the slot
ENDIF;
IF(%HITDATA%=5);
GETSLOTITEM(35:0,#slot,36);
#slot=#slot-35;
SLOT(%#slot%);
ENDIF;
WAIT(1t); //This ensures that all the numbers, such as ITEM and HITDATA, will update correctly
LOOP;
I have a script that auto welcomes NEW players to our server, it does this with ONCHAT and looks for the specific text that NEW players get. How could I parse through the text to get the players name to include it in my welcome message?
And is there a site with all the variables, parameters and scripting info? Something more complete than the readme.
Assuming the server's message is similar to the server I play on, you would want:
MATCH("%CHATCLEAN%","Welcome (.+?) to the server!",&name);
ECHO("Hello %&name%!");
As for the info, use the change log on the first page of this topic. It has information of nearly everything in the mod.
When I do that I get end of stream error on both my local test server and my multiplayer server.
The end of stream is probably a network issue, but I need to fix the regex anyways. Also, I forgot to add the scripting signs!
Use:
$${MATCH("%CHATCLEAN%","Welcome (.+?) to the server",&name,2);
ECHO("Hello %&name%!");}$$
The extra 2 at the end should make the regex only match the name, since the second match the regex makes is the actual name, not the first match. If that still causes the end of stream, use LOG instead of ECHO. It won't send an actual message to the server, but it will let you monitor it's output
My initial problem was my message was too long. lol. Figured it out when I decided to shorten it for s and giggles. Second after I tried it it started repeating itself in an infinite loop. The 2 you added fixed it! TY!
On another note, im having issues with the warps list. It doesnt iterate through the list of warps on my SMP server. I have the %S (right one?) set for the pages....
My initial problem was my message was too long. lol. Figured it out when I decided to shorten it for s and giggles. Second after I tried it it started repeating itself in an infinite loop. The 2 you added fixed it! TY!
On another note, im having issues with the warps list. It doesnt iterate through the list of warps on my SMP server. I have the %S (right one?) set for the pages....
For a warp list, its as easy as binding "/warp $$w" to a key or button (no script even needed )
You can either add your own warps or just use the option in the $$w menu to import all of the server's warps.
I mean it gets the information about an item in a certain slot.
Macro/Keybind mod Wiki
Hi Toma,
I'm not sure how to do such a thing in this mod, but did you know that by pressing F3+H, an unmodded Minecraft client can give you this information natively? Pressing it will bring up the debug screen, but if you press F3 on it's own again to toggle the debug screen off, the durability information will remain.
http://www.minecraftwiki.net/wiki/Debug_screen
pix
I'm trying to make a crafting macro that takes into consideration items you currently have in your inventory (i.e. using mixed materials), as well as use prompts to set the total quantity you want. What I've been using to make bookshelves is:
but it makes 144 paper regardless of if you already had paper in your inventory, 48 books regardless of inventory, and 96 wood planks (again) regardless of inventory. It also only makes bookshelves in quantities of 16.
So I'm trying to make a script that will first prompt you for the quantity you want, but if you type "help" as the quantity, I want it to tell the amount of most-raw materials are needed per unit of final product. I think I have the prompting part down correctly (it's terribly incomplete).
From there, I am wanting to determine the amount of materials present in the player's inventory (i.e. # of paper, books, and wood planks) and temporarily save those values (like A, B, C, etc. on a graphing calculator). But I can't figure out how to determine the quantity of an item you have in your inventory and how to save the value.
For example, if someone has a stack of 34 oak wood planks (ID=5) and a stack of 7 jungle wood planks (ID=5:3), I can't figure out how to get the quantity unless it's in my hotbar using the GETSTACK command. As for the GETSLOTITEM command, I really can't figure out if it's relevant or what the various values it can find are.
But once we've determined that the player has 41 wood planks, I would like to save the value as [planks] for referencing later in the script. I'm wanting to do the same with the sugarcane, leather, books, and logs so it can calculate if you will be able to make the quantity prompted and return a message stating more of what you need. I came up with a rough code for it, but I'm not 100% on how the mod does order of operations calculations or how flags SET/UNSET work. I'm also running on the assumption that if something is between %s, it is run as a calculation and only the final result is displayed to the user. If I knew how to save values, it'd be a lot more compact.
If there is a rounding function, I'd love to know about it; in several of those overly complex equations, having a quantity of paper that is not a multiple of 3 would cause the resulting value to be a fraction, and I don't know if/how the mod might round those.
I really have no idea what I'm doing and am just making code based off what I have seen in other people's posts as an example, since there's no mentioning of a lot of things in the readme.txt and not a whole lot of documentation on features added since it was written.
Any help would be greatly appreciated!
You have a few things needing fixing, let me get that for you.
1) The logical or works like Java, it's '||' not '|'
2) Variables aren't just strings (&). Mart made a great explanation and the readme also has an explanation. The problem you have is using strings as counters (#) which are the numerical system in Macros that work as integers (I don't know how they round, but presumably using HALF_UP/round up if over 5)
3) The changelog holds most of the new info, go check it out! Mumfrey is working on a wiki, and Mart has a website somewhere in the last page or two.
I'll work on your script and see if I can make it work.
Until next time, immediacy.
Near the bottom in the GUI editor there's a button to add new stuff
add a label, give it %% as text, and give it, for example, DURABILITY as binding
do this in the InGame GUI to have it always visible
For example, to show current time on a label you would set label text to Time=%%
and set the binding to TICKS
Spoiler for giant pic.; note that this is the wrong GUI, but the editor works the same for all
'Cause tomorrow spring is here
You LogTo(name,message), where name is the CONTROL NAME of the textarea
'Cause tomorrow spring is here
To elaborate on this, as far as i understand you mean something like
SetGUIObject(CONTROLNAME,x,y,height,width,foreground,opacity,background,opacity,messagelife,GUI)
SetGUIObject(CONTROLNAME,x,y,height,width,display,binding,foreground,opacity,background,opacity,shadow,textalign,GUI)
SetGUIObject(CONTROLNAME,x,y,height,width,display,foreground,opacity,background,opacity,HideUnbound,CloseGUI,GUI)
Jesus that's a lot of parameters...
What should it do if there's a conflict though? if you give coordinates and size where there's something already in the way?
or more width/height than there's space in the grid?
Can we get rid of some of these parameters that are not really important; if so, which ones?
---
I'm not sure what you're trying to do, but you can probably get pretty close with the chatfilter module
One more thing, the assumption
//Having a pipe between flags means all must be true to return a 'true' IF value*
is incorrect, you need an AND (&&) operator, not an OR (||)
'Cause tomorrow spring is here
Yeah, something like that, although I was thinking it could be more like the FOV() or the FOG() where there are multiple commands that each change one thing. So maybe commands like:
CHATOPACITY(#number); //To change the opacity of the text
CHATTOGGLE(); //To turn the chat on or off
or maybe it could even utilize already implemented commands (like SET) and just make variables that we could change, so something like:
UNSET(COLORCHAT); //Make the chat all white
SET(CHAT); //Turn the chat on
SET(CHATWIDTH,#number) //Change the width of the chat
Definately not SET, that's for setting variables, it'd get confusing
Separate commands maybe, but it may get crowded seeing how many there are..., i don't know
maybe.., yeah
like three or four
GUIPOS for size and position
GUIColor for coloring information
and maybe scrap the settings like "text align"
hmm.., i'll try and think of something to make this more intuitive if i can =P
---
As for yourself, you're still not saying what you want to do, but ChatToggle() actually kinda exists with the chatfilter module
Chatfilter:
IF(!@chat)
Filter()
ENDIF
on a key or macro to turn it off
UnSet(@chat)
ClearChat()
on a key or macro to turn it back on
Set(@chat)
Almost.., only difference is that it clears memory, when you turn it on you only see new messages
'Cause tomorrow spring is here
I can't get it to differentiate between green wool and white.
I am successfully able to determine what's in front of me via the HITDATA.
But I can't pick the right wool using PICK
I Rigged it to work.... Jeez...
So sick of rigging my programs to work due to poor documentation.
I'd be willing to help on the wiki.
*Cringe* *cringe*
And is there a site with all the variables, parameters and scripting info? Something more complete than the readme.
Yeah, 10 or so commands might be overwhelming... I think that the most useful one by far would be the changing the chat size as that seems to be what limits the in game gui screen. And I use filter so much my chat might as well be off
Since pick doesn't look at meta data, this will have to use GETSLOTITEM. Although its a bit clunkier, this should work:
Assuming the server's message is similar to the server I play on, you would want:
As for the info, use the change log on the first page of this topic. It has information of nearly everything in the mod.
When I do that I get end of stream error on both my local test server and my multiplayer server.
The end of stream is probably a network issue, but I need to fix the regex anyways. Also, I forgot to add the scripting signs!
Use:
The extra 2 at the end should make the regex only match the name, since the second match the regex makes is the actual name, not the first match. If that still causes the end of stream, use LOG instead of ECHO. It won't send an actual message to the server, but it will let you monitor it's output
On another note, im having issues with the warps list. It doesnt iterate through the list of warps on my SMP server. I have the %S (right one?) set for the pages....
For a warp list, its as easy as binding "/warp $$w" to a key or button (no script even needed )
You can either add your own warps or just use the option in the $$w menu to import all of the server's warps.
Yeah, you can add $$! to the command at the point where you want to finish it