Files
  • main.py
  • User Help Guide
  • HScript Discord Emoji.png
  • HScript Logo.png
  • games.py
  • games.pyc
  • result.txt
  • terminal.py
  • terminal.pyc
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
#Version 0.3.1

import terminal, random, games

true = True
false = False
enter = raw_input
string = str
integer = int
decimal = float
rand = random
r = "red"
g = "green"
b = "blue"
y = "yellow"
m = "magenta"
w = "white"

#------------------Programming Space-------------------#

def clr():
  terminal.clr()

turnOn = 1
def load():
  per = 0
  while per != 101:
    clr()
    a="Preparing Setup... "
    if per >= 20:
      a="Fetching Data..."
    if per >= 50:
      a="Installing HOS (This may take a while)... "
    if per == 100:
      a="Installation Finished!"
    terminal.state("---------------")
    terminal.state("Welcome to HOS!")
    terminal.state("---------------")
    terminal.state(a)
    terminal.space()
    terminal.state(string(per) + "%")
    terminal.space()
    terminal.colour_reverse("|"*(per/2), w)
    terminal.wait(0.1)
    per += 1
install_code = 0
def main():
  clr()
  terminal.state("---------------")
  terminal.state("Welcome to HOS!")
  terminal.state("---------------")
  terminal.space()
  terminal.state("Type in help for commands.")
  terminal.space()
  install_echo = 0
  install_BTB = 0
  install_add = 0
  install_subtract = 0
  install_times = 0
  install_divide = 0
  install_1d_Terrain_Gen__v2 = 0
  installdivide = 0
  installecho = 0
  installBTB = 0
  installadd = 0
  installsubtract = 0
  installtimes = 0
  install1dTerrainGenv2 = 0
  install_squared =0
  installsquared=0
  install_cubed =0
  installcubed=0
  ex = 1
  byte = 100
  money = 0
  while ex == 1:
    if installecho == 1:
      byte -= 5
    else:
      byte = byte
    if installBTB == 1:
      byte -= 17
    else:
      byte = byte
    if installadd == 1:
      byte -= 7
    else:
      byte = byte
    if installsubtract == 1:
      byte -= 7
    else:
      byte = byte
    if installtimes == 1:
      byte -= 7
    else:
      byte = byte
    if installdivide == 1:
      byte -= 7
    else:
      byte = byte
    if install1dTerrainGenv2 == 1:
      byte -= 23
    else:
      byte = byte
    if installsquared == 1:
      byte -= 6
    else:
      byte = byte
    if installcubed == 1:
      byte -= 6
    else:
      byte = byte
    installdivide = 0
    installecho = 0
    installBTB = 0
    installadd = 0
    installsubtract = 0
    installtimes = 0
    install1dTerrainGenv2 = 0
    installsquared = 0
    installcubed = 0
    terminal.state("Storage left: " + string(byte) + " bytes.")
    terminal.space()
    HOS_input = enter("> ")
    terminal.space()
    if HOS_input == "help":
      terminal.wait(rand.randint(1,3))
      terminal.state("HOS Install Commands: 'echo', 'BTB', 'add', 'subtract', 'times', '1d Terrain Gen v2', 'squared', 'cubed'.")
      terminal.space()
      terminal.state("Type in install and whatever you want to install to install.")
      terminal.space()
      terminal.state("Type in run and then what you want to run to run it.")
      terminal.space()
      terminal.state("Type in read and then what you want to read about to read what it is.")
      terminal.space()
      terminal.state("Type in exit to exit the system.")
      terminal.space()
      terminal.state("Type in clear to clear the screen.") 
      terminal.space()
    if HOS_input == "install echo":
      if install_echo == 0:
        install_echo = 1
        installecho = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Insalling echo (This may take 7 to 21 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(7,21))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'echo' already installed")
        terminal.space()
    if HOS_input == "run echo":
      if install_echo == 1:
        terminal.wait(rand.randint(1,3))
        aa = enter("> ")
        terminal.space()
        terminal.wait(rand.randint(1,3))
        terminal.state(string(aa))
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'echo' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read echo":
      if install_echo == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'echo' prints what you type into the system.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'echo' does not exist.")
        terminal.space()
        continue
    if HOS_input == "exit":
      terminal.wait(rand.randint(1,3))
      terminal.state("Bye!")
      terminal.space()
      ex = 0
    if HOS_input == "install BTB":
      if install_BTB == 0:
        install_BTB = 1
        installBTB = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Insalling BTB (This may take 5 to 22 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(5,22))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'BTB' already installed")
        terminal.space()
    if HOS_input == "run BTB":
      if install_BTB == 1:
        terminal.wait(rand.randint(1,3))

        terminal.state("From @HappyFakeboulde.")
        terminal.space()
        aa = enter("> ")
        terminal.space()
        terminal.wait(rand.randint(1,3))
        def BTB(binary):
	        retstring = ""
	        for x in binary:
		        if x == "0":
			        retstring += "\\"
		        elif x == "1":
			        retstring += "/"
		        else:
			        retstring += "?"
	        return retstring
        terminal.state(BTB(aa))
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'BTB' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read BTB":
      if install_BTB == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'BTB' converts binary to back slashes. This product is made by @HappyFakeboulde.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'BTB' does not exist.")
        terminal.space()
        continue
    if HOS_input == "install add":
      if install_add == 0:
        install_add = 1
        installadd = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Insalling add (This may take 3 seconds to 14 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(3,14))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'add' already installed")
        terminal.space()
    if HOS_input == "run add":
      if install_add == 1:
        terminal.wait(rand.randint(1,3))
        aa = decimal(enter("> "))
        terminal.space()
        terminal.wait(rand.randint(1,3))
        ab = decimal(enter("> "))
        terminal.wait(rand.randint(1,3))
        answ = aa + ab
        terminal.space()
        terminal.state(answ)
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'add' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read add":
      if install_add == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'add' adds the 2 numbers that you type in.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'add' does not exist.")
        terminal.space()
        continue
    if HOS_input == "install subtract":
      if install_subtract == 0:
        install_subtract = 1
        installsubtract = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Insalling subtract (This may take 3 to 14 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(3,14))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'subtract' already installed")
        terminal.space()
    if HOS_input == "run subtract":
      if install_subtract == 1:
        terminal.wait(rand.randint(1,3))
        aa = decimal(enter("> "))
        terminal.space()
        terminal.wait(rand.randint(1,3))
        ab = decimal(enter("> "))
        terminal.wait(rand.randint(1,3))
        answ = aa - ab
        terminal.space()
        terminal.state(answ)
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'subtract' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read subtract":
      if install_subtract == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'subtract' subtracts the 2 numbers that you type in.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'subtract' does not exist.")
        terminal.space()
        continue
    if HOS_input == "install times":
      if install_times == 0:
        install_times = 1
        installtimes = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Insalling times (This may take 3 to 14 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(3,14))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'times' already installed")
        terminal.space()
    if HOS_input == "run times":
      if install_times == 1:
        terminal.wait(rand.randint(1,3))
        aa = decimal(enter("> "))
        terminal.space()
        terminal.wait(rand.randint(1,3))
        ab = decimal(enter("> "))
        terminal.wait(rand.randint(1,3))
        answ = aa * ab
        terminal.space()
        terminal.state(answ)
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'times' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read times":
      if install_add == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'times' times the 2 numbers that you type in.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'times' does not exist.")
        terminal.space()
        continue
    if HOS_input == "install divide":
      if install_divide == 0:
        install_divide = 1
        installdivide = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Insalling divide (This may take 3 to 14 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(3,14))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'divide' already installed")
        terminal.space()
    if HOS_input == "run divide":
      if install_divide == 1:
        terminal.wait(rand.randint(1,3))
        aa = decimal(enter("> "))
        terminal.space()
        terminal.wait(rand.randint(1,3))
        ab = decimal(enter("> "))
        terminal.wait(rand.randint(1,3))
        answ = aa / ab
        terminal.space()
        terminal.state(answ)
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'divide' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read divide":
      if install_divide == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'divide' divides the 2 numbers that you type in.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'divide' does not exist.")
        terminal.space()
        continue
    if HOS_input == "run 1d Terrain Gen v2":
      if install_1d_Terrain_Gen__v2 == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("Programme made by @HappyFakeboulde.")
        terminal.space()
        terminal.wait(rand.randint(1,3))
        f = open("result.txt", "w+")
        result = [60]
        for x in range(0,10):
          for y in range(0,7):
            result.append(None)
          result.append(rand.randint(-8,8) + result[-8])
        for x in range(4,77,8):
          result[x] = rand.randint(-4,4) + ((result[x-4] + result[x+4]) / 2)
        for x in range(2, 79, 4):
	        result[x] = rand.randint(-2, 2) + ((result[x - 2] + result[x + 2]) / 2)
        for x in range(1, 80, 2):
	        result[x] = rand.randint(-1, 1) + ((result[x - 1] + result[x + 1]) / 2)
        for x in range(256, 0, -1):
	        output = ""
	        for y in result:
		        if y >= x:
			        output += "@@"
		        else:
			        output += "  "
	        f.write(output + "\n")
        with open("result.txt", "r") as a:
          for line in a:
            terminal.state(line) 
            terminal.space()
        f.close()
        terminal.state(result)
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'1d Terrain Gen v2' does not exist.")
        terminal.space()
        continue
    if HOS_input == "install 1d Terrain Gen v2":
      if install_1d_Terrain_Gen__v2 == 0:
        install_1d_Terrain_Gen__v2 = 1
        install1dTerrainGenv2 = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Installing 1d Terrain Gen v2 (This may take 12 to 46 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(12,46))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'1d Terrain Gen v2' already installed")
        terminal.space()
    if HOS_input == "read 1d Terrain Gen v2":
      if install_1d_Terrain_Gen__v2 == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'1d Terrain Gen v2' generates rand 1D terrain. This programme was created by @HappyFakeboulde.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'1d Terrain Gen v2' does not exist.")
        terminal.space()
        continue
    if HOS_input == "install squared":
      if install_squared == 0:
        install_squared = 1
        installsquared = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Installing squared (This may take 3 to 12 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(3,12))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'squared' already installed")
        terminal.space()
    if HOS_input == "run squared":
      if install_squared == 1:
        terminal.wait(rand.randint(1,3))
        aa = decimal(enter("> "))
        terminal.wait(rand.randint(1,3))
        answ = aa*aa
        terminal.space()
        terminal.state(answ)
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'squared' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read squared":
      if install_squared == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'squared' squares the number you type in.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'squared' does not exist.")
        terminal.space()
        continue
    if HOS_input == "install cubed":
      if install_cubed == 0:
        install_cubed = 1
        installcubed = 1
        terminal.wait(rand.randint(1,3))
        terminal.state("Installing cubed (This may take 3 to 12 seconds to install depending on your PC)... ")
        terminal.space()
        terminal.wait(rand.randint(3,12))
        terminal.state("Installation sucsessful!")
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'cubed' already installed")
        terminal.space()
    if HOS_input == "run cubed":
      if install_cubed == 1:
        terminal.wait(rand.randint(1,3))
        aa = decimal(enter("> "))
        terminal.wait(rand.randint(1,3))
        answ = aa*aa*aa
        terminal.space()
        terminal.state(answ)
        terminal.space()
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'cubed' does not exist.")
        terminal.space()
        continue
    if HOS_input == "read cubed":
      if install_cubed == 1:
        terminal.wait(rand.randint(1,3))
        terminal.state("'cubed' cubes the number you type in.")
        terminal.space()
        continue
      else:
        terminal.wait(rand.randint(1,3))
        terminal.state("'cubed' does not exist.")
        terminal.space()
        continue
    if HOS_input == "clear":
      terminal.wait(rand.randint(1,3))
      clr()
      terminal.state("---------------")
      terminal.state("Welcome to HOS!")
      terminal.state("---------------")
      terminal.space()
      terminal.state("Type in help for commands.")
      terminal.space()

load()
main()