Downloads containing RClvl13.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: RabbitCity Remastered P4rr0t Single player 7.5 Download file

File preview

  1. #include "MLLE-Include-1.4.asc"
  2. const bool MLLESetupSuccessful = MLLE::Setup();
  3. #pragma require "RClvl13.j2l"
  4. #pragma require "RClvl13-MLLE-Data-1.j2l"
  5. #pragma require "JazzCity2_Airship.j2t"
  6.  
  7. /*************************************************
  8. Created by Parrot86 - RabbitCity: Remastered
  9. *************************************************/
  10. void onLevelLoad() {
  11.         jjAlert("||Level Name: |Elevator - Port");
  12.         jjAlert("||RabbitCity : Remastered - Level: |1 3");
  13.         jjAlert("");
  14.         jjAlert("");
  15.        
  16.         jjTexturedBGFadePositionY = 1;
  17.         jjUseLayer8Speeds = true;
  18. }
  19.  
  20. // Doors - Thank for zepect!
  21. array<bool> keyPressed(256, false); //arrays holds the state of the keys
  22. int myArea = 0;
  23.  
  24. bool inArea(jjPLAYER@ p, int x1, int y1, int x2, int y2) {
  25.         return ((p.xPos > (x1*32)) && (p.xPos < x2*32 + 32) && (p.yPos > (y1*32)) && (p.yPos < y2*32 + 32));
  26. }
  27. void onKeyDown(jjPLAYER@ p, int key) {
  28.         if(key == 0x26) { //0x26 is up arrow key (all keys at http://msdn.microsoft.com/en-us/library/dd375731(VS.85).aspx)
  29.                 if(myArea == 1) p.warpToID(2, true);
  30.         }
  31. }
  32.  
  33. void onPlayer(jjPLAYER@ p) {
  34.         for(int i = 0; i < 256; i++) { //loop through all the keys
  35.                 if(jjKey[i] && !keyPressed[i]) {
  36.                         onKeyDown(p, i);
  37.                         keyPressed[i] = true;
  38.                 } else if(!jjKey[i] && keyPressed[i]) keyPressed[i] = false;
  39.         }
  40.         if(inArea(p, 68, 16, 68, 16)) myArea = 1;
  41.         else myArea = 0;
  42. }
  43.  
  44. bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) {
  45.         if(myArea == 1) {
  46.                 canvas.drawString(120, 320, "Press UP to go through the elevator!", STRING::MEDIUM, STRING::BOUNCE, 1);
  47.         }
  48.         return false;
  49. }
  50.  
  51. void onFunction0() {
  52.         p.showText("@@@@@@@@#YOU FOUND A SECRET AREA!", STRING::MEDIUM);
  53. }
  54. void onFunction1() {
  55.         jjAlert("");
  56.         jjAlert("");
  57.         jjAlert("");
  58.         jjAlert("");
  59.         jjAlert("");
  60.         jjAlert("");
  61.         jjAlert("YellowRabbit:||||| Aaaaahhhhh, GET OUT!");
  62.         jjAlert("Player:||||| Oopps!");
  63. }
  64. void onFunction2() {
  65.         jjAlert("");
  66.         jjAlert("");
  67.         jjAlert("");
  68.         jjAlert("");
  69.         jjAlert("");
  70.         jjAlert("Player:||||| What is that ?");
  71.         jjAlert("Pink Rabbit:||||| It's submarine");
  72.         jjAlert("Player:||||| Cool");
  73. }
  74. void onFunction3() {
  75.         jjAlert("");
  76.         jjAlert("");
  77.         jjAlert("");
  78.         jjAlert("");
  79.         jjAlert("");
  80.         jjAlert("");
  81.         jjAlert("Capital Rabbit:||||| Hey Player, go to enter the ship");
  82.         jjAlert("Player:||||| OK");
  83. }