Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. (() => {
  2. let letterLookup = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  3. let output = "";
  4.  
  5. RPUI.use(["readingHeaders", "story"], mod => {
  6. let storyData = mod.story.getStoryData();
  7.  
  8. for (questionIdx in storyData.questionList) {
  9. let question = storyData.questionList[questionIdx];
  10.  
  11. output += "[" + (parseInt(questionIdx) + 1) + "] " + question.question + "\n";
  12.  
  13. if (question.type == 9) {
  14. for (e of question.excerptList) {
  15. for (s of e.sectionList) {
  16. for (p of s.paragraphList) {
  17. for (c of p.sentenceList) {
  18. if (c.clue == true) {
  19. for (w of c.words) {
  20. output += w + " ";
  21. }
  22. output += "\n";
  23. }
  24. }
  25. }
  26. }
  27. }
  28. output += "\n";
  29. continue;
  30. }
  31.  
  32. let hashes = mod.readingHeaders.handleCountryCode(question);
  33.  
  34. for (h of question.b) {
  35. let index = hashes.indexOf(h)
  36. if (index != -1) {
  37. output += "[" + letterLookup[index] + "] " + question.answerList[index] + "\n";
  38. }
  39. }
  40.  
  41. output += "\n";
  42. }
  43. })
  44.  
  45. return output
  46. })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement