#include "MLLE-Include-1.4.asc" const bool MLLESetupSuccessful = MLLE::Setup(); #pragma require "RClvl2.j2l" #pragma require "JazzCity2_Airship.j2t" /************************************************* Created by Parrot86 - RabbitCity: Remastered *************************************************/ void onLevelLoad() { jjAlert("|||----------------> You Got The Green Access Card Key <----------------"); jjAlert(""); jjAlert("||Level Name: |Police - Devan's escaped! 2 / 2"); jjAlert("||RabbitCity : Remastered - Level: |2"); jjAlert(""); jjAlert(""); } // Doors - Thank for zepect! array keyPressed(256, false); //arrays holds the state of the keys int myArea = 0; bool inArea(jjPLAYER@ p, int x1, int y1, int x2, int y2) { return ((p.xPos > (x1*32)) && (p.xPos < x2*32 + 32) && (p.yPos > (y1*32)) && (p.yPos < y2*32 + 32)); } void onKeyDown(jjPLAYER@ p, int key) { if(key == 0x26) { //0x26 is up arrow key (all keys at http://msdn.microsoft.com/en-us/library/dd375731(VS.85).aspx) if(myArea == 1) p.warpToID(2, true); else if(myArea == 2) p.warpToID(1, true); else if(myArea == 3) p.warpToID(4, true); else if(myArea == 4) p.warpToID(3, true); } } void onPlayer(jjPLAYER@ p) { for(int i = 0; i < 256; i++) { //loop through all the keys if(jjKey[i] && !keyPressed[i]) { onKeyDown(p, i); keyPressed[i] = true; } else if(!jjKey[i] && keyPressed[i]) keyPressed[i] = false; } if(inArea(p, 4, 89, 4, 89)) myArea = 1; else if(inArea(p, 154, 19, 154, 19)) myArea = 2; else if(inArea(p, 58, 23, 58, 23)) myArea = 3; else if(inArea(p, 60, 93, 60, 93)) myArea = 4; else myArea = 0; } bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) { if(myArea == 1 || myArea == 2 || myArea == 3 || myArea == 4) { canvas.drawString(220, 320, "Press UP to walk through!", STRING::MEDIUM, STRING::BOUNCE, 1); } return false; } void onFunction0() { jjAlert(""); jjAlert(""); jjAlert(""); jjAlert("|RedRazz:|||| You got it ?"); jjAlert("Player:||||| Yes, but what is green access card ?"); jjAlert("|RedRazz:|||| I dont know, what is it"); jjAlert("|RedRazz:|||| I think... it's Devan have got a green card ?"); jjAlert("Player:||||| Oh, okay"); }