This challenge will start when we have 6 people. The challenge is a Command mod. You have to have 50 lines no acceptions. I will also need an android tester[Can't be one of the moders]. Will have a reward. I will say what it is at the end.
This challenge will start when we have 6 people. The challenge is a Command mod. You have to have 50 lines no acceptions. I will also need an android tester[Can't be one of the moders]. Will have a reward. I will say what it is at the end.
var macroRecordMode = false; //Macro script by 500 Internal Server Error
var macroLines, macroBinds; //I release this under Creative Commons CC0. TLDR: do whatever you want with it. I don't care.
var macroUsage = "Usage: /macro record to start recording\n /macro <name> to stop recording\n /macro play <name> to play back macro\n" +
" /macro bind <name> to bind macro to current item";
function macroProcCmd(cmd) {
var data = cmd.split(" ");
if (macroRecordMode) {
if (data[0] == "macro") {
macroRecordMode = false;
ModPE.saveData("500ise_macro_" + data[1], JSON.stringify(macroLines));
clientMessage("Recorded. run /macro play " + data[1] + " to replay.");
} else {
macroLines.push(cmd);
}
return;
}
if (data[0] != "macro") return;
if (data.length < 2) {
clientMessage(macroUsage);
} else if (data[1] == "record") {
macroRecordMode = true;
clientMessage("Recording macro: /macro <name> to stop");
macroLines = [];
} else if (data[1] == "play") {
var lines = JSON.parse(ModPE.readData("500ise_macro_" + data[2]));
for (var i = 0; i < lines.length; i++)
net.zhuoweizhang.mcpelauncher.ScriptManager.callScriptMethod("procCmd", [lines[i]]);//Will make a proper API for this later.
} else if (data[1] == "bind") {
if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds");
macroBinds[getCarriedItem()] = data[2];
ModPE.saveData("500ise_macrobinds", JSON.stringify(macroBinds));
} else {
clientMessage(macroUsage);
}
}
function macroUseItem(x, y, z, itemId, blockId, side) {
if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds");
if (macroBinds[itemId]) macroProcCmd("macro play " + macroBinds[itemId]);
}
function macroLoadDict(name) {
var a = ModPE.readData("500ise_macrobinds");
return a == ""? {}: JSON.parse(a);
}//copy the stuff above as-is, no need for modification.
function procCmd(cmd) {
macroProcCmd(cmd); //copy this line to the top of your procCmd
}
function useItem(x, y, z, itemId, blockId, side) {
macroUseItem(x, y, z, itemId, blockId, side); //and this line to the top of useItem
}
Exactly 50 lines (though I used 7 lines to make it more copy-and-paste-able into a larger script if needed)
Records commands you run, and then lets you play them back by running a command or tapping an item.
/macro record <- starts the recording
/macro play name <- plays the recording with that name
/macro bind name <- binds the macro with name to the currently held item's ID
During recording:
/macro name <- stop and save the macro to name
Usage example:
/macro record
/give 46 1
/give 280 1
/macro first
This creates a macro with the two give commands, named first. Now, I'll hold a piece of gravel, and do
/macro bind first
Now whenever I tap on the ground with gravel, I get a piece of TNT and a stick.
If I want to unbind, I do
/macro bind
I made this very copy-and-paste friendly: just copy the top part, then add one line to procCmd and one line to useItem.
I release this under CC0: http://creativecommons.org/publicdomain/zero/1.0/ which basically means you can do whatever the ???? you want with it.
var macroRecordMode = false; //Macro script by 500 Internal Server Error
var macroLines, macroBinds; //I release this under Creative Commons CC0. TLDR: do whatever you want with it. I don't care.
var macroUsage = "Usage: /macro record to start recording\n /macro <name> to stop recording\n /macro play <name> to play back macro\n" +
" /macro bind <name> to bind macro to current item";
function macroProcCmd(cmd) {
var data = cmd.split(" ");
if (macroRecordMode) {
if (data[0] == "macro") {
macroRecordMode = false;
ModPE.saveData("500ise_macro_" + data[1], JSON.stringify(macroLines));
clientMessage("Recorded. run /macro play " + data[1] + " to replay.");
} else {
macroLines.push(cmd);
}
return;
}
if (data[0] != "macro") return;
if (data.length < 2) {
clientMessage(macroUsage);
} else if (data[1] == "record") {
macroRecordMode = true;
clientMessage("Recording macro: /macro <name> to stop");
macroLines = [];
} else if (data[1] == "play") {
var lines = JSON.parse(ModPE.readData("500ise_macro_" + data[2]));
for (var i = 0; i < lines.length; i++)
net.zhuoweizhang.mcpelauncher.ScriptManager.callScriptMethod("procCmd", [lines[i]]);//Will make a proper API for this later.
} else if (data[1] == "bind") {
if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds");
macroBinds[getCarriedItem()] = data[2];
ModPE.saveData("500ise_macrobinds", JSON.stringify(macroBinds));
} else {
clientMessage(macroUsage);
}
}
function macroUseItem(x, y, z, itemId, blockId, side) {
if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds");
if (macroBinds[itemId]) macroProcCmd("macro play " + macroBinds[itemId]);
}
function macroLoadDict(name) {
var a = ModPE.readData("500ise_macrobinds");
return a == ""? {}: JSON.parse(a);
}//copy the stuff above as-is, no need for modification.
function procCmd(cmd) {
macroProcCmd(cmd); //copy this line to the top of your procCmd
}
function useItem(x, y, z, itemId, blockId, side) {
macroUseItem(x, y, z, itemId, blockId, side); //and this line to the top of useItem
}
Exactly 50 lines (though I used 7 lines to make it more copy-and-paste-able into a larger script if needed)
Records commands you run, and then lets you play them back by running a command or tapping an item.
/macro record <- starts the recording
/macro play name <- plays the recording with that name
/macro bind name <- binds the macro with name to the currently held item's ID
During recording:
/macro name <- stop and save the macro to name
Usage example:
/macro record
/give 46 1
/give 280 1
/macro first
This creates a macro with the two give commands, named first. Now, I'll hold a piece of gravel, and do
/macro bind first
Now whenever I tap on the ground with gravel, I get a piece of TNT and a stick.
If I want to unbind, I do
/macro bind
I made this very copy-and-paste friendly: just copy the top part, then add one line to procCmd and one line to useItem.
I release this under CC0: http://creativecommons.org/publicdomain/zero/1.0/ which basically means you can do whatever the ???? you want with it.
var macroRecordMode = false; //Macro script by 500 Internal Server Error
var macroLines, macroBinds; //I release this under Creative Commons CC0. TLDR: do whatever you want with it. I don't care.
var macroUsage = "Usage: /macro record to start recording\n /macro <name> to stop recording\n /macro play <name> to play back macro\n" +
" /macro bind <name> to bind macro to current item";
function macroProcCmd(cmd) {
var data = cmd.split(" ");
if (macroRecordMode) {
if (data[0] == "macro") {
macroRecordMode = false;
ModPE.saveData("500ise_macro_" + data[1], JSON.stringify(macroLines));
clientMessage("Recorded. run /macro play " + data[1] + " to replay.");
} else {
macroLines.push(cmd);
}
return;
}
if (data[0] != "macro") return;
if (data.length < 2) {
clientMessage(macroUsage);
} else if (data[1] == "record") {
macroRecordMode = true;
clientMessage("Recording macro: /macro <name> to stop");
macroLines = [];
} else if (data[1] == "play") {
var lines = JSON.parse(ModPE.readData("500ise_macro_" + data[2]));
for (var i = 0; i < lines.length; i++)
net.zhuoweizhang.mcpelauncher.ScriptManager.callScriptMethod("procCmd", [lines[i]]);//Will make a proper API for this later.
} else if (data[1] == "bind") {
if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds");
macroBinds[getCarriedItem()] = data[2];
ModPE.saveData("500ise_macrobinds", JSON.stringify(macroBinds));
} else {
clientMessage(macroUsage);
}
}
function macroUseItem(x, y, z, itemId, blockId, side) {
if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds");
if (macroBinds[itemId]) macroProcCmd("macro play " + macroBinds[itemId]);
}
function macroLoadDict(name) {
var a = ModPE.readData("500ise_macrobinds");
return a == ""? {}: JSON.parse(a);
}//copy the stuff above as-is, no need for modification.
function procCmd(cmd) {
macroProcCmd(cmd); //copy this line to the top of your procCmd
}
function useItem(x, y, z, itemId, blockId, side) {
macroUseItem(x, y, z, itemId, blockId, side); //and this line to the top of useItem
}
Exactly 50 lines (though I used 7 lines to make it more copy-and-paste-able into a larger script if needed)
Records commands you run, and then lets you play them back by running a command or tapping an item.
/macro record <- starts the recording
/macro play name <- plays the recording with that name
/macro bind name <- binds the macro with name to the currently held item's ID
During recording:
/macro name <- stop and save the macro to name
Usage example:
/macro record
/give 46 1
/give 280 1
/macro first
This creates a macro with the two give commands, named first. Now, I'll hold a piece of gravel, and do
/macro bind first
Now whenever I tap on the ground with gravel, I get a piece of TNT and a stick.
If I want to unbind, I do
/macro bind
I made this very copy-and-paste friendly: just copy the top part, then add one line to procCmd and one line to useItem.
I release this under CC0: http://creativecommo...omain/zero/1.0/ which basically means you can do whatever the ???? you want with it.
People in it
1: 500ise
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumChallenge accepted. I'll work on this tomorrow.
Oh.......
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumvar macroRecordMode = false; //Macro script by 500 Internal Server Error var macroLines, macroBinds; //I release this under Creative Commons CC0. TLDR: do whatever you want with it. I don't care. var macroUsage = "Usage: /macro record to start recording\n /macro <name> to stop recording\n /macro play <name> to play back macro\n" + " /macro bind <name> to bind macro to current item"; function macroProcCmd(cmd) { var data = cmd.split(" "); if (macroRecordMode) { if (data[0] == "macro") { macroRecordMode = false; ModPE.saveData("500ise_macro_" + data[1], JSON.stringify(macroLines)); clientMessage("Recorded. run /macro play " + data[1] + " to replay."); } else { macroLines.push(cmd); } return; } if (data[0] != "macro") return; if (data.length < 2) { clientMessage(macroUsage); } else if (data[1] == "record") { macroRecordMode = true; clientMessage("Recording macro: /macro <name> to stop"); macroLines = []; } else if (data[1] == "play") { var lines = JSON.parse(ModPE.readData("500ise_macro_" + data[2])); for (var i = 0; i < lines.length; i++) net.zhuoweizhang.mcpelauncher.ScriptManager.callScriptMethod("procCmd", [lines[i]]);//Will make a proper API for this later. } else if (data[1] == "bind") { if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds"); macroBinds[getCarriedItem()] = data[2]; ModPE.saveData("500ise_macrobinds", JSON.stringify(macroBinds)); } else { clientMessage(macroUsage); } } function macroUseItem(x, y, z, itemId, blockId, side) { if (!macroBinds) macroBinds = macroLoadDict("500ise_macrobinds"); if (macroBinds[itemId]) macroProcCmd("macro play " + macroBinds[itemId]); } function macroLoadDict(name) { var a = ModPE.readData("500ise_macrobinds"); return a == ""? {}: JSON.parse(a); }//copy the stuff above as-is, no need for modification. function procCmd(cmd) { macroProcCmd(cmd); //copy this line to the top of your procCmd } function useItem(x, y, z, itemId, blockId, side) { macroUseItem(x, y, z, itemId, blockId, side); //and this line to the top of useItem }Exactly 50 lines (though I used 7 lines to make it more copy-and-paste-able into a larger script if needed)
Records commands you run, and then lets you play them back by running a command or tapping an item.
Usage example:
/macro record
/give 46 1
/give 280 1
/macro first
This creates a macro with the two give commands, named first. Now, I'll hold a piece of gravel, and do
/macro bind first
Now whenever I tap on the ground with gravel, I get a piece of TNT and a stick.
If I want to unbind, I do
/macro bind
I made this very copy-and-paste friendly: just copy the top part, then add one line to procCmd and one line to useItem.
I release this under CC0: http://creativecommons.org/publicdomain/zero/1.0/ which basically means you can do whatever the ???? you want with it.
Please participate in my challenge 500 ISE! http://www.minecraftforum.net/topic/2112789-gaming-confusions-75-line-modscript-challenge/
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI did
Simply amazing! +1 for you!
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]