Zak McKracken's Gambling Problem

Here's my first SCUMM-related discovery!

One of the things you need to keep track of in Zak McKracken and the Alien Mindbenders is your characters' CashCard balance. Just like reality!

The best way for Zak to replenish his savings is to play the lottery, which only he can do. You can rig the odds in your favor by reading the Lott-O-Dictor on the King's ship. Note the number, then go back to San Francisco. You can go back by inputting the button combination or giving an artifact to the king - but don't worry, you can get the artifacts back if you choose the latter.

Once Zak's back home, he can go to Lou's Loans and buy a lottery ticket. Input the number that was on the Lott-O-Dictor. Eventually, the numbers will be picked, and Zak will win $10000! If only it were that easy in real life...

But how many times can Zak do this? The answer is five. You see, every time you win big, the game remembers. Once you've won the lottery five times, Lou will pay up one last time, and will sell no more tickets, wondering what your secret is.

At least Zak's money troubles are history. Let's hope he didn't develop an addiction.

Here's the descumm'd lottery script in room 7.
Code:
// Script 72: Lottery Result
[0000] (40) cutscene();
[0001] (9A) Var[50] = Var[235];
[0004] (1E) walkActorTo(10,49,47);
[0008] (3B) waitForActor(10);
[000A] (11) animateActor(10,246);
[000D] (11) animateActor(1,247);
[0010] (31) VAR_RESULT = getBitVar(1458,0);
[0015] (A8) if (VAR_RESULT) {
[0019] (46)   Var[232]++;
[001B] (44)   if (Var[232] > 4) {
[0021] (14)     print(10,"Friend, ya won the big one a few too\x01many times. Now, I'm not accusin' ya^\x03I'll pay up this last time, but I ain't\x01sellin' ya another ticket.");
[0098] (18)     goto 0143;
[009B] (**)   }
[009B] (67)   clearState04(237);
[009E] (9A)   Var[66] = Var[234];
[00A1] (16)   Var[67] = getRandomNr(9);
[00A4] (9A)   Var[14] = Var[66];
[00A7] (5A)   Var[14] += 212;
[00AB] (8A)   Var[Var[14]] = Var[67];
[00AE] (46)   Var[66]++;
[00B0] (44)   unless (Var[66] > 3) goto 00A1;
[00B6] (1A)   Var[54] = 10000;
[00BA] (14)   print(10,"Congratulations lucky fella! Ya won the\x01big lotto prize! 10,000 Smackeroos!");
[00FF] (18) } else {
[0102] (16)   Var[66] = getRandomNr(9);
[0105] (48)   unless (Var[66] == 7) goto 01F1;
[010B] (16)   Var[66] = getRandomNr(99);
[010E] (DA)   Var[66] += Var[235];
[0111] (9A)   Var[54] = Var[234];
[0114] (9A)   Var[67] = Var[234];
[0117] (5A)   Var[54] += 10;
[011B] (46)   Var[67]++;
[011D] (C4)   unless (Var[67] > Var[66]) goto 0117;
[0122] (14)   print(10,"Hey bud, yer lotto ticket won ya $\x04\x36!");
[0143] (**) }
[0143] (DA) Var[62] += Var[54];
[0146] (58) beginOverride();
[0147] (18) goto 0248;
[014A] (AE) waitForMessage();
[014B] (1E) walkActorTo(10,16,47);
[014F] (14) print(10,"C'mere, I'll give ya yer winnin's.");
[016F] (80) breakHere();
[0170] (80) breakHere();
[0171] (36) walkActorToObject(1,182);
[0175] (3B) waitForActor(10);
[0177] (11) animateActor(10,250);
[017A] (3B) waitForActor(1);
[017C] (AE) waitForMessage();
[017D] (14) print(10,"Gimme that ticket and yer CashCard.");
[019E] (AE) waitForMessage();
[019F] (11) animateActor(10,247);
[01A2] (2E) delay(60);
[01A6] (1C) startSound(84);
[01A8] (2E) delay(120);
[01AC] (11) animateActor(10,246);
[01AF] (3B) waitForActor(10);
[01B1] (78) if (Var[232] < 5) {
[01B7] (14)   print(10,"Ya sure are one lucky guy!");
[01CF] (18) } else {
[01D2] (14)   print(10,"So tell me, what's yer secret?");
[01EE] (**) }
[01EE] (18) goto 0248;
[01F1] (14) print(10,"Sorry bud, but yer lotto tick's a dud.\x01Give it here and I'll toss it for ya.");
[0231] (58) beginOverride();
[0232] (18) goto 0248;
[0235] (2E) delay(120);
[0239] (43) Var[51] = getActorX(10);
[023C] (46) Var[51]++;
[023E] (5E) walkActorTo(1,Var[51],49);
[0242] (3B) waitForActor(1);
[0244] (11) animateActor(1,247);
[0247] (AE) waitForMessage();
[0248] (A8) if (VAR_OVERRIDE) {
[024C] (11)   animateActor(10,255);
[024F] (11)   animateActor(10,250);
[0252] (**) }
[0252] (29) setOwnerOf(42,0);
[0256] (29) setOwnerOf(42,15);
[025A] (C0) endCutscene();
[025B] (A0) stopObjectCode();
END

And here's the descumm'd Lotto Sign object:
Code:
//Object 189: Lotto Sign
Events:
   C - 00AA
  11 - 001C
  FD - 00D5
[001C] (48) if (VAR_EGO == 1) {
[0022] (78)   if (Var[232] < 5) {
[0028] (10)     VAR_RESULT = getObjectOwner(42);
[002C] (48)     if (VAR_RESULT == 15) {
[0032] (1A)       VAR_ACTIVE_OBJECT1 = 42;
[0036] (1A)       Var[47] = 10;
[003A] (42)       startScript(24);
[003C] (18)     } else {
[003F] (14)       print(10,"Dontcha know the law?\x01Only one Lotto ticket per person.");
[0071] (**)     }
[0071] (18)   } else {
[0074] (14)     print(10,"I told ya, NO MORE LOTTO TICKETS!");
[0092] (**)   }
[0092] (18) } else {
[0095] (11)   animateActor(2,246);
[0098] (3B)   waitForActor(2);
[009A] (D8)   printEgo("I don't gamble.");
[00A9] (**) }
[00A9] (00) stopObjectCode();
[00AA] (D8) printEgo("PLAY LOTTO\x01`If you don't play, you can't lose!`");
[00D4] (00) stopObjectCode();
[00D5] (5B) setBitVar(1461,0,Var[234]);
[00DA] (1E) walkActorTo(1,23,60);
[00DE] (3B) waitForActor(1);
[00E0] (D8) printEgo("Gee, I hope I win!");
[00F0] (AE) waitForMessage();
[00F1] (2F) if (!getState04(189)) {
[00F6] (27)   setState04(189);
[00F9] (14)   print(10,"Come back after the numbers are picked\x01and I'll tell ya if yer a winner.");
[0137] (11)   animateActor(1,247);
[013A] (AE)   waitForMessage();
[013B] (D8)   printEgo("Thanks!");
[0144] (**) }
[0144] (00) stopObjectCode();
END
 
Last edited:
Back
Top