A game... (Full Version)

All Forums >> [Gaming Community] >> [Legends and Lore] >> Writers of Lore >> [The Bookshelves] >> AE Fanfiction >> AdventureQuest Worlds



Message


LeDgErMaYnE -> A game... (3/13/2013 21:27:37)

I wasn't so sure where to put this. I used python to program my own game, inspired by the Undead Legion. I decided to post the entire coding here.

import easygui, time, random
from time import sleep
easygui.msgbox('???: Hello...')
name = easygui.enterbox('???: What is your name? I am one of the Paragon Defenders.')
easygui.msgbox('Paragon Defender: Hmm, ' +name+ '... Nice name. Follow me.')
easygui.msgbox('A little later...')
easygui.msgbox('Paragon Defender: Meet the leader of the Undead Legion... Dage The Evil!!')
easygui.msgbox('Dage: Hello, and welcome to my soul forge... If you want power, you will have to earn it. Meowlala can help. Do not speak with me until you are worthy.')
easygui.msgbox('You find Meowlala.')
easygui.msgbox('Meowlala: Heh. Puny. I guess I can help. Just, uh... Forge a item. I *might* reward you. Here, let me open the forge.')
easygui.msgbox('SOUL FORGE')
wa = easygui.buttonbox('Would you like to forge a weapon, or armor?',
choices = ['Weapon', 'Armor'])
if wa == wa:
easygui.msgbox('Forging ' +wa+ '...')
sleep(2)
easygui.msgbox('DONE!')
easygui.msgbox('Meowlala: ... I think you could use some practice, but, I will grant you... 1, 5, or 15 legion tokens...')
lt = 0
lg = random.randint(1,3)
if lg == 1:
lt += 1
if lg == 2:
lt += 5
if lg == 3:
lt += 15
easygui.msgbox("That's worth... " +str(lt)+ ' legion tokens.')
easygui.msgbox("Meowlala: Cheap. You have to do a lot better. But, I'll take a token and open the forge again.")
easygui.msgbox('SOUL FORGE...')
lt = lt -1
if wa == 'Weapon':
wa2 = 'Armor'
elif wa == 'Armor':
wa2 = 'Weapon'
wa3 = easygui.buttonbox('You may only forge a ' +wa2+ ' currently.',
choices = ['Forge ' +wa2])
easygui.msgbox('Forging ' +wa2+ '...')
sleep(3)
easygui.msgbox('DONE!')
easygui.msgbox("Meowlala: Nice. I think that was better. I think I might add a extra chance of 5 legion tokens.")
lg2 = random.randint(1,4)
if lg2 == 1:
lt += 1
if lg2 > 1:
if lg2 < 4:
lt += 5
if lg2 == 4:
lt += 15
easygui.msgbox('Meowlala: You now have... ' +str(lt)+ ' legion tokens!')
easygui.msgbox("Meowlala: Being the leader of the Paragon Defenders, I suggest you get working. I'll take 2 legion tokens, and open the forge. Have some skulls.")
lt = lt - 2
easygui.msgbox('SOUL FORGE...')
skulls = 3
wa4 = easygui.buttonbox('What would you like to forge? You have ' +str(skulls)+ ' skulls.',
choices = ['Weapon (1 skull)', 'Armor (2 skulls)', 'Helmet (3 skulls)'])
easygui.msgbox('Forging ' +wa4+ '...')
sleep(3)
easygui.msgbox('Done!')
if wa4 == 'Weapon (1 skull)':
skulls = skulls -1
lg3 = random.randint(1,3)
if lg3 == 1:
lt += 1
if lg3 == 2:
lt += 5
if lg3 == 3:
lt += 15
if wa4 == 'Armor (2 skulls)':
skulls = skulls -2
lg3 = random.randint(1,4)
if lg3 == 1:
lt += 1
if lg3 > 1:
if lg3 < 4:
lt += 5
if lg3 == 4:
lt += 15
if wa4 == 'Helmet (3 skulls)':
skulls = skulls -3
lg3 = random.randint(1,5)
if lg3 == 1:
lt += 1
if lg3 > 1:
if lg3 < 4:
lt += 5
if lg3 > 3:
lt += 15
easygui.msgbox("Meowlala: Nice. Here's your earnings. Now ya have " +str(lt)+ ' legion tokens.')
easygui.msgbox('Meowlala: I want a weapon from you. I will open the soul forge. And, based on your work, I added some skulls.')
skulls += random.randint(2,5)
weaponforge = easygui.buttonbox('He opens the soul forge. You have 3 choices, and ' +str(skulls)+ ' skulls.',
choices = ['Iron Blade (2 skulls)', 'Legion darkstaff (3 skulls)', 'Dark Hammeraxe (5 skulls)'])
easygui.msgbox('Forging ' +weaponforge+ '...')
sleep(2)
easygui.msgbox('DONE!')
if weaponforge == 'Iron Blade (2 skulls)':
skulls = skulls -2
lg4 = random.randint(1,3)
if lg4 == 1:
lt += 1
if lg4 == 2:
lt += 5
if lg4 == 3:
lt += 15
if weaponforge == 'Legion Darkstaff (3 skulls)':
skulls = skulls -3
lg4 = random.randint(1,5)
if lg4 == 1:
lt += 1
if lg4 > 1:
if lg4 < 4:
lt += 5
if lg4 > 3:
lt += 15
if weaponforge == 'Dark Hammeraxe (5 skulls)':
skulls = skulls -5
lg4 = random.randint(1,50)
if lg4 < 20:
lt += 1
if lg4 > 20:
if lg4 < 40:
lt += 5
if lg4 > 39:
lt += 15
easygui.msgbox('Meowlala: Meow. ... Good. I think you deserve the ' +str(lt)+ ' legion tokens that you have. I will let you purchase more skulls. For legion tokens.')
skullpurchase = easygui.buttonbox('How many do you wish to purchase? 1 legion token per skull. You have ' +str(lt)+ ' legion tokens.',
choices = ['0 skulls', '1 skull', '4 skulls'])
if skullpurchase == '0 skulls':
lt == lt
skulls == skulls
if skullpurchase == '1 skull':
lt = lt -1
skulls += 1
if skullpurchase == '4 skulls':
lt = lt -4
skulls += 4
easygui.msgbox('Meowlala: Nice. ' +str(skulls)+ ' skulls, and ' +str(lt)+ ' legion tokens. You have gained power. I still have missions for you, though.')
easygui.msgbox('Meowlala: We need to purchase some materials. Now. I hope you have enough to pay. At least 1.')
shop1 = easygui.buttonbox('Which material will you use?',
choices = ['Soul rocks (3 legion tokens)', 'Petrifying wood (2 legion tokens)', 'Scream cookies (1 legion token)'])
if shop1 == 'Soul rocks (3 legion tokens)':
lt = lt -3
if shop1 == 'Petrifying wood (2 legion tokens)':
lt = lt -2
if shop1 == 'Scream cookies (1 legion token)':
lt = lt -1
easygui.msgbox('Meowlala: Hmm. The pricier the better. I want a helmet. In case you need it, I have a extra skull for you.')
skulls += 1
helmetforge = easygui.buttonbox('Which helmet would you like?',
choices = ['1 skull helmet', 'Gilded 2 skull helmet', 'Platinum 3 skull helmet'])
easygui.msgbox('Forging ' +helmetforge+ '...')
if shop1 == 'Soul rocks (3 legion tokens)':
if helmetforge == '1 skull helmet':
skulls = skulls -1
lg5 = random.randint(1,12)
if lg5 > 1:
if lg5 < 6:
lt += 1
if lg5 > 6:
if lg5 < 11:
lt += 5
if lg5 > 10:
lt += 15
if helmetforge == 'Gilded 2 skull helmet':
skulls = skulls -2
lg5 = random.randint(1,90)
if lg5 > 1:
if lg5 < 50:
lt += 1
if lg5 > 49:
if lg5 < 80:
lt += 5
if lg5 > 79:
lt += 15
if helmetforge == 'Platinum 3 skull helmet':
skulls = skulls -3
lg5 = random.randint(1,110)
if lg5 > 1:
if lg5 < 40:
lt += 1
if lg5 > 39:
if lg5 < 70:
lt += 5
if lg5 > 69:
lt += 15
if shop1 == 'Petrifying wood (2 legion tokens)':
if helmetforge == '1 skull helmet':
skulls = skulls -1
lg5 = random.randint(1,6)
if lg5 > 1:
if lg5 < 3:
lt += 1
if lg5 > 3:
if lg5 < 5:
lt += 5
if lg5 > 4:
lt += 15
if helmetforge == 'Gilded 2 skull helmet':
skulls = skulls -2
lg5 = random.randint(1,30)
if lg5 > 1:
if lg5 < 10:
lt += 1
if lg5 > 9:
if lg5 < 20:
lt += 5
if lg5 > 19:
lt += 15
if helmetforge == 'Platinum 3 skull helmet':
skulls = skulls -3
lg5 = random.randint(1,90)
if lg5 > 1:
if lg5 < 50:
lt += 1
if lg5 > 49:
if lg5 < 80:
lt += 5
if lg5 > 79:
lt += 15
if shop1 == 'Scream cookies (1 legion token)':
if helmetforge == '1 skull helmet':
skulls = skulls -1
lg5 = random.randint(1,3)
if lg5 < 3:
lt += 1
if lg5 == 3:
lt += 15
if helmetforge == 'Gilded 2 skull helmet':
skulls = skulls -2
lg5 = random.randint(1,10)
if lg5 < 8:
lt += 1
if lg5 > 8:
lt += 15
if helmetforge == 'Platinum 3 skull helmet':
skulls = skulls -3
lg5 = random.randint(1,30)
if lg5 > 1:
if lg5 < 10:
lt += 1
if lg5 > 9:
if lg5 < 20:
lt += 5
if lg5 > 19:
lt += 15
easygui.msgbox('Meowlala: Ha! Score. With your ' +str(lt)+ ' legion tokens, you might stand a chance. The dark lord Dage would like to see you.')
easygui.msgbox('Dage: Oh. You, again. You think you are powerful enough? The undead legion has nothing against newcomers. But, really... What has Meowlala awarded you with?')
easygui.msgbox('You show him the ' +str(lt)+ ' legion tokens.')
easygui.msgbox('Dage: Ahh... I see. I guess I could welcome you to the Undead Legion. You might get... Much more... Legion tokens...')
easygui.msgbox('Dage: But first, I think that I would like... Ah, some new... Armor. With all the Undead Legion requests you always need so much armor. I will open the forge. But, this armor might be expensive to forge. And, you are NOT getting paid.')
armorforge = easygui.buttonbox('You look at the soulforge...',
choices = ['Forge Armor (10 tokens)'])
easygui.msgbox('Forging armor...')
sleep(5)
easygui.msgbox('Done!')
lt = lt -10
easygui.msgbox('Dage: Excellent. You may be... Useful. Ah, more legion tokens? But you already have ' +str(lt)+ '...')
easygui.msgbox('Dage: Greedy, eh? I like that. And this is not a game of catch. After all, only the best survive. Forge the Legion Skullstaff for 20 skulls and I might think differently. Not enough? Let me open up the store...')
shop2 = easygui.buttonbox('Dage: 3 skulls for the price of one. You should be glad. And, be careful which button you press. HAH!',
choices = ['?', '??????', '????????????'])
if shop2 == '????????????':
skulls += 12
lt = lt - 4
if shop2 == '??????':
skulls += 6
lt = lt - 2
if shop2 == '?':
skulls = skulls
easygui.msgbox('Dage: Ah. ' +str(skulls)+ ' skulls for you. And... ' +str(lt)+ ' legion tokens.')
if skulls < 20:
easygui.msgbox('Dage: Not enough? The legion is kind. But, I cannot allow you to stay, little mortal.')
else:
easygui.msgbox('Dage: Your prize for the craft will be... 25 legion tokens and 25 skulls. That is, if I like it. Really, it will probably be inbetween 14 and 26.')
skullstaff = easygui.buttonbox('Legion Skullstaff: Price: 20 skulls. Forge?',
choices = ['Forge'])
easygui.msgbox('Forging Legion Skullstaff...')
sleep(6)
easygui.msgbox('Done!')
skulls = skulls - 20
lt += random.randint(14,26)
skulls += random.randint(14,26)
easygui.msgbox('Dage: ... You have a quite large collection of Legion Tokens. ' +str(lt)+ ' to be exact. And ' +str(skulls)+ ' skulls. More? I like this business.')

Like it? I believe that this ^^ is truly fan fiction.

Please reply. And, python users, feel free to copy and paste the code. I enjoyed putting my time and effort into this. If you are not experienced with code, this might not look very... uh, interesting. But really, when you're a programmer coder you don't see all that "game" stuff, just a bunch of words. Thank you, and feel free to delete if you believe this is not fitting. But please don't. [:(]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.109375