@JulianChoquette/

haunted graveyard

Python

copied from Holly @ Eltham

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.11069283740032021","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"a2VlcF9wbGF5aW5nID0gVHJ1ZQpwYWdlID0gMQpwcmludCgiV2VsY29tZSB0byBteSBnYW1lISIpCgoKd2hpbGUga2VlcF9wbGF5aW5nOgogIAoKICBpZiBwYWdlID09IDE6CiAgICBwcmludCgiWW91J3JlIGluIGEgaGF1bnRlZCBncmF2ZXlhcmQgYW5kIG5lZWQgdG8gZXNjYXBlLiBZb3UgY2FuIGdvIGxlZnQgKGwpIHRvIHRoZSB0cmVlcywgcmlnaHQgKHIpIHRvIHRoZSBib3R0b20gb2YgdGhlIGhpbGwgb3IgZm9yd2FyZCAoZiksIHRvIG1vcmUgZ3JhdmVzPyIpCiAgICBhbnN3ZXIgPSBpbnB1dCgiQ2hvb3NlIGFuIG9wdGlvbjoiKQogICAgaWYgYW5zd2VyID09ICJsIjoKICAgICAgcHJpbnQoIllvdSdyZSBub3cgYW1vbmcgdGhlIGRhcmsgdHJlZXMuIFlvdSBoZWFyIGEgY3J1bmNoaW5nIG9mIGxlYXZlcyBuZWFyIHlvdS4gIikKICAgICAgcGFnZSA9IDIKICAgIGlmIGFuc3dlciA9PSAiciI6CiAgICAgIHByaW50KCJZb3UgYXJlIG5vdyBhdCB0aGUgYm90dG9tIG9mIHRoZSBoaWxsLCBpdCBpcyBjb2xkZXIgYW5kIHlvdSBjYW4gaGVhciBhbmltYWxzIG1vdmluZyBhcm91bmQgbmVhciB5b3UuIikKICAgICAgcGFnZSA9IDIKICAgIGlmIGFuc3dlciA9PSAiZiI6CiAgICAgIHByaW50KCJZb3UncmUgbm93IGF0IHRoZSBmcm9udCBvZiB0aGUgZ3JhdmV5YXJkLCB3aXRoIHRoZSBtb3N0IGdyYXZlcy4iKQogICAgICBwYWdlID0gMgogICAgICAKICBpZiBwYWdlID09IDI6CiAgICAgIHByaW50KCJZb3UgY2FuIG5vdyBnbyBlYXN0IChlKSBvciB3ZXN0ICh3KS4iKQogICAgICBhbnN3ZXIgPSBpbnB1dCgiUGljayBhbiBvcHRpb246IikKICAgICAgaWYgYW5zd2VyID09ICJlIjoKICAgICAgICBwcmludCgiWW91IHJhbiBpbnRvIGEgd29sZiwgd2hvIHRvcmUgeW91IHRvIHNocmVkcy4gWW91IGRpZWQuIikKICAgICAgICBrZWVwX3BsYXlpbmcgPSBGYWxzZQogICAgICAgIHByaW50KCJUaGFua3MgZm9yIHBsYXlpbmcgbXkgZ2FtZSEiKQogICAgICBpZiBhbnN3ZXIgPT0gInciOgogICAgICAgIHByaW50KCJZb3UndmUgZm91bmQgdGhlIGdhdGUsIGJ1dCBpdCdzIGxvY2tlZC4iKSAKICAgICAgICBwYWdlID0gMwogICAgICAgCiAgaWYgcGFnZSA9PSAzOgogICAgICBwcmludCgiV291bGQgeW91IGxpa2UgdG8gc2VhcmNoIG5lYXJieSBvbiB0aGUgZ3JvdW5kIGZvciB0aGUga2V5IChzKSBvciBhdHRlbXB0IHRvIHJhbSB0aGUgZ2F0ZSAocik/IikKICAgICAgYW5zd2VyID0gaW5wdXQoIkNob29zZSBhbiBvcHRpb24uIikKICAgICAgaWYgYW5zd2VyID09ICJzIjoKICAgICAgICBwcmludCgiV2hpbGUgc2NyYW1ibGluZyBhcm91bmQgb24geW91ciBoYW5kcyBhbiBrbmVlcyBpbiB0aGUgcGl0Y2ggYmxhY2ssIHlvdSBmZWxsIGludG8gYSBkdWcgYnV0IHVudXNlZCBncmF2ZS4gWW91IHdpbGwgbm93IGxpZSB0aGVyZSB1bnRpbCB5b3VyIGRlYXRoLiIpCiAgICAgICAga2VlcF9wbGF5aW5nID0gRmFsc2UKICAgICAgICBwcmludCgiVGhhbmtzIGZvciBwbGF5aW5nIG15IGdhbWUhIikKICAgICAgaWYgYW5zd2VyID09ICJyIjoKICAgICAgICBwcmludCgiWW91IH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mIGFuc3dlciA9PSAiaiI6CiAgICAgIHByaW50KCJZb3UgY3JvdWNoZWQsIHRoZW4gbGVhcHQgb2ZmIHRoZSBicmFuY2guIEl0IGNydW1ibGVkIGFzIHlvdSBqdW1wZWQsIGJ1dCBub25ldGhlbGVzcyB5b3UgY2xlYXJlZCB0aGUgZmVuY2UgYW5kIGJhcmJlZCB3aXJlLiBZb3UgbGFuZGVkIGhlYXZpbHksIGFuZCBub3cgaGF2ZSBhIGJyb2tlbiBhbmtsZSBidXQgeW91IG1hZGUgaXQgb3V0ISIpCiAgICBwYWdlID0gNyAKICBpZiBwYWdlID09IDc6CiAgICBwcmludCgiVGhhbmtzIGZvciBwbGF5aW5nIG15IGdhbWUhIikKCmtlZXBfcGxheWluZyA9IEZhbHNl"},"asBuffer":null},"loaded":true}}
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
keep_playing = True
page = 1
print("Welcome to my game!")


while keep_playing:
  

  if page == 1:
    print("You're in a haunted graveyard and need to escape. You can go left (l) to the trees, right (r) to the bottom of the hill or forward (f), to more graves?")
    answer = input("Choose an option:")
    if answer == "l":
      print("You're now among the dark trees. You hear a crunching of leaves near you. ")
      page = 2
    if answer == "r":
      print("You are now at the bottom of the hill, it is colder and you can hear animals moving around near you.")
      page = 2
    if answer == "f":
      print("You're now at the front of the graveyard, with the most graves.")
      page = 2
      
  if page == 2:
      print("You can now go east (e) or west (w).")
      answer = input("Pick an option:")
      if answer == "e":
        print("You ran into a wolf, who tore you to shreds. You died.")
        keep_playing = False
        print("Thanks for playing my game!")
      if answer == "w":
        print("You've found the gate, but it's locked.") 
        page = 3
       
  if page == 3:
      print("Would you like to search nearby on the ground for the key (s) or attempt to ram the gate (r)?")
      answer = input("Choose an option.")
      if answer == "s":
        print("While scrambling around on your hands an knees in the pitch black, you fell into a dug but unused grave. You will now lie there until your death.")
        keep_playing = False
        print("Thanks for playing my game!")
      if answer == "r":
        print("You ran straight towards the gate and crashed into it. You're now injured and the gate is unscathed.")
        page = 4
  
  if page == 4:
    print("Would you like to ram the gate again (r), try to climb over the gate (c) or left (l) to the tall oak tree?")
    answer = input("Choose an option.")
    if answer == "r":
      print("You ran at the gate again, but this time your head hit the wood, and you fell to the ground bleeding. You eventually bleed out and die.")
      keep_playing = False 
      print("Thanks for playing my game!")
    if answer == "c":
      print("You tried to climb up the gate but the top of it had barbed wire. You become entangled in the wire, cut open and eventually bleed out and die.")
      keep_playing = False
      print("Thanks for playing my game!")
    if answer == "l":
      print("You walk over to the oak tree and see ridges in it that look suitable for climbing.")
      page = 5
      
  if page == 5:
    print("Would you like to attempt to climb the tree (c), settle down next to the tree to sleep for the night (s) or pick some berries off the tree as you're hungry (e)?")
    answer = input("Choose an option.")
    if answer == "s":
      print("You settled down under the tree, closed your eyes after a tiring day, and fall asleep. In your sleep you're ravaged by wolves and die.")
      keep_playing = False 
      print("Thanks for playing my game!")
    if answer == "e":
      print("You picked some delicious looking red berries off the tree, and crunched right into them. However they were poisonous and you began foaming at the mouth and died.")
      keep_playing = False 
      print("Thanks for playing my game!")
    if answer == "c":
      print("You began climbing, getting higher and higher, until you're just above the fence.")
    page = 6 
    
  if page == 6:
    print("You began to hear the growls of a pack of hungry wolves below the tree. You could climb a little higher, to less stable, riskier parts of the tree to ensure a safer jump (c), or you can jump over the fence right now from your current position in the tree (j).")
    answer = input("Choose an option.")
    if answer == "c":
      print("You climbed higher to riskier, less stable parts of the tree, when the branch you were relying on for support snapped, and you tumbled down to the pack of wolves below, who tore you to pieces.")
      keep_playing = False 
      print("Thanks for playing my game!")
    if answer == "j":
      print("You crouched, then leapt off the branch. It crumbled as you jumped, but nonetheless you cleared the fence and barbed wire. You landed heavily, and now have a broken ankle but you made it out!")
    page = 7 
  if page == 7:
    print("Thanks for playing my game!")

keep_playing = False