forked from STI/Astroport.ONE
Kristofer Rumeau 05/02
This commit is contained in:
parent
f2f3515550
commit
02da0c339e
@ -17,22 +17,40 @@ ME="${0##*/}"
|
||||
###################################################################
|
||||
### CREER VOTRE PROPRE VERSION DU JEU
|
||||
### CHOISIR SCENARIO
|
||||
|
||||
###################################################################
|
||||
if hash uuidgen 2>/dev/null; then
|
||||
homefolder=$(pwd)
|
||||
newplayer=$(uuidgen)
|
||||
## Copy Player Game Files
|
||||
mkdir -p $HOME/.zen/adventure/$newplayer
|
||||
cp -r $MY_PATH/rooms $HOME/.zen/adventure/$newplayer/rooms
|
||||
cp -r $MY_PATH/art $HOME/.zen/adventure/$newplayer/art
|
||||
cp -r $MY_PATH/script $HOME/.zen/adventure/$newplayer/script
|
||||
cp -r $MY_PATH/logic $HOME/.zen/adventure/$newplayer/logic
|
||||
mkdir -p "$HOME/.zen/adventure/$newplayer"
|
||||
if [ -d "$MY_PATH/rooms" ]; then
|
||||
cp -r "$MY_PATH/rooms" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/rooms does not exist or is not a directory."
|
||||
fi
|
||||
|
||||
if [ -d "$MY_PATH/art" ]; then
|
||||
cp -r "$MY_PATH/art" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/art does not exist or is not a directory."
|
||||
fi
|
||||
|
||||
if [ -d "$MY_PATH/script" ]; then
|
||||
cp -r "$MY_PATH/script" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/script does not exist or is not a directory."
|
||||
fi
|
||||
|
||||
if [ -d "$MY_PATH/logic" ]; then
|
||||
cp -r "$MY_PATH/logic" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/logic does not exist or is not a directory."
|
||||
fi
|
||||
fi
|
||||
|
||||
###################################################################
|
||||
echo "Loading..."
|
||||
echo
|
||||
sleep 4
|
||||
###################################################################
|
||||
if hash uuidgen 2>/dev/null; then
|
||||
cd $HOME/.zen/adventure/$newplayer/rooms
|
||||
|
67
adventure/games/kristofer.rumeau@ynov.com/adventure.sh
Normal file
67
adventure/games/kristofer.rumeau@ynov.com/adventure.sh
Normal file
@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
###################################################################
|
||||
# This Launch script is based on BashVenture.
|
||||
#
|
||||
# Remember, kids - sharing is caring! Keep it open. Spread the love.
|
||||
# - @BenNunney
|
||||
# Thanks and gratitude to all living creatures and the whole creation.
|
||||
# - @Fred
|
||||
# $AGE×365,25×24×60×60×9,807÷299792458 = RELATIVE LIGHT GRAVITY SPEED
|
||||
###################################################################
|
||||
# Guide avancé d'écriture des scripts Bash : https://abs.traduc.org/abs-fr/
|
||||
# GAMESHELL : https://github.com/phyver/GameShell/
|
||||
###################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
###################################################################
|
||||
### CREER VOTRE PROPRE VERSION DU JEU
|
||||
### CHOISIR SCENARIO
|
||||
###################################################################
|
||||
if hash uuidgen 2>/dev/null; then
|
||||
homefolder=$(pwd)
|
||||
newplayer=$(uuidgen)
|
||||
## Copy Player Game Files
|
||||
mkdir -p "$HOME/.zen/adventure/$newplayer"
|
||||
if [ -d "$MY_PATH/rooms" ]; then
|
||||
cp -r "$MY_PATH/rooms" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/rooms does not exist or is not a directory."
|
||||
fi
|
||||
|
||||
if [ -d "$MY_PATH/art" ]; then
|
||||
cp -r "$MY_PATH/art" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/art does not exist or is not a directory."
|
||||
fi
|
||||
|
||||
if [ -d "$MY_PATH/script" ]; then
|
||||
cp -r "$MY_PATH/script" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/script does not exist or is not a directory."
|
||||
fi
|
||||
|
||||
if [ -d "$MY_PATH/logic" ]; then
|
||||
cp -r "$MY_PATH/logic" "$HOME/.zen/adventure/$newplayer/"
|
||||
else
|
||||
echo "Source directory $MY_PATH/logic does not exist or is not a directory."
|
||||
fi
|
||||
fi
|
||||
|
||||
###################################################################
|
||||
echo "Loading..."
|
||||
echo
|
||||
###################################################################
|
||||
if hash uuidgen 2>/dev/null; then
|
||||
cd $HOME/.zen/adventure/$newplayer/rooms
|
||||
else
|
||||
cd rooms
|
||||
fi
|
||||
./start.sh
|
||||
###################################################################
|
||||
if hash uuidgen 2>/dev/null; then
|
||||
cd "$homefolder"
|
||||
rm -r $HOME/.zen/adventure/$newplayer
|
||||
fi
|
||||
echo "To continue..."
|
||||
exit
|
0
adventure/games/votrejeu/art/bigfinish.ben → adventure/games/kristofer.rumeau@ynov.com/art/bigfinish.ben
Executable file → Normal file
0
adventure/games/votrejeu/art/bigfinish.ben → adventure/games/kristofer.rumeau@ynov.com/art/bigfinish.ben
Executable file → Normal file
0
adventure/games/votrejeu/art/supper.ben → adventure/games/kristofer.rumeau@ynov.com/art/supper.ben
Executable file → Normal file
0
adventure/games/votrejeu/art/supper.ben → adventure/games/kristofer.rumeau@ynov.com/art/supper.ben
Executable file → Normal file
0
adventure/games/votrejeu/art/titleart.ben → adventure/games/kristofer.rumeau@ynov.com/art/titleart.ben
Executable file → Normal file
0
adventure/games/votrejeu/art/titleart.ben → adventure/games/kristofer.rumeau@ynov.com/art/titleart.ben
Executable file → Normal file
0
adventure/games/votrejeu/logic/leverlogic.ben → adventure/games/kristofer.rumeau@ynov.com/logic/leverlogic.ben
Executable file → Normal file
0
adventure/games/votrejeu/logic/leverlogic.ben → adventure/games/kristofer.rumeau@ynov.com/logic/leverlogic.ben
Executable file → Normal file
0
adventure/games/votrejeu/logic/stationlogic.ben → adventure/games/kristofer.rumeau@ynov.com/logic/stationlogic.ben
Executable file → Normal file
0
adventure/games/votrejeu/logic/stationlogic.ben → adventure/games/kristofer.rumeau@ynov.com/logic/stationlogic.ben
Executable file → Normal file
0
adventure/games/votrejeu/rooms/bigroom.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/bigroom.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/bigroom.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/bigroom.sh
Executable file → Normal file
16
adventure/games/votrejeu/rooms/brown.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/brown.sh
Executable file → Normal file
16
adventure/games/votrejeu/rooms/brown.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/brown.sh
Executable file → Normal file
@ -1,13 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
|
||||
clear
|
||||
# Initialise the Title Art
|
||||
file1="../art/titleart.ben"
|
||||
file1="$MY_PATH/../art/titleart.ben"
|
||||
while IFS= read -r line
|
||||
do
|
||||
echo "$line"
|
||||
done <"$file1"
|
||||
echo
|
||||
sleep 1
|
||||
|
||||
# Here's this room's script.
|
||||
|
||||
@ -21,7 +25,7 @@ echo "Il ressemble à une grosse calculatrice"
|
||||
|
||||
|
||||
# Here we tell the player whether the lever is on or off.
|
||||
leverstate=`cat ../logic/leverlogic.ben`
|
||||
leverstate=$(cat $MY_PATH/../logic/leverlogic.ben)
|
||||
if [ "$leverstate" = "on" ]; then
|
||||
echo "'VISA SVP' clignote sur l'écran..."
|
||||
else
|
||||
@ -42,13 +46,11 @@ while true; do
|
||||
s ) echo "Si vous continuez à marcher dans la forêt. Vous allez vous perdre. Demi tour." ;;
|
||||
e ) echo "Le chemin qui part à l'Est est plein de boue... Impossble d'aller par là." ;;
|
||||
w ) echo "Une rivière vous empêche de passer." ;;
|
||||
u ) leverstate=`cat ../logic/leverlogic.ben`
|
||||
if [ "$leverstate" = "on" ]; then
|
||||
u ) if [ "$leverstate" = "on" ]; then
|
||||
echo "A chaque frappe d'une touche. l'écran fait défiler le texte 'SCANNEZ VISA SVP'."
|
||||
else
|
||||
sed -i='' 's/off/on/' ../logic/leverlogic.ben
|
||||
sed -i 's/off/on/' $MY_PATH/../logic/leverlogic.ben
|
||||
echo "Vous pianotez sur l'appareil..."
|
||||
sleep 3
|
||||
echo "A moment où vous touchez la touche '#' L'écran se met à clignoter..."
|
||||
echo "Puis le message 'ACTIVATION STATION' défile sur les caractères lumineux."
|
||||
fi
|
0
adventure/games/votrejeu/rooms/end.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/end.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/end.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/end.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/gameroom.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/gameroom.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/gameroom.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/gameroom.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/green.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/green.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/green.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/green.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/grue.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/grue.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/grue.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/grue.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/kroo.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/kroo.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/kroo.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/kroo.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/kroo2.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/kroo2.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/kroo2.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/kroo2.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/magic8.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/magic8.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/magic8.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/magic8.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/mainroom.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/mainroom.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/mainroom.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/mainroom.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/meteofrance.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/meteofrance.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/meteofrance.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/meteofrance.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/red.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/red.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/red.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/red.sh
Executable file → Normal file
11
adventure/games/votrejeu/rooms/start.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/start.sh
Executable file → Normal file
11
adventure/games/votrejeu/rooms/start.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/start.sh
Executable file → Normal file
@ -1,16 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
|
||||
clear
|
||||
|
||||
# Logic in the game is stored in .ben files. This sample has just one 'logic' file.
|
||||
# You can add more logic files by simply adding a 'sed' command and appropriate .ben file.
|
||||
# First off, let us reset the game logic. Use this as an example.
|
||||
|
||||
sed -i='' 's/on/off/' ../logic/leverlogic.ben
|
||||
sed -i '' 's/on/off/' ../logic/leverlogic.ben
|
||||
|
||||
# Who doen't love ASCII text, right?
|
||||
# Next up, let's initialise the Title Art
|
||||
file1="../art/titleart.ben"
|
||||
file1="$MY_PATH/../art/titleart.ben"
|
||||
while IFS= read -r line
|
||||
do
|
||||
echo "$line"
|
||||
@ -18,8 +22,7 @@ done <"$file1"
|
||||
echo
|
||||
|
||||
# Next up, let's load in the initial introduction. Script is also stored in .ben files.
|
||||
sleep 5
|
||||
file2="../script/opening.ben"
|
||||
file2="$MY_PATH/../script/opening.ben"
|
||||
while IFS= read -r line
|
||||
do
|
||||
echo "$line"
|
0
adventure/games/votrejeu/rooms/white.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/white.sh
Executable file → Normal file
0
adventure/games/votrejeu/rooms/white.sh → adventure/games/kristofer.rumeau@ynov.com/rooms/white.sh
Executable file → Normal file
0
adventure/games/votrejeu/script/opening.ben → adventure/games/kristofer.rumeau@ynov.com/script/opening.ben
Executable file → Normal file
0
adventure/games/votrejeu/script/opening.ben → adventure/games/kristofer.rumeau@ynov.com/script/opening.ben
Executable file → Normal file
@ -46,7 +46,7 @@ while true; do
|
||||
if [ "$leverstate" = "on" ]; then
|
||||
echo "A chaque frappe d'une touche. l'écran fait défiler le texte 'SCANNEZ VISA SVP'."
|
||||
else
|
||||
sed -i='' 's/off/on/' ../logic/leverlogic.ben
|
||||
sed -i '' 's/off/on/' ../logic/leverlogic.ben
|
||||
echo "Vous pianotez sur l'appareil..."
|
||||
sleep 3
|
||||
echo "A moment où vous touchez la touche '#' L'écran se met à clignoter..."
|
||||
|
Loading…
Reference in New Issue
Block a user