// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function repeatedly_execute() {
if (IsGamePaused() == 1) return;
String wScreen = "";
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// TIMER FUN - CASE 1 : AIR BREATHING
if (IsTimerExpired(6))
{
player.Mess("I can't breathe.");
STATUS_CANTBREATH++;
if (STATUS_CANTBREATH > 5)
{
Black();
player.Mess("AAAAAAAAAAAAAAAAAAAAARGH.");
player.ChangeRoom(290); // Temporary Death Room
return; //(I know it's useless but it makes me feel happy)
}
else
{
// NB : SEE ALSO Room 140
if (STATUS_Helmet == 1 && STATUS_Wet == 1)
{
STATUS_CANTBREATH = 0; // reset
player.Mess("Humpf ahhhh.");
player.Mess("I feel much better now!");
}
else
{
SetTimer(6, 120);
}
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// TIMER FUN - CASE 2 : JUNGLE REMOVAL ROUTINE
if (IsTimerExpired(8) && FLAG_JUNGLE_DISP == 1)
{
mAliens.Stop();
BlackOUT(1);
cZak.StopMoving(); // sinon c laid
Wait(60);
//*********************
SWITCH = 124;
//*********************
player.ChangeRoom(120); // Go directly to Mayan Temple
return; //(I know it's useless but it makes me feel happy)
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ STANDARD LUCASARTS MANAGEMENT ++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ 1 - INVENTORY BUTTON ON/OFF ACCORDING TO NUMBER OF ITEMS
if (gVerbs.Visible == true && mouse.Visible == true)
{
if (hidenINV.TopItem > 0) bINV_UP.Visible = true;
else bINV_UP.Visible = false;
if ((hidenINV.TopItem + 4) > (hidenINV.ItemCount-1))bINV_DOWN.Visible = false;
else bINV_DOWN.Visible = true;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ 2 - UPDATE INVENTORY LABELS
if (hidenINV.ItemCount>0) lINV_1HG.Text = hidenINV.ItemAtIndex[hidenINV.TopItem].Name;
else lINV_1HG.Text ="";
if (hidenINV.ItemCount>1 && (hidenINV.TopItem+1 <hidenINV.ItemCount)) lINV_2HD.Text = hidenINV.ItemAtIndex[hidenINV.TopItem+1].Name;
else lINV_2HD.Text ="";
if (hidenINV.ItemCount>2 && (hidenINV.TopItem+2 < hidenINV.ItemCount)) lINV_3BG.Text = hidenINV.ItemAtIndex[hidenINV.TopItem+2].Name;
else lINV_3BG.Text ="";
if (hidenINV.ItemCount>3 && (hidenINV.TopItem+3 < hidenINV.ItemCount)) lINV_4BD.Text = hidenINV.ItemAtIndex[hidenINV.TopItem+3].Name;
else lINV_4BD.Text ="";
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ 3 - UPDATE INVENTORY LABELS COLOR + DATA ACCORDING TO MOUSE POSITION
if (gVerbs.Visible == true)
{
// PUT EVERYTHING PINK BY DEFAUT
lINV_1HG.TextColor = C64Pink;lINV_2HD.TextColor = C64Pink;
lINV_3BG.TextColor = C64Pink;lINV_4BD.TextColor = C64Pink;
lACTION.TextColor = C64Pink;
// LEFT COLUMN
if (mouse.x < bINV_UP.X)
{
if (mouse.y > gVerbs.Y+bINV_3BG.Y){
lINV_3BG.TextColor = C64Jaune;
wScreen = lINV_3BG.Text;}
else if (mouse.y > gVerbs.Y+bINV_1HG.Y){
lINV_1HG.TextColor = C64Jaune;
wScreen = lINV_1HG.Text;}
}
// RIGHT COLUMN
else if (mouse.x > bINV_UP.X+bINV_UP.Width)
{
if (mouse.y > gVerbs.Y+ bINV_3BG.Y){
lINV_4BD.TextColor = C64Jaune;
wScreen = lINV_4BD.Text;}
else if (mouse.y > gVerbs.Y+bINV_1HG.Y){
lINV_2HD.TextColor = C64Jaune;
wScreen = lINV_2HD.Text;}
}
}
//********************************************************
// TO THAT POINT IF THERE'S NULL TRANSFORM IT TO ""
if (wScreen == null) wScreen = ""; // THIS IS ANTI-BUG
//********************************************************
// ACTION LABEL COLOR : PURELY ESTHETICAL
if (mouse.y >= gActionLine.Y && mouse.y <= gActionLine.Y+gActionLine.Height)lACTION.TextColor = C64Jaune;
else lACTION.TextColor = C64Pink;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// NO PUT ON / TAKE OFF FROM ANYTHING ABOVE ACTION LINE
if ((vACTION == aPutOn || vACTION ==aTakeOff) && mouse.y < gActionLine.Y)wScreen = " ";
// IF wScreen was not already fill with an inventory name - Fill it With the sceen Location
if (wScreen == "")wScreen = Game.GetLocationName(mouse.x, mouse.y);
// EXCEPTIOn - NO BOOK TITLE FOR ZAK
if (player.ID == cZak.ID && (player.Room == 10 || player.Room == 9))
{
if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot)
{
LeSpot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
if (LeSpot.GetProperty("ISBOOK") > 0) wScreen = "books";
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ Update ACTION LINE
// +++ CASE 1 - USE / GIVE
if (player.ActiveInventory != null)
{
if (vACTION == aGive)
{
if (GetLocationType(mouse.x, mouse.y) != eLocationCharacter) wScreen ="";
lACTION.Text = String.Format("%s %s to %s",wACTION, player.ActiveInventory.Name, wScreen);
}
// +++ AUTOMATICAL INVENTORY LAUCHES (NO "USE X WITH Y" FOR THOSE)
else if (vACTION == aUse && player.ActiveInventory == iGPS){iGPS.RunInteraction(eModeInteract);}
else if (vACTION == aUse && player.ActiveInventory == iRemoteC){iRemoteC.RunInteraction(eModeInteract); }
else if (vACTION == aUse && player.ActiveInventory == iMuffin) {iMuffin.RunInteraction(eModeInteract);}
// +++ STANDARD USE OF "USE"
else if (vACTION == aUse)
{
lACTION.Text = String.Format("%s %s with %s",wACTION, player.ActiveInventory.Name, wScreen);
}
// STANDARD USE OF ANY OTHER VERBS ON ITEMS
else
{
lACTION.Text = String.Format("%s %s",wACTION, player.ActiveInventory.Name);
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// NO INVENTORY THEREFORE IT'S ON THE SCREEN
else
{
lACTION.Text = String.Format("%s %s",wACTION, wScreen);
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++