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: |Second Police Station 5 / 7");
jjAlert("||RabbitCity 2: The Secret Room - Level: |56");
jjAlert("");
jjAlert("");
jjTexturedBGFadePositionY = 1;
jjUseLayer8Speeds = true;
// Blaster is limited ammo - Thank for zepect!
jjWeapons[WEAPON::BLASTER].infinite = false;
jjWeapons[WEAPON::BLASTER].maximum = maxBlaster;
}
//Blaster Reloading - Thank for zepect!
bool pressedR = false;
const int maxBlaster = 15;
void doReload() {
for(int i = 0; i < jjLocalPlayerCount; i++)
if(jjLocalPlayers[i].ammo[WEAPON::BLASTER] == 0)
jjLocalPlayers[i].ammo[WEAPON::BLASTER] = maxBlaster;
}
bool onDrawAmmo(jjPLAYER@ player, jjCANVAS@ canvas) {
if(player.ammo[WEAPON::BLASTER] == 0)
canvas.drawString(80, jjResolutionHeight - 30, "Press [R] to reload your Blaster!", STRING::MEDIUM, STRING::BOUNCE, 1);
return false;
}
// 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 == 4) p.warpToID(5, true);
else if(myArea == 5) p.warpToID(4, true);
else if(myArea == 6) p.warpToID(7, true);
else if(myArea == 7) p.warpToID(6, true);
else if(myArea == 8) p.warpToID(9, true);
else if(myArea == 9) p.warpToID(8, true);
else if(myArea == 10) p.warpToID(11, true);
else if(myArea == 11) p.warpToID(10, true);
else if(myArea == 12) p.warpToID(13, true);
else if(myArea == 13) p.warpToID(12, true);
else if(myArea == 14) p.warpToID(15, true);
else if(myArea == 15) p.warpToID(14, true);
else if(myArea == 16) p.warpToID(17, true);
else if(myArea == 17) p.warpToID(16, true);
else if(myArea == 18) p.warpToID(19, true);
else if(myArea == 19) p.warpToID(18, true);
else if(myArea == 22) p.warpToID(23, true);
else if(myArea == 23) p.warpToID(22, true);
else if(myArea == 24) p.warpToID(25, true);
else if(myArea == 25) p.warpToID(24, true);
else if(myArea == 26) p.warpToID(27, true);
else if(myArea == 27) p.warpToID(26, true);
else if(myArea == 28) p.warpToID(29, true);
else if(myArea == 29) p.warpToID(28, true);
else if(myArea == 30) p.warpToID(31, true);
else if(myArea == 31) p.warpToID(30, true);
else if(myArea == 38) p.warpToID(39, true);
else if(myArea == 39) p.warpToID(38, true);
else if(myArea == 40) p.warpToID(41, true);
else if(myArea == 41) p.warpToID(40, 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, 86, 179, 86, 179)) myArea = 4;
else if(inArea(p, 255, 23, 255, 23)) myArea = 5;
else if(inArea(p, 235, 23, 235, 23)) myArea = 6;
else if(inArea(p, 106, 179, 106, 179)) myArea = 7;
else if(inArea(p, 198, 179, 198, 179)) myArea = 8;
else if(inArea(p, 567, 179, 567, 179)) myArea = 9;
else if(inArea(p, 568, 59, 568, 59)) myArea = 10;
else if(inArea(p, 197, 59, 197, 59)) myArea = 11;
else if(inArea(p, 181, 55, 181, 55)) myArea = 12;
else if(inArea(p, 262, 55, 262, 55)) myArea = 13;
else if(inArea(p, 262, 115, 262, 115)) myArea = 14;
else if(inArea(p, 181, 115, 181, 115)) myArea = 15;
else if(inArea(p, 146, 115, 146, 115)) myArea = 16;
else if(inArea(p, 297, 115, 297, 115)) myArea = 17;
else if(inArea(p, 311, 115, 311, 115)) myArea = 18;
else if(inArea(p, 132, 115, 132, 115)) myArea = 19;
else if(inArea(p, 274, 359, 274, 359)) myArea = 22;
else if(inArea(p, 169, 359, 169, 359)) myArea = 23;
else if(inArea(p, 274, 299, 274, 299)) myArea = 24;
else if(inArea(p, 169, 299, 169, 299)) myArea = 25;
else if(inArea(p, 52, 329, 52, 329)) myArea = 26;
else if(inArea(p, 356, 59, 356, 59)) myArea = 27;
else if(inArea(p, 274, 239, 274, 239)) myArea = 28;
else if(inArea(p, 169, 239, 169, 239)) myArea = 29;
else if(inArea(p, 274, 209, 274, 209)) myArea = 30;
else if(inArea(p, 169, 209, 169, 209)) myArea = 31;
else if(inArea(p, 383, 376, 383, 376)) myArea = 38; //test
else if(inArea(p, 578, 376, 578, 376)) myArea = 39;
else if(inArea(p, 582, 168, 582, 168)) myArea = 40;
else if(inArea(p, 373, 168, 373, 168)) myArea = 41;
else myArea = 0;
}
bool onDrawHealth(jjPLAYER@ player, jjCANVAS@ canvas) {
if(myArea == 4 || myArea == 5 || myArea == 6 || myArea == 7 || myArea == 8 || myArea == 9 || myArea == 10 || myArea == 11 || myArea == 12 || myArea == 13 || myArea == 14 || myArea == 15 || myArea == 16 || myArea == 17 || myArea == 18 || myArea == 19 || myArea == 22 || myArea == 23 || myArea == 24 || myArea == 25 || myArea == 26 || myArea == 27 || myArea == 28 || myArea == 29 || myArea == 30 || myArea == 31 || myArea == 38 || myArea == 39 || myArea == 40 || myArea == 41) {
canvas.drawString(135, 300, "Press UP to walk through!", STRING::MEDIUM, STRING::BOUNCE, 1);
}
return false;
}
void onMain() {
if(jjKey[0x52] && !pressedR) {
doReload();
pressedR = true;
} else if(!jjKey[0x52]) pressedR = false;
updateGems();
}
void updateGems()
{
for(int i=1;i<jjObjectCount;i++)
{
if(jjObjects[i].isActive)
{
if(jjObjects[i].eventID==OBJECT::SUPERGEM)
{
jjObjects[i].var[0]=jjParameterGet(jjObjects[i].xOrg/32,jjObjects[i].yOrg/32,0,2)+1;
}
if(jjObjects[i].eventID==OBJECT::FLICKERGEM)
{
if(jjEventGet(jjObjects[i].xOrg/32,jjObjects[i].yOrg/32)==OBJECT::SUPERGEM)
{
jjObjects[i].var[0]=jjParameterGet(jjObjects[i].xOrg/32,jjObjects[i].yOrg/32,0,2)+1;
}
else if(jjEventGet(jjObjects[i].xOrg/32,jjObjects[i].yOrg/32+1)==OBJECT::GEMSTOMP)
{
jjObjects[i].var[0]=jjParameterGet(jjObjects[i].xOrg/32,jjObjects[i].yOrg/32+1,0,2)+1;
}
if(jjObjects[i].var[0]==2||jjObjects[i].var[0]==3)
{
jjObjects[i].points=500*(jjObjects[i].var[0]-1);
}
}
}
}
}
void onFunction0() { if (p.timerState != TIMER::STARTED) p.timerStart(2*70, false); }
void onFunction1() { p.timerStop(); }
void onPlayerTimerEnd() {
p.kill();
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| AAAARRGGHHH!");
}
void onFunction2() {
p.kill();
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| AAAARRGGHHH!");
}
void onFunction3() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|*** NOTICE: RESTRICTED AREA ***");
jjAlert("This area is under 24hour video surveillance");
jjAlert("|*** WARNING: NO GUNS ALLOWED ***");
jjAlert("");
}
void onFunction4() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| WHAT??? My gun was detected? What's now?");
}
void onFunction5() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Aaaaaaaahhhhhhh!");
}
void onFunction6() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Ow, I lost my gun! Argh!");
}
void onFunction7() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Uh, I am wanted ! ?");
}
void onFunction8() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| What is this?");
}
void onFunction9() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Hmm, I don't remember this new room");
}
void onFunction10() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|*** IT'S LOCKED ***");
jjAlert("|*** Alert Security: UNSAFE ***");
jjAlert("");
jjAlert("Player:||||| Hmm, this door will not open.");
}
void onFunction11() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| It's broken!");
}
void onFunction12() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|*** NO ENTRY ***");
jjAlert("");
jjAlert("Player:||||| Hmm");
}
void onFunction13() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|||*** NOTICE: ELEVATOR IS OUT OF ORDER ***");
jjAlert("");
jjAlert("Player:||||| Hmm... this elevator is out of order?");
}
void onFunction14() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Nothing here...");
}
void onFunction15() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("*** IT'S UNLOCKED - RED ACCESS CARD ***");
jjAlert("");
jjAlert("Player:||||| Wow!");
}
void onFunction16() {
p.showText("@@@@@@@@#YOU FOUND A SECRET!", STRING::MEDIUM);
}
void onFunction17() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| What does H mean? Hmmm");
}
void onFunction18() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| OH SWAT is here!!");
}
void onFunction19() {
p.cameraFreeze(309*32, 25*32, true, true); // Black Screen
}
void onFunction20() {
p.cameraFreeze(309*32, 25*32, true, true); // Black Screen
p.showText("@@@@@@@@3 hours later...", STRING::MEDIUM);
}
void onFunction21() {
p.cameraFreeze(309*32, 25*32, true, true); // Black Screen
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Charlotte:||||| Ouch! that's hurt my head...");
jjAlert("Charlotte:||||| PLAYER, ARE YOU HERE? PLAYER!!");
jjAlert("Charlotte:||||| OH no... Player is sleeping...");
jjAlert("Charlotte:||||| Pfff.. I must go to another floor");
}
void onFunction22() {
p.cameraFreeze(309*32, 25*32, true, true); // Black Screen
p.showText("@@@@@@@@1 hour later...", STRING::MEDIUM);
}
void onFunction23() {
p.cameraFreeze(309*32, 25*32, true, true); // Black Screen
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Argh! ouch! eh, where is Charlotte ? ! ?");
jjAlert("Player:||||| Damn... I have no blaster gun!");
}
void onFunction24() {
p.cameraUnfreeze();
}
void onFunction25() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Wow... 1 2 floor ?! I didn't know this!");
}
void onFunction26() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| 1 0 floor ? A secret floor ? ! ?");
}
void onFunction27() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Wow! What is this?");
}
void onFunction28() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| 1 1 floor ?");
}
void onFunction29() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| I found a blaster!");
}
void onFunction30() {
p.showText("@@@@@@@@#YOU FOUND THE EASTER EGG!", STRING::MEDIUM);
}
void onFunction31() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| 8 floor ? but where is 7 floor?");
}
void onFunction32() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Yes! It's 7 floor!");
}
void onFunction33() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Whoa...");
}
void onFunction34() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|*** IT'S LOCKED - ID ACCESS CARD REQUIRED ***");
jjAlert("");
jjAlert("Player:||||| ID card???? Argh! it's GreenSpaz...");
}
void onFunction35() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Oh my GOD... Burn rabbits ? !");
}
void onFunction36() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Sign Message:||| Welcome To Second Police Station.");
jjAlert("");
jjAlert("Player:||||| Okay");
}
void onFunction37() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Sign Message:||| Welcome To First Police Station.");
jjAlert("");
jjAlert("Player:||||| Yay");
}
void onFunction38() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Hey Charlotte! What are you doing?");
}
void onDrawLayer4(jjPLAYER@ p, jjCANVAS@ canvas) {
canvas.drawString(75*32, 26*32-18, "|Control Security",STRING::MEDIUM);
canvas.drawString(51*32+10, 327*32-15, "|???",STRING::SMALL);
canvas.drawString(393*32+10, 65*32-25, "||||TreyLina",STRING::SMALL);
canvas.drawString(399*32-5, 65*32-25, "|J|u|h|u",STRING::SMALL);
canvas.drawString(404*32+10, 65*32-25, "|FabiAN|||[NC]",STRING::SMALL);
canvas.drawString(411*32-5, 65*32-25, "|||||555",STRING::SMALL);
canvas.drawString(415*32-5, 65*32-25, "GrytolleCC",STRING::SMALL);
canvas.drawString(397*32-10, 59*32-25, "|||Parrot",STRING::SMALL);
canvas.drawString(403*32-20, 59*32-25, "|ShakerNL",STRING::SMALL);
canvas.drawString(387*32+10, 52*32-35, "|||Micky",STRING::SMALL);
canvas.drawString(387*32-10, 54*32-25, "||BANNED",STRING::SMALL);
canvas.drawString(409*32-20, 59*32-25, "Cooba[si]",STRING::SMALL);
canvas.drawString(414*32-20, 59*32-25, "Blur[si]",STRING::SMALL);
canvas.drawString(397*32-20, 53*32-25, "SlaYer",STRING::SMALL);
canvas.drawString(403*32-20, 53*32-25, "VegitoCC",STRING::SMALL);
canvas.drawString(407*32+20, 53*32-25, "||AndraBoss",STRING::SMALL);
canvas.drawString(412*32+20, 53*32-25, "|||||PurpleJazz",STRING::SMALL);
canvas.drawString(399*32+20, 56*32-35, "Visit: www.jazz2online.com",STRING::MEDIUM,STRING::BOUNCE);
canvas.drawString(394*32+20, 62*32-35, "JJ2 Clan Ladder Visit: www.jazzjackrabbit.net",STRING::MEDIUM,STRING::BOUNCE);
canvas.drawString(400*32+20, 51*32-35, "Easter Egg",STRING::LARGE,STRING::BOUNCE);
canvas.drawString(394*32+20, 68*32-35, "JJ2 Puke Nukem Visit: www.pukenukem.com",STRING::MEDIUM,STRING::BOUNCE);
canvas.drawString(381*32, 372*32, "||||Heliport",STRING::MEDIUM);
canvas.drawString(379*32+15, 163*32, "||||B1 - HELIPORT",STRING::LARGE);
}
void onDrawLayer5(jjPLAYER@ p, jjCANVAS@ canvas) {
canvas.drawString(75*32+8, 28*32-18, "|SCANNING...",STRING::MEDIUM);
canvas.drawString(75*32-3, 29*32-18, "||FIREARM DETECTED",STRING::SMALL);
canvas.drawString(34*32+8, 56*32-18, "|Player Wanted",STRING::MEDIUM);
canvas.drawString(33*32-9, 59*32-18, "|Jazz",STRING::SMALL);
canvas.drawString(37*32-9, 59*32-18, "||Spaz",STRING::SMALL);
canvas.drawString(41*32-9, 59*32-18, "||||Lori",STRING::SMALL);
canvas.drawString(128*32-9, 9*32-18, "||||Second Police Station",STRING::MEDIUM);
canvas.drawString(139*32+10, 9*32-15, "|Exit",STRING::SMALL);
}
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.