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: |Welcome To new house 5 / 6");
jjAlert("||RabbitCity 2: The Secret Room - Level: |99");
jjAlert("");
jjAlert("");
jjAlert("||||| Night Time - 4:55 (24h)");
jjTexturedBGFadePositionY = 0.85;
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 == 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(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.showText("@@@@@@@@#YOU FOUND A SECRET!", STRING::MEDIUM);
}
void onFunction3() {
p.showText("@@@@@@@@#YOU FOUND THE EASTER EGG!", STRING::MEDIUM);
}
void onFunction4() {
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("|||*** This submarine just like in JazzCity - 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(67*32, 152*32, true, true);
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| What the hell ? Two SWAT is died ! ?");
}
void onFunction9() {
p.cameraFreeze(98*32, 152*32, true, true);
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| It's died.... Damn!");
}
void onFunction10() {
p.cameraFreeze(134*32, 152*32, true, true);
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Devan:||||| Hello Player Kids!");
jjAlert("Player:||||| OH DEVAN !!!");
jjAlert("Devan:||||| Ha Ha!");
jjAlert("Player:||||| YOU JUST DIE!");
}
void onFunction11() {
p.cameraUnfreeze();
p.activateBoss();
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| Dieeeeeeeeeeeeee!");
}
void onFunction12() {
p.cameraFreeze(56*32, 119*32, true, true);
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("");
jjAlert("Player:||||| I'm going to find him...");
}
void onFunction13(jjPLAYER@ player) {
player.activateBoss();
}
void onDrawLayer2(jjPLAYER@ play, jjCANVAS@ canvas) {
canvas.drawString(133*32-5, 66*32-15, "||||House of Jazz",STRING::SMALL);
}
void onDrawLayer3(jjPLAYER@ play, jjCANVAS@ canvas) {
canvas.drawString(207*32+20, 151*32-35, "BANG!",STRING::LARGE,STRING::BOUNCE);
canvas.drawString(21*32-15, 152*32-1, "zZz",STRING::SMALL,STRING::BOUNCE);
canvas.drawString(25*32-15, 152*32-1, "zZz",STRING::SMALL,STRING::BOUNCE);
canvas.drawString(29*32-15, 152*32-1, "zZz",STRING::SMALL,STRING::BOUNCE);
canvas.drawString(21*32-15, 175*32-1, "||! ?",STRING::SMALL);
canvas.drawString(25*32-15, 175*32-1, "||! ?",STRING::SMALL);
canvas.drawString(29*32-15, 175*32-1, "||! ?",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(71*32-15, 138*32-15, "||Control Security",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.