Downloads containing RClvl3.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 "RClvl3.j2l"
  4. #pragma require "RClvl3-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: |Police - Exit");
  12.         jjAlert("||RabbitCity : Remastered - Level: |3");
  13.         jjAlert("");
  14.         jjAlert("");
  15. }
  16.  
  17. // Doors - Thank for zepect!
  18. array<bool> keyPressed(256, false); //arrays holds the state of the keys
  19. int myArea = 0;
  20.  
  21. bool inArea(jjPLAYER@ p, int x1, int y1, int x2, int y2) {
  22.         return ((p.xPos > (x1*32)) && (p.xPos < x2*32 + 32) && (p.yPos > (y1*32)) && (p.yPos < y2*32 + 32));
  23. }
  24. void onKeyDown(jjPLAYER@ p, int key) {
  25.         if(key == 0x26) { //0x26 is up arrow key (all keys at http://msdn.microsoft.com/en-us/library/dd375731(VS.85).aspx)
  26.                 if(myArea == 1) p.warpToID(2, true);
  27.         }
  28. }
  29.  
  30. void onPlayer(jjPLAYER@ p) {
  31.         for(int i = 0; i < 256; i++) { //loop through all the keys
  32.                 if(jjKey[i] && !keyPressed[i]) {
  33.                         onKeyDown(p, i);
  34.                         keyPressed[i] = true;
  35.                 } else if(!jjKey[i] && keyPressed[i]) keyPressed[i] = false;
  36.         }
  37.         if(inArea(p, 177, 491, 177, 491)) myArea = 1;
  38.         else myArea = 0;
  39. }
  40.  
  41. bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) {
  42.         if(myArea == 1) {
  43.                 canvas.drawString(120, 320, "Press UP to go through the elevator!", STRING::MEDIUM, STRING::BOUNCE, 1);
  44.         }
  45.         return false;
  46. }
  47.  
  48. void onFunction0() {
  49.         jjAlert("");
  50.         jjAlert("");
  51.         jjAlert("");
  52.         jjAlert("");
  53.         jjAlert("");
  54.         jjAlert("Player:||||| Hey, elevator is working?");
  55.         jjAlert("FBI Spaz:||||| Yes");
  56.         jjAlert("Player:||||| Thanks !");
  57. }
  58. void onFunction1() {
  59.         jjAlert("");
  60.         jjAlert("");
  61.         jjAlert("");
  62.         jjAlert("");
  63.         jjAlert("");
  64.         jjAlert("");
  65.         jjAlert("FBI Spaz:||||| Sorry, but you are not allowed! GET OUT!");
  66.         jjAlert("Player:||||| Why ?");
  67. }