LSL1FR/src/Logic_Casino_Outside.lgc
2021-04-25 22:23:00 +02:00

1 line
No EOL
11 KiB
Text

if (isset(newRoom))
{
if (varWatchHour > 4 &&
varWatchHour < 10)
{
new.room(Logic_BadEnding); [ ##LE001##
}
set.horizon(107);
load.pic(currentRoom);
draw.pic(currentRoom);
discard.pic(currentRoom);
load.logics(Logic_Street_Outside);
load.view(Sign_Casino);
random(1, 3, varRandomValue);
if (isset(boolDebugInGame))
{
varRandomValue = 1;
}
if (varLarryAttitude == ATTITUDE_NORMAL &&
varRandomValue == 1 &&
obj.in.room("Apple", currentRoom))
{
load.view(Pnj_Casino_Loser);
animate.obj(Obj_animatedPNJ3);
set.view(Obj_animatedPNJ3, Pnj_Casino_Loser);
position(Obj_animatedPNJ3, 120, 131);
random(4, 7, varPickedQuestion1);
object.on.land(Obj_animatedPNJ3);
}
animate.obj(Obj_animatedPNJ1);
ignore.blocks(Obj_animatedPNJ1);
ignore.objs(Obj_animatedPNJ1);
set.view(Obj_animatedPNJ1, Sign_Casino);
set.loop(Obj_animatedPNJ1, 1);
fix.loop(Obj_animatedPNJ1);
set.cel(Obj_animatedPNJ1, 0);
stop.cycling(Obj_animatedPNJ1);
animate.obj(Obj_animatedPNJ2);
ignore.blocks(Obj_animatedPNJ2);
ignore.objs(Obj_animatedPNJ2);
set.view(Obj_animatedPNJ2, Sign_Casino);
set.loop(Obj_animatedPNJ2, 1);
fix.loop(Obj_animatedPNJ2);
set.cel(Obj_animatedPNJ2, 1);
stop.cycling(Obj_animatedPNJ2);
if (isset(boolSlowProcessor))
{
add.to.pic(Sign_Casino, 0, 1, 51, 61, 4, 4);
}
else
{
animate.obj(Obj_animatedPNJ4);
ignore.horizon(Obj_animatedPNJ4);
ignore.blocks(Obj_animatedPNJ4);
ignore.objs(Obj_animatedPNJ4);
set.view(Obj_animatedPNJ4, Sign_Casino);
set.loop(Obj_animatedPNJ4, 0);
position(Obj_animatedPNJ4, 51, 61);
draw(Obj_animatedPNJ4);
}
if (previousRoom == 31)
{
varEgoPosX = 75;
varEgoPosY = 109;
set.loop(ego, 2);
position(Obj_animatedPNJ1, 57, 108);
position(Obj_animatedPNJ2, 88, 108);
draw(Obj_animatedPNJ1);
draw(Obj_animatedPNJ2);
set(boolNearDoor);
}
else
{
position(Obj_animatedPNJ1, 67, 108);
draw(Obj_animatedPNJ1);
position(Obj_animatedPNJ2, 78, 108);
draw(Obj_animatedPNJ2);
if (previousRoom == 9)
{
varEgoPosX = 0;
varEgoPosY = 141;
}
else
{
if (previousRoom != 33)
{
varEgoPosX = 77;
varEgoPosY = 155;
}
}
}
position.v(ego, varEgoPosX, varEgoPosY);
draw(ego);
object.on.anything(ego);
call(Logic_Street_Outside);
show.pic();
return();
}
reset(f204);
distance(Obj_animatedPNJ3, ego, varRandomValue);
if (isset(boolCopAtEgo) &&
varRandomValue < 25)
{
set(f204);
}
reset(boolInClear);
if (posn(ego, 63, 100, 86, 113))
{
set(boolInClear);
}
if (varYunchTimer == 3)
{
distance(Obj_animatedPNJ3, ego, varRandomValue);
if (varRandomValue < 255 &&
varRandomValue > 20)
{
print("\"Hey, come back!\" says the man. \"Are you sure you don't want to "
"buy an apple?\"");
set(boolDoorOpen);
varYunchTimer = 1;
varPickedQuestion1 = 0;
}
}
if (!isset(haveInput))
{
goto(Label1);
}
if ((said("examine") ||
said("examine", "building") ||
said("examine", "area") ||
said("examine", "casino") ||
said("examine", "casino")))
{
print("It's a casino!");
}
if ((said("examine", "bush") ||
said("look in", "bush") ||
said("look in", "pot") ||
said("examine", "pot")))
{
print("They are nicely manicured, but of no help to you.");
}
if (said("increase", "door"))
{
if (isset(f61))
{
reset(haveMatch);
}
else
{
print("They're automatic. Get closer.");
}
}
if (said("examine", "brick"))
{
print("Isn't it wonderful what can be done with a few light bulbs?");
}
if ((said("examine", "glass") ||
said("examine", "glass") ||
said("examine", "door") ||
said("examine", "glass", "door") ||
said("look in", "glass")))
{
print("Pretty flashy, eh?");
}
if (isset(boolCopAtEgo))
{
if (said("examine", "bouncer"))
{
print("He's yet another poor soul who donated his everything so the shrine "
"of Lost Wages could continue to flourish.");
}
if (said("ask", "bouncer"))
{
if (!isset(f204))
{
set(boolNotCloseEnough);
}
else
{
if (has("Apple"))
{
print("\"Thanks a lot. See you later, pal.\"");
}
else
{
if (varYunchTimer < 3)
{
print("\"Apples. Apples! APPLES for sale!!\"");
}
else
{
print("\"My pleasure was always the slot machines,\" he says. \"Say, "
"are we going to stand here and chitchat all night, or am I "
"going to make a sale?\"");
}
}
}
}
if ((said("ask", "name") ||
said("ask", "bouncer", "about", "name") ||
said("catch", "name") ||
said("ask", "about", "name") ||
said("ask", "bouncer", "name") ||
said("name") ||
said("name", "bouncer") ||
said("bouncer", "name")))
{
if (!isset(f204))
{
set(boolNotCloseEnough);
}
else
{
print("\"Why, Steve. Nice of you to ask,\" he responds.");
}
}
if ((varYunchTimer == 2 ||
varYunchTimer == 3))
{
if ((said("n") ||
said("catch", "lost", "rol") ||
said("board", "away", "rol") ||
said("copulate", "off", "rol") ||
said("n", "thank you")))
{
print("\"Ok, be that way!\" he says, and disappears into the night.");
set(boolDoorOpen);
varYunchTimer = 3;
varPickedQuestion1 = 0;
}
}
if ((said("ask", "last", "name") ||
said("last", "name") ||
said("last", "name", "bouncer") ||
said("bouncer", "last", "name")))
{
if (!isset(f204))
{
set(boolNotCloseEnough);
}
else
{
print("\"Well, my friends call me 'Woz,' but I don't consider you a "
"friend.\"");
}
}
if (said("catch", "barrel"))
{
if (!isset(f204))
{
set(boolNotCloseEnough);
}
else
{
print("\"Oh no, you don't!\" exclaims the man.");
}
}
if (said("look in", "barrel"))
{
if (!isset(f204))
{
set(boolNotCloseEnough);
}
else
{
print("\"Say, you really did lose everything,\" you tell the man.");
}
}
if ((said("buy", "rol") ||
said("add", "bucks", "bouncer") ||
said("buy", "rol")))
{
if (!isset(f204))
{
set(boolNotCloseEnough);
}
else
{
if (!obj.in.room("Apple", currentRoom))
{
print("\"You know,\" says the man, peering deep into his barrel, \"I'm "
"all out! But thank you for your continued interest.\"");
}
else
{
currentScore += 3;
print("\"Thank you very much, sir. Please call again, whenever you are "
"in the neighborhood,\" says the man. And with that, he walks "
"away into the night.");
get("Apple");
--varInGameMoney;
set(boolDoorOpen);
varPickedQuestion1 = 0;
varYunchTimer = 3;
}
}
}
}
Label1:
if (isset(boolSecondHasChange))
{
--varPickedQuestion1;
if (varPickedQuestion1 == 1)
{
set(boolDoorOpen);
}
}
if (varYunchTimer == 3 &&
edgeEgoHit > NOT_HIT)
{
print("\"I take that as a 'No,'\" he says pleasantly. \"Very well then, "
"perhaps some other time.\"");
}
if (varYunchTimer == 4 &&
objHitEdge == 3)
{
set(boolDoorOpen);
}
if (isset(boolDoorOpen))
{
reset(boolDoorOpen);
++varYunchTimer;
if (varYunchTimer == 1)
{
draw(Obj_animatedPNJ3);
set(boolCopAtEgo);
varYunchTimer = 2;
}
if (varYunchTimer == 2)
{
start.cycling(Obj_animatedPNJ3);
follow.ego(Obj_animatedPNJ3, 8, boolDoorOpen);
}
if (varYunchTimer == 3)
{
varPickedQuestion1 = 11;
stop.cycling(Obj_animatedPNJ3);
print("\"Hello, sir. Would you help out a poor unfortunate by purchasing an "
"apple?\"");
print("\"The price is reasonable: only $1.00.\"");
set(boolNearPerson);
}
if (varYunchTimer == 4)
{
start.cycling(Obj_animatedPNJ3);
wander(Obj_animatedPNJ3);
}
if (varYunchTimer == 5)
{
erase(Obj_animatedPNJ3);
reset(boolCopAtEgo);
varYunchTimer = 0;
}
}
if (isset(boolInClear))
{
ignore.blocks(ego);
observe.objs(Obj_animatedPNJ1);
observe.objs(Obj_animatedPNJ2);
observe.objs(ego);
if (!isset(boolNearDoor))
{
set(boolNearDoor);
move.obj(Obj_animatedPNJ1, 57, 108, 1, boolMusicDone);
move.obj(Obj_animatedPNJ2, 88, 108, 1, boolMusicDone);
}
}
else
{
observe.blocks(ego);
if (isset(boolNearDoor))
{
reset(boolNearDoor);
ignore.objs(Obj_animatedPNJ1);
ignore.objs(Obj_animatedPNJ2);
move.obj(Obj_animatedPNJ1, 67, 108, 1, boolMusicDone);
move.obj(Obj_animatedPNJ2, 78, 108, 1, boolMusicDone);
}
}
call(Logic_Street_Outside);
if (edgeEgoHit == TOP_EDGE)
{
varJumpToRoom = 31;
}
if (edgeEgoHit == RIGHT_EDGE)
{
varJumpToRoom = 33;
}
if (edgeEgoHit == LEFT_EDGE)
{
varJumpToRoom = 9;
}
if (edgeEgoHit == TOP_EDGE)
{
new.room(Logic_Taxi); [ ##LE002##
}
return();
[ Messages
#message 1 "It's a casino!"
#message 2 "\"Hello, sir. Would you help out a poor unfortunate by purchasing an apple?\""
#message 3 "\"The price is reasonable: only $1.00.\""
#message 4 "\"I take that as a 'No,'\" he says pleasantly. \"Very well then, perhaps some other time.\""
#message 5 "He's yet another poor soul who donated his everything so the shrine of Lost Wages could continue to flourish."
#message 6 "\"My pleasure was always the slot machines,\" he says. \"Say, are we going to stand here and chitchat all night, or am I going to make a sale?\""
#message 7 "\"Why, Steve. Nice of you to ask,\" he responds."
#message 8 "\"Well, my friends call me 'Woz,' but I don't consider you a friend.\""
#message 9 "\"Thank you very much, sir. Please call again, whenever you are in the neighborhood,\" says the man. And with that, he walks away into the night."
#message 10 "\"Hey, come back!\" says the man. \"Are you sure you don't want to buy an apple?\""
#message 11 "\"You know,\" says the man, peering deep into his barrel, \"I'm all out! But thank you for your continued interest.\""
#message 12 "\"Ok, be that way!\" he says, and disappears into the night."
#message 13 "\"Oh no, you don't!\" exclaims the man."
#message 14 "\"Say, you really did lose everything,\" you tell the man."
#message 15 "They are nicely manicured, but of no help to you."
#message 16 "They're automatic. Get closer."
#message 17 "Pretty flashy, eh?"
#message 18 "\"Apples. Apples! APPLES for sale!!\""
#message 19 "\"Thanks a lot. See you later, pal.\""
#message 20 "Isn't it wonderful what can be done with a few light bulbs?"