View difference between Paste ID: WtKaweDF and qa0K5Znf
SHOW: | | - or go back to the newest paste.
1
#!/bin/bash
2
##Functions##
3
saveFunction(){
4
echo "#!/bin/bash" >> ./human/$NAME.txt
5
echo "NAME='$NAME'" >> ./human/$NAME.txt
6
echo "AGE='$AGE'" >> ./human/$NAME.txt
7
echo "GENDER='$GENDER'" >> ./human/$NAME.txt
8
echo "GLASSES='$GLASSES'" >> ./human/$NAME.txt
9
echo "WEIGHT='$WEIGHT'" >> ./human/$NAME.txt
10
echo "LENGTH='$LENGTH'" >> ./human/$NAME.txt
11
echo "HAIR='$HAIR'" >> ./human/$NAME.txt
12
echo "FEET='$FEET'" >> ./human/$NAME.txt
13
echo "INCHES='$INCHES'" >> ./human/$NAME.txt
14
echo "STR='$STR'" >> ./human/$NAME.txt
15
echo "DEX='$DEX'" >> ./human/$NAME.txt
16
echo "CON='$CON'" >> ./human/$NAME.txt
17
echo "INT='$INT'" >> ./human/$NAME.txt
18
echo "WIS='$WIS'" >> ./human/$NAME.txt
19
echo "CHAR='$CHAR'" >> ./human/$NAME.txt
20
echo "JOB='$JOB'" >> ./human/$NAME.txt
21
if [ "$GENDER" == "female" ]; then
22-
	echo "BREAST='$BREAST'" >> ./human/$NAME.txt
22+
    echo "BREAST='$BREAST'" >> ./human/$NAME.txt
23-
	echo "File saved at ./human/$NAME.txt"
23+
    echo "File saved at ./human/$NAME.txt"
24
fi
25
}
26
27
statsFunction(){
28
echo "Name: " $NAME
29
echo "Age:" $AGE
30
echo "Gender: " $GENDER
31
echo "$GLASSES"
32
echo "Weight: " $WEIGHT
33
echo "Hair: " $LENGTH " and " $HAIR
34
echo "Height: "$FEET "Feet" $INCHES "Inches"
35
echo "Job: " $JOB
36
echo "STR: " $STR
37
echo "DEX: " $DEX
38
echo "CON: " $CON
39
echo "INT: " $INT
40
echo "WIS: " $WIS
41
echo "CHAR: " $CHAR
42
43
if [ "$GENDER" == "female" ]; then
44-
	case $BREAST in
44+
    case $BREAST in
45-
	1)
45+
    1) BREAST="A" ;;
46-
		BREAST="A"
46+
    2) BREAST="B" ;;
47-
		;;
47+
    3) BREAST="C" ;;
48-
	2)
48+
    4) BREAST="D" ;;
49-
		BREAST="B"
49+
    5) BREAST="DD" ;;
50-
		;;
50+
    6) BREAST="E" ;;
51-
	3)
51+
    esac
52-
		BREAST="C"
52+
    echo "Breasts Size: " $BREAST
53-
		;;
53+
54-
	4)
54+
55-
		BREAST="D"
55+
56-
		;;
56+
57-
	5)
57+
58-
		BREAST="DD"
58+
59-
		;;
59+
60-
	6)
60+
61-
		BREAST="E"
61+
    if [ -d ./human ]; then
62-
		;;
62+
        echo "--Files currently available--"
63-
	esac
63+
        ls ./human
64-
	echo "Breasts Size: " $BREAST
64+
        read -p "please type the exact name of the character without .txt: " CHARACTER
65
        . ./human/$CHARACTER.txt
66
    else
67
        echo "There are currently no files to load or the human directory was moved!"
68
        exit
69
    fi
70
else
71
72
##Beginning of character creation##
73-
	if [ -d ./human ]; then
73+
    read -p "Please enter a name: " NAME
74-
		echo "--Files currently available--"
74+
    read -p "Please enter gender male/female: " GENDER
75-
		ls ./human
75+
    AGE=`shuf -i 17-40 -n 1`
76-
		read -p "please type the exact name of the character without .txt: " CHARACTER
76+
    WEIGHT=`shuf -i 90-180 -n 1`
77-
		. ./human/$CHARACTER.txt
77+
    HAIR=`shuf -i 1-6 -n 1`
78-
	else
78+
    LENGTH=`shuf -i 1-4 -n 1`
79-
		echo "There is currently no files to load or the human directory was moved!"
79+
    EYES=`shuf -i 1-4 -n 1`
80-
		exit
