Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

See through a Gm's eyes!
#1

Everyone says Dev's/Gm's are lazy, don't do nuttin, etc. Well I am here to prove you wrong. I spent 6 hours with a half as hard programming system then what the gm's use, just to finally perfect this simple script with no bugs.

I seriously spent 6 hours on this. Code has to be perfect. I drank 4 cups of coffee, ate 5 burritos, and smoked a pack of cigarettes.......

Code:
#Practicing Variables, If structures, while structures, Import structures

#Author: Lucas John Hoage
#Version 1.0 Open Beta
#Copyright: None/Open Source
#Time spent: 6 Hours
#Time Start: 11:30 P.M. Eastern Time Zone
#Time Finish: 5:23 A.M. Eastern Time Zone

####################################Instructions#####################################

#In order to use/view/edit this code, you must have Python 2.5.1 installed on your computer. This is for windows users. If -
#the installation asks you to update anything, press ignore, its a retard. Once installed go to Python, Python IDLE (GUI), then -
#when it loads, go to file, New window, in the new window, copy and paste this text into it. save as anything, BUT make sure it -
#ends with .py Example: Practice.py, then save as python file py, pyw, txt. After that, go back to the IDLE (GUI) and -
#hit file, open, and open the file you saved. Now, have fun and enjoy. Do not feel hesitant about editing the script, its a -
#good way to learn. Trust me, this shit took 6 ****ing hours. This is merely the beginning of Python programming. Enjoy ^_^

#Note: All keywords close in " marks, are case sensitive and are coded to continue the program.
#Questions? Comments? email them to [email][email protected][/email]


import sys


Prize1 = 1
Prize2 = 2
Selection1 = raw_input
Pr1 = True
shop = True
shieldM = True
sword =  250
shield = 250
storeM = True
store = raw_input
buy = True
checkoutS = True
checkoutSW = True

while Pr1:
    Selection1 = int(raw_input("Please choose a reward 1 or 2.\n"))
    

    if Selection1 == 1:
        gold = 500
        print "You receive 500 gold!\n"
        Pr1 = False

    elif Selection1 == 2:
        print "I am sorry, but you do not have any gold to visit the 'store'!\n"
        gold = '0'
        print "You receive nothing!!!! Try again.\n"

    elif Selection1 != Prize1 and Prize2:
        print "That is not an option, try again.\n"

while storeM:
    shop = str(raw_input("Do you wish to use the 'store'.\n"))
    

    if shop == 'store':
        print "Welcome to my store, please take a look around.\n"
        storeM = False

    else:
        print "I don't understand what you want.\n"

while shieldM:
    store = str(raw_input("I have a 'sword' and \
a 'shield' for sale! Which would you like to 'buy' some sir?\n"))

    if store == 'buy':
        shieldM = False

    else:
        print "I do not understand what you want.\n"

while checkoutS:
    if gold > 0 or 'shield' or 'sword':
         buy = str(raw_input("Care to buy anything else?\n"))
        
    if buy == 'shield' and gold >= shield:
        print "Let me get that real quick...\n"
        print "*You have received a shield!*\n"
        gold = (gold - shield)
        print "You now have ", gold, "gold left!\n"
        
    if buy == 'sword' and gold >= sword:
        print "Let me get that real quick...\n"
        print "*You have received a sword!*\n"
        gold = (gold - sword)
        print "You now have ", gold, "gold left!\n"
    elif gold == 0:
        checkoutS = False
            

while checkoutSW:
    if gold == 0:
        print "I am sorry, but you have ", gold, "gold left. It is not enough to buy any item here! Come back when you have money sir!\n"
        checkoutSW = False
        SystemExit

This was my first attempt at programming a basic program, with Python, ever. I've only been studying Python for.. 3 days now? Its fairly easy to learn, but a damn cranky ***** if you're not careful.

I hope this program will inspire the other community members to delve into programming.


Messages In This Thread
See through a Gm's eyes! - by Galens - 01-10-2008, 12:32 PM
See through a Gm's eyes! - by imported_Kitiara - 01-10-2008, 01:27 PM
See through a Gm's eyes! - by imported_KYO1 - 01-10-2008, 01:38 PM
See through a Gm's eyes! - by Galens - 01-10-2008, 02:09 PM
See through a Gm's eyes! - by imported_Nasir - 01-10-2008, 04:55 PM
See through a Gm's eyes! - by imported_Lederoil - 01-10-2008, 05:23 PM
See through a Gm's eyes! - by imported_Aghast - 01-10-2008, 05:37 PM
See through a Gm's eyes! - by imported_Hate - 01-10-2008, 06:40 PM
See through a Gm's eyes! - by imported_ShadarWar - 01-10-2008, 07:37 PM
See through a Gm's eyes! - by imported_ScareCrow - 01-10-2008, 08:29 PM
See through a Gm's eyes! - by imported_Vulcan - 01-10-2008, 09:09 PM
See through a Gm's eyes! - by Galens - 01-10-2008, 10:34 PM
See through a Gm's eyes! - by imported_Kitiara - 01-10-2008, 11:03 PM
See through a Gm's eyes! - by Galens - 01-10-2008, 11:16 PM
See through a Gm's eyes! - by imported_KYO1 - 01-11-2008, 01:50 AM
See through a Gm's eyes! - by Galens - 01-11-2008, 02:13 AM
See through a Gm's eyes! - by imported_Kamos - 01-11-2008, 05:59 AM
See through a Gm's eyes! - by Galens - 01-11-2008, 07:22 AM
See through a Gm's eyes! - by imported_Odium - 01-11-2008, 07:39 AM
See through a Gm's eyes! - by Eighty Swords - 01-11-2008, 07:54 AM
See through a Gm's eyes! - by imported_ScareCrow - 01-11-2008, 08:29 AM
See through a Gm's eyes! - by Galens - 01-11-2008, 10:48 AM
See through a Gm's eyes! - by imported_Kamos - 01-11-2008, 03:53 PM
See through a Gm's eyes! - by imported_Kamos - 01-11-2008, 04:15 PM
See through a Gm's eyes! - by Galens - 01-11-2008, 04:58 PM
See through a Gm's eyes! - by imported_Aghast - 01-11-2008, 05:25 PM
See through a Gm's eyes! - by Eighty Swords - 01-11-2008, 08:39 PM
See through a Gm's eyes! - by imported_LudaKrishna - 01-16-2008, 01:12 AM

Forum Jump:


Users browsing this thread: 6 Guest(s)