G2A Many GEOs
SHARE
TWEET

Untitled

a guest Aug 13th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*****************
  2.  * cellBlockA.js *
  3.  *****************
  4.  *
  5.  * Good morning, Dr. Eval.
  6.  *
  7.  * It wasn't easy, but I've managed to get your computer down
  8.  * to you. This system might be unfamiliar, but the underlying
  9.  * code is still JavaScript. Just like we predicted.
  10.  *
  11.  * Now, let's get what we came here for and then get you out of
  12.  * here. Easy peasy.
  13.  *
  14.  * I've given you as much access to their code as I could, but
  15.  * it's not perfect. The red background indicates lines that
  16.  * are off-limits from editing.
  17.  *
  18.  * The code currently places blocks in a rectangle surrounding
  19.  * you. All you need to do is make a gap. You don't even need
  20.  * to do anything extra. In fact, you should be doing less.
  21.  */
  22.  
  23. function startLevel(map) {
  24.     map.displayChapter('Chapter 1\nBreakout');
  25.  
  26.     map.placePlayer(7, 5);
  27.  
  28.     for (y = 3; y <= map.getHeight() - 5; y++) {
  29.         //map.placeObject(5, y, 'block');
  30.         map.placeObject(map.getWidth() - 5, y, 'block');
  31.     }
  32.  
  33.     for (x = 5; x <= map.getWidth() - 5; x++) {
  34.         map.placeObject(x, 3, 'block');
  35.         map.placeObject(x, map.getHeight() - 10, 'block');
  36.     }
  37.  
  38.     map.placeObject(15, 12, 'computer');
  39.  
  40.     map.placeObject(map.getWidth()-7, map.getHeight()-5, 'exit');
  41. }
  42.  
  43. function onExit(map) {
  44.     if (!map.getPlayer().hasItem('computer')) {
  45.         map.writeStatus("Don't forget to pick up the computer!");
  46.         return false;
  47.     } else {
  48.         return true;
  49.     }
  50. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top