You will earn a custom banner for completing this task.
TOPIC
Commands
Mob spawning
Gamemode Change ( With inv clear )
Challenges Done
500 ISE
var
v0
=
'procCmd=function(a){var b={chicken:10,cow:11,pig:1';
var
v1
=
'2,sheep:13,zombie:32,creeper:33,skeleton:34,spider';
var
v2
=
':35,zombiepigman:36};a=a.split(" ");var c=a[0];if(';
var
v3
=
'"gamemode"==c)a=parseInt(a[1]),Level.setGameMode(a';
var
v4
=
'),clientMessage("Set gamemode to "+(1==a?"creative';
var
v5
=
'":"survival"));else if("spawnmob"==c)for(b=b[a[1].';
var
v6
=
'toLowerCase()],"undefined"==typeof b&&(b=parseInt(';
var
v7
=
'a[1])),c=0,a=2<a.length?parseInt(a[2]):1;c<a;c++)L';
var
v8
=
'evel.spawnMob(getPlayerX(),getPlayerY(),getPlayerZ';
var
v9
=
'(),B)};\n';
This challenge is will be for the public !
What You Need To Do
- Make 10 Variables
- Use 10 Variables
- Use 75 Lines ! No Less , No More
- Comments don't count as lines
How To Submit Your Mod- Add Your Name
- Link to mod
- Mod Info
You Can Have 2 People To Help If Needed- Just add there names in post
You will earn a custom banner for completing this task.Commands
Mob spawning
Gamemode Change ( With inv clear )
Challenges Done
500 ISE
var
v0
=
'procCmd=function(a){var b={chicken:10,cow:11,pig:1';
var
v1
=
'2,sheep:13,zombie:32,creeper:33,skeleton:34,spider';
var
v2
=
':35,zombiepigman:36};a=a.split(" ");var c=a[0];if(';
var
v3
=
'"gamemode"==c)a=parseInt(a[1]),Level.setGameMode(a';
var
v4
=
'),clientMessage("Set gamemode to "+(1==a?"creative';
var
v5
=
'":"survival"));else if("spawnmob"==c)for(b=b[a[1].';
var
v6
=
'toLowerCase()],"undefined"==typeof b&&(b=parseInt(';
var
v7
=
'a[1])),c=0,a=2<a.length?parseInt(a[2]):1;c<a;c++)L';
var
v8
=
'evel.spawnMob(getPlayerX(),getPlayerY(),getPlayerZ';
var
v9
=
'(),B)};\n';
var
procCmd;
eval
(
v0
+
v1
+
v2
+
v3
+
v4
+
v5
+
v6
+
v7
+
v8
+
v9
);
Waiting
Good Luck
Click Banner to SUBSCRIBE!!! I'm in the Team Flame Clan!!! Click that little green arrow!! -------------->
Thanks
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumvar v0 = 'procCmd=function(a){var b={chicken:10,cow:11,pig:1'; var v1 = '2,sheep:13,zombie:32,creeper:33,skeleton:34,spider'; var v2 = ':35,zombiepigman:36};a=a.split(" ");var c=a[0];if('; var v3 = '"gamemode"==c)a=parseInt(a[1]),Level.setGameMode(a'; var v4 = '),clientMessage("Set gamemode to "+(1==a?"creative'; var v5 = '":"survival"));else if("spawnmob"==c)for(b=b[a[1].'; var v6 = 'toLowerCase()],"undefined"==typeof b&&(b=parseInt('; var v7 = 'a[1])),c=0,a=2<a.length?parseInt(a[2]):1;c<a;c++)L'; var v8 = 'evel.spawnMob(getPlayerX(),getPlayerY(),getPlayerZ'; var v9 = '(),B)};\n'; var procCmd; eval ( v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 );Challenge complete. Made with the help of Google Closure Compiler and a Python script I wrote.
Usage:
switches gamemode.
spawns 5 chickens.
does the same in a nerdier way.
spawns one chicken.
Original unobfuscated script:
var procCmd; procCmd = function(cmd) { var mobIds = { "chicken": 10, "cow": 11, "pig": 12, "sheep": 13, "zombie": 32, "creeper": 33, "skeleton": 34, "spider": 35, "zombiepigman": 36 }; var data = cmd.split(" "); var c = data[0]; if (c == "gamemode") { var newmode = parseInt(data[1]); Level.setGameMode(newmode); clientMessage("Set gamemode to " + (newmode == 1? "creative": "survival")); } else if (c == "spawnmob") { var mobId = mobIds[data[1].toLowerCase()]; if (typeof(mobId) == "undefined") { mobId = parseInt(data[1]); } for (var i = 0, count = data.length > 2? parseInt(data[2]) : 1; i < count; i++) { Level.spawnMob(getPlayerX(), getPlayerY(), getPlayerZ(), mobId); } } }Edit: external code link.
https://gist.github.com/zhuowei/7130455
wow
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOK, so technically I used 11 global variables, but one is used to hold procCmd, which isn't a value, but a function, so doesn't count.