Blockland Forums > Modification Help
1024 byte scripting contest
Demian:
--- Quote from: Resonance_Cascade on January 19, 2011, 08:54:40 AM ---Made a 949 byte terrain generator
--- End quote ---
So you got that thing working then? I though it only generated terrain from actual .ter files?
Space Guy:
--- Quote from: Destiny/Zack0Wack0 on January 19, 2011, 07:03:30 AM ---
--- Code: ---function z(%a){if(%a)moveForward(!$mvForwardAction);}%c=$remapCount;$remapDivision[%c]="Move";$remapName[%c]="AutoMove";$remapCmd[%c]="z";$remapCount++;
--- End code ---
--- End quote ---
--- Code: ---function z(%a){if(%a)moveForward(!$mvForwardAction);}$remapDivision[%c=$remapCount]=Move;$remapName[%c]=AutoMove;$remapCmd[%c]=z;$remapCount++;
--- End code ---
It appears to work when I put it in the console, anyway.
Truce:
--- Quote from: Space Guy on January 19, 2011, 01:27:40 PM ---
--- Code: ---function z(%a){if(%a)moveForward(!$mvForwardAction);}$remapDivision[%c=$remapCount]=Move;$remapName[%c]=AutoMove;$remapCmd[%c]=z;$remapCount++;
--- End code ---
It appears to work when I put it in the console, anyway.
--- End quote ---
--- Code: ---function a(){moveForward($a++%4);}$remapDivision[%a=$remapCount]=Move;$remapName[%a]=Automove;$remapCmd[%a]=a;$remapCount++;
--- End code ---
DrenDran:
--- Quote from: Ephialtes on January 19, 2011, 07:27:29 AM ---I don't think you understand how keybinds work.
--- End quote ---
Me?
I generally did, but I didn't know that
--- Quote from: Truce on January 19, 2011, 09:17:23 AM ---The function is passed a boolean, with true indicating a press. He checked that boolean.
--- End quote ---
And now I do.
Truce:
Added in another block to my mining mod but had to come up with a compression system to make it all fit.
Here's an overview of all the features it has:
- Executing the script sets up the initial mine and places you in it.
- The mine expands as you dig deeper into it (will last forever).
- The spawn is in the mine for Self Deleters and others who join.
- Different block types / colors are present throughout the mine.
- 90% chance of dirt, 8% chance of silver, 2% chance of gold.
- The default hammer tool is used to mine the bricks.
- The block type you just mined is indicated in the chat for clarity.
- The wrench is disabled, as well as using the plant brick button.
- A varying number of hits are required for different block types.
- The remaining hits are indicated to the user mining the block.
- Dirt takes 5, silver takes 25, and gold takes 50 hits.
- Typing /status will tell the user their block counts.
- Messages are easy to understand and are colored.
--- Quote from: Truce on January 13, 2011, 09:01:05 PM ---
--- Quote ---//6a&{`=Ètrandom(0,99>new fxdts7(aøÅ=%a;datablock=74xcubedata;is
|ed=1;isbaseplate=1;Ë=`<2?1:(`<10?5:8);a=`<2?50:(`<10?25:5);}.|(
>$a[%a]=1;}packaÈ a{6fxdts7Á{'Á;for(`=0;`<18;`+=3)if(!$a[%c=vect
oradd(%a.Å,Ètwords("#-#0 #-#0 #-2",`,`+2))])a(%c>}6hammerimaÈz{i
f(%d.aø%i=%d.a--É=`.clientÉ.centerprint("\c3"@%i@" hits left.",1
>if(!%iø'z;%h=%d.ËÉ.a[%h]++É^mined "@(%h==8?dirt:(%h==5?silver:g
old))@".">}}}6Èttrustlevel(øreturn 2;}6gameconneqÄ{'Ä;%a.~.settr
ansform("0 0 -3">}Â|7(ø}6wrenchimaÈ::onfire(ø}};activatepackaÈ(a
>Âstatus&{%a^have "À8*Êdirt+"À5*Êsilver+"À1*Êgold.">}missiongrou
p.Ètobject(5).delete(>a("0 0 0">ÃÃlocalclientconneq.~.kill(>
new fileobject(a).openforread($con::file);$a=a.readline();a.clos
e();while($b++<25)$a=strreplace($a,getsubstr(" øËÊÉÈÅÄÃÂÁÀ|`'>~&
^#76zq/",$b,1),getfield("){\tcolorid\t1@\" \t;%g\tge\tposition\t
::spawn~&\ta.kill7(>\t6servercmd\t::ondeath&\t@%a.a\tplant\t%b\t
parent\t);\tplayer\t(%a)\t.chatmessage(\"\\c3You \t2 0 0 \tbrick
\tfunq \t::onhitobject(%a,%b,%c,%d,%e,%f)\tction",$b-1));eval($a);
--- End quote ---
Make sure to delete the line breaks EXCEPT the one after the green.
(There should be 2 lines, and the file should be 1024 bytes with \r\n).
--- End quote ---