# Version .35 dev ## ## RPG.py # name = raw_input("What is your name traveler...?") def errormessageinput() : print "--->You have entered an option that was not provided. Please try again..." ######################################################################################################################### print "Great " + name + "!" def raceasker_2() : if race == 1 : race_text = str("Human") elif race == 2 : race_text = str("Zard") elif race == 3 : race_text = str("Orc") elif race == 4 : race_text = str("Dwarf") elif race == 5 : race_text = str("Troll") else: errormessageinput() raceasker_1() raceasker_2() race_text = " " def raceasker_1() : print "-->Here are your options:" print "--> Type for 1 = Human: Your average human. Basically jack of all trades. Has a high charisma and average smarts, willpower, and strength." print "--> Type for 2 = Zard: A lizard like humanoid who come from their native marchlands of Tark. They have beautiful scale patterns. Have high charisma low smarts, low willpower, and medium strength." print "--> Type for 3 = Orc: Grey-green skin. large canined, rippling muscled Orcs. From their homeland of Torell They are bred to be warriors, blacksmiths and hunters. They have low charisma, average smarts, average willpower and lots of strength." print "--> Type for 4 = Dwarf: These hearty and loyal, these small creatures rival the tenacity and aptitude of Orcs. They are master craftsmen, and feared fighters. They come from the land of Ironort in search of new business opportunities in new colonies. Low charisma, more than average smarts, medium willpower, and average strength." print "--> Type for 5 = Troll: This humanoids come out of their mountain fortresses in caravans trading their goods with the neighboring cities and colonies. They are short clay grey creatures with no charisma, a lot of smarts, high willpower, and less than average strength." raceasker_1() print ("And you are a...?") race = input("-->") if race == 1 : race_text = str("Human") elif race == 2 : race_text = str("Zard") elif race == 3 : race_text = str("Orc") elif race == 4 : race_text = str("Dwarf") elif race == 5 : race_text = str("Troll") else: errormessageinput() ######################################################################################################################### raceasker_2() print ("Great your a " + race_text + "!") print "Now " + name + " the " + race_text + ", I don't meen to offend you but are you a man or woman?" print "Type 1 for: = Man" print "Type 2 for: = Woman" genderasker = input() gender_text = " " if genderasker == 1: gender_text = str("Man") elif genderasker == 2: gender_text = str("Woman") print "Ok %s your a %s, as well as a %s" % (name, gender_text, race_text) print "Is this information correct?" print "Type 1 for: = yes" print "Type 2 for: = no" yes_no_text = " " yes_no = input("-->") if yes_no == 1: yes_no_text = "Amazing, lets get you in the city walls" elif yes_no == 2: yes_no_text = "ALrigh let us try again" else: errormessageinput()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question