Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
RabbitCity 2 | P4rr0t | Single player | 7.7 |
/*************************************************
Created by Parrot86 - RabbitCity 2: The Secret Room
*************************************************/
void onLevelLoad() {
jjAlert("||Level Name: |Jails - Police Station 1 /4");
jjAlert("||RabbitCity 2: The Secret Room - Level: |3");
jjAlert("");
jjAlert("");
}
// 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(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, 7, 7, 7, 7)) myArea = 1;
else if(inArea(p, 214, 84, 214, 84)) myArea = 2;
else myArea = 0;
}
bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) {
if(myArea == 1 || myArea == 2) {
canvas.drawString(135, 300, "Press UP to walk through!", STRING::MEDIUM, STRING::BOUNCE, 1);
}
return false;
}
void onFunction0() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|*** NOTICE: RESTRICTED AREA ***");
jjAlert("This area is under 24hour video surveillance");
jjAlert("|*** WARNING! NO GUNS ALLOWED ***");
jjAlert("");
}
void onFunction1() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|*** IT'S LOCKED - ID ACCESS CARD REQIRED ***");
jjAlert("");
jjAlert("Player:||||| Hmm.. What is this?");
}
void onFunction2() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Hey, do you know, where is the secret room?");
jjAlert("PinkRabbit:||||| Yes, left the door");
jjAlert("Player:||||| Oh Thanks!");
}
void onFunction3() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("FBI Rabbit:||||| Hey, do not enter, thanks!");
jjAlert("Player:||||| OK");
}
void onFunction5() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| It's broken");
}
void onFunction6() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
p.showText("@@@@@*Control Room of video surveillance*", STRING::MEDIUM);
jjAlert("|*** IT'S LOCKED ***");
jjAlert("");
jjAlert("Player:||||| Hmm");
}
void onFunction7() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Oh, I see ID access card...");
jjAlert("GreenSpaz:||||| What are you doing ! ?");
jjAlert("GreenSpaz:||||| Sorry, but you are not allowed!");
jjAlert("Player:||||| Pfff!");
}
void onDrawLayer4(jjPLAYER@ p, jjCANVAS@ canvas) {
canvas.drawString(212*32, 82*32-16, "|-GreenSpaz-",STRING::SMALL);
canvas.drawString(277*32, 92*32-16, "||DANGER",STRING::MEDIUM);
canvas.drawString(290*32+10, 91*32-16, "|OFFICE",STRING::MEDIUM);
}
void onDrawLayer5(jjPLAYER@ p, jjCANVAS@ canvas) {
canvas.drawString(207*32, 92*32-16, "||DANGER",STRING::MEDIUM);
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.