Bench.dcgi (1903B)
1 #!/bin/bash 2 3 . config 4 echo Bench > $savegame/room 5 . functions 6 . maps 7 8 map_bench 9 10 if [ ! -f "$inventory/.starttime" ]; then 11 date +%s > "$inventory/.starttime" 12 fi 13 difftime=$(($(date +%s) - $(cat "$inventory/.starttime"))) 14 15 cat <<EOM 16 ## THE BENCH 17 18 EOM 19 # One hour waiting time. 20 if [ $difftime -gt 3600 ]; then 21 cat <<EOM 22 Your friend is coming down from the party, a bit drunk, but happy. You 23 are happy too. 24 25 Both of you walk towards 26 [h|the time machine|URL:ssh://time-machine@bitreich.org|server|port] 27 28 You have completed Act I in British mode. 29 30 Let us know on #bitreich-en (freenode) if you liked it! 31 32 Find the code at: 33 [1|gopher://parazyd.org/1/git/dotg/log.gph|/git/dotg/log.gph|server|port] 34 35 [1|Go to Act II|/dotg/act-ii|server|port]" 36 EOM 37 else 38 cat <<EOM 39 You are sitting on the bench, waiting for your friend to come out so both of 40 you can go home. From the top floor you hear that the party is still going on. 41 42 Instead of being the party pooper as you use to be you decide to wait. 43 44 EOM 45 46 case "$(($RANDOM % 7))" in 47 0) 48 _msg "You see a cat walking by, look into her eyes. She turns around." 49 ;; 50 1) 51 _msg "A police car is driving by, asking you, if you saw some cat. You do 52 not know French so you just say something in British English and the 53 police turns around quickly." 54 ;; 55 2) 56 _msg 'Your Smartphone is playing the notification tone of the "Waaaazzzuup?" 57 messenger.' 58 printf 1 > "$inventory/.newmessage" 59 ;; 60 3) 61 _msg "Some drunk people walk by singing songs and smashing trash bins. 62 You are scared." 63 ;; 64 4) 65 _msg "Some people walk by talking and greeting you." 66 ;; 67 5) 68 _msg "You hear moaning and some elf is hanging out of the window naked with 69 someone behind her. You are missing out all the fun." 70 ;; 71 *) 72 _msg "Nothing happened." 73 ;; 74 esac 75 76 cat <<EOM 77 78 [1|Check inventory|$path/inventory.dcgi|server|port] 79 80 [1|Wait a bit.|$path/Bench.dcgi|server|port] 81 EOM 82 fi 83