sites

parazyd.cf website
git clone git://parazyd.org/sites.git
Log | Files | Refs

commit df44b10f0ed2cd8573b9643380c97b86210a1682
parent bfe29a75b291f8ce56212ceb09572b47370a3cba
Author: parazyd <parazyd@dyne.org>
Date:   Fri, 23 Feb 2018 18:13:42 +0100

more

Diffstat:
Mdotg/act-i/Balcony.dcgi | 1-
Adotg/act-i/Bedroom2.dcgi | 44++++++++++++++++++++++++++++++++++++++++++++
Adotg/act-i/Bedroom2.sh | 21+++++++++++++++++++++
Mdotg/act-i/Hipster_Area.dcgi | 11+++--------
Mdotg/act-i/config | 5++---
Mdotg/act-i/functions | 32++++++++++++++++++++++++++++++--
Mdotg/act-i/host.dcgi | 2+-
Mdotg/act-i/maps | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mdotg/act-i/take.dcgi | 31++++++++++++++++++++++++++-----
Mdotg/act-i/talk-20h.sh | 31++-----------------------------
Mdotg/act-i/talk-gentoo.sh | 22++++------------------
Mdotg/act-i/talk-girls.sh | 2+-
Mdotg/act-i/talk-nerds.dcgi | 1-
Mdotg/act-i/talk-nerds.sh | 18+++++++++---------
Mdotg/act-i/usecases.csv | 3++-
15 files changed, 215 insertions(+), 81 deletions(-)

diff --git a/dotg/act-i/Balcony.dcgi b/dotg/act-i/Balcony.dcgi @@ -2,7 +2,6 @@ . config echo Balcony > $savegame/room - . functions . maps diff --git a/dotg/act-i/Bedroom2.dcgi b/dotg/act-i/Bedroom2.dcgi @@ -0,0 +1,44 @@ +#!/bin/sh + +. config +echo Bedroom2 > $savegame/room +. functions +. maps + +gotkey="yes" +[ -f "$bedroom2/.notyet" ] && gotkey="no" + +case "$gotkey" in + yes) map_bedroom2_unlocked ;; + *) map_bedroom2_locked ;; +esac + +cat <<EOM +## BEDROOM 2 (R1) + +EOM + +case "$gotkey" in + yes) + cat <<EOM +You are in a small bedroom. + +You see a bed, closet, and a chair. + +EOM + list_items_to take "$bedroom2" + ;; + *) + cat <<EOM +You can not open the bedroom door. It seems it's locked. +EOM + ;; +esac + +cat <<EOM + +[1|Check inventory|$path/inventory.dcgi|server|port] + +EOM + +navigation diff --git a/dotg/act-i/Bedroom2.sh b/dotg/act-i/Bedroom2.sh @@ -0,0 +1,21 @@ +specific_bedroom2() { + item="$1" + + case "$item" in + Keychain_with_a_key) + cat <<EOM + +You unlock the bedroom door. The key snaps and breaks, blocking the +keyhole. +EOM + rm "$inventory/$item" + rm "$bedroom2/.notyet" + ;; + *) + cat <<EOM + +$item is of no use here. +EOM + ;; + esac +} diff --git a/dotg/act-i/Hipster_Area.dcgi b/dotg/act-i/Hipster_Area.dcgi @@ -21,21 +21,16 @@ Spaniard. EOM -[ -f "$inventory/Beers" ] && { -beercnt="$(cat $inventory/Beers)" -if [ "$beercnt" -gt 1 ]; then - newcnt="$(( $beercnt - 1 ))" - printf "$newcnt" > "$inventory/Beers" - echo "You give a beer to your friend." -fi -} +dropitem Beers && echo "You give a beer to your friend." if [ -f "$inventory/.nerdsmoved" ]; then cat <<EOM + Behind you (NX) there is an unattended NeXT UNIX machine. EOM else cat <<EOM + Behind you (NX) there are a couple of nerds trying to type in commands into a NeXT machine. EOM diff --git a/dotg/act-i/config b/dotg/act-i/config @@ -61,10 +61,8 @@ printf 100 > "$balcony/Chocolate_Milks" printf 1 > "$bedroom1/.notyet" printf 1 > "$bedroom2/Unlocked_Macbook" +printf 1 > "$bedroom2/Google_Ad_coupons" printf 1 > "$bedroom2/.notyet" -printf 1 > "$bedroom2/Bed" -printf 1 > "$bedroom2/Closet" -printf 1 > "$bedroom2/Chair" printf 1 > "$toilet1/toilet/Vomit" printf 1 > "$toilet1/shower/Lab_Rat" @@ -78,6 +76,7 @@ printf 1 > "$nextbox/Keyboard" printf 1 > "$nextbox/Mouse" printf 1 > "$workdesk/Locked_computer" +printf 1 > "$workdesk/Keychain_with_a_key" printf 1 > "$kitchen/fridge/Wifi_password" printf 1 > "$kitchen/fridge/Old_yoghurt" diff --git a/dotg/act-i/functions b/dotg/act-i/functions @@ -63,12 +63,22 @@ EOM echo "[1|Exit|$path/$current.dcgi|server|port]" } +dropitem() { + item="$1" + [ -f "$inventory/$item" ] || return 1 + oldcount="$(cat $inventory/$item)" + newcount="$(( $oldcount - 1))" + printf "$newcount" > "$inventory/$item" + if [ "$newcount" -lt 1 ]; then + rm -f "$inventory/$item" + fi +} + list_items_to() { what="$1" where="$2" - [ -n "$3" ] && aa="-A" cd "$where" - for i in $(ls $aa -1); do + for i in $(ls -1); do echo "[1|$i|$path/$what.dcgi?$where/$i|server|port]" done cd - >/dev/null @@ -149,6 +159,12 @@ You take a sip of rakia. You feel drunk. EOM ;; + Keychain_with_a_key) + cat <<EOM +You try to unlock things, but there's no place to use the key. + +You put it back in your pocket. +EOM esac } @@ -177,9 +193,21 @@ use_specific() { . talk-nerds.sh specific_talk_nerds "$item" ;; + #talk-balcony) + # . talk-balcony.sh + # specific_talk_balcony "$item" + # ;; Hipster_Area) . Hipster_Area.sh specific_talk_hipsterarea "$item" + ;; + Bedroom2) + . Bedroom2.sh + specific_bedroom2 "$item" + ;; + *) + echo "Not implemented" + ;; esac } diff --git a/dotg/act-i/host.dcgi b/dotg/act-i/host.dcgi @@ -22,7 +22,7 @@ of a strange combination of colorfully and black dressed people. You oversee the room and see some free spots on the couch in front of you. You look at your friend and tell him to go grab -the seats, and you'll be there with the beers. +tthe seats, and you'll be there with the beers. "Okay!" - He says, and leaves for the couch (HIP) diff --git a/dotg/act-i/maps b/dotg/act-i/maps @@ -169,8 +169,76 @@ map_bedroom1() { |bk| TTT o +-------+....+--------+ |bk| TTT | | |bk| (COMP) | (BAL)o o bbb | -|bk| | ----> ☃ mmm | -|bk| | YOU | +|bk| | mmm | +|bk| | | ++---------------+....+----------------------------------------+ + +EOM +} + +map_bedroom2_unlocked() { + cat <<EOM ++-------------------------------------------------------------+ +| | | YOU--> ☃ | +| | (R1) | (R2) | +|-----------------+....+------+-----------------+....+--------+ +| | +| | +| +---+....+---+....+------+....+--------+ +| |bk| | | o |x| +| o |bk| | | |x| +| o o |bk| | | |x| +| | DJ | |bk| (T1) | (T2) | o TTTT o |x| +| +- +----+ |bk| o | | TTTTo o |x| +| |o o | |bk| o o | | TTTT |S| +| |o TTT +----------+--------+ o TTTT o |x| +| |o TTT | | o oTTTT o |F| +| +- (HIP) o +| TTTT |x| +| |_o_☃_<o>| o NX| TTTT (KIT) |-| +| o +| TTTT | +| o o (H) | +| o o | +|bk| | +|bk| o o | +|bk| TTT o +-------+....+--------+ +|bk|o TTT | | +|bk| o (COMP) | (BAL)o o bbb | +|bk| | mmm | +|bk| | | ++---------------+....+----------------------------------------+ + +EOM +} + +map_bedroom2_locked() { + cat <<EOM ++-------------------------------------------------------------+ +| | o | | +| | (R1) o | (R2) | +|-----------------+....+------+-----------------+....+--------+ +| YOU--> ☃ | +| | +| +---+....+---+....+------+....+--------+ +| |bk| | | o |x| +| |bk| | | |x| +| o oo |bk| | | |x| +| | DJ | |bk| (T1) | (T2) | o TTTT o |x| +| +- +----+ |bk| | | TTTTo o |x| +| | o o | |bk| | o | TTTT |S| +| |o TTT +----------+--------+ o TTTT o |x| +| |o TTT | | o oTTTT o |F| +| +- (HIP) o +| TTTT |x| +| |_o_☃_<o>| o NX| TTTT (KIT) |-| +| o +| TTTT | +| o o o | +| | +|bk| | +|bk| o o o | +|bk| o TTT +-------+....+--------+ +|bk| oTTT | | +|bk| (COMP) | (BAL)o o bbb | +|bk| | (H) mmm | +|bk| | | +---------------+....+----------------------------------------+ EOM diff --git a/dotg/act-i/take.dcgi b/dotg/act-i/take.dcgi @@ -3,12 +3,33 @@ . config . functions -take_item "$2" +case "$(basename $2)" in + Plate_of_Bolognese_Sauce) + rm -f "$toilet1/.notyet" + rm -f "$hipster/obese/.takingashit" + ;; + + Keychain_with_a_key) + if [ -f "$bedroom1/.notyet" ]; then + cat <<EOM + +"Umm, that's not something you should be taking..." + +The girls don't let you take the keys. + +[1|Exit|$path/$(cat $savegame/room).dcgi|server|port] +EOM + return + else + cat <<EOM -if [ "$(basename $2)" = Plate_of_Bolognese_Sauce ]; then - rm -f "$toilet1/.notyet" - rm -f "$hipster/obese/.takingashit" -fi +The girls smile at you and let you take it. +EOM + fi + ;; +esac + +take_item "$2" cat <<EOM diff --git a/dotg/act-i/talk-20h.sh b/dotg/act-i/talk-20h.sh @@ -7,13 +7,7 @@ specific_talk_20h() { You give a beer to your friend. He thanks you and starts drinking it. EOM - oldcount="$(cat $inventory/$item)" - newcount="$(( $oldcount -1 ))" - printf "$newcount" > "$inventory/$item" - if [ "$newcount" -lt 1 ]; then - rm -f "$inventory/$item" - fi - return + givebeer "$item" ;; Chocolate_Milks) cat <<EOM @@ -21,13 +15,7 @@ EOM Your friend takes the chocolate milk and pours it all over the Macbook guy's testicles to cool them down. EOM - oldcount="$(cat $inventory/$item)" - newcount="$(( $oldcount -1 ))" - printf "$newcount" > "$inventory/$item" - if [ "$newcount" -lt 1 ]; then - rm -f "$inventory/$item" - fi - return + givebeer "$item" ;; Locked_computer) cat <<EOM @@ -36,7 +24,6 @@ Your friend takes the locked computer and installs Gentoo on it while uploading the old content to the cloud. EOM mv "$inventory/$item" "$hipsters/20h/$item" - return ;; Smartphone) cat <<EOM @@ -45,7 +32,6 @@ Your friend takes the smartphone and calls father christmas to bring some elves for fun. EOM printf 1 > "$inventory/.elvesarehere" - return ;; Used_condom) cat <<EOM @@ -54,14 +40,12 @@ Your friend takes the used condom, blows it up using heat from the Macbook guy's produced heat and gives you back a balloon. EOM mv "$inventory/$item" "$inventory/Condom_balloon" - return ;; White_Lighter) cat <<EOM Your friend asks for the red lighter. EOM - return ;; Red_Lighter) cat <<EOM @@ -69,7 +53,6 @@ EOM Your friend uses the red lighter to start the fire of the revolution. EOM printf 1 > "$inventory/.revolutionstarted" - return ;; Black_dildo) cat <<EOM @@ -78,7 +61,6 @@ You give the black dildo to your friend. He smiles perversly and sticks it in his butt. EOM mv "$inventory/$item" "$hipsters/20h" - return ;; Also_sprach_Zarathustra) cat <<EOM @@ -92,7 +74,6 @@ EOM fi mv "$inventory/$item" "$hipsters/20h" printf 1 > "$hipsters/20h/.meaningoflife" - return ;; The_Birth_of_Tragedy) cat <<EOM @@ -107,7 +88,6 @@ EOM fi mv "$inventory/$item" "$hipsters/20h" printf 1 > "$hipsters/20h/.meaningoflife" - return ;; Siddhartha) cat <<EOM @@ -124,7 +104,6 @@ EOM You tuck the book back in your backpack. EOM - return ;; Developing_NodeJS) cat <<EOM @@ -135,7 +114,6 @@ Your friend starts manically laughing. You tuck the book back in your backpack. EOM - return ;; Sex_drugs_and_cocoa_puffs) cat <<EOM @@ -145,11 +123,6 @@ EOM He takes the book from you and smiles. EOM mv "$item" "$hipsters/20h" - return ;; - *) - cat <<EOM -$item is of no use here. -EOM esac } diff --git a/dotg/act-i/talk-gentoo.sh b/dotg/act-i/talk-gentoo.sh @@ -24,7 +24,6 @@ be unable to catch up. You put your laptop back in your backpack. EOM - return ;; Plate_of_Bolognese_Sauce) cat <<EOM @@ -34,7 +33,6 @@ You give a plate of Bolognese sauce to the spaniard. He thanks you and starts eating it swiftly. EOM mv "$inventory/$item" "$hipsters/obese/" - return ;; Beers) cat <<EOM @@ -42,7 +40,6 @@ You offer a beer to the spaniard. He refuses. Is it because it makes bellies big, you ponder... EOM - return ;; Chocolate_Milks) cat <<EOM @@ -50,13 +47,7 @@ EOM You give a chocolate milk bottle to the spaniard. He thanks you and drinks it in one sip. EOM - oldcount="$(cat $inventory/$item)" - newcount="$(( $oldcount -1 ))" - printf "$newcount" > "$inventory/$item" - if [ "$newcount" -lt 1 ]; then - rm -f "$inventory/$item" - fi - return + givebeer "$item" ;; Old_yoghurt) cat <<EOM @@ -67,8 +58,7 @@ You hear his stomach gurgling. Struggling, but he manages to get up and start walking towards the toilet. EOM printf 1 > "$hipsters/obese/.takingashit" - mv "$hipsters/obese/Plate_of_Bolognese_Sauce" "$hipsters/coffeetable" - return + cp -f "$hipsters/obese/Plate_of_Bolognese_Sauce" "$hipsters/coffeetable" ;; The_Birth_of_Tragedy) cat <<EOM @@ -76,29 +66,25 @@ EOM You nod. EOM - return ;; The_C_Programming_Language) cat <<EOM -You show the K&R book to the spaniard. He enjoys it and takes it from you. +You show the K&R book to the spaniard. His head explodes. EOM - mv "$inventory/The_C_Programming_Language" "$hipsters/obese" - return + printf 1 > "$hipsters/obese/.dead" ;; Developing_NodeJS) cat <<EOM "Man, nodejs sucks, man." - He says while gasping. EOM - return ;; *) cat <<EOM $item is of no use here. EOM - return ;; esac } diff --git a/dotg/act-i/talk-girls.sh b/dotg/act-i/talk-girls.sh @@ -14,7 +14,7 @@ You hand over two beers to the girls. "Say, could you do us a favor? There is a thing in the closet in the small bedroom over there. Would you mind going there and bringing it -to us?" - One of the girls asks. +back to us?" - One of the girls asks. "Hm, what is it?" - You ask. diff --git a/dotg/act-i/talk-nerds.dcgi b/dotg/act-i/talk-nerds.dcgi @@ -27,7 +27,6 @@ list_items_to use $nextbox [1|Check inventory|$path/inventory.dcgi|server|port] -[1|Use the computer|$path/nextconsole.dcgi|server|port] [1|Leave the computer|$path/Hipster_Area.dcgi|server|port] EOM else diff --git a/dotg/act-i/talk-nerds.sh b/dotg/act-i/talk-nerds.sh @@ -13,28 +13,32 @@ EOM cat <<EOM You use the power of C to flip bytes and bang bits... +EOM + [ -f "$inventory/.notyet" ] || { + cat <<EOM +Accidentally, you activate a +[h|time machine|URL:ssh://time-machine@bitreich.org|server|port] + -Accidentally, you activate a time machine. +You have finished Act I. -The book and the hardware vanish. +[1|To to Act II|/dotg/act-ii|server|port] EOM rm -f "$nextbox/Terminal" "$nextbox/Keyboard" \ "$nextbox/Mouse" "$nextbox/The_C_Programming_Language" printf 1 > "$inventory/.timemachineactivated" - return + } ;; Terminal|Keyboard|Mouse) cat <<EOM You try using the NeXT computer, but you're unsuccessful. EOM - return ;; *) cat <<EOM $item is of no use here. EOM - return ;; esac else @@ -45,7 +49,6 @@ EOM The nerds steal all your $item. EOM rm -f "$inventory/$item" - return ;; The_C_Programming_Language) cat <<EOM @@ -56,7 +59,6 @@ NeXT console. They seem to be failing. EOM mv "$inventory/$item" "$nextbox" - return ;; Developing_NodeJS) cat <<EOM @@ -69,7 +71,6 @@ leave the area and move towards somewhere else. EOM rm -f "$inventory/$item" printf 1 > "$inventory/.nerdsmoved" - return ;; Sex_drugs_and_cocoa_puffs) cat <<EOM @@ -79,7 +80,6 @@ The virgins try to convince you they're not. (Developer note: this is actually a good book, unrelated to the context it is presented in-game. Read it ;) EOM - return ;; *) cat <<EOM diff --git a/dotg/act-i/usecases.csv b/dotg/act-i/usecases.csv @@ -11,7 +11,7 @@ Black_dildo,Toilet1,Balcony,Bedroom1,Bedroom2,talk-girls,talk-20h,talk-hipster Red_Lighter,talk-20h White_Lighter,talk-20h Locked_computer,talk-20h - +Keychain_with_a_key,Bedroom2,anywhere Used_condom,Toilet1,Toilet2,talk-20h Plastic_bag,Balcony,Toilet1,Toilet2 Old_yoghurt,talk-gentoo @@ -20,6 +20,7 @@ Empty_Glasses,Kitchen,Toilet1 Terminal,talk-nerds Keyboard,talk-nerds Mouse,talk-nerds +Google_Ad_coupons,talk-balcony Also_sprach_Zarathustra,talk-20h The_Birth_of_Tragedy,talk-20h,talk-gentoo