Downloads containing JC2lvl95.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 "JC2lvl95-MLLE-Data-1.j2l"
#pragma require "A_CarrFIXday.j2t"
#pragma require "JazzCity2_Airship.j2t"
#pragma require "JC2lvl95.j2l"

/*************************************************
Created by Parrot86 - RabbitCity 2: The Secret Room Remastered
*************************************************/
void onLevelLoad() {
	jjAlert("||Level Name: |Welcome To new house 1 / 6");
	jjAlert("||RabbitCity 2: The Secret Room Remastered - Level: |9 5");
	jjAlert("");
	jjAlert("");

	jjTexturedBGFadePositionY = 0.85;
	jjUseLayer8Speeds = true;
	
}

// 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);
	}
}

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, 135, 69, 135, 69)) myArea = 1;
	else if(inArea(p, 81, 127, 81, 127)) myArea = 2;
	else myArea = 0;
}

bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) {
	if(myArea == 1 || myArea == 2) {
		canvas.drawString(220, 370, "Press UP to walk through!", STRING::MEDIUM, STRING::BOUNCE, 1);
	}
	return false;
}

void onFunction0() { if (p.timerState != TIMER::STARTED) p.timerStart(7*70, false); }
void onFunction1() { p.timerStop(); }
void onPlayerTimerEnd() {
	p.kill();
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| AAAARRGGHHH!");
}
void onFunction2() {
	p.showText("@@@@@@@@#YOU FOUND A SECRET AREA!", STRING::MEDIUM);
}
void onFunction3() {
	p.showText("@@@@@@@@#YOU FOUND A EASTER EGG!", STRING::MEDIUM);
}
void onFunction4() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("|||*** This submarine just like in RabbitCity - Episode 4 ***");
	jjAlert("");
	jjAlert("Player:||||| Oh, yay!");
}
void onFunction5() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("|||*** This boat just like in The Island Of Devan - Episode 3 ***");
	jjAlert("");
	jjAlert("Player:||||| yey!");
}
void onFunction6() {
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Whoa !  That a secret room, but what is this ???");
}
void onFunction7() {
	p.cameraFreeze(15*32, 9*32, true, true); //Black Screen
}
void onFunction8() {
	p.cameraFreeze(24*32, 72*32, true, true);
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("GreenSpaz:||||| Look at your new house !");
	jjAlert("Player:||||| Wooooooow");
	jjAlert("|RedRazz:|||| Cool, beautiful house !");
}
void onFunction9() {
	p.cameraFreeze(135*32, 67*32, true, true);
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("GreenSpaz:||||| Do you like it ?");
	jjAlert("Player:||||| Yes !");
	jjAlert("|RedRazz:|||| Very nice");
	jjAlert("Charlotte:||||| Yes");
}
void onFunction10() {
	p.cameraFreeze(82*32, 125*32, true, true);
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("GreenSpaz:||||| This is hall");
	jjAlert("Player:||||| Wow !");
	jjAlert("|RedRazz:|||| Wow !");
	jjAlert("Charlotte:||||| Wow !");
}
void onFunction11() {
	p.cameraFreeze(219*32, 68*32, true, true);
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("GreenSpaz:||||| This is pool !");
	jjAlert("Player:||||| Whoa !");
	jjAlert("|RedRazz:|||| beautiful pool!");
	jjAlert("Charlotte:||||| Nice!");
}
void onFunction12() {
	p.cameraFreeze(219*32, 68*32, true, true);
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("Player:||||| Yawn, i need some sleep");
	jjAlert("GreenSpaz:||||| OK, i must go, good night !");
	jjAlert("|RedRazz:|||| good night !");
	jjAlert("Charlotte:||||| good night !");
}
void onFunction13() {
	p.cameraFreeze(162*32, 67*32, true, true);
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("");
	jjAlert("GreenSpaz:||||| Hey, SWAT, defend a Player's house, OK?");
	jjAlert("SWAT:||||| OK, sir!");
	jjAlert("GreenSpaz:||||| Good night everywhere !");
}
void onDrawLayer2(jjPLAYER@ play, jjCANVAS@ canvas) {
	canvas.drawString(133*32-5, 66*32-15, "||||House of Jazz",STRING::SMALL);
}
void onDrawLayer4(jjPLAYER@ play, jjCANVAS@ canvas) {
	canvas.drawSprite(216*32-15, 117*32-23, ANIM::JAZZ, jjIsTSF? 10:0, 0, 0, SPRITE::NEONGLOW, 0);
	canvas.drawSprite(217*32-15, 118*32-23, ANIM::SPAZ, jjIsTSF? 10:0, 0, 0, SPRITE::NEONGLOW, 0);
	canvas.drawSprite(215*32-15, 118*32-23, ANIM::LORI, jjIsTSF? 10:0, 0, 0, SPRITE::NEONGLOW, 0);
	canvas.drawString(70*32-15, 138*32-15, "||Control Room Security",STRING::SMALL);
}