Skip to content

Instantly share code, notes, and snippets.

@Jither
Last active July 24, 2023 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jither/077e9e90ad4d4f30127f2eddc3730fdb to your computer and use it in GitHub Desktop.
Save Jither/077e9e90ad4d4f30127f2eddc3730fdb to your computer and use it in GitHub Desktop.
WOODTICK.SCU
script housecall-timer {
local variable ok-to-bail-out
sleep-for 5 minutes
do {
break-here
if (selected-room is-not woodshop) {
if (selected-room is-not laundry) {
if (selected-room is-not woodtick) {
ok-to-bail-out is true
}
}
}
} until (ok-to-bail-out)
housecall-happening is false
seen-woodsmith-gone is false
class-of pegleg is UNLOCKED
stop-script housecall-timer
}
script woodtick-music-control previous-room destination-room {
if (destination-room is bar) {
if (chartered-ship) {
if (not easy-mode) {
if (owner-of jojo-object is in-the-room) {
break-here
stop-sound woodtick-theme
stop-script
}
}
}
}
if (previous-room is -1) {
q-sound-trigger woodtick-theme 0
q-sound-command q-jump-to woodtick-theme 6 4 400
q-sound-command end-command-q
if (destination-room is scabb-island) {
q-sound-trigger woodtick-theme 1
q-sound-command q-stop-sound scabb-theme
q-sound-command q-start-sound scabb-theme
q-sound-command end-command-q
load-sound scabb-theme
} else {
}
flush-sound-q
stop-script
}
case previous-room {
of woodtick {
q-sound-trigger woodtick-theme 0
foo = (random 4 + 1)
q-sound-command q-jump-to woodtick-theme foo 4 400
q-sound-command end-command-q
q-sound-trigger woodtick-theme 1
}
of cartographers {
q-sound-trigger cartographers-theme 0
q-sound-command q-set-hook cartographers-theme MD-HOOK-JUMP 1
q-sound-command end-command-q
q-sound-trigger cartographers-theme 1
}
of laundry {
q-sound-trigger laundry-theme 0
q-sound-command q-set-hook laundry-theme MD-HOOK-JUMP 1
q-sound-command end-command-q
q-sound-trigger laundry-theme 1
}
of bar {
sound-play-status bar-theme
flush-sound-q
if (error-flag > 0) {
q-sound-trigger bar-theme 0
q-sound-command q-set-hook bar-theme MD-HOOK-JUMP 1
q-sound-command end-command-q
q-sound-trigger bar-theme 1
} else {
load-sound woodtick-theme
quick-start-sound woodtick-theme
stop-script
}
}
of inn {
q-sound-trigger inn-theme 0
q-sound-command q-set-hook inn-theme MD-HOOK-JUMP 1
q-sound-command end-command-q
q-sound-trigger inn-theme 1
}
of woodshop {
q-sound-trigger woodshop-theme 0
q-sound-command q-set-hook woodshop-theme MD-HOOK-JUMP 1
q-sound-command end-command-q
q-sound-trigger woodshop-theme 1
}
default {
load-sound woodtick-theme
clear-command-q
quick-start-sound woodtick-theme
flush-sound-q
stop-script
}
}
case destination-room {
of cartographers {
load-sound cartographers-theme
q-sound-command q-stop-sound cartographers-theme
q-sound-command q-start-sound cartographers-theme
if (not cartographer-snatched) {
jump wally-is-here-phew
}
if (not seen-wally-gone) {
seen-wally-gone is true
q-sound-command q-set-hook cartographers-theme MD-HOOK-JUMP 3
} else {
q-sound-command q-set-hook cartographers-theme MD-HOOK-PART-ENABLE 1 3
}
wally-is-here-phew:
}
of laundry {
load-sound laundry-theme
q-sound-command q-stop-sound laundry-theme
q-sound-command q-start-sound laundry-theme
}
of bar {
load-sound bar-theme
q-sound-command q-stop-sound bar-theme
q-sound-command q-start-sound bar-theme
}
of inn {
largo-volume = 0
inn-volume = 127
load-sound inn-theme
q-sound-command q-stop-sound inn-theme
q-sound-command q-start-sound inn-theme
}
of woodshop {
load-sound woodshop-theme
q-sound-command q-stop-sound woodshop-theme
q-sound-command q-start-sound woodshop-theme
}
of woodtick {
load-sound woodtick-theme
q-sound-command q-stop-sound woodtick-theme
q-sound-command q-start-sound woodtick-theme
foo = (random 6 + 1)
q-sound-command q-set-hook woodtick-theme MD-HOOK-JUMP foo
}
}
q-sound-command end-command-q
flush-sound-q
}
script woodtick-volume-fader {
}
room woodtick {
start-variables room-local
variable time-to-nuke-largo
variable looked-at-money
variable out-of-money-lines
script crawl-down-hatch {
userput off
do-animation selected-actor chore-11
sleep-for 30 jiffies
userput on
if (class-of pegleg is LOCKED) {
if (not script-running housecall-timer) {
start-script housecall-timer
}
}
largo-still-here is false
start-script bak woodtick-music-control woodtick bar
come-out-door bar-woodtick-door in-room bar walk 211,135
}
script goto-grill {
actor selected-actor costume rail-jumping-skin
cut-scene quick-cut {
if (not fell-into-inn-kitchen) {
fell-into-inn-kitchen is true
do-animation selected-actor talk-down
break-here 5
start-sound knock
actor selected-actor ignore-boxes never-zclip
break-here 6
} else {
do-animation selected-actor chore-10
break-here 5
actor selected-actor ignore-boxes never-zclip
break-here 2
}
}
if (class-of pegleg is LOCKED) {
if (not script-running housecall-timer) {
start-script housecall-timer
}
}
largo-still-here is false
start-script bak woodtick-music-control woodtick bar
come-out-door grill-woodtick-door in-room grill
}
script outta-grill {
do-animation selected-actor face-front
actor selected-actor costume rail-jumping-skin
cut-scene quick-cut {
break-here
actor selected-actor ignore-boxes never-zclip
if (not came-out-inn-kitchen) {
came-out-inn-kitchen is true
do-animation selected-actor chore-8
break-here 4
actor selected-actor follow-boxes
break-here 24
do-animation selected-actor chore-9
break-here 17
} else {
do-animation selected-actor chore-7
break-here 2
actor selected-actor follow-boxes always-zclip 1
break-here 7
}
}
actor selected-actor
default
costume guybrush-skin
talk-color white
name "Guybrush"
}
script largo-alert {
cursor off
userput off
look-out-for-largo is false
pick-up-object big-pile in-room woodtick
pick-up-object medium-pile in-room woodtick
pick-up-object coins-and-cash in-room woodtick
pick-up-object cash-pile in-room woodtick
pick-up-object crown in-room woodtick
pick-up-object gold-bars in-room woodtick
pick-up-object chest-o-jewels in-room woodtick
pick-up-object bonds in-room woodtick
lock-costume largo-skin
load-costume largo-skin
actor largo
default
costume largo-skin
talk-color light-green
name "Largo"
start-script maybe-change-largos-shirt
break-here
break-until (actor-x selected-actor < 737)
cursor on
userput on
do {
if (actor-x selected-actor < 670) {
jump largo-from-left
}
if (actor-x selected-actor > 737) {
jump largo-from-right
}
break-here
}
largo-from-left:
quick-start-sound largo-theme
cut-scene {
override skip-largo-from-left
put-actor largo at 456,70 in-room woodtick
walk largo to 571,71
walk selected-actor to 600,70
wait-for-actor largo
say-line largo "Where do you think YOU'RE going, fancy-pants?"
wait-for-message
skip-largo-from-left:
if (override-hit) {
put-actor selected-actor at 600,70
do-animation selected-actor face-left
time-to-nuke-largo is true
stop-all-sounds
clear-command-q
flush-sound-q
} else {
override off
time-to-nuke-largo is false
}
}
chain-script meet-largo-lagrande
largo-from-right:
cut-scene {
override skip-largo-from-right
put-actor largo at-object woodtick-scabb-door in-room woodtick
walk selected-actor to woodtick-scabb-door
wait-for-actor selected-actor
say-line "Whoops. Excuse me."
wait-for-message
quick-start-sound largo-theme
say-line largo "Outta my way, fancy-pants!"
sleep-for 30 jiffies
walk selected-actor to 571,70
break-here 4
walk largo to 697,49
wait-for-actor largo
say-line largo "On second thought, stop right there!"
do-animation largo chore-7
break-here 4
walk largo to 600,71
wait-for-actor selected-actor
do-animation selected-actor turn-right
wait-for-actor largo
do-animation largo face-left
wait-for-message
skip-largo-from-right:
if (override-hit) {
put-actor selected-actor at 571,70
do-animation selected-actor face-right
time-to-nuke-largo is true
stop-all-sounds
clear-command-q
flush-sound-q
} else {
override off
time-to-nuke-largo is false
}
}
chain-script meet-largo-lagrande
}
script meet-largo-lagrande {
local variable fake-obj here-take-it save-largo-facing
if (time-to-nuke-largo) {
jump nuke-largo
}
cursor off
userput off
save-largo-facing = (248 + actor-facing largo)
override skip-largo-lagrande
say-line largo "You ain't from these parts, are ya?"
do-animation largo chore-7
break-here 4
do-animation largo stand
wait-for-message
say-line largo "This here's a toll bridge. You gotta pay."
wait-for-message
build-sentence-script is get-dialog
start-script set-verbs dialog-verbs
start-script start-dialog
set-dialog 1 "Is this some sort of bribe situation?%Achore-25%"
set-dialog 2 "Sure. Take my money. I don't want any trouble.%Atalk-down%"
set-dialog 3 "Who's gonna make me, shorty?%Achore-23%"
set-dialog 4 "I don't pay for nothin'. I'm a pirate!%Achore-27%"
wait-for-dialog {
of dialog-1 {
say-line largo "No, more like extortion.":
"Here--allow me to demonstrate."
}
of dialog-2 {
here-take-it is true
say-line largo "Aw, there goes all my fun.":
"Now I don't get to do this."
}
default {
say-line largo "Tough guy, eh?"
}
}
lock-costume largo-grab-skin
load-costume largo-grab-skin
lock-costume guy-grab-skin
load-costume guy-grab-skin
wait-for-message
clear-loop largo-theme
flush-sound-q
actor selected-actor costume guy-grab-skin ignore-boxes always-zclip 1
if (actor-facing selected-actor == 0) {
do-animation selected-actor face-right
} else {
do-animation selected-actor face-left
}
actor largo costume largo-grab-skin ignore-boxes always-zclip 1
start-script maybe-change-largos-shirt
do-animation largo talk-down
do-animation selected-actor talk-down
break-here 4
do-animation largo chore-7
do-animation selected-actor chore-7
break-here 12
actor selected-actor ignore-boxes never-zclip
do-animation largo chore-8
do-animation selected-actor chore-8
break-here 15
do-animation selected-actor chore-10
do-animation largo chore-10
print-line color white at 125,106 "Help!"
wait-for-message
do-animation selected-actor chore-11
do-animation largo chore-11
do-animation selected-actor chore-10
do-animation largo chore-10
print-line color white at 125,106 "Police!"
wait-for-message
do-animation selected-actor chore-11
do-animation largo chore-11
do-animation largo chore-14
do-animation selected-actor chore-14
say-line largo "Ha ha ha!":
"Scream as loud as you want!":
"There are no police on Scabb Island!"
wait-for-message
do-animation largo chore-11
do-animation selected-actor chore-11
build-sentence-script is get-upside-down-dialog
start-script start-dialog
set-dialog 1 "Then who keeps up the law and maintains order?"
set-dialog 2 "Then who eats the donuts and roughs-up the transients?"
set-dialog 3 "Please! Not in my new coat!"
set-dialog 4 "OK, put me down now and I won't have to hurt you."
choice is 0
break-until (choice)
do-animation largo chore-14
do-animation selected-actor chore-14
case choice {
of dialog-1 {
jump law-n-order
}
of dialog-2 {
jump donuts-n-violence
}
of dialog-3 {
jump new-coat
}
of dialog-4 {
jump mercy
}
}
law-n-order:
say-line largo "I'm the only law on this island!"
jump upsey-daisy
donuts-n-violence:
say-line largo "I roughs-up what needs roughing-up on this island!"
jump upsey-daisy
new-coat:
say-line largo "Maybe I should make you one out of cement!"
jump upsey-daisy
mercy:
say-line largo "Ha ha ha!":
"That's a good one. Maybe I won't kill you right now."
upsey-daisy:
wait-for-message
do-animation largo chore-12
do-animation selected-actor chore-12
break-here 2
actor selected-actor always-zclip 1
do-animation selected-actor chore-15
break-here 4
do-animation selected-actor stand
unlock-costume largo-grab-skin
actor largo costume largo-skin follow-boxes
start-script maybe-change-largos-shirt
do-animation largo save-largo-facing
do-animation largo chore-7
break-here 2
say-line largo "Hey! Yer loaded!"
wait-for-message
say-line largo "This is my lucky night!"
wait-for-message
walk largo to 697,49
do {
break-here
return-x = actor-x largo
} until (actor-x selected-actor < return-x)
do-animation selected-actor face-left
wait-for-actor largo
do-animation largo turn-left
break-here 2
do-animation largo chore-7
say-line largo "Remember^":
"Wherever you go^":
"On sea or on land,"
wait-for-message
say-line largo "You can't ever hide":
"From Largo LaGrande!"
wait-for-message
walk largo to woodtick-scabb-door
wait-for-actor largo
set-jump-hook largo-theme 1
flush-sound-q
do-animation selected-actor chore-13
break-here 27
unlock-costume guy-grab-skin
actor selected-actor
default
costume guybrush-skin
talk-color white
name "Guybrush"
do-animation selected-actor face-right
say-line "Tough town.":
"I guess I should have got those traveler's checks."
wait-for-message
skip-largo-lagrande:
if (override-hit) {
print-line " "
stop-script get-upside-down-dialog
actor selected-actor
default
costume guybrush-skin
talk-color white
name "Guybrush"
put-actor selected-actor at 600,70
do-animation selected-actor face-right
cancel-dialog
stop-all-sounds
clear-command-q
flush-sound-q
} else {
override off
}
build-sentence-script is build-sentence
start-script set-verbs normal-verbs
cursor on
userput on
nuke-largo:
put-actor largo in-the-void
unlock-costume largo-skin
unlock-costume largo-grab-skin
unlock-costume guy-grab-skin
owner-of big-pile is nuked
owner-of medium-pile is nuked
owner-of coins-and-cash is nuked
owner-of cash-pile is nuked
owner-of crown is nuked
owner-of gold-bars is nuked
owner-of chest-o-jewels is nuked
owner-of bonds is nuked
quick-start-sound woodtick-theme
}
script money-admiration {
local variable selected-line
if (out-of-money-lines) {
selected-line = random 16
} else {
selected-line = looked-at-money
++looked-at-money
if (looked-at-money > 16) {
out-of-money-lines is true
}
}
case selected-line {
of 0 {
say-line "This maybe a lot of money, but it's nothing compared to how rich I'll be when I find Big Whoop."
}
of 1 {
say-line "I think I'm pretty well prepared, financially, for now."
}
of 2 {
say-line "I should be set for the whole trip with this."
}
of 3 {
say-line "This should be plenty of money to charter a ship."
}
of 4 {
say-line "Look at all this!"
}
of 5 {
say-line "I've got enough to buy my own ship--in five different currencies."
}
of 6 {
say-line "I'll be traveling first class on this treasure hunt."
}
of 7 {
say-line "It sure took a long time to save all this."
}
of 8 {
say-line "No more part-time circus work for me."
}
of 9 {
say-line "Of course, this is only a fraction of what I'll have after I find Big Whoop."
}
of 10 {
say-line "Hmmm^ Maybe I should get a money belt."
}
of 11 {
say-line "I wonder what I'll buy first^"
}
of 12 {
say-line "Boy, this stuff's heavy."
}
of 13 {
say-line "I could just look at this money all day."
}
of 14 {
say-line "Money, money, money."
}
of 15 {
say-line "I'm confused by this strange urge to squander my wealth on immoral and dangerous vices."
}
of 16 {
say-line "I wish all those girls who wouldn't go out with me in school could see this!"
}
}
}
script get-upside-down-dialog clicked-zone item button {
if (clicked-zone == 1) {
if (item) {
for foo = 120 to 128 ++ {
verb foo off
}
cursor off
userput off
}
if (item >= dialog-1) {
if (item <= dialog-9) {
do-animation selected-actor chore-10
do-animation largo chore-10
print-line color white at 125,106 "%vitem%"
wait-for-message
do-animation selected-actor chore-11
do-animation largo chore-11
break-here 2
}
print-line
choice is item
}
}
}
script ship-hulk-parallax {
foo = (590 - (camera-x - 624) / 2)
put-actor para-boat at foo,144
}
sounds {
"sfx\knock" knock
"sfx\woodtick-theme" woodtick-theme
"sfx\largo-theme" largo-theme
}
costumes {
"costumes\guy-grab-skin" guy-grab-skin
"costumes\largo-grab-skin" largo-grab-skin
"costumes\rail-jumping-skin" rail-jumping-skin
"costumes\para-boat-skin" para-boat-skin
}
enter {
if (graphics-mode == 19) {
do-animation para-boat face-front
actor para-boat
default
costume para-boat-skin
ignore-boxes
never-zclip
put-actor para-boat at 0,0 in-room woodtick
camera-script is ship-hulk-parallax
}
if (easy-mode) {
state-of longshot-of-bucket is GONE
}
class-of scabb-woodtick-door is UNLOCKED
case last-room {
of bar {
do-animation selected-actor chore-11
sleep-for 30 jiffies
if (not actor-moving selected-actor) {
do-animation selected-actor stand
}
}
of grill {
start-script outta-grill
}
}
if (look-out-for-largo) {
start-script largo-alert
}
}
exit {
camera-script is script-0
}
object help-wanted-sign {
name is "sign"
quick-verb is look
verb look {
saw-help-wanted-sign is true
say-line "`Help wanted.":
"One week's salary in advance.":
"Inquire below.`"
}
}
object woodtick-inn-door {
name is "ship"
quick-verb is no-double-verb
verb default-verb {
if (class-of pegleg is LOCKED) {
if (not script-running housecall-timer) {
start-script housecall-timer
}
}
start-script bak woodtick-music-control woodtick inn
come-out-door inn-woodtick-door in-room inn walk 221,87
}
}
object woodtick-cartographers-door {
name is "door"
quick-verb is no-double-verb
verb look {
say-line "What a dinky little door."
}
verb walk-to {
if (class-of pegleg is LOCKED) {
if (not script-running housecall-timer) {
start-script housecall-timer
}
}
largo-still-here is false
start-script bak woodtick-music-control woodtick cartographers
come-out-door cartographers-woodtick-door in-room cartographers walk 51,112
}
verb open {
if (sputm-debug > 1) {
start-sound woodtick-theme
}
}
}
object woodtick-bar-door {
name is "hatch"
quick-verb is no-double-verb
verb default-verb {
start-script crawl-down-hatch
}
}
object woodtick-scabb-door {
name is "path"
quick-verb is no-double-verb
verb default-verb {
if (class-of pegleg is LOCKED) {
if (not script-running housecall-timer) {
start-script housecall-timer
}
}
largo-still-here is false
start-script bak woodtick-music-control -1 scabb-island
come-out-door scabb-woodtick-door in-room scabb-island
}
}
object woodtick-laundry-door {
name is "ship"
quick-verb is no-double-verb
verb walk-to {
largo-still-here is false
start-script bak woodtick-music-control woodtick laundry
come-out-door laundry-woodtick-door in-room laundry walk 192,134
}
}
object shovel {
name is "shovel"
class is prep-on REACH-MED HARD UNTOUCHABLE
icon is shovel-icon
verb look {
say-line "`THRIFTY-DIG☼ -- For the treasure hunter on a budget.`"
}
verb pick-up {
pick-up-object me
}
verb use {
if (selected-room is front-mansion) {
if (loc-0 == 11) {
start-script actor-scripts[11] 36
jump end-verb
}
}
if (valid-verb loc-0 dig-up) {
do-sentence dig-up loc-0 me
} else {
say-line "I can't dig that, Daddy."
}
end-verb:
}
}
object shovel-sign {
name is "sign"
class is REACH-MED
quick-verb is look
verb pick-up {
if (state-of shovel is HERE) {
pick-up-object shovel
start-sound plank-break
say-line "Oops^":
"^I think I broke the sign."
} else {
say-line "I'd better not do anymore damage."
}
}
verb look {
say-line "`Welcome to Woodtick`":
"`No Trezer huntin zone`"
}
}
object woodtick-woodshop-door {
name is "door"
quick-verb is no-double-verb
verb default-verb {
largo-still-here is false
start-script bak woodtick-music-control woodtick woodshop
come-out-door woodshop-woodtick-door in-room woodshop walk 99,112
}
}
object woodtick-grill-door {
name is "window"
quick-verb is no-double-verb
verb open close push pull look {
say-line "There's no glass in the window."
}
verb use walk-to {
start-script goto-grill
}
}
object big-pile {
name is "riches"
icon is stinking-filthy-rich-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object medium-pile {
name is "riches"
icon is financially-comfortable-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object coins-and-cash {
name is "riches"
icon is coins-n-cash-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object cash-pile {
name is "riches"
icon is cash-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object crown {
name is "riches"
icon is crown-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object gold-bars {
name is "riches"
icon is gold-bars-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object chest-o-jewels {
name is "riches"
icon is jewel-chest-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object bonds {
name is "riches"
icon is bonds-icon
verb use {
say-line "I intend to."
}
verb look {
start-script money-admiration
}
}
object woodtick-bar-sign {
name is "sign"
verb look {
say-line "`The Bloody Lip Bar and Grill`"
}
}
animation-object longshot-of-bucket
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment