Downloads containing JC2lvl42.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: RabbitCity 2 Remastered P4rr0t Single player N/A Download file

File preview

#include "MLLE-Include-1.4.asc"
const bool MLLESetupSuccessful = MLLE::Setup();
#pragma require "JC2lvl42-MLLE-Data-1.j2l"
#pragma require "A_CarrFIXday.j2t"
#pragma require "JazzCity2_Boat.j2t"
#pragma require "JC2lvl42.j2l"

/*************************************************
Created by Parrot86 - RabbitCity 2: The Secret Room Remastered
*************************************************/
void onLevelLoad() {
	jjAlert("||Level Name: |Metro - Emergency Exit");
	jjAlert("||RabbitCity 2: The Secret Room Remastered - Level: |4 2");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Ouch! That's hurt my head...");
	
}
// Doors - Thank for zepect!
array<bool> 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);
		else if(myArea == 5) p.warpToID(6, true);
		else if(myArea == 6) p.warpToID(5, 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, 36, 107, 36, 107)) myArea = 1;
	else if(inArea(p, 323, 136, 323, 136)) myArea = 2;
	else if(inArea(p, 159, 136, 159, 136)) myArea = 3;
	else if(inArea(p, 200, 107, 200, 107)) myArea = 4;
	else if(inArea(p, 98, 33, 98, 33)) myArea = 5;
	else if(inArea(p, 465, 77, 465, 77)) myArea = 6;
	else myArea = 0;
}

bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) {
	if(myArea == 1 || myArea == 2 || myArea == 3 || myArea == 4 || myArea == 5 || myArea == 6) {
		canvas.drawString(220, 370, "Press UP to walk through!", STRING::MEDIUM, STRING::BOUNCE, 1);
	}
	return false;
}
void onFunction0() {
	p.kill();
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| AAAARRGGHHH!");
}
void onFunction1() {
	p.showText("@@@@@@@@#YOU FOUND A SECRET AREA!", STRING::MEDIUM);
}
void onFunction2() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("|*** WARNING! Fall Down Of Death ***");
	jjAlert("");
	jjAlert("Player:||||| ?");
}
void onFunction3() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Wow, Another train");
}
void onFunction4() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Whoa... underground");
}
void onFunction5() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| What is that ?");
}
void onFunction6() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Underground is too long... I'm very confused");
}
void onFunction7() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Wow, Another metro");
}
void onFunction8() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| What happened to no light ? ");
}
void onFunction9() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("|*** WARNING ***");
	jjAlert("|* DO NOT ENTER *");
	jjAlert("");
}
void onFunction10() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Uh... generator power not working");
}
void onDrawLayer4(jjPLAYER@ p, jjCANVAS@ canvas) {
	canvas.drawString(97*32-5, 30*32-16, "||||EXIT",STRING::MEDIUM);
	canvas.drawString(465*32-20, 74*32-16, "||||METRO",STRING::MEDIUM);
}