3 ms·
:'( I'm stuck at crispsContest.js lvl
by pacofvf 13y ago
:'( I'm stuck at crispsContest.js lvl
- aaronem 13y agoSo was I, until I took another close look at the code. It's easy to miss the part you can edit.
- majugi 13y agoThis level was driving me crazy (mostly because of the character limit). The solution that I found is kind of silly: it turns out the removeItem function is dumber than you probably think it is.
- SheeEttin 13y agoA good solution would be to remove an invalid item, and the function should silently try to remove the invalid item, but still allow passage. For some reason, even when you have the green key, but try to remove an invalid item, it still doesn't let you through, despite apparently returning false (passable). Additionally it doesn't support injection there, so while "player.removeItem('greenKey'); player.additem('greenKey');" should work, it says "TypeError: undefined is not a function".
- Lozzer 13y agoI thought https://gist.github.com/anonymous/cfe03f2ddb0052b38081 https://gist.github.com/anonymous/cfe03f2ddb0052b38081 was kind of neat, as you still have to solve the puzzle a bit after using it.
- 9193-on 13y agoI approached it like this: player.removeItem('greenKey'); return 0;} if(1==1){(''); Full link: https://gist.github.com/anonymous/c78b439d8f2369e03f68 https://gist.github.com/anonymous/c78b439d8f2369e03f68 Basically, this let's you delete the green item once. After that, it makes sure that return true is never reached (because of the 1==1), so next passages through green are allowed. Kinda liked the sneaky (''); myself :P