View difference between Paste ID: MuVdZppt and ZRtZzh00
SHOW: | | - or go back to the newest paste.
1
Public Class frmChat
2
3
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
4
        Randomize()
5
        Dim rndNum As Integer
6
        rndNum = Int(Rnd() * 3) + 1
7
        Dim input As String
8
        input = txtInput.Text
9
        If input.Contains("family") Then
10
            txtBot.AppendText("tell me more about your family" & vbNewLine)
11
        ElseIf input.Contains("I am") Then
12
            If rndNum = 1 Then
13
                txtBot.AppendText("that is interesting" & vbNewLine)
14
            ElseIf rndNum = 2 Then
15
                txtBot.AppendText("cool" & vbNewLine)
16
            ElseIf rndNum = 3 Then
17
                txtBot.AppendText("great" & vbNewLine)
18
            End If
19
        End If
20
    End Sub
21
End Class