bladesoflegends


SUBMITTED BY: Guest

DATE: Nov. 29, 2013, 4:56 p.m.

FORMAT: Text only

SIZE: 2.4 kB

HITS: 728

  1. # This program will calculate experience need or gold needed to get desired amount for a game called bladesoflegends
  2. import time
  3. def main2():
  4. x = input("Return to main [y]es or [n]o >> ")
  5. if x == "y":
  6. main()
  7. elif x == "n":
  8. print("k")
  9. else:
  10. main2()
  11. def main():
  12. z = input('Gold [1] or Experience [2] >> ')
  13. if z == '1':
  14. gold()
  15. elif z == '2':
  16. experience()
  17. else:
  18. print('No.')
  19. time.sleep(1)
  20. main()
  21. def experience():
  22. print('\nThis will calculate how much experience and kills you need to level up.')
  23. time.sleep(0.5)
  24. totalexp = input('Total exp >> ')
  25. currentexp = input('Experience you have now >> ')
  26. expperkill = input('Experience per kill >> ')
  27. neededexp = int(totalexp) - int(currentexp)
  28. neededkills = int(neededexp) / int(expperkill)
  29. a = neededkills * 5.5
  30. b = a / 60
  31. c = b / 60
  32. d = c / 24
  33. print('\nYou need ' + str(neededexp) + ' to level up.')
  34. print('You have to kill ' + str(round(neededkills,0)) + ' creatures to level up.')
  35. print('It will take you ' + str(round(c,1)) + ' (' + str(round(d,1)) + ' days) non-stop hours to level up.')
  36. time.sleep(1)
  37. def gold():
  38. print('\nThis will calculate how much creatures you need to kill to get desired gold.')
  39. time.sleep(0.5)
  40. currentgold = int(input('\nCurrent gold >> '))
  41. desiredamount = int(input('Wanted gold >> '))
  42. goldperkill = int(input('Gold per kill >> '))
  43. neededgold = desiredamount - currentgold
  44. neededkills = neededgold / goldperkill
  45. a = neededkills * 5.5
  46. b = a / 60
  47. c = b / 60
  48. d = c / 24
  49. print('\nYou need ' + str(neededgold) + ' gold.')
  50. print('You need to kill ' + str(round(neededkills,0)) + ' creatures.')
  51. print('It will take you ' + str(round(c,1)) + ' (' + str(round(d,1)) + ' days) non-stop hours to wanted gold.')
  52. time.sleep(0.5)
  53. z = input('\nReturn to main [y]es or [n]o >> ')
  54. if z == 'y':
  55. main()
  56. else:
  57. print('k')
  58. main()