80+
    FEET=`shuf -i 4-6 -n 1`
81-
	fi
81+
    INCHES=`shuf -i 0-11 -n 1`
82
    BREAST=`shuf -i 1-6 -n 1`
83
    GLASSES=`shuf -i 0-1 -n 1`
84
    STR=`shuf -i 3-18 -n 1`
85-
	read -p "Please enter a name: " NAME
85+
    DEX=`shuf -i 3-18 -n 1`
86-
	read -p "Please enter gender male/female: " GENDER
86+
    CON=`shuf -i 3-18 -n 1`
87-
	AGE=`shuf -i 17-40 -n 1`
87+
    INT=`shuf -i 3-18 -n 1`
88-
	WEIGHT=`shuf -i 90-180 -n 1`
88+
    WIS=`shuf -i 3-18 -n 1`
89-
	HAIR=`shuf -i 1-6 -n 1`
89+
    CHAR=`shuf -i 3-18 -n 1`
90-
	LENGTH=`shuf -i 1-4 -n 1`
90+
    JOBROLL=`shuf -i 1-6 -n 1`
91-
	EYES=`shuf -i 1-4 -n 1`
91+
92-
	FEET=`shuf -i 4-6 -n 1`
92+
93-
	INCHES=`shuf -i 0-11 -n 1`
93+
94-
	BREAST=`shuf -i 1-6 -n 1`
94+
95-
	GLASSES=`shuf -i 0-1 -n 1`
95+
96-
	STR=`shuf -i 3-18 -n 1`
96+
    1) JOB="CEO" ;;
97-
	DEX=`shuf -i 3-18 -n 1`
97+
    2) JOB="Vice-President" ;;
98-
	CON=`shuf -i 3-18 -n 1`
98+
    3) JOB="HumanResources" ;;
99-
	INT=`shuf -i 3-18 -n 1`
99+
    4) JOB="ITManager" ;;
100-
	WIS=`shuf -i 3-18 -n 1`
100+
    5) JOB="TechSupport" ;;
101-
	CHAR=`shuf -i 3-18 -n 1`
101+
    6) JOB="SalesFloorEmployee" ;;
102-
	JOBROLL=`shuf -i 1-6 -n 1`
102+
103
104
case $HAIR in
105
    1) HAIR="White" ;;
106
    2) HAIR="Black" ;;
107
    3) HAIR="Red" ;;
108-
	1)
108+
    4) HAIR="Blonde" ;;
109-
		JOB="CEO"
109+
    5) HAIR="Brunette" ;;
110-
		;;
110+
    6) HAIR="Grey" ;;
111-
	2)
111+
112-
		JOB="Vice-President"
112+
113-
		;;
113+
114-
	3)
114+
    1) LENGTH="Short" ;;
115-
		JOB="HumanResources"
115+
    2) LENGTH="Medium" ;;
116-
		;;
116+
    3) LENGTH="Long" ;;
117-
	4)
117+
    4) LENGTH="Super Long" ;;
118-
		JOB="ITManager"
118+
119-
		;;
119+
120-
	5)
120+
121-
		JOB="TechSupport"
121+
    1) EYES="Brown" ;;
122-
		;;
122+
    2) EYES="Blue" ;;
123-
	6)
123+
    3) EYES="Green" ;;
124-
		JOB="SalesFloorEmployee"
124+
    4) EYES="Hazel" ;;
125-
		;;
125+
126
127
case $GLASSES in
128
    0) GLASSES="Eyes: $EYES and wears glasses" ;;
129-
	1)
129+
    1) GLASSES="Eye color: $EYES" ;;
130-
		HAIR="White"
130+
131-
		;;
131+
132-
	2)
132+
133-
		HAIR="Black"
133+
134-
		;;
134+
135-
	3)
135+
136-
		HAIR="Red"
136+
137-
		;;
137+
138-
	4)
138+
139-
		HAIR="Blonde"
139+
    if [ "$JOB" == "CEO" ]; then
140-
		;;
140+
        if [ "$INT" == "3" ]; then
141-
	5)
141+
            echo "You stare blankly at the square box in front of you and scratch at your $HAIR hair. You know this box is supposed to do something. You smack it thinking it might help. Unfortunantly it seems smacking it caused a piece to fall off. Picking it up you examine it and pull out a hammer. Knowing full well this will fix the problem."
142-
		HAIR="Burnette"
142+
        elif [ "$INT" -le "14" ]; then
143-
		;;
143+
            echo "Being a woman, it's been hard to be in the lime light of the company, being that you're not particulary smart. Especially in the IT field. You think secretly the IT scum are making fun of you behind your back. You always just merely flip your $LENGTH $HAIR hair and turn your nose up at them as they walk by. Knowing full well they like the view as you walk away."
144-
	6)
144+
        elif [ "$INT" -le "17" ]; then
145-
		HAIR="Grey"
145+
            echo "Being that you're a woman and the owner of your own company. Not many think that you're smart, but the IT guys seem to have your back when it comes to questions. They're nice and respectful and you always seem to have the right questions and follow through with their advice. You may be no tech guru, but you sure as hell try."
146-
		;;
146+
147
            echo "It's been rough being a woman, and being extremely intelligient. Especially to the IT crowd. Not many women fills it's rosters. You made this company, and grew it from the ground up with barely any need of an IT crew. You hire them anyways though to carry out the tasks you deem necessary and they don't seem to really complain too much. They know you're not stupid and respect your decisions."
148
        fi
149
    elif [ "$JOB" == "Vice-President" ]; then
150-
	1)
150+
        if [ "$INT" == "3" ]; then
151-
		LENGTH="Short"
151+
            echo "completely and utter failure $JOB"
152-
		;;
152+
        elif [ "$INT" -le "14" ]; then
153-
	2)
153+
            echo "Dumb $JOB"
154-
		LENGTH="Medium"
154+
        elif [ "$INT" -le "17" ]; then
155-
		;;
155+
            echo "Semi-smart $JOB"
156-
	3)
156+
157-
		LENGTH="Long"
157+
            echo "Smart $JOB"
158-
		;;
158+
159-
	4)
159+
    elif [ "$JOB" == "HumanResources" ]; then
160-
		LENGTH="Super Long"
160+
        if [ "$INT" == "3" ]; then
161-
		;;
161+
            echo "completely and utter failure $JOB"
162
        elif [ "$INT" -le "14" ]; then
163
            echo "Dumb $JOB"
164
        elif [ "$INT" -le "17" ]; then
165-
	1)
165+
            echo "Semi-smart $JOB"
166-
		EYES="Brown"
166+
167-
		;;
167+
            echo "Smart $JOB"
168-
	2)
168+
169-
		EYES="Blue"
169+
    elif [ "$JOB" == "ITManager" ]; then
170-
		;;
170+
        if [ "$INT" == "3" ]; then
171-
	3)
171+
            echo "completely and utter failure $JOB"
172-
		EYES="Green"
172+
        elif [ "$INT" -le "14" ]; then
173-
		;;
173+
            echo "Dumb $JOB"
174-
	4)
174+
        elif [ "$INT" -le "17" ]; then
175-
		EYES="Hazel"
175+
            echo "Semi-smart $JOB"
176-
		;;
176+
177
            echo "Smart $JOB"
178
        fi
179
    elif [ "$JOB" == "TechSupport" ]; then
180-
	0)
180+
        if [ "$INT" == "3" ]; then
181-
		GLASSES="Eyes: $EYES and wears glasses"
181+
            echo "completely and utter failure $JOB"
182-
		;;
182+
        elif [ "$INT" -le "14" ]; then
183-
	1)
183+
            echo "Dumb $JOB"
184-
		GLASSES="Eye color: $EYES"
184+
        elif [ "$INT" -le "17" ]; then
185-
		;;
185+
            echo "Semi-smart $JOB"
186
        else
187
            echo "Smart $JOB"
188
        fi
189
    elif [ "$JOB" == "SalesFloorEmployee" ]; then
190
        if [ "$INT" == "3" ]; then
191
            echo "completely and utter failure $JOB"
192
        elif [ "$INT" -le "14" ]; then
193
            echo "Dumb $JOB"
194
        elif [ "$INT" -le "17" ]; then
195-
	if [ "$JOB" == "CEO" ]; then
195+
            echo "Semi-smart $JOB"
196-
		if [ "$INT" == "3" ]; then
196+
197-
			echo "You stare blankly at the square box in front of you and scratch at your $HAIR hair. You know this box is supposed to do something. You smack it thinking it might help. Unfortunantly it seems smacking it caused a piece to fall off. Picking it up you examine it and pull out a hammer. Knowing full well this will fix the problem."
197+
            echo "Smart $JOB"
198-
		elif [ "$INT" -le "14" ]; then
198+
199-
			echo "Being a woman, it's been hard to be in the lime light of the company, being that your not particulary smart. Especially in the IT field. You think secretly the IT scum are making fun of you behind your back. You always just merely flip your $LENGTH $HAIR hair and turn your nose up at them as they walk by. Knowing full well they like the view as you walk away."
199+
    fi
200-
		elif [ "$INT" -le "17" ]; then
200+
201-
			echo "Being that your a woman and the owner of your own company. Not many think that your smart, but the IT guys seem to have your back when it comes to questions. They're nice and respectful and you always seem to have the right questions and follow through with there advice. You may be no tech guru, but you sure as hell try."
201+
202-
		else
202+
    if [ "$JOB" == "CEO" ]; then
203-
			echo "It's been rough being a woman, and being extremely intelligient. Especially to the IT crowd. Not many women fills it's rosters. You made this company, and grew it from the ground up with barely any need of an IT crew. You hire them anyways though to carry out the tasks you deem necessary and they don't seem to really complain to much. They know your not stupid and respect your decisions."
203+
        if [ "$INT" == "3" ]; then
204-
		fi
204+
            echo "You stare blankly at the square box in front of you and scratch at your $HAIR hair. You know this box is supposed to do something. You smack it thinking it might help. Unfortunantly it seems smacking it caused a piece to fall off. Picking it up you examine it and pull out a hammer. Knowing full well this will fix the problem."
205-
	elif [ "$JOB" == "Vice-President" ]; then
205+
        elif [ "$INT" -le "14" ]; then
206-
		if [ "$INT" == "3" ]; then
206+
            echo "You are the big cheese, the boss to end all bosses. Those IT guys and their thingamajiggers aren't anything to you. You rule this company with an iron fist and it doesn't matter a lick that you don't even know what a survore is."
207-
			echo "completely and utter failure $JOB"
207+
        elif [ "$INT" -le "17" ]; then
208-
		elif [ "$INT" -le "14" ]; then
208+
            echo "Looking at your email you notice you've lost connection to the exchange server. Knowing thats a pretty bad thing you call up the IT department just to double check they're on the case. Knowing full well they're probably already on it. You love your IT guys, they keep the world revolving."
209-
			echo "Dumb $JOB"
209+
210-
		elif [ "$INT" -le "17" ]; then
210+
            echo "You've pretty much single handedly programmed every server in the company and often times find yourself in the IT department just to get your hands dirty. The IT guys love you and often come to your own office just to chit chat. You always make sure the IT department is well taken care of and often make sure the rest of your employees go through your general computing classes."
211-
			echo "Semi-smart $JOB"
211+
212-
		else
212+
    elif [ "$JOB" == "Vice-President" ]; then
213-
			echo "Smart $JOB"
213+
        if [ "$INT" == "3" ]; then
214-
		fi
214+
            echo "completely and utter failure $JOB"
215-
	elif [ "$JOB" == "HumanResources" ]; then
215+
        elif [ "$INT" -le "14" ]; then
216-
		if [ "$INT" == "3" ]; then
216+
            echo "Dumb $JOB"
217-
			echo "completely and utter failure $JOB"
217+
        elif [ "$INT" -le "17" ]; then
218-
		elif [ "$INT" -le "14" ]; then
218+
            echo "Semi-smart $JOB"
219-
			echo "Dumb $JOB"
219+
220-
		elif [ "$INT" -le "17" ]; then
220+
            echo "Smart $JOB"
221-
			echo "Semi-smart $JOB"
221+
222-
		else
222+
    elif [ "$JOB" == "HumanResources" ]; then
223-
			echo "Smart $JOB"
223+
        if [ "$INT" == "3" ]; then
224-
		fi
224+
            echo "completely and utter failure $JOB"
225-
	elif [ "$JOB" == "ITManager" ]; then
225+
        elif [ "$INT" -le "14" ]; then
226-
		if [ "$INT" == "3" ]; then
226+
            echo "Dumb $JOB"
227-
			echo "completely and utter failure $JOB"
227+
        elif [ "$INT" -le "17" ]; then
228-
		elif [ "$INT" -le "14" ]; then
228+
            echo "Semi-smart $JOB"
229-
			echo "Dumb $JOB"
229+
230-
		elif [ "$INT" -le "17" ]; then
230+
            echo "Smart $JOB"
231-
			echo "Semi-smart $JOB"
231+
232-
		else
232+
    elif [ "$JOB" == "ITManager" ]; then
233-
			echo "Smart $JOB"
233+
        if [ "$INT" == "3" ]; then
234-
		fi
234+
            echo "completely and utter failure $JOB"
235-
	elif [ "$JOB" == "TechSupport" ]; then
235+
        elif [ "$INT" -le "14" ]; then
236-
		if [ "$INT" == "3" ]; then
236+
            echo "Dumb $JOB"
237-
			echo "completely and utter failure $JOB"
237+
        elif [ "$INT" -le "17" ]; then
238-
		elif [ "$INT" -le "14" ]; then
238+
            echo "Semi-smart $JOB"
239-
			echo "Dumb $JOB"
239+
240-
		elif [ "$INT" -le "17" ]; then
240+
            echo "Smart $JOB"
241-
			echo "Semi-smart $JOB"
241+
242-
		else
242+
    elif [ "$JOB" == "TechSupport" ]; then
243-
			echo "Smart $JOB"
243+
        if [ "$INT" == "3" ]; then
244-
		fi
244+
            echo "completely and utter failure $JOB"
245-
	elif [ "$JOB" == "SalesFloorEmployee" ]; then
245+
        elif [ "$INT" -le "14" ]; then
246-
		if [ "$INT" == "3" ]; then
246+
            echo "Dumb $JOB"
247-
			echo "completely and utter failure $JOB"
247+
        elif [ "$INT" -le "17" ]; then
248-
		elif [ "$INT" -le "14" ]; then
248+
            echo "Semi-smart $JOB"
249-
			echo "Dumb $JOB"
249+
250-
		elif [ "$INT" -le "17" ]; then
250+
            echo "Smart $JOB"
251-
			echo "Semi-smart $JOB"
251+
252-
		else
252+
    elif [ "$JOB" == "SalesFloorEmployee" ]; then
253-
			echo "Smart $JOB"
253+
        if [ "$INT" == "3" ]; then
254-
		fi
254+
            echo "completely and utter failure $JOB"
255-
	fi
255+
        elif [ "$INT" -le "14" ]; then
256
            echo "Dumb $JOB"
257
        elif [ "$INT" -le "17" ]; then
258-
	if [ "$JOB" == "CEO" ]; then
258+
            echo "Semi-smart $JOB"
259-
		if [ "$INT" == "3" ]; then
259+
260-
			echo "You stare blankly at the square box in front of you and scratch at your $HAIR hair. You know this box is supposed to do something. You smack it thinking it might help. Unfortunantly it seems smacking it caused a piece to fall off. Picking it up you examine it and pull out a hammer. Knowing full well this will fix the problem."
260+
            echo "Smart $JOB"
261-
		elif [ "$INT" -le "14" ]; then
261+
262-
			echo "You are the big cheese, the boss to end all bosses. Those IT guys and there thingy majigures aren't anything to you. You rule this company with an iron fist and it doesn't matter a lick that you don't even know what a survore is."
262+
    fi
263-
		elif [ "$INT" -le "17" ]; then
263+
264-
			echo "Looking at your email you notice you've lost connection to the exchange server. Knowing thats a pretty bad thing you call up the IT department just to double check they're on the case. Knowing full well they're probably already on it. You love your IT guys, they keep the world revolving."
264+
265-
		else
265+
266-
			echo "You've pretty much single handedly programmed every server in the company and often times find yourself in the IT department just to get your hands dirty. The IT guys love you and often come to your own office just to chit chat. You always make sure the IT department is well taken care of and often make sure the rest of your employees go through your general computing classes."
266+
267-
		fi
267+
268-
	elif [ "$JOB" == "Vice-President" ]; then
268+
269-
		if [ "$INT" == "3" ]; then
269+
270-
			echo "completely and utter failure $JOB"
270+
271-
		elif [ "$INT" -le "14" ]; then
271+
    if [ "$SAVE" == "y" ]; then
272-
			echo "Dumb $JOB"
272+
        if [ -f "$FILENAME" ]; then
273-
		elif [ "$INT" -le "17" ]; then
273+
            read -p "This file exists, would you like to overwrite? y/n: " overwrite
274-
			echo "Semi-smart $JOB"
274+
            if [ "$overwrite" == "y" ]; then
275-
		else
275+
                rm ./human/$NAME.txt
276-
			echo "Smart $JOB"
276+
                saveFunction
277-
		fi
277+
278-
	elif [ "$JOB" == "HumanResources" ]; then
278+
            fi
279-
		if [ "$INT" == "3" ]; then
279+
280-
			echo "completely and utter failure $JOB"
280+
            saveFunction
281-
		elif [ "$INT" -le "14" ]; then
281+
282-
			echo "Dumb $JOB"
282+
    else
283-
		elif [ "$INT" -le "17" ]; then
283+
        exit
284-
			echo "Semi-smart $JOB"
284+
    fi
285-
		else
285+
286-
			echo "Smart $JOB"
286+
    mkdir ./human
287-
		fi
287+
    saveFunction
288-
	elif [ "$JOB" == "ITManager" ]; then
288+