Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Domitron answers- by Dominic McGough 23/11/2012
- start:
- GraphicsWindow.Show()
- GraphicsWindow.Height = 350
- GraphicsWindow.Width = 800
- GraphicsWindow.Clear()
- GraphicsWindow.DrawText(0,0,"Petition Domitron to get it's attention [eg. Domitron, please answer...]")
- GraphicsWindow.DrawText(0,40,"Petition: ")
- GraphicsWindow.DrawText(0,60,"Question: ")
- i = 0
- fullstopFlag = 0
- returns = 0
- faketext = "Domitron, please answer......."
- 'array loader
- For i = 1 To Text.GetLength(faketext)
- pretend[i] = Text.GetSubText(faketext,i,1)
- EndFor
- GraphicsWindow.TextInput = typing
- sub typing
- If returns = 2 Then
- If fullstopFlag = 1 Then
- GraphicsWindow.FontSize = 65
- GraphicsWindow.BrushColor = "red"
- GraphicsWindow.DrawText(100,175,Text.GetSubTextToEnd(secret,2))
- Sound.PlayChime()
- Goto start
- Else
- GraphicsWindow.FontSize = 20
- GraphicsWindow.BrushColor = "blue"
- GraphicsWindow.DrawText(20,200,"I'm Stumped! Please ask another way.")
- Sound.PlayClick()
- EndIf
- EndIf
- If GraphicsWindow.LastText <> Text.GetCharacter(13) then
- linetyped = linetyped + GraphicsWindow.LastText
- If Text.StartsWith(linetyped,".") And returns = 0 Then 'if fullstop used 1st
- fullstopFlag = 1
- GraphicsWindow.DrawText(cursoralong + 65,cursordown + 40, pretend[j+1])
- j = j + 1
- cursoralong = cursoralong + 10
- secret = linetyped
- Else 'if fullstop NOT used 1st
- ordtxt = GraphicsWindow.LastText
- GraphicsWindow.DrawText(cursoralong + 65,cursordown + 40,ordtxt)
- cursoralong = cursoralong + 10
- EndIf
- else 'if 'return' used
- returns = returns + 1
- cursordown = cursordown + 20
- cursoralong = cursoralong - Text.GetLength(linetyped)* 10
- If returns = 2 Then
- GraphicsWindow.DrawText(20,100,"Press the Spacebar to reveal answer!!")
- EndIf
- EndIf
- endsub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement