Advertisement
Guest User

Breath of a Wild Adventure code (In Progress)

a guest
Apr 21st, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 12.89 KB | None | 0 0
  1. #A Breath of a Wild Adventure#
  2.  
  3. import maya.cmds as cmds
  4. import random
  5.  
  6. master_sword=False
  7.  
  8.  
  9. def start():
  10.     result = cmds.promptDialog(title="Welcome Hero",
  11.                                message="A voice calls out to someone, it calls a name. What is it?",
  12.                                button=["Confirm", "Cancel"])
  13.                                
  14.     if result == "Confirm":
  15.         hero = cmds.promptDialog(query=True, text=True)
  16.         wake_up(hero)  
  17.     else:
  18.         print "Sorry to see you go, Good Bye."                        
  19.  
  20. def wake_up(hero):
  21.     cmds.confirmDialog(title="Wake Up",
  22.                        message="{} wakes up after being asleep for 100 years. There is a pedestal a few feet in front of them with a slate device.".format(hero))
  23.     result = cmds.confirmDialog(title="Decide",
  24.                                message="What do they do?",
  25.                                button=["Walk over to the pedestal",  
  26.                                        "Ponder my existance for a few more moments."])      
  27.      
  28.     if result == "Walk over to the pedestal":
  29.        walk_to_pedestal(hero)
  30.     elif result == "Ponder my existance for a few more moments.":
  31.        cmds.confirmDialog(title="Pondering",
  32.                        message="You're not ready to face the world, and go back to sleep for another 100 years.")
  33.        wake_up(hero)  
  34.        
  35. def walk_to_pedestal(hero):
  36.    
  37.     result = cmds.confirmDialog(title="Decide",
  38.                                message="{} walks over and looks at the slate. Do they pick it up?".format(hero),
  39.                                button=["Yes", "No"])
  40.                                        
  41.     if result == "Yes":
  42.         slate_pick_up(hero)
  43.     elif result == "No":
  44.         cmds.confirmDialog(title="You won't pick it up?",
  45.                        message="You refuse, and you sit there in the room until you fall asleep again.")
  46.         wake_up(hero)
  47.    
  48. def slate_pick_up(hero):
  49.         cmds.confirmDialog(title="Pick Up Slate",
  50.                        message="{} picks up the slate and it activates with their touch. It tells them to walk over to the door in front of them and touch the slate to the door to open it. They do so.".format(hero))
  51.         result = cmds.confirmDialog(title="Big Decision",
  52.                                message="The door opens with the touch of the slate, opening up to the world outside. Just then, {} hears the faint voice in the distance calling to them again. It says that they must save the world. This is their final chance to back down; do they accept the request?".format(hero),
  53.                                button=["Yes, they accept",
  54.                                        "No, they refuse"])
  55.                                        
  56.        
  57.         if result == "Yes, they accept":
  58.            start_adventure(hero)
  59.         elif result == "No, they refuse":
  60.            cmds.confirmDialog(title="How could you?",
  61.                        message="You refuse, and Ganon takes over the world. The Hero of Time is no more.")
  62.         return                                
  63.                      
  64. def start_adventure(hero):
  65.     cmds.confirmDialog(title="The Adventure Begins",
  66.                        message="As {} exists the chamber, they feel a sense of adrenaline overcome them. They approach a cliff and look out over it. They see vast planes, a volcano, mountain ranges and a menacing castle in the horizon. An adventure is about to begin!".format(hero))
  67.    
  68.     item_collect(hero)
  69.      
  70.    
  71. def item_collect(hero):
  72.      cmds.confirmDialog(title="Weeks Later...",
  73.                        message="A couple of weeks pass. {} finds some apples, mushrooms and other plant life to sustain them. They also go hunting for wild boars and small birds; they cook and live of the land. They also find some other items, a small bow and arrow with arrows, a rusty broadsword and a sturdy stick. ".format(hero))
  74.      result = cmds.confirmDialog(title="You're Attacked!",
  75.                                message="Just then, a pig like creature called a Bokoblin jumps out from the tall grass and attacks them! What do you they to attack back?",
  76.                                button=["Bow and Arrow",
  77.                                        "Rusty Broadsword",
  78.                                        "Sturdy Stick"])
  79.      if result == "Bow and Arrow":
  80.         after_attack(hero)
  81.        
  82.      elif result == "Rusty Broadsword":
  83.         after_attack(hero)
  84.        
  85.      elif result == "Sturdy Stick":
  86.         cmds.confirmDialog(title="You attack, but...",
  87.                        message="You attack, but your stick breaks upon contact! The Bokoblin hits you with its club, and you're knocked out cold! You wake up a few hours later and continue onward.")
  88.        
  89.         item_collect(hero)
  90.        
  91.        
  92. def after_attack(hero):
  93.      cmds.confirmDialog(title="Victory!",
  94.                        message="{} attacks, and the Bokoblin rears back in pain and turns into a pile of purple dust. Unfortunately, their weapon breaks in the altercation, but they emerge victorious.".format(hero))
  95.          
  96.      months_later(hero)
  97.    
  98. def months_later(hero):
  99.      cmds.confirmDialog(title="Onward!",
  100.                        message="As {} finishes the fight, they continue on their way. Months pass and they visit many towns: Hateno and Kakariko, and meet many other Hylians just like them. They also encounter other races, such as the Zora's; a tribe of sweet and kind fish people, the Rito's; a village of proud bird people, and the Gerudo's: an all-female town filled with powerful women. They get stronger and stronger; one day they will defeat Ganon. The journey continues.".format(hero))
  101.        
  102.      get_a_horse(hero)
  103.      
  104. def get_a_horse(hero):
  105.      cmds.confirmDialog(title="Field of Horses",
  106.                        message="One day on their quest, {} finds a field of horses and decides to try and tame one to make their journey a little easier.".format(hero))
  107.      result = cmds.confirmDialog(title="Which horse?",
  108.                                message="Which horse do they try to tame?",
  109.                                button=["A light brown horse with multiple white spots",
  110.                                        "A full chestnut coloured horse",
  111.                                        "A pure white horse"])    
  112.                                                      
  113.      if result == "A light brown horse with multiple white spots":
  114.          horse_a(hero)
  115.      elif result == "A full chestnut coloured horse":
  116.          horse_b(hero)
  117.      elif result == "A pure white horse":
  118.          horse_c(hero)
  119.          
  120. def horse_a(hero):
  121.     chance = random.randrange (0, 20)
  122.     brown_horse = False
  123.     if chance > 1:
  124.         result = cmds.promptDialog(title="You did it!",
  125.                                message="{} managed to calm down the wild horse and tame it! They now have a horse companion. What do they name their horse?".format(hero),
  126.                                button=["Confirm", "Cancel"])
  127.         if result == "Confirm":
  128.             horse = cmds.promptDialog(query=True, text=True)  
  129.                                
  130.             brown_horse = True
  131.        
  132.             days_later(hero)
  133.    
  134.        
  135.     else:
  136.         message="{} tries to tame the horse, but it knocks them right off, and they watch as it runs away. Maybe next time!".format(hero)
  137.        
  138.         cmds.confirmDialog(title="Maybe next time!",
  139.                            message=message)
  140.        
  141.         get_a_horse(hero)
  142.        
  143. def horse_b(hero):
  144.     chance = random.randrange (0, 20)
  145.     chestnut_horse = False
  146.     if chance > 10:
  147.         result = cmds.promptDialog(title="You did it!",
  148.                                message="{} managed to calm down the wild horse and tame it! They now have a horse companion. What do they name their horse?".format(hero),
  149.                                button=["Confirm", "Cancel"])
  150.         if result == "Confirm":
  151.             horse = cmds.promptDialog(query=True, text=True)  
  152.                                
  153.             chestnut_horse = True
  154.        
  155.             days_later(hero)
  156.    
  157.        
  158.     else:
  159.         message="{} tries to tame the horse, but it knocks them right off, and they watch as it runs away. Maybe next time!".format(hero)
  160.        
  161.         cmds.confirmDialog(title="Maybe next time!",
  162.                            message=message)
  163.        
  164.         get_a_horse(hero)
  165.        
  166. def horse_c(hero):
  167.     chance = random.randrange (0, 20)
  168.     white_horse = False
  169.     if chance > 18:
  170.         result = cmds.promptDialog(title="You did it!",
  171.                                message="{} managed to calm down the wild horse and tame it! They now have a horse companion. What do they name their horse?".format(hero),
  172.                                button=["Confirm", "Cancel"])
  173.         if result == "Confirm":
  174.             horse = cmds.promptDialog(query=True, text=True)  
  175.                                
  176.             white_horse = True
  177.        
  178.             days_later(hero)
  179.        
  180.        
  181.     else:
  182.         message="{} tries to tame the horse, but it knocks them right off, and they watch as it runs away. Maybe next time!".format(hero)
  183.        
  184.         cmds.confirmDialog(title="Maybe next time!",
  185.                            message=message)
  186.        
  187.         get_a_horse(hero)
  188.        
  189.  
  190.    
  191. def days_later(hero):
  192.     result = cmds.confirmDialog(title="The Forest.....",
  193.                                message="{} travels onward with {}, and a few days later find a large forest. Though it was foggy, they found their way through and find a small village of leaf people called Koroks! In this forest lies a sword of legend, the Master Sword. The hero of legend from long ago used this sword to seal away Ganon 10,000 years ago, and now it is their turn to try and awaken it from its slumber. Do they try and pull the master sword from its resting place? ".format(hero, horse),
  194.                                button=["Yes",  
  195.                                        "No"])  
  196.    
  197.     if result == "Yes":
  198.         master_sword = True
  199.         sword_yes(hero)
  200.        
  201.     else:
  202.         sword_no(hero)
  203.        
  204.        
  205. def sword_yes(hero):
  206.     cmds.confirmDialog(title="The Master Sword",
  207.                        message="{} pulls with all their might, and the Master Sword is released! They feel a surge of energy course through them; {} and the sword are now one. The Koroks cheer for them, the Master Sword is now in the hands of the hero once again!  They are now ready to face Ganon!".format(hero, hero))
  208.     ganon_castle(hero)
  209.    
  210.    
  211. def ganon_castle(hero):
  212.     result = cmds.confirmDialog(title="Now or never.",
  213.                                message="{} approaches the castle, and it is in dire state. They make their way up the path, and approach the sanctum, where Ganon lies. It's now or never. Do they enter?".format(hero),
  214.                                button=["Yes",  
  215.                                        "No"])
  216.     if result == "Yes":
  217.         enter_sanctum(hero, master_sword)
  218.        
  219.     elif result == "No":
  220.         cmds.confirmDialog(title="It's not the time...",
  221.                        message="{} doubts themself, and leaves the castle. They return to it once they've gathered the courage to fight Ganon.".format(hero))
  222.         ganon_castle(hero)
  223.                    
  224.                        
  225. def sword_no(hero):
  226.     cmds.confirmDialog(title="Let it sleep...",
  227.                        message="{} decides to not disturb the sword, and leaves the forest. The Koroks bid them farewell as they depart, but as {} glances at them one last time, they seem to be sad. {} continues on. ".format(hero, hero, hero))
  228.     cmds.confirmDialog(title="Weeks Later...",
  229.                        message="More weeks pass, and as {} trains, they feel themself get stronger. They feel they're ready to face Ganon, and make their way to the castle.".format(hero))                  
  230.     ganon_castle(hero)  
  231.      
  232.              
  233. def enter_sanctum(hero, master_sword=False):
  234.     cmds.confirmDialog(title="The fight begins!",
  235.                        message="As {} enters the Sanctum, a black and red sludge from the center of the room begins to come to life and grows bigger and bigger. It materializes into Calamity Ganon, a spider like monster with weaponized arms. Just as it begins to move, {} pulls out their Master Sword and it glows a brilliant blue, ready to face the evil. The fight is on! ".format(hero, hero),
  236.                        button=["Save Hyrule!"])  
  237.                                        
  238.    
  239.     if result == "Save Hyrule!":
  240.         fight_continues_b(hero, master_sword)  
  241.     elif result == "Save Hyrule!":
  242.         if master_sword:
  243.             fight_continues_a(hero, master_sword)  
  244.                        
  245.        
  246. def fight_continues_a(hero, master_sword=True):
  247.     print "saved"
  248.    
  249. def fight_continues_b(hero, master_sword=False):
  250.     print "doomed"    
  251.        
  252.  
  253.  
  254.    
  255. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement