LSL1FR/src/Logic_MainGame.lgc

1 line
No EOL
10 KiB
Text

[ onLoad()
if (isset(newRoom))
{
if (varGameTimeHour > 4 &&
varGameTimeHour < 10)
{
new.room(Logic_BadEnding); [ ##LE001##
}
if (!isset(f105))
{
load.sound(Music_Title_Main);
if (varGameControlDebug <= 0)
{
set(enableMenu);
disable.item(CtrlMenuUnusedItem);
status.line.on();
varGameTimeSecond = 0;
varGameTimeMinute = 0;
v117 = 0;
v118 = 0;
reset(boolDisabledRoomJump);
reset(boolDisablePlayer);
accept.input();
animationInterval = 2;
varLarryAttitude = 0;
load.view(Larry_StandAndWalk);
set.view(ego, Larry_StandAndWalk);
varCurrentRoom = 0;
}
}
set.horizon(130);
load.logics(Logic_Street_Outside);
load.pic(currentRoom);
draw.pic(currentRoom);
discard.pic(currentRoom);
load.view(Leftys_FrontHotelSign);
load.view(Leftys_Door);
if (varLarryAttitude != 20 &&
isset(boolLarryWearCondom))
{
load.view(Pnj_Policeman);
load.sound(Sound29);
animate.obj(ObjPoliceMan);
set.view(ObjPoliceMan, Pnj_Policeman);
position(ObjPoliceMan, 0, 145);
draw(ObjPoliceMan);
follow.ego(ObjPoliceMan, 8, f205);
set(f207);
}
animate.obj(Obj_animatedPNJ1);
ignore.horizon(Obj_animatedPNJ1);
ignore.blocks(Obj_animatedPNJ1);
position(Obj_animatedPNJ1, 60, 131);
set.view(Obj_animatedPNJ1, Leftys_Door);
set.priority(Obj_animatedPNJ1, 8);
set.cel(Obj_animatedPNJ1, 0);
draw(Obj_animatedPNJ1);
varRandomValue = 3;
cycle.time(Obj_animatedPNJ1, varRandomValue);
stop.update(Obj_animatedPNJ1);
if (isset(f118))
{
add.to.pic(Leftys_FrontHotelSign, 1, 0, 36, 83, 4, 4);
}
else
{
animate.obj(Obj_animatedPNJ2);
ignore.horizon(Obj_animatedPNJ2);
ignore.blocks(Obj_animatedPNJ2);
ignore.objs(Obj_animatedPNJ2);
position(Obj_animatedPNJ2, 36, 83);
set.view(Obj_animatedPNJ2, Leftys_FrontHotelSign);
set.loop(Obj_animatedPNJ2, 1);
draw(Obj_animatedPNJ2);
cycle.time(Obj_animatedPNJ2, v87);
}
animate.obj(Obj_animatedPNJ3);
ignore.horizon(Obj_animatedPNJ3);
ignore.blocks(Obj_animatedPNJ3);
ignore.objs(Obj_animatedPNJ3);
position(Obj_animatedPNJ3, 83, 84);
set.view(Obj_animatedPNJ3, Leftys_FrontHotelSign);
set.loop(Obj_animatedPNJ3, 2);
draw(Obj_animatedPNJ3);
cycle.time(Obj_animatedPNJ3, v84);
animate.obj(Obj_animatedPNJ4);
ignore.horizon(Obj_animatedPNJ4);
ignore.blocks(Obj_animatedPNJ4);
ignore.objs(Obj_animatedPNJ4);
position(Obj_animatedPNJ4, 134, 67);
set.view(Obj_animatedPNJ4, Leftys_FrontHotelSign);
set.loop(Obj_animatedPNJ4, 0);
draw(Obj_animatedPNJ4);
cycle.time(Obj_animatedPNJ4, v88);
if (isset(f89))
{
load.view(Larry_MST);
load.view(Larry_Dead);
load.view(Larry_Dying);
}
if (previousRoom == 12)
{
varEgoPosX = 134;
varEgoPosY = 142;
set.loop(ego, 1);
start.motion(ego);
}
else
{
if (previousRoom == 15)
{
varEgoPosX = 58;
varEgoPosY = 134;
set.loop(ego, 2);
}
else
{
if (previousRoom != 9)
{
varEgoPosX = 63;
varEgoPosY = 156;
set.loop(ego, 3);
}
}
}
position.v(ego, varEgoPosX, varEgoPosY);
draw(ego);
call(Logic_Street_Outside);
show.pic();
if (varLarryAttitude != 20 &&
isset(boolLarryWearCondom))
{
sound(Sound29, f40);
}
if (!isset(f105))
{
set(f105);
sound(Music_Title_Main, f40);
}
return();
}
[ end onLoad()
reset(boolQuestionnaireFailedOnce);
if (posn(ego, 34, 142, 130, 166))
{
set(boolQuestionnaireFailedOnce);
}
reset(f201);
if (posn(ego, 50, 131, 75, 136))
{
set(f201);
}
[ skip command interpreter if no input
if (!isset(haveInput))
{
goto(Label1);
}
if ((said("examine") ||
said("examine", "building") ||
said("examine", "area") ||
said("examine", "bar")))
{
print("You are outside Lefty's bar. Isn't it wonderful what can be done with "
"a little neon?");
print("There is a sign on that utility pole.");
}
if (said("examine", "doormat"))
{
print("\"Welcome\"");
}
if ((said("increase", "doormat") ||
said("examine", "below", "doormat")))
{
print("Amazed by your own cleverness, you lift the door mat and discover...");
print("...absolutely nothing!");
print("(What did you expect? A key?)");
}
if (isset(f207))
{
if (said("examine", "bouncer"))
{
print("He appears to be chasing someone!");
}
if (said("ask", "bouncer"))
{
print("\"STOP, PERVERT!!!\" shouts the cop.\n\n\"I wonder who he's yelling "
"at,\" you think.");
}
}
if (said("increase", "door"))
{
if (isset(f61))
{
reset(haveMatch);
}
else
{
if (!isset(f201))
{
set(f54);
}
else
{
if (varGameTimeHour > 2 &&
varGameTimeHour < 10)
{
print("You can't. The door is securely locked. ");
print("Lefty's closes at 3:00 a.m.");
}
else
{
set(f67);
start.update(Obj_animatedPNJ1);
end.of.loop(Obj_animatedPNJ1, f202);
prevent.input();
stop.motion(ego);
set(boolDisablePlayer);
}
}
}
}
if (said("examine", "door"))
{
if (!isset(f201))
{
set(f54);
}
else
{
print("Nice tuck and roll job, eh?");
}
}
if ((said("examine", "bar") ||
said("examine", "building")))
{
print("Considering the looks of this place, you decide that next time you'd "
"be better off to spend a little more money on your computer games!");
}
if ((said("examine", "glass") ||
said("look in", "glass")))
{
print("The windows are too dirty to see through.");
}
if ((said("break", "glass") ||
said("beat", "glass")))
{
print("Nah. Lefty would probably break both your legs!");
}
[ end of command interpreter
Label1:
if (!isset(boolDisabledRoomJump) &&
isset(f89) &&
v63 > 5 &&
varCurrentRoom == 0 &&
varLarryAttitude == 0 &&
isset(boolQuestionnaireFailedOnce))
{
set(boolTimingDelayOut);
varTitlePageStep = 0;
}
if (varTitlePageStep == 2 &&
isset(boolQuestionnaireFailedOnce))
{
set(boolTimingDelayOut);
}
[ timing for MST
if (isset(boolTimingDelayOut))
{
reset(boolTimingDelayOut);
++varTitlePageStep;
if (varTitlePageStep == 1)
{
reset(f89);
varLarryAttitude = 25;
set(boolDisabledRoomJump);
prevent.input();
set.view(ego, Larry_MST);
force.update(ego);
print("It appears that the hooker gave you a little more than you bargained "
"for!");
varTimingDelay = 10;
}
if (varTitlePageStep == 2)
{
[ WARNING: this block contains no commands
}
if (varTitlePageStep == 3)
{
print("While life may be possible, it is no longer worth living.");
stop.motion(ego);
set(boolDisablePlayer);
set.view(ego, Larry_Dying);
set.cel(ego, 0);
cycle.time(ego, v85);
set(f34);
end.of.loop(ego, boolTimingDelayOut);
}
if (varTitlePageStep == 4)
{
reset(f34);
stop.cycling(ego);
set.view(ego, Larry_Dead);
set.cel(ego, 0);
varEgoPosX -= 3;
if (varEgoPosY < 160)
{
varEgoPosY += 7;
}
reposition.to.v(ego, varEgoPosX, varEgoPosY);
varTimingDelay = 5;
}
if (varTitlePageStep == 5)
{
set(f34);
cycle.time(ego, varEgoSize);
end.of.loop(ego, boolTimingDelayOut);
}
if (varTitlePageStep == 6)
{
reset(boolDisabledRoomJump);
varJumpToRoom = 8;
}
}
[ end of timing
if (isset(boolSecondHasChange) &&
v63 == 5 &&
isset(boolLarryWearCondom))
{
print("\"STOP, PERVERT!!!\" shouts the cop.\n\n\"I wonder who he's yelling "
"at,\" you think.");
}
if (isset(f205))
{
reset(f205);
set(boolDisabledRoomJump);
erase(ego);
erase(ObjPoliceMan);
set(f50);
print("\"Caught you, pervert!\" the cop shouts. \"We don't like people "
"exposing themselves around this town, especially wearing one of "
"those!\"");
print("Next time, if you insist on wearing your \"lubber\" in public, you "
"should at least zip your fly.");
}
call(Logic_Street_Outside);
if ((edgeEgoHit == RIGHT_EDGE ||
edgeEgoHit == LEFT_EDGE))
{
varJumpToRoom = 9;
}
if (posn(ego, 132, 120, 159, 138))
{
varJumpToRoom = 12;
}
if (isset(f202))
{
accept.input();
start.motion(ego);
reset(boolDisablePlayer);
varJumpToRoom = 15;
}
if (edgeEgoHit == BOTTOM_EDGE)
{
new.room(Logic_Taxi); [ ##LE003##
}
if (edgeEgoHit == RIGHT_EDGE)
{
new.room(Logic_Leftys_Alley); [ ##LE002##
}
if (edgeEgoHit == TOP_EDGE)
{
new.room(Logic_Leftys_Mainroom); [ ##LE004##
}
return();
[ Messages
#message 1 "You are outside Lefty's bar. Isn't it wonderful what can be done with a little neon?"
#message 2 "There is a sign on that utility pole."
#message 3 "It appears that the hooker gave you a little more than you bargained for!"
#message 4 "Considering the looks of this place, you decide that next time you'd be better off to spend a little more money on your computer games!"
#message 5 "While life may be possible, it is no longer worth living."
#message 6 "The windows are too dirty to see through."
#message 7 "Nah. Lefty would probably break both your legs!"
#message 8 "Nice tuck and roll job, eh?"
#message 9 "\"Welcome\""
#message 10 "Amazed by your own cleverness, you lift the door mat and discover..."
#message 11 "...absolutely nothing!"
#message 12 "(What did you expect? A key?)"
#message 13 "You can't. The door is securely locked. "
#message 14 "Lefty's closes at 3:00 a.m."
#message 15 "\"STOP, PERVERT!!!\" shouts the cop.\n\n\"I wonder who he's yelling at,\" you think."
#message 16 "\"Caught you, pervert!\" the cop shouts. \"We don't like people exposing themselves around this town, especially wearing one of those!\""
#message 17 "Next time, if you insist on wearing your \"lubber\" in public, you should at least zip your fly."
#message 18 "He appears to be chasing someone!"