Advertisement
gnamp

Domitron Answers 1st draft

Nov 21st, 2012
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GraphicsWindow.Show()
  2. 'GraphicsWindow.ShowMessage("dunno","dunno title")
  3. 'TextWindow.WriteLine("")
  4. GraphicsWindow.DrawboundText(0,0,280,"Please petition Domitron to get his attention. eg. 'Please Domitron, answer my question'... ")
  5. GraphicsWindow.DrawText(0,40,"Petition: ")
  6. GraphicsWindow.DrawText(0,60,"Question: ")
  7.  
  8. pretend[1]=  "D"
  9. pretend[2] = "o"
  10. pretend[3] = "m"
  11. pretend[4] = "i"
  12. pretend[5] = "t"
  13. pretend[6] = "r"
  14. pretend[7] = "o"
  15. pretend[8] = "n"
  16. pretend[9] = "p"
  17. pretend[10] = "l"
  18. pretend[11] = "e"
  19. pretend[12] = "a"
  20. pretend[13] = "s"
  21. pretend[14] = "e"
  22. pretend[15] = "m"
  23.  
  24. returns = 0
  25.  
  26. While returns < 1
  27.   GraphicsWindow.KeyDown = sub1
  28.  
  29. endwhile
  30. cursoralong = cursoralong - (Text.GetLength(newanswer)*10)
  31. While returns = 1
  32. GraphicsWindow.KeyDown = sub2
  33. endwhile
  34.  
  35.  '''GraphicsWindow.DrawText(200,200,newanswer)
  36.  
  37. cursordown = 0
  38. cursoralong = 75
  39.  
  40. Sub sub1
  41.   If GraphicsWindow.LastKey = "OemPeriod" then
  42.     If GraphicsWindow.LastKey <> "Return" Then
  43.       lasttyped = GraphicsWindow.LastKey
  44.   'GraphicsWindow.DrawText(cursoralong+75,40,lasttyped)
  45.    
  46.   length = length + 1
  47.  
  48.   For i = 1 To length
  49.           sentence[length] = lasttyped
  50.       answer = Text.Append(answer,sentence[i])
  51.       newanswer = Text.GetSubTextToEnd(answer,Text.GetLength(answer)-(length-1))
  52.      
  53.      
  54.   EndFor
  55.   GraphicsWindow.DrawText(cursoralong+75,40,pretend[i-1])
  56.   cursoralong = cursoralong + 10
  57. else  
  58.   returns = returns + 1
  59.   cursordown = cursordown + 20
  60.  
  61.  
  62. EndIf
  63.  
  64. Else 'no fullstop used
  65.       If GraphicsWindow.LastKey <> "Return" Then
  66.       lasttyped = GraphicsWindow.LastKey
  67.   GraphicsWindow.DrawText(cursoralong+75,40,lasttyped)
  68.    
  69.   length = length + 1
  70.  
  71.   For i = 1 To length
  72.           sentence[length] = lasttyped
  73.       answer = Text.Append(answer,sentence[i])
  74.       newanswer = "error- please try again"
  75.      
  76.      
  77.   EndFor
  78.   'GraphicsWindow.DrawText(cursoralong+75,40,pretend[i-1])
  79.   cursoralong = cursoralong + 10
  80. else  
  81.   returns = returns + 1
  82.   cursordown = cursordown + 20
  83.   EndIf
  84.   EndIf
  85. EndSub
  86.  
  87. Sub sub2
  88.  
  89.   If GraphicsWindow.LastKey <> "Return" Then
  90.     lasttyped = GraphicsWindow.LastKey  
  91.    
  92.   GraphicsWindow.DrawText(cursoralong+75,60,lasttyped)
  93.  cursoralong = cursoralong + 10
  94. else  
  95.   returns = returns + 1
  96.   'cursordown = cursordown + 20
  97.   'cursordown = 60
  98.   GraphicsWindow.DrawText(150,200,"Your answer is: ")
  99.   GraphicsWindow.DrawText(280,200,newanswer)
  100. EndIf
  101.  
  102. EndSub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement