Talvieno

I don't even know, a rekt morrowind quiz thing

May 4th, 2016
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.22 KB | None | 0 0
  1. from Tools.Scripts.treesync import raw_input
  2. import random
  3.  
  4. quizQuestions = ["On a clear day you chance upon a strange animal, its leg trapped in a hunter's claw snare. \
  5. Judging from the bleeding it will not survive long.","One Summer afternoon your father gives \
  6. you a choice of chores.","Your cousin has given you a very embarrassing nickname and, even worse, \
  7. likes to call you it in front of your friends. You asked him to stop, but he finds it very \
  8. amusing to watch you blush.","There is a lot of heated discussion at the local tavern over a \
  9. grouped of people called 'Telepaths'. They have been hired by certain City-State kings. Rumor has \
  10. it these Telepaths read a person's mind and tell their lord whether a follower is telling the \
  11. truth or not.","Your mother sends you to the market with a list of goods to buy. After you \
  12. finish you find that by mistake a shopkeeper has given you too much money back in exchange for \
  13. one of the items.","While in the market place you witness a thief cut a purse from a noble. Even \
  14. as he does so, the noble notices and calls for the city guards. In his haste to get away, the \
  15. thief drops the purse near you. Surprisingly no one seems to notice the bag of coins at your \
  16. feet.","Your father sends you on a task which you loathe, cleaning the stables. On the way there, \
  17. pitchfork in hand, you run into your friend from the homestead near your own. He offers to do \
  18. it for you, in return for a future favor of his choosing.","Your mother asks you to help fix the \
  19. stove. While you are working, a very hot pipe slips its mooring and falls towards her.","While \
  20. in town the baker gives you a sweet roll. Delighted, you take it into an alley to enjoy only to \
  21. be intercepted by a gang of three other kids your age. The leader demands the sweet roll, or \
  22. else he and his friends will beat you and take it.","Entering town you find that you are witness \
  23. to a very well-dressed man running from a crowd. He screams to you for help. The crowd behind \
  24. him seems very angry."]
  25. quizAnswers = [["Draw your dagger, mercifully ending its life with a single thrust.",
  26. "Work in the forge with him casting iron for a new plow.",
  27. "Beat up your cousin, then tell him that if he ever calls you that nickname again, you will bloody him worse\
  28. than this time.",
  29. "This is a terrible practice. A person's thoughts are his own and no one, not even a king, has the right to\
  30. make such an invasion into another human's mind.",
  31. "Return to the store and give the shopkeeper his hard-earned money, explaining to him the mistake.",
  32. "Pick up the bag and signal to the guard, knowing that the only honorable thing to do is return the money\
  33. to its rightful owner.",
  34. "Decline his offer, knowing that your father expects you to do the work, and it is better not to be in debt.",
  35. "Position yourself between the pipe and your mother.",
  36. "Drop the sweet roll and step on it, then get ready for the fight.",
  37. "Rush to the town's aid immediately, despite your lack of knowledge of the circumstances."],["Use herbs from \
  38. your pack to put it to sleep.",
  39. "Gather herbs for your mother who is preparing dinner.",
  40. "Make up a story that makes your nickname a badge of honor instead of something humiliating.",
  41. "Loyal followers to the king have nothing to fear from a Telepath. It is important to have a method of\
  42. finding assassins and spies before it is too late.",
  43. "Decide to put the extra money to good use and purchase items that would help your family.",
  44. "Leave the bag there, knowing that it is better not to get involved.",
  45. "Ask him to help you, knowing that two people can do the job faster than one, and agree to help him with \
  46. one task of his choosing in the future.",
  47. "Grab the hot pipe and try to push it away.",
  48. "Give him the sweet roll now without argument, knowing that later this afternoon you will have all your \
  49. friends with you and can come and take whatever he owes you.",
  50. "Stand aside and allow the man and the mob to pass, realizing it is probably best not to get involved."],["Do \
  51. not interfere in the natural evolution of events, but rather take the opportunity to learn more about a \
  52. strange animal you have never seen before.",
  53. "Go catch fish at the stream using a net and line.",
  54. "Make up an even more embarrassing nickname for him and use it constantly until he learns his lesson.",
  55. "In these times, it is a necessary evil. Although you do not necessarily like the idea, a Telepath could have \
  56. certain advantages during a time of war or in finding someone innocent of a crime.",
  57. "Pocket the extra money, knowing that shopkeepers in general tend to overcharge customers anyway.",
  58. "Pick up the bag and pocket it, knowing that the extra windfall will help your family in times of trouble.",
  59. "Accept his offer, reasoning that as long as the stables are cleaned, it matters not who does the cleaning.",
  60. "Push your mother out of the way.",
  61. "Act like you're going to give him the sweet roll, but at the last minute throw it in the air, hoping that \
  62. they'll pay attention to it long enough for you to get a shot in on the leader.",
  63. "Rush to the man's aid immediately, despite your lack of knowledge of the circumstances."]]
  64. # values = []
  65. values = [[[[0.89, 0.44, 0.78, -1.22, 0.0, -1.44, -1.22, 0.22], [-0.33, 0.33, -0.89, 0.33, 0.89, -1.67, -0.22, -0.56]], [[-0.33, 0.17, 1.0, -1.5, 0.33, -0.5, 0.0, -0.17], [-0.33, 0.33, 0.33, 0.5, -0.33, -1.5, 0.17, -0.17]], [[-0.67, 0.5, 0.83, -0.5, -0.33, -1.17, -0.17, -0.33], [-0.83, 0.33, 1.0, -0.5, -0.33, -0.5, -0.17, -0.17]]], [[[0.3, 0.9, 0.8, -1.7, 0.0, -1.3, -0.4, -0.3], [-0.6, 0.4, -0.1, 0.1, 0.5, -2.0, 0.0, -0.5]], [[-0.75, -0.5, 1.0, -0.5, 1.0, -0.75, -0.25, -0.25], [-1.0, 0.25, 1.25, -1.25, -0.5, -0.25, 0.5, 0.0]], [[0.29, 0.14, 0.86, -0.57, -0.57, -1.0, -1.0, 0.43], [0.0, 0.29, -0.57, 1.0, 0.14, -0.86, -0.57, -0.29]]], [[[0.8, 0.4, 0.6, -1.4, 0.0, -1.0, -1.0, 0.2], [-0.8, -0.4, -0.6, 0.2, 1.2, -1.4, -0.4, -0.4]], [[-0.45, 0.36, 1.0, -0.91, 0.27, -1.09, -0.73, -0.36], [-0.09, 0.82, 0.45, -0.09, -0.64, -1.09, -0.09, -0.45]], [[0.6, 0.4, 0.8, -1.2, -0.6, -1.2, 0.2, 0.4], [-1.0, 0.0, -0.4, 0.6, 1.0, -1.6, 0.2, 0.0]]], [[[0.75, 0.0, 1.0, -1.25, -0.5, -1.25, -0.5, 0.25], [-0.75, 0.5, -0.62, 0.88, 0.5, -1.5, 0.0, 0.0]], [[-0.57, 0.57, 0.71, -0.86, 0.86, -1.0, -1.0, -0.14], [-0.29, 0.14, 0.57, -0.57, -0.14, -0.57, 0.14, -0.43]], [[0.0, 0.67, 0.83, -1.17, -0.33, -1.0, -0.17, -0.33], [-0.33, 0.33, 0.17, 0.0, 0.17, -1.83, -0.5, -0.67]]], [[[0.67, 0.67, 1.0, -1.67, 0.33, -1.67, -0.67, 0.33], [0.0, 1.33, -0.67, 0.0, 0.67, -2.0, -0.33, -1.33]], [[-0.2, 0.3, 0.5, -0.6, 0.3, -1.0, -1.0, 0.0], [-0.1, 0.2, 0.3, -0.1, -0.1, -0.9, 0.2, -0.4]], [[0.25, 0.38, 1.25, -1.5, -0.5, -1.0, 0.0, -0.25], [-1.12, 0.12, -0.12, 0.5, 0.38, -1.5, -0.38, 0.12]]], [[[0.33, 0.33, 0.67, -0.83, 0.33, -0.67, -0.67, 0.0], [0.0, 0.67, -0.33, -0.17, 0.17, -1.33, 0.5, -0.5]], [[-0.12, 0.38, 0.75, -0.88, 0.25, -1.5, -0.75, 0.12], [-0.62, 0.38, 0.12, 0.12, 0.0, -1.0, -0.12, -0.12]], [[0.14, 0.43, 1.14, -1.57, -0.57, -1.0, -0.29, -0.29], [-0.71, 0.0, 0.14, 0.43, 0.43, -1.57, -0.57, -0.43]]], [[[1.0, 0.5, 0.67, -1.33, -0.67, -1.17, -0.33, 0.33], [-0.83, 0.33, -0.5, 0.33, 1.0, -1.5, 0.0, 0.0]], [[0.0, 0.25, 0.62, -0.62, 1.0, -0.75, -1.12, -0.62], [-0.25, 0.62, 0.38, 0.12, -0.75, -1.12, 0.0, -0.5]], [[-0.57, 0.43, 1.29, -1.43, -0.57, -1.43, -0.14, 0.29], [-0.43, 0.0, 0.0, 0.0, 0.57, -1.29, -0.29, -0.43]]], [[[0.4, 0.2, 1.0, -1.4, -0.8, -1.4, -0.2, 0.6], [-0.2, -0.4, -0.8, 0.6, 1.0, -2.0, 0.0, -0.4]], [[-0.1, 0.8, 0.7, -1.1, 0.2, -1.2, -0.9, -0.3], [-0.1, 0.6, 0.1, 0.5, -0.3, -1.5, -0.3, -0.5]], [[0.17, -0.17, 1.0, -0.83, 0.33, -0.67, -0.33, -0.17], [-1.33, 0.5, 0.5, -0.83, 0.33, -0.33, 0.17, 0.0]]], [[[1.2, 0.6, 1.0, -1.6, -1.2, -1.2, -1.2, 0.4], [-1.0, -0.4, -1.6, 1.2, 1.0, -1.6, -0.4, 0.2]], [[-0.3, 0.3, 0.9, -1.2, 0.7, -0.9, -0.4, -0.4], [-0.2, 0.7, 0.5, 0.0, -0.4, -1.5, -0.1, -0.6]], [[-0.17, 0.33, 0.67, -0.5, -0.17, -1.33, -0.33, 0.17], [-0.5, 0.33, 0.5, -0.5, 0.5, -0.67, 0.17, -0.33]]], [[[0.4, 0.8, 1.4, -1.6, -1.2, -1.6, -0.2, 0.2], [-0.2, 0.2, -0.4, 0.0, 0.8, -1.6, -0.8, -0.8]], [[0.09, 0.27, 0.73, -1.09, -0.09, -1.09, -0.73, -0.09], [-0.82, 0.45, 0.0, 0.36, 0.09, -1.27, 0.0, -0.09]], [[-0.2, 0.2, 0.6, -0.6, 1.4, -0.6, -0.6, -0.2], [0.0, 0.2, 0.4, -0.2, -0.2, -1.0, 0.4, -0.4]]]]
  66.  
  67. stats = [[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]]
  68. for i in range(0, 10):
  69. for j in range(0, 3):
  70. for k in range (0, 2):
  71. for l in range (0, 8):
  72. values[i][j][k][l] = float(values[i][j][k][l]) + 3
  73. if float(values[i][j][k][l]) < 0:
  74. input("not good")
  75.  
  76. for i in range(0, 10):
  77. maxStats = [[-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0],
  78. [-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]]
  79. minStats = [[100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
  80. [100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]]
  81.  
  82. for j in range(0, 3):
  83. for k in range (0, 2):
  84. for l in range (0, 8):
  85. if float(values[i][j][k][l]) < minStats[k][l]:
  86. minStats[k][l] = float(values[i][j][k][l])
  87.  
  88. if float(values[i][j][k][l]) > maxStats[k][l]:
  89. maxStats[k][l] = float(values[i][j][k][l])
  90.  
  91.  
  92. for j in range(0, 3):
  93. for k in range (0, 2):
  94. for l in range(0, 8):
  95. # print("" + str(values[i][j][k][l]) + " " + str(minStats[k][l]) + " " + str(maxStats[k][l]))
  96. # print ("" + str(values[i][j][k][l]) + " " + str(minStats[k][l]) + " " + str(maxStats[k][l]) + " " + str(((float(values[i][j][k][l]) - minStats[k][l]) * (4 / (max(1,maxStats[k][l]) - minStats[k][l]))) - 2))
  97. values[i][j][k][l] = ((float(values[i][j][k][l]) - minStats[k][l]) * (4.0 / max(0.1, maxStats[k][l] - minStats[k][l]))) - 2
  98.  
  99.  
  100. for j in range (0, 10):
  101. # print (stats)
  102. print(quizQuestions[j])
  103. print("0:" + quizAnswers[0][j])
  104. print("1:" + quizAnswers[1][j])
  105. print("2:" + quizAnswers[2][j])
  106. answer = int(raw_input("answer:"))
  107. print("")
  108. for k in range (0, 8):
  109. for l in range (0, 2):
  110. # print(values[j][answer][l][k])
  111. stats[l][k] += (float(values[j][answer][l][k]) / 10.0)
  112.  
  113.  
  114.  
  115.  
  116. oldStats = [[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]]
  117.  
  118. for i in range (0,8):
  119. for j in range (0,2):
  120. oldStats[j][i] = stats[j][i]
  121.  
  122. statOrder = []
  123. skillOrder = []
  124.  
  125. for i in range (0,8):
  126. minStat = 0
  127. statValue = 888888.0
  128. minSkill = 0
  129. skillValue = 888888.9
  130. for k in range(0, 8):
  131. if stats[0][k] < statValue:
  132. statValue = stats[0][k]
  133. minStat = k
  134.  
  135. if stats[1][k] < skillValue:
  136. skillValue = stats[1][k]
  137. minSkill = k
  138.  
  139. statOrder.append(minStat)
  140. skillOrder.append(minSkill)
  141. stats[0][minStat] = 999999
  142. stats[1][minSkill] = 999999
  143.  
  144. test = 1.5
  145. stats[0][statOrder[0]] = -2
  146. stats[0][statOrder[1]] = -2
  147. if oldStats[0][statOrder[3]] * test > oldStats[0][statOrder[1]]:
  148. stats[0][statOrder[2]] = -1
  149. stats[0][statOrder[3]] = -1
  150. else:
  151. stats[0][statOrder[2]] = -2
  152. stats[0][statOrder[3]] = -0
  153.  
  154. stats[0][statOrder[4]] = 0
  155. if oldStats[0][statOrder[6]] * test < oldStats[0][statOrder[7]]:
  156. stats[0][statOrder[5]] = 0
  157. stats[0][statOrder[6]] = 1
  158. stats[0][statOrder[7]] = 2
  159. else:
  160. stats[0][statOrder[5]] = 1
  161. stats[0][statOrder[6]] = 1
  162. stats[0][statOrder[7]] = 1
  163.  
  164. stats[1][skillOrder[0]] = -2
  165. stats[1][skillOrder[1]] = -2
  166. if oldStats[1][statOrder[3]] * test > oldStats[1][statOrder[1]]:
  167. stats[1][skillOrder[2]] = -1
  168. stats[1][skillOrder[3]] = -1
  169. else:
  170. stats[1][skillOrder[2]] = -2
  171. stats[1][skillOrder[3]] = -0
  172.  
  173. stats[1][skillOrder[4]] = 0
  174. if oldStats[1][statOrder[6]] * test < oldStats[1][statOrder[7]]:
  175. stats[1][skillOrder[5]] = 0
  176. stats[1][skillOrder[6]] = 1
  177. stats[1][skillOrder[7]] = 2
  178. else:
  179. stats[1][skillOrder[5]] = 1
  180. stats[1][skillOrder[6]] = 1
  181. stats[1][skillOrder[7]] = 1
  182.  
  183.  
  184.  
  185. toPrintA = ""
  186. toPrintB = ""
  187. for k in range(0, 8):
  188. toPrintA += str(stats[0][k]) + ","
  189. toPrintB += str(stats[1][k]) + ","
  190. # print(str(j) + "-" + str(answer) + ": " + str(totalStats[j][answer]))
  191. print (toPrintA[:-1])
  192. print (toPrintB[:-1])
  193.  
  194.  
  195. raw_input('Press Enter to exit, because python closes too fast')
Advertisement
Add Comment
Please, Sign In to add comment