Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 30th, 2011  |  syntax: None  |  size: 2.11 KB  |  views: 479  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Character creator program
  2.  
  3. skills = {"Strength":0, "Wisdom":0, "Health":0, "Dextarity":0}
  4. points=int(30)
  5. player=""
  6.  
  7. while player != "e":
  8.     print("Welcome to your character\n")
  9.     print("You have ",points," avaliable.")
  10.     print("1. Add points.")
  11.     print("2. Remove Points")
  12.     print("3. Show current status")
  13.     print("Type exit to quit")
  14.     print("------------------")
  15.     selection = input(">")
  16.     if selection == "1":
  17.         pts2 = 0
  18.         pts=int(input("how many points would you like to apply?"))
  19.         if pts > points:
  20.             pts = 0
  21.             print("ha, nice try")
  22.         else:  
  23.             pts2=input("To what attribute would you like to apply? 1. Strength 2. Health 3. Dextarty, or 4. Wisdom?")
  24.             if pts2 == "1":
  25.                 skills["Strength"] += pts
  26.                 points -= pts
  27.             if pts2 == "2":            
  28.                 skills["Health"] += pts
  29.                 points -= pts
  30.             if pts2 == "3":
  31.                 skills["Dextarity"] += pts
  32.                 points -= pts            
  33.             if pts2 == "4":
  34.                 skills["Wisdom"] += pts
  35.                 points -= pts
  36.     if selection == "2":
  37.         rmv = int(input("How many points would you like back?"))
  38.         rmv2 = input("From where? 1. Strength 2. Health 3. Dextarty, or 4. Wisdom?")
  39.         if rmv2 == "1":
  40.             if rmv < skills["Strength"]:
  41.                 skills["Strength"] -= rmv
  42.                 points += rmv
  43.             else:
  44.                 print("no")
  45.         if rmv2 == "2":
  46.             if rmv < skills["Health"]:
  47.                 skills["Health"] -= rmv
  48.                 points += rmv
  49.             else:
  50.                 print("no")
  51.         if rmv2 == "3":
  52.             if rmv < skills[Dextarity]:
  53.                 skills["Dextarity"] -= rmv
  54.                 points += rmv
  55.             else:
  56.                 print("No")
  57.         if rmv2 == "4":
  58.             if rmv < skills[Wisdom]:
  59.                 skills["Wisdom"] -= rmv
  60.                 points += rmv
  61.             else:
  62.                 print("No")
  63.  
  64.  
  65.     if selection == "3":
  66.           print (skills)
clone this paste RAW Paste Data