-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMinecraft2.py
1513 lines (1444 loc) · 75.3 KB
/
Minecraft2.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
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import random
import numpy as np
# Liyong Wang want to join in this project (6/24/2024)
# blocks: ◈ is stone
# Character Length test (1): aaaaaaaaaa
# Character Length test (2):
# Entire game function
def entire_game(player_name):
Time_Spent = 0
game_size = 21
vill_houses = {} # List of villages
# Text engine for rock paper scissors
binary_capital_letter_codes_rps = {
'A': '010101111101101',
'C': '011100100100011',
'E': '111100111100111',
'I': '111010010010111',
'K': '101101110101101',
'O': '010101101101010',
'P': '110101110100100',
'R': '110101110101101',
'S': '011100010001110'
}
# Village house model
vill_house = [
' ', ' ', ' ', '∥', ' ', ' ', ' ',
' ', ' ', '∥', ' ', '∥', ' ', ' ',
' ', '∥', ' ', ' ', ' ', '∥', ' ',
'|', ' ', ' ', ' ', ' ', ' ', '|',
'|', ' ', ' ', ' ', ' ', ' ', '|',
'|', ' ', ' ', ' ', ' ', ' ', '|',
'|', ' ', ' ', ' ', ' ', ' ', '|',
' ', ' ', '⊠', '◈', '◈', ' ', ' ',
'∥', '∥', '∥', '∥', '∥', '∥', '∥',
]
def clear_range(start, end): # Clears a range of blocks in the game
game_index = start
while game_index < end:
game[game_index] = ' '
game_index += 1
def display_char(left_corner_place, character_display): # Display a character for rock paper scissors
x_display = 0
y_display = 0
index_display = 0
for y_axis_change in range(5):
for x_axis_change in range(3):
if list(binary_capital_letter_codes_rps[character_display])[index_display] == '1':
game[left_corner_place + x_display + y_display * 51] = '◆'
x_display += 1
index_display += 1
x_display = 0
y_display += 1
def display_rps(player, rps_run): # If real player, set player to 0, else set player to 1. This also displays the text of rock paper scissors gamemode.
index_char_displaying = 0
for character_to_display in list(rps_run):
display_char(410 + player * 612 + index_char_displaying * 4, character_to_display)
index_char_displaying += 1
def login(): # Login vertification test
user_credentials = {'Wax01': 'TheSST!!!!!', 'max': "i am stupid"}
if user_credentials.keys().__contains__(username):
# Get username and password from the user
password = input("Enter your password: ")
# Check if the entered username exists and the password matches
if username in user_credentials and user_credentials[username] == password:
print("Login successful!")
else:
print("Login failed. Please check your username and password.")
exit(0)
def lottery(): # Lottery game
"""
lottery.
getting 3 A's on any line is a 1.385% chance or 1 in 72.2 chance.
"""
import random
MAX_LINES = 3
MAX_BET = 100
MIN_BET = 1
ROWS = 3
COLS = 3
symbol_count = {
'A': 3,
'B': 4,
'C': 5,
'D': 6
}
symbol_value = {
'A': 100,
'B': 50,
'C': 25,
'D': 12
}
def check_winnings(columns, lines, bet, values):
winnings = 0
winning_lines = []
for line in range(lines):
symbol = columns[0][line]
for column in columns:
symbol_to_check = column[line]
if symbol != symbol_to_check:
break
else:
winnings += values[symbol] * bet
winning_lines.append(line + 1)
return winnings, winning_lines
def get_slot_machine_spin(rows, cols, symbols):
all_symbols = []
for symbol, symbol_count in symbols.items():
for _ in range(symbol_count):
all_symbols.append(symbol)
columns = []
for _ in range(cols):
column = []
current_symbols = all_symbols[:]
for _ in range(rows):
value = random.choice(current_symbols)
#current_symbols.remove(value) <- dont do dis
column.append(value)
columns.append(column)
return columns
def print_slot_machine(columns):
for row in range(len(columns[0])):
for i, column in enumerate(columns):
if i != len(columns) - 1:
print(column[row], end=' | ')
else:
print(column[row], end='')
print()
def deposit():
while True:
amount = input('how much money do u want 2 deposit? $')
if amount.isdigit():
amount = int(amount)
if amount > 0:
break
else:
print('invalid value! number must be above 0')
else:
print('pls enter a number')
return amount
def get_lines():
while True:
lines = input(f'enter da number of lines 2 bet on (1 - {MAX_LINES}) ')
if lines.isdigit():
lines = int(lines)
if 1 <= lines <= MAX_LINES:
break
else:
print(f'invalid value! number must be between 1 and {MAX_LINES} inclusive ')
else:
print('pls enter a number')
return lines
def get_bet():
while True:
amount = input(f'how much money do u want 2 bet? ({MIN_BET} - {MAX_BET}) $')
if amount.isdigit():
amount = int(amount)
if MIN_BET <= amount <= MAX_BET:
break
else:
print(f'invalid value! number must be between {MIN_BET} and {MAX_BET} inclusive')
else:
print('pls enter a number')
return amount
def game(balance):
lines = get_lines()
while True:
bet = get_bet()
total_bet = bet * lines
if total_bet > balance:
print('u dont have enough money')
else:
break
print(f'u r betting ${bet} on {lines} lines. total bet is equal 2 ${total_bet}')
slots = get_slot_machine_spin(ROWS, COLS, symbol_count)
print_slot_machine(slots)
winnings, winning_lines = check_winnings(slots, lines, bet, symbol_value)
print(f'u won ${winnings}')
print(f'u won on', *winning_lines)
return winnings - total_bet
def main():
balance = deposit()
while True:
print(f'current balance is ${balance}')
spin = input('press enter 2 spin (q to quit) ')
if spin.lower() == 'q' or spin.lower() == 'quit':
break
balance += game(balance)
print(f'u left with ${balance}')
main()
def convert_emoji(words): # Converts text to face emojis
text_split = words.split(' ')
output = ''
emojis = {
':)': '🙂', ':(': '☹️', ":\\": '😐',
":|": '😐', ":/": '😐', "O_O": '😮',
":D": '😃', "XD": '😆', ":'(": '😢',
":')": '🥲', ":P": '😛', ":3": '😗',
">:(": '🤬', ">:)": '😈', "-_-": '😑',
"D:": '😦', '=D': '😀', '=(': '🥺',
"D':": '😭', '<3': '❤️', ':O': '😮',
'O:': '😮', '...': '😐', '_WIN_': '🥇',
'_LOSE_': '🥇❌', '_LUCKY_': '🍀', '_UNLUCKY_': '🍀❌',
'_1ST_': '🥇', '_2ND_': '🥈', '_3RD_': '🥉'
}
for emoji in text_split:
output += emojis.get(emoji.upper(), emoji) + ' '
return output
def spawn_tree(x, y): # Spawns a tree.
place = (game_size**2-int(np.ceil(game_size/2))) + x - y * game_size
k = 0
height = random.randint(3, 7)
while k < height:
place -= game_size
if place > 0:
game[place] = '|'
k += 1
if place - 1 >= 1:
game[place - 1] = '0'
if place + 1 >= 1:
game[place + 1] = '0'
if place + (game_size - 1) >= 0:
game[place + (game_size - 1)] = '0'
if place + (game_size + 1) >= 0:
game[place + (game_size + 1)] = '0'
if place - game_size >= 0:
game[place - game_size] = '0'
if place - (game_size + 1) >= 0:
game[place - (game_size + 1)] = '0'
if place - (game_size - 1) >= 0:
game[place - (game_size - 1)] = '0'
if place - 2*game_size >= 0:
game[place - 2*game_size] = '0'
def spawn_village_house(x, y): # Spawns a house
place = (game_size**2-int(np.ceil(game_size/2))) + x - y * game_size
increase_place = game_size * -8 - 3
increment_block = 0
for y_change in range(9):
for x_change in range(7):
if game_size ** 2 > place + increase_place >= 0:
game[place + increase_place] = vill_house[increment_block]
increment_block += 1
increase_place += 1
increase_place += game_size - 7
chest_items[place - game_size - 1] = []
for i in range(len(block_count)):
chest_items[place - game_size - 1].append(0)
chest_items[place - game_size - 1].append(0) # Saplings
chest_items[place - game_size - 1].append(0) # Flint
chest_items[place - game_size - 1].append(0) # Flint and Steel
chest_items[place - game_size - 1].append(0) # Explosive Pickaxes
chest_items[place - game_size - 1].append(0) # Explosive Pickaxes (Fortune I)
chest_items[place - game_size - 1].append(0) # Block Break (Fortune I)
chest_items[place - game_size - 1].append(0) # Fireballs
chest_items[place - game_size - 1][1] = random.randint(2, 7)
chest_items[place - game_size - 1][2] = random.randint(5, 13)
chest_items[place - game_size - 1][3] = random.randint(1, 4)
chest_items[place - game_size - 1][4] = random.randint(5, 11)
chest_items[place - game_size - 1][6] = random.randint(0, 3)
chest_items[place - game_size - 1][7] = random.randint(0, 4)
chest_items[place - game_size - 1][8] = random.randint(0, 2)
chest_items[place - game_size - 1][9] = random.randint(0, 2)
chest_items[place - game_size - 1][15] = random.randint(2, 4)
chest_items[place - game_size - 1][16] = random.randint(1, 2)
x_block_place = -3
for block_col in range(7):
block_place = place + x_block_place + game_size
while True:
if block_place < game_size ** 2:
if game[block_place] == ' ':
game[block_place] = '▪'
else:
break
else:
break
block_place += game_size
x_block_place += 1
x_block_place = -3
for block_col in range(7):
block_place = place + x_block_place - 9 * game_size
while True:
if block_place >= 0:
if game[block_place] != ' ':
game[block_place] = ' '
else:
break
else:
break
block_place -= game_size
x_block_place += 1
for x_offset in [-4, 4]:
block_place = place + x_offset - game_size
if game[block_place] != ' ':
while True:
if block_place >= 0:
if game[block_place] != ' ':
game[block_place] = ' '
else:
break
else:
break
block_place -= game_size
else:
block_place += game_size
while True:
if block_place < game_size ** 2:
if game[block_place] == ' ':
game[block_place] = '▪'
else:
break
else:
break
block_place += game_size
def ban_user(): # Banning system
hit_user = input('who do u want to ban ')
while True:
ban_time = input(f'how long do u ban {hit_user} (hrs) ')
if ban_time.isdigit():
break
else:
print('invalid')
reason = input(f'y do u want 2 ban {hit_user} ')
print(f'Ban Successful! {hit_user} has been banned for {ban_time} hours because {hit_user} {reason}')
exit(0)
last_move = ''
if player_name == 0:
user_domain = random.randint(1, 20) # Username generator
if user_domain == 1:
user_domain = "01'er"
if user_domain == 2:
user_domain = "Wax01_g0t_"
if user_domain == 3:
user_domain = "1n54n1t4-"
if user_domain == 4:
user_domain = "G0d_play3r"
if user_domain == 5:
user_domain = "1nsane_gmr"
if user_domain == 6:
user_domain = "L0L_C4P-S"
if user_domain == 7:
user_domain = "Anti09'er"
if user_domain == 8:
user_domain = "Xx_0H10-1T3_"
if user_domain == 9:
user_domain = "Wax01-Wax01_DA-"
if user_domain == 10:
user_domain = "Xx_XxxX_M-PIRE-"
if user_domain == 11:
user_domain = "abcdefghijklmnopqrstuvwxyz"
if user_domain == 12:
user_domain = "r_CUT_bee"
if user_domain == 13:
user_domain = "Anti5112967'er"
if user_domain == 14:
user_domain = "github-user"
if user_domain == 15:
user_domain = "0N3_PLU5_TW0_3QU4L5_"
if user_domain == 16:
user_domain = "min3craft_PLAYR"
if user_domain == 17:
user_domain = "gmrgmr"
if user_domain == 18:
user_domain = "wAX01_iN_c4P5_r3V3RS3"
if user_domain == 19:
user_domain = "Wax01_fr0m_"
if user_domain == 20:
user_domain = "XxXxWax01xXxX"
user_id = random.randint(1000, 9999)
username = user_domain + str(user_id)
else:
username = player_name
user = input(f'Your username is {username}. Do you want to change it? (Y/N) ')
if user.upper() == 'Y' or user.upper() == 'YES':
username = input("What's your new username? ")
login()
print(f'Hello {username}!')
Server = int(np.round(10 ** random.uniform(0, 10)))
gamemode = input('Do u want 2 play peaceful or skywars or parkour or make a server (mas) or bedwars or rock paper scissors (rps) or creative or explosion survival or \nsurvival or hard survival? ') # Gamemode to play
if gamemode.upper() == 'MAS' or gamemode.upper() == 'MAKE A SERVER':
Your_Server = True
gamemode = 'peaceful'
Server = input('What do you want your server name to be? ')
else:
Your_Server = False
gamemode = gamemode.lower()
if gamemode == 'rps':
gamemode = 'rock paper scissors'
chat = [f'Welcome to server {Server} in {gamemode}!', f'{username} joined', f"Tip: {random.choice(['You can do a 3 block vertical jump!', "Breaking a village house's chest can give you up to 2 diamonds!", "Craft a chest with 8 planks.", 'Explode a TNT with flint and steel!', "You won't get the items in a chest if you explode them with TNT."])}"]
i = 1
up_speed = 0
right_speed = 0
last_tree = -5
last_vill_house = -15
# Adds the items list
Saplings = 0
y_terrain = 10
Server_Views = 0
Flint = 0
FlintAndSteel = 0
ExplosivePickaxes = 0
ExplosivePickaxesFortuneI = 0
BlockBreakFortuneI = 0
fireballs = 100
block_types = ['▪', '|', '0', '◈', '∥', '⊠', '∷', '⍠', '⌘', '◆', '▟', '▙', '▜', '▛', '⚠', '?', '7', '#']
block_names = ['GRASS', 'WOOD', 'LEAVES', 'STONE', 'PLANKS', 'CHESTS', 'COAL', 'IRON', 'GOLD', 'DIAMONDS', 'UPRIGHT STAIRS', 'UPLEFT STAIRS', 'DOWNRIGHT STAIRS', 'DOWNLEFT STAIRS', 'TNT', 'LUCKY BLOCKS', 'LOTTERIES', 'MAGMA']
block_count = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0]
Enemy_Bed = None
Your_Bed = None
G1 = 0
G2 = 0
chest_items = {}
active_fireballs = [] # Format: [[place, x_velocity, y_velocity]]
ExplosivePickEquip = False
ExplosivePickFortuneIEquip = False
BlockBreakFortuneIEquip = False
burn_time = 0
if gamemode.upper() == 'SKYWARS' or gamemode.upper() == 'BEDWARS':
game_size = 21
block_count[0:2] = 1000000, 1000000
user_domain = random.randint(1, 20) # Enemy name generator
if user_domain == 1:
user_domain = "01'er"
if user_domain == 2:
user_domain = "Wax01_g0t_"
if user_domain == 3:
user_domain = "1n54n1t4-"
if user_domain == 4:
user_domain = "G0d_play3r"
if user_domain == 5:
user_domain = "1nsane_gmr"
if user_domain == 6:
user_domain = "L0L_C4P-S"
if user_domain == 7:
user_domain = "Anti09'er"
if user_domain == 8:
user_domain = "Xx_0H10-1T3_"
if user_domain == 9:
user_domain = "Wax01-Wax01_DA-"
if user_domain == 10:
user_domain = "Xx_XxxX_M-PIRE-"
if user_domain == 11:
user_domain = "abcdefghijklmnopqrstuvwxyz"
if user_domain == 12:
user_domain = "r_CUT_bee"
if user_domain == 13:
user_domain = "Anti5112967'er"
if user_domain == 14:
user_domain = "github-user"
if user_domain == 15:
user_domain = "0N3_PLU5_TW0_3QU4L5_"
if user_domain == 16:
user_domain = "min3craft_PLAYR"
if user_domain == 17:
user_domain = "gmrgmr"
if user_domain == 18:
user_domain = "wAX01_iN_c4P5_r3V3RS3"
if user_domain == 19:
user_domain = "Wax01_fr0m_"
if user_domain == 20:
user_domain = "XxXxWax01xXxX"
user_id = random.randint(1000, 9999)
enemy_name = user_domain + str(user_id)
chat.append(f'{enemy_name}: I will win!!!')
game = [] # Default Game Size
while i <= 441:
game.append(' ')
i += 1
i = 0
if gamemode.upper() == 'PEACEFUL' or gamemode.upper() == 'CREATIVE' or gamemode.upper() == 'EXPLOSION SURVIVAL' or gamemode.upper() == 'SURVIVAL' or gamemode.upper() == 'HARD SURVIVAL':
if gamemode.upper() == 'EXPLOSION SURVIVAL':
game_size = 41
else:
game_size = int(input('How big do u want ur world 2 b??? '))
y_terrain = int(np.floor(game_size/2))
game = [] # World Terrain Generator
while i <= game_size**2:
game.append(' ')
i += 1
i = 0
while i < game_size:
super_slope = random.randint(0, 1)
if super_slope == 0:
if y_terrain > int(np.ceil((game_size * 5)/7)):
y_terrain += random.randint(-1, 0)
elif y_terrain < int(np.floor((game_size * 2)/7)-1):
y_terrain += random.randint(0, 1)
else:
y_terrain += random.randint(-1, 1)
else:
if y_terrain > int(np.ceil((game_size * 5)/7)):
y_terrain += random.randint(-2, 0)
elif y_terrain < int(np.floor((game_size * 2)/7)-1):
y_terrain += random.randint(0, 2)
else:
y_terrain += random.randint(-2, 2)
j = y_terrain
place = game_size * (game_size-1) + i - y_terrain * game_size
while j >= 0:
if y_terrain - j > random.randint(4, 5):
game[place] = '◈'
if random.randint(1, int(np.round(1.3 ** (float(abs(14 - (y_terrain - j)) + 9))))) == 1:
game[place] = '∷'
if random.randint(1, int(np.round(1.3 ** (float(abs(16 - (y_terrain - j)) + 9))))) == 1:
game[place] = '⍠'
if random.randint(1, int(np.round(1.3 ** (float(abs(23 - (y_terrain - j)) + 9))))) == 1:
game[place] = '⌘'
if random.randint(1, int(np.round(1.3 ** (float(abs(26 - (y_terrain - j)) + 9))))) == 1:
game[place] = '◆'
else:
game[place] = '▪'
if random.randint(1, 3) == 1 and gamemode.upper() == 'HARD SURVIVAL':
game[place] = random.choice([' ', '#'])
place += game_size
j -= 1
tree = random.randint(1, 12 - (i - last_tree))
if tree == 1 and i != np.floor(game_size/2):
last_tree = i
spawn_tree(i - (int(np.floor(game_size/2))), y_terrain)
vill_house_random = random.randint(1, 35 - (i - last_vill_house))
if vill_house_random == 1 and abs(i - np.floor(game_size/2)) > 3 and i - last_vill_house >= 9:
last_vill_house = i
vill_houses[i - (int(np.floor(game_size/2)))] = y_terrain
if i == np.floor(game_size/2):
ytm = y_terrain
i += 1
for vill_house_x, vill_house_y in vill_houses.items():
spawn_village_house(vill_house_x, vill_house_y)
game[(game_size**2 - int(np.ceil(game_size/2))) - (ytm + 1) * game_size] = '🙂'
place = (game_size**2 - int(np.ceil(game_size/2))) - (ytm + 1) * game_size
touching_ground = True
if gamemode.upper() == 'SKYWARS':
game[420:427] = '▪', '▪', '▪', '▪', '▪', '▪', '▪'
game[400] = '🙂'
game[315:319] = '▪', '▪', '▪', '▪'
game[339] = '▪'
game[360] = '▪'
game[119:126] = '▪', '▪', '▪', '▪', '▪', '▪', '▪'
game[103] = '☹️'
game[17:21] = '▪', '▪', '▪', '▪'
game[38] = '▪'
game[59] = '▪'
place = 400
if gamemode.upper() == 'PARKOUR':
game[399] = '🙂'
game[420] = '▪'
game[422] = '▪'
game[424] = '▪'
game[406] = '▪'
game[431] = '▪'
game[390] = '▪'
game[348] = '▪'
game[437] = '▪'
game[398] = '▪'
game[285] = '▪'
game[353] = '▪'
game[311] = '▪'
game[269] = '▪'
game[260] = '▪'
game[218] = '▪'
game[176] = '▪'
game[254] = '▪'
game[210] = '▪'
game[170] = '▪'
game[129] = '▪'
game[85:88] = '▪', '▪', '▪'
game[126] = '▪'
game[91] = '▪'
game[95] = '▪'
game[99] = '▪'
game[103] = '▪'
game[82] = 'F'
place = 399
try:
block_count[1] = int(input('How much wood do you want? '))
except ValueError:
pass
if gamemode == '837uc41nnc39crn' and username == 'Wax01':
ban_user()
if gamemode.upper() == 'BEDWARS':
block_count[0] = 0
block_count[1] = 5
block_count[16] = 0
game[420:430] = '▪', '▪', '▪', '▪', '▪', '▪', '▪', '▪', '▪', '▪'
game[399] = '|'
game[378] = '|'
game[357] = '|'
game[336] = '|'
game[315:319] = '|', '|', '|', '|'
game[340] = '|'
game[294:299] = '▪', '▪', '▪', '▪', '▪'
game[319] = '▪'
game[406] = '◈'
barrier = []
m = 0
while m < 105:
barrier.append('▪')
m += 1
game[168:273] = barrier
game[437:440] = '|', '|', '|'
game[415:420] = '▪', '▪', '▪', '▪', '▪'
game[398] = '|'
game[394] = '|'
game[437 - 294:440 - 294] = '|', '|', '|'
game[415 - 294:420 - 294] = '▪', '▪', '▪', '▪', '▪'
game[398 - 294] = '|'
game[394 - 294] = '|'
game[420 - 294:430 - 294] = '▪', '▪', '▪', '▪', '▪', '▪', '▪', '▪', '▪', '▪'
game[399 - 294] = '|'
game[378 - 294] = '|'
game[357 - 294] = '|'
game[336 - 294] = '|'
game[315 - 294:319 - 294] = '|', '|', '|', '|'
game[340 - 294] = '|'
game[294 - 294:299 - 294] = '▪', '▪', '▪', '▪', '▪'
game[319 - 294] = '▪'
game[406 - 294] = '◈'
game[401] = '🙂'
place = 401
game[401 - 294] = '☹️'
Enemy_Bed = True
Your_Bed = True
G1 = 0
G2 = 0
if gamemode.upper() == 'RPS' or gamemode.upper() == 'ROCK PAPER SCISSORS':
user_domain = random.randint(1, 20)
if user_domain == 1:
user_domain = "01'er"
if user_domain == 2:
user_domain = "Wax01_g0t_"
if user_domain == 3:
user_domain = "1n54n1t4-"
if user_domain == 4:
user_domain = "G0d_play3r"
if user_domain == 5:
user_domain = "1nsane_gmr"
if user_domain == 6:
user_domain = "L0L_C4P-S"
if user_domain == 7:
user_domain = "Anti09'er"
if user_domain == 8:
user_domain = "Xx_0H10-1T3_"
if user_domain == 9:
user_domain = "Wax01-Wax01_DA-"
if user_domain == 10:
user_domain = "Xx_XxxX_M-PIRE-"
if user_domain == 11:
user_domain = "abcdefghijklmnopqrstuvwxyz"
if user_domain == 12:
user_domain = "r_CUT_bee"
if user_domain == 13:
user_domain = "Anti5112967'er"
if user_domain == 14:
user_domain = "github-user"
if user_domain == 15:
user_domain = "0N3_PLU5_TW0_3QU4L5_"
if user_domain == 16:
user_domain = "min3craft_PLAYR"
if user_domain == 17:
user_domain = "gmrgmr"
if user_domain == 18:
user_domain = "wAX01_iN_c4P5_r3V3RS3"
if user_domain == 19:
user_domain = "Wax01_fr0m_"
if user_domain == 20:
user_domain = "XxXxWax01xXxX"
user_id = random.randint(1000, 9999)
enemy_name = user_domain + str(user_id)
chat.append(f"{enemy_name}: I'm good at rock paper scissors!!!")
game = []
while i <= 2601:
game.append(' ')
i += 1
i = 0
game_size = 51
place = 2504
game[2503] = '🙂'
game[2551:2558] = '∥', '∥', '∥', '∥', '∥', '∥', '∥'
game[2296], game[2302], game[2347], game[2353], game[2398], game[2404], game[2449], game[2455], game[2500] = \
'|', '|', '|', '|', '|', '|', '|', '|', '|'
game[2558:2565] = '▪', '▪', '▪', '▪', '▪', '▪', '▪'
game[2245:2252] = game[2551:2558]
game[2501:2503] = '◈', '◈'
game[2504] = '⊠'
game[2509:2512] = '◆', '◆', '◆'
game[2459] = '◆'
game[2456] = '◆'
game[2354] = '◆'
game[2196:2200] = '⌘', '⌘', '⌘', '⌘', '⌘'
game[2146:2149] = '⌘', '⌘', '⌘'
game[2096] = '⌘'
game[2592:2599] = game[2552:2559]
game[2585:2592] = game[2559:2566]
game[2286:2293] = game[2246:2253]
game[2236:2241] = game[2196:2201]
game[2186:2189] = game[2146:2149]
game[2136] = '⌘'
game[2337], game[2343], game[2388], game[2394], game[2439], game[2445], game[2490], game[2496], game[2547] = \
'|', '|', '|', '|', '|', '|', '|', '|', '|'
game[2545:2547] = '◈', '◈'
game[2544] = '☹️'
game[2536:2539] = game[2510:2513]
game[2543] = '⊠'
game[2486] = '◆'
game[2489] = '◆'
game[2387] = '◆'
game[104], game[106], game[155], game[157], game[207], game[258], game[309] = \
'◆', '◆', '◆', '◆', '◆', '◆', '◆'
game[109], game[159], game[161], game[210], game[212], game[261], game[263], game[313] = \
'◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆'
game[112], game[114], game[163], game[165], game[214], game[216], game[265], game[267], game[316], game[317], game[318] = \
'◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆'
game[717], game[718], game[767], game[818], game[869], game[921], game[922] = \
'◆', '◆', '◆', '◆', '◆', '◆', '◆'
game[720], game[721], game[771], game[773], game[822], game[823], game[873], game[924] = \
'◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆'
game[724], game[726], game[775], game[777], game[826], game[828], game[877], game[879], game[928], game[929], game[930] = \
'◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆', '◆'
x_pos = (place % (game_size**2)) % game_size - int(np.floor(game_size/2)) # Coordinate converter
y_pos = -1 * ((place % (game_size**2)) // game_size) + int(np.floor(game_size/2))
# Where to explode TNT
tnt_explosion_range = [-2 * game_size - 1, -2 * game_size, -2 * game_size + 1,
-game_size - 2, -game_size - 1, -game_size, -game_size + 1, -game_size + 2,
-2, -1, 0, 1, 2,
game_size - 2, game_size - 1, game_size, game_size + 1, game_size + 2,
2 * game_size - 1, 2 * game_size, 2 * game_size + 1]
# Explosive pickaxe explosion range:
explosive_pick_range = [-game_size, -1, 0, 1, game_size]
# Fireball explosion range:
fireball_explosion_range = [-game_size - 1, -game_size, -game_size + 1,
-1, 0, 1,
game_size - 1, game_size, game_size + 1]
def explode_tnt(tnt_x, tnt_y, explosion_range, block_multi): # Explodes TNT
explode_origin = (game_size**2-int(np.ceil(game_size/2))) + tnt_x - tnt_y * game_size
x_expl = int((explode_origin % (game_size ** 2)) % game_size - np.floor(game_size / 2))
y_expl = int(-1 * ((explode_origin % (game_size**2)) // game_size) + np.floor(game_size/2))
vel_up = 0
vel_right = 0
if explosion_range == tnt_explosion_range:
if abs(y_pos - y_expl) == 1:
vel_up = 2 * (y_pos - y_expl)
elif abs(y_pos - y_expl) == 2:
vel_up = int(0.5 * (y_pos - y_expl))
if abs(x_pos - x_expl) == 1:
vel_right = 2 * (x_pos - x_expl)
elif abs(x_pos - x_expl) == 2:
vel_right = int(0.5 * (x_pos - x_expl))
if explosion_range == fireball_explosion_range:
if abs(y_pos - y_expl) == 1:
vel_up = 4 * (y_pos - y_expl)
elif abs(y_pos - y_expl) == 2:
vel_up = int(1.5 * (y_pos - y_expl))
elif abs(y_pos - y_expl) == 3:
vel_up = int((y_pos - y_expl) / 1.5)
elif abs(y_pos - y_expl) == 4:
vel_up = 0.25 * (y_pos - y_expl)
if abs(x_pos - x_expl) == 1:
vel_right = 4 * (x_pos - x_expl)
elif abs(x_pos - x_expl) == 2:
vel_right = int(1.5 * (x_pos - x_expl))
elif abs(x_pos - x_expl) == 3:
vel_right = int((x_pos - x_expl) / 1.5)
elif abs(y_pos - y_expl) == 4:
vel_up = int(0.25 * (y_pos - y_expl))
for explode_index in explosion_range:
if game_size ** 2 > explode_origin + explode_index >= 0:
if game[explode_origin + explode_index] != '🙂':
for block_test in range(len(block_types)):
if game[explode_origin + explode_index] == block_types[block_test]:
if explosion_range == explosive_pick_range:
block_count[block_test] += block_multi
else:
block_count[block_test] += 1
game[explode_origin + explode_index] = ' '
return [vel_right, vel_up]
hp = 20
# Main Loop
while i < 999:
if not block_types.__contains__(game[(place + game_size) % (game_size**2)]) and not place + 2*game_size > game_size**2-1: # Detects if touching the ground
touching_ground = False
else:
touching_ground = True
if not block_types.__contains__([place - game_size]) and last_move == '':
up_speed = 0
if (gamemode == 'explosion survival' or gamemode == 'survival' or gamemode == 'hard survival') and hp < 20: # Regeneration of health
hp += 1
if (gamemode == 'explosion survival' or gamemode == 'survival' or gamemode == 'hard survival') and burn_time > 0:
burn_time -= 1
for message in chat: # Generates Inventory summary message and coordinates
print(message)
k = 0
while k < game_size:
print(game[k * game_size: (k + 1) * game_size])
k += 1
if burn_time > 0:
print(f'🔥 {burn_time}')
summary = 'Inventory: '
for index in range(len(block_count)):
summary += f'{block_count[index]} {block_names[index].lower()}, '
if index == 2:
summary += f'{Saplings} saplings, '
if index == 14:
summary += f'{Flint} flint, '
summary += f'{FlintAndSteel} flint and steel, '
summary += f'{ExplosivePickaxes} explosive pickaxes, '
if index == 15:
summary += f'{ExplosivePickaxesFortuneI} explosive pickaxes (Fortune I), '
summary += '\n'
summary += f'{BlockBreakFortuneI} block break (Fortune I), '
if index == 17:
summary += f'{fireballs} fireballs, '
if index % 7 == 6:
summary += '\n'
if gamemode == 'explosion survival' or gamemode == 'survival' or gamemode == 'hard survival':
print('❤️' * int(np.ceil(hp / 2)))
print(summary)
print(str(x_pos) + ", " + str(y_pos))
if gamemode == 'rock paper scissors':
clear_range(408, 665)
clear_range(1020, 1277)
if Your_Server is True:
print(f'Your server has {Server_Views} views!')
if gamemode == 'bedwars' and -9 <= x_pos <= -6 and (-9 <= y_pos <= -6 or 5 <= y_pos <= 8): # Asks for what to do.
move = input("Do u want 2 jump (w), move left (a) or move right (d) or break a block (bab) or place a block (pab) or chat or gamble on a lottery (goal) or \nbuy something (bs)? ")
else:
if gamemode == 'peaceful' or gamemode == 'survival' or gamemode == 'hard survival':
move = input("Do u want 2 jump (w), move left (a) or move right (d) or break a block (bab) or place a block (pab) or chat or gamble on a lottery (goal) or \ncraft or use a chest (uac) or explode a tnt (eat) or toggle an effect (tae/eep) or use a fireball (uaf)? ")
elif gamemode == 'parkour':
move = input("Do u want 2 jump (w), move left (a) or move right (d) or place a block (pab) or chat or gamble on a lottery (goal)? ")
elif gamemode == 'rock paper scissors':
move = input("Do u want 2 jump (w), move left (a) or move right (d) or chat or gamble on a lottery (goal) or play rock paper scissors (prps)? ")
elif gamemode == 'creative':
move = input(
"Do u want 2 move up (w), move left (a) or move right (d) or break a block (bab) or place a block (pab) or move down (s) or chat or \ngamble on a lottery (goal)? ")
elif gamemode == 'explosion survival':
move = input(
"Do u want 2 jump (w), move left (a) or move right (d) or break a block (bab) or chat or gamble on a lottery (goal)? ")
else:
move = input("Do u want 2 jump (w), move left (a) or move right (d) or break a block (bab) or place a block (pab) or chat or gamble on a lottery (goal)? ")
last_move = '' # Doing the action
if (move.upper() == 'JUMP' or move.upper() == ' ' or move.upper() == 'W' or move.upper() == 'UP'):
if gamemode == 'creative':
if place - game_size >= 0 and not block_types.__contains__(game[place - game_size]):
game[place % (game_size ** 2)] = ' '
place -= game_size
game[place % (game_size ** 2)] = '🙂'
elif touching_ground is True:
up_speed = 1
last_move = 'jump'
elif (move.upper() == 'LEFT' or move.upper() == 'A') and place % game_size != 0 and not block_types.__contains__(game[place - 1]):
game[place % (game_size**2)] = ' '
place -= 1
game[place % (game_size**2)] = '🙂'
elif (move.upper() == 'RIGHT' or move.upper() == 'D') and place % game_size != game_size - 1 and not block_types.__contains__(game[place + 1]):
game[place % (game_size**2)] = ' '
place += 1
game[place % (game_size**2)] = '🙂'
elif (move.upper() == 'S' or move.upper() == 'DOWN') and gamemode == 'creative':
if place + game_size < game_size ** 2 and not block_types.__contains__(game[place + game_size]):
game[place % (game_size ** 2)] = ' '
place += game_size
game[place % (game_size ** 2)] = '🙂'
elif (move.upper() == 'BAB' or move.upper() == 'BREAK A BLOCK') and gamemode != 'parkour' and gamemode != 'rock paper scissors':
x = input('x? ')
y = input('y? ')
try:
place_break = (int(y) - int(np.floor(game_size/2))) * -game_size + int(x) + int(np.floor(game_size/2))
if ((int(x_pos) - int(x)) ** 2 + (int(y_pos) - int(y)) ** 2) ** 0.5 < 2.9 and (block_types.__contains__(game[place_break])):
block_multiplier = 1
if ExplosivePickFortuneIEquip:
block_multiplier *= random.randint(1, 2)
if BlockBreakFortuneIEquip:
block_multiplier *= random.randint(1, 2)
if ExplosivePickEquip or ExplosivePickFortuneIEquip:
explode_tnt(int(x), int(y) + (int(np.ceil(game_size / 2)) - 1), explosive_pick_range, block_multiplier)
else:
lucky_block = False
for i in range(len(block_count)):
if block_types[i] == game[place_break]:
block_count[i] += block_multiplier
if game[place_break] == '0' and random.randint(1, 6) == 1:
block_count[2] -= block_multiplier
Saplings += block_multiplier
if game[place_break] == '⊠':
for j in range(len(block_count)):
block_count[j] += chest_items[place_break][j]
Saplings += chest_items[place_break][len(block_count) + 0]
Flint += chest_items[place_break][len(block_count) + 1]
FlintAndSteel += chest_items[place_break][len(block_count) + 2]
ExplosivePickaxes += chest_items[place_break][len(block_count) + 3]
ExplosivePickaxesFortuneI += chest_items[place_break][len(block_count) + 4]
BlockBreakFortuneI += chest_items[place_break][len(block_count) + 5]
fireballs += chest_items[place_break][len(block_count) + 6]
del chest_items[place_break]
if game[place_break] == '?':
lucky_block = True
game[place_break] = ' '
break
if lucky_block:
block_count[15] -= block_multiplier
for offset in explosive_pick_range:
if 0 <= place_break + offset < game_size ** 2:
if game[place_break + offset] == ' ':
game[place_break + offset] = random.choice(block_types)
except ValueError:
pass
elif (move.upper() == 'PAB' or move.upper() == 'PLACE A BLOCK') and gamemode != 'rock paper scissors' and gamemode != 'explosion survival':
x = input('x? ')
y = input('y? ')
try:
place_break = (int(y) - int(np.floor(game_size/2))) * -game_size + int(x) + int(np.floor(game_size/2))
if ((int(x_pos) - int(x)) ** 2 + (int(y_pos) - int(y)) ** 2) ** 0.5 < 2.9 and game[place_break] == ' ':
if gamemode == 'bedwars':
block = input('Do you want to place grass or wood or leaves or saplings or stone or planks or chests or coal or iron or gold or diamonds or upright stairs \nor upleft stairs or downright stairs or downleft stairs or tnt or lucky blocks or magma? ')
else:
block = input('Do you want to place grass or wood or leaves or saplings or stone or planks or chests or coal or iron or gold or diamonds or upright stairs \nor upleft stairs or downright stairs or downleft stairs or tnt or lucky blocks or lotteries or magma? ')
for i in range(len(block_count)):
if block.upper() == block_names[i]:
if gamemode == 'creative':
game[place_break] = block_types[i]
if block.upper() == 'CHESTS':
chest_items[place_break] = []
for i in range(len(block_count)):
chest_items[place_break].append(0)
chest_items[place_break].append(0) # Saplings
chest_items[place_break].append(0) # Flint
chest_items[place_break].append(0) # Flint and Steel
chest_items[place_break].append(0) # Explosive Pickaxes
chest_items[place_break].append(0) # Explosive Pickaxes (Fortune I)
chest_items[place_break].append(0) # Block Break (Fortune I)
chest_items[place_break].append(0) # Fireballs
elif block_count[i] > 0:
if gamemode != 'bedwars' or i != 16:
game[place_break] = block_types[i]
block_count[i] -= 1
if block.upper() == 'CHESTS':
chest_items[place_break] = []
for i in range(len(block_count)):
chest_items[place_break].append(0)
chest_items[place_break].append(0) # Saplings
chest_items[place_break].append(0) # Flint
chest_items[place_break].append(0) # Flint and Steel
chest_items[place_break].append(0) # Explosive Pickaxes
chest_items[place_break].append(0) # Explosive Pickaxes (Fortune I)
chest_items[place_break].append(0) # Block Break (Fortune I)
chest_items[place_break].append(0) # Fireballs