Skip to content

Instantly share code, notes, and snippets.

@icemnki
Last active June 25, 2020 18:07
Show Gist options
  • Save icemnki/8b1698528ff2f38d08b662d5b2dfb75e to your computer and use it in GitHub Desktop.
Save icemnki/8b1698528ff2f38d08b662d5b2dfb75e to your computer and use it in GitHub Desktop.
function ( a , { t } )
{// t:#s.name.loc
var c = { } , p , v , r , x , s , i = 0 ,
P = "red0purple0blue0cyan0green0lime0yellow0orange020305070110130170190230290310370410430470530590610670710730790830890970unlock0open0release" . split ( 0 ) ,
z = "_..!|1!|2!|3!|or n|d c| com|k c|color_digit|c002_complement|c003_triad_1|c003_triad_2|!d|t d|pr",
Z = z . split ( '|' )
for ( ; v = ( r = t . call ( c ) ) . match ( z ) ; c [ p ] = x , i ++ )
s = Z . indexOf ( v = v [ 0 ] ) ,
s > 13 ? c . ez_prime = + P [ i % 25 + 8 ] :
s > 11 ? c . digit = i%10:
s > 8 ? p = v :
s > 7 ? c [ v ] = x.length :
x = s > 6 ? P [ i % 3 + 33 ] :
s > 3 ? P [ i % 8 ] :
p = s > 0 ? "c00" + v [ 0 ] :
"EZ_" + v [ 1 ] + v [ 2 ]
return r
}
@TL044CN
Copy link

TL044CN commented Dec 8, 2019

you can shave off more bytes by using string templates and whitespaces (\n and space) because the game doesnt recognize them as a character.
Ive seen someone writing a script that encoded itself completely in whitespaces making it about 30 bytes to the game.
This is an example what you could do:

  P = "red purple blue cyan green lime yellow orange 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 unlock open release" . split` ` ,
  z = "_..!
1!
2!
3!
or n
d c
 com
k c
color_digit
c002_complement
c003_triad_1
c003_triad_2
!d
t d
pr",
  Z = z . split`
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment