Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Tease AI/Classes/ContactData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ checkFolder:
Dim currPath As String

If Contact = ContactType.Random And Not newFolder Then
currPath = myDirectory.GetDirectories(baseDirectory).ElementAt(New Random().Next(0, myDirectory.GetDirectories(baseDirectory).Count))
currPath = myDirectory.GetDirectories(baseDirectory).ElementAt(Form1.ssh.randomizer.Next(0, myDirectory.GetDirectories(baseDirectory).Count))
tempBaseFolder = currPath
Else
currPath = baseDirectory
Expand All @@ -282,7 +282,7 @@ nextSubDir:
End If

' Get a random folder in base directory.
Dim rndFolder As String = subDirs(New Random().Next(0, subDirs.Count))
Dim rndFolder As String = subDirs(Form1.ssh.randomizer.Next(0, subDirs.Count))

If RecentFolders.Contains(rndFolder) Then
exclude.Add(rndFolder)
Expand Down Expand Up @@ -411,8 +411,8 @@ nextSubDir:

If My.Settings.CBSlideshowRandom Then
' get Random Image
Index = New Random().Next(0, ImageList.Count)
ElseIf My.Settings.NextImageChance < New Random().Next(0, 101)
Index = Form1.ssh.randomizer.Next(0, ImageList.Count)
ElseIf My.Settings.NextImageChance < Form1.ssh.randomizer.Next(0, 101) Then
' Randomly backwards
Index -= 1
If Index < 0 Then Index = 0
Expand Down Expand Up @@ -530,7 +530,7 @@ SetForwardImage:
'End If
'Next
If ImagePaths.TagImageList.Count <> 0 Then
rtnPath = ImagePaths.TagImageList.ElementAt(New Random().Next(0, ImagePaths.TagImageList.Count))
rtnPath = ImagePaths.TagImageList.ElementAt(Form1.ssh.randomizer.Next(0, ImagePaths.TagImageList.Count))
Else
rtnPath = ImagePaths.LastPicked
End If
Expand Down
7 changes: 7 additions & 0 deletions Tease AI/Classes/SessionState.StackedCallReturn.vb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
'when it reaches the end of a link/beforeScript)
Dim isALink As Boolean

'store the rapidcode status so we can resume it when coming back if the script was in this mode
Dim rapidText, rapidCode As Boolean

'store all the modes variables so we can reset them on coming back
Dim edgeMode, ruinMode, cameMode, yesMode, noMode As New Mode()
Dim customModes As New Dictionary(Of String, Mode)
Expand All @@ -28,6 +31,8 @@
customModes = session.Modes
showingModule = session.ShowModule
isALink = session.isLink
rapidCode = session.RapidCode
rapidText = session.RapidFire
End Sub
Sub resumeState()
Session.StrokeTauntVal = Line
Expand All @@ -44,6 +49,8 @@
Session.Modes = customModes
Session.ShowModule = showingModule
Session.isLink = isALink
Session.RapidCode = rapidCode
Session.RapidFire = rapidText
End Sub
End Class
End Class
23 changes: 4 additions & 19 deletions Tease AI/Classes/State.vb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Public Class SessionState
Public Property TaskText As String
Public Property TaskTextDir As String

Public Property tempResponseLine As Integer
Public Property nameErrors As Integer = 0
Public Property wrongAttempt As Boolean

Expand Down Expand Up @@ -349,8 +350,7 @@ Public Class SessionState
<Category("Bookmark")> Public Property BookmarkLinkFile As String
<Category("Bookmark")> Public Property BookmarkLinkLine As Integer

Public Property WaitTick As Integer

Public Property WaitTick As Integer = -1



Expand Down Expand Up @@ -583,7 +583,8 @@ Public Class SessionState
Public Property SecondSession As Boolean

Public Property checkAnswers As subAnswers

Public Property addAnswerList As Boolean
Public Property addResponseList As Boolean

''' <summary>
''' Set to true if the sub is on the edge and the domme had decided to not to stop stroking.
Expand Down Expand Up @@ -709,7 +710,6 @@ Public Class SessionState

<NonSerialized> <OptionalField> Friend Files As New FileClass(Me)
<NonSerialized> <OptionalField> Friend Folders As New FoldersClass(Me)

<NonSerialized> Dim ActivationForm As Form1

#Region "------------------------------------- Constructors----------------------------------------------"
Expand Down Expand Up @@ -897,9 +897,6 @@ Public Class SessionState
AvoidTheEdgeResume_enabled = .AvoidTheEdgeResume.Enabled
AvoidTheEdgeTaunts_enabled = .AvoidTheEdgeTaunts.Enabled
CensorshipTimer_enabled = .CensorshipTimer.Enabled
Contact1Timer_enabled = .Contact1Timer.Enabled
Contact2Timer_enabled = .Contact2Timer.Enabled
Contact3Timer_enabled = .Contact3Timer.Enabled
CustomSlideshowTimer_enabled = .CustomSlideshowTimer.Enabled
EdgeCountTimer_enabled = .EdgeCountTimer.Enabled
EdgeTauntTimer_enabled = .EdgeTauntTimer.Enabled
Expand Down Expand Up @@ -929,9 +926,6 @@ Public Class SessionState
AvoidTheEdgeResume_Interval = .AvoidTheEdgeResume.Interval
AvoidTheEdgeTaunts_Interval = .AvoidTheEdgeTaunts.Interval
CensorshipTimer_Interval = .CensorshipTimer.Interval
Contact1Timer_Interval = .Contact1Timer.Interval
Contact2Timer_Interval = .Contact2Timer.Interval
Contact3Timer_Interval = .Contact3Timer.Interval
CustomSlideshowTimer_Interval = .CustomSlideshowTimer.Interval
EdgeCountTimer_Interval = .EdgeCountTimer.Interval
EdgeTauntTimer_Interval = .EdgeTauntTimer.Interval
Expand Down Expand Up @@ -1037,9 +1031,6 @@ Public Class SessionState
.AvoidTheEdgeResume.Enabled = False
.AvoidTheEdgeTaunts.Enabled = False
.CensorshipTimer.Enabled = False
.Contact1Timer.Enabled = False
.Contact2Timer.Enabled = False
.Contact3Timer.Enabled = False
.CustomSlideshowTimer.Enabled = False
.EdgeCountTimer.Enabled = False
.EdgeTauntTimer.Enabled = False
Expand Down Expand Up @@ -1195,9 +1186,6 @@ Public Class SessionState
.AvoidTheEdgeResume.Interval = AvoidTheEdgeResume_Interval
.AvoidTheEdgeTaunts.Interval = AvoidTheEdgeTaunts_Interval
.CensorshipTimer.Interval = CensorshipTimer_Interval
.Contact1Timer.Interval = Contact1Timer_Interval
.Contact2Timer.Interval = Contact2Timer_Interval
.Contact3Timer.Interval = Contact3Timer_Interval
.CustomSlideshowTimer.Interval = CustomSlideshowTimer_Interval
.EdgeCountTimer.Interval = EdgeCountTimer_Interval
.EdgeTauntTimer.Interval = EdgeTauntTimer_Interval
Expand Down Expand Up @@ -1228,9 +1216,6 @@ Public Class SessionState
.AvoidTheEdgeResume.Enabled = AvoidTheEdgeResume_enabled
.AvoidTheEdgeTaunts.Enabled = AvoidTheEdgeTaunts_enabled
.CensorshipTimer.Enabled = CensorshipTimer_enabled
.Contact1Timer.Enabled = Contact1Timer_enabled
.Contact2Timer.Enabled = Contact2Timer_enabled
.Contact3Timer.Enabled = Contact3Timer_enabled
.CustomSlideshowTimer.Enabled = CustomSlideshowTimer_enabled
.EdgeCountTimer.Enabled = EdgeCountTimer_enabled
.EdgeTauntTimer.Enabled = EdgeTauntTimer_enabled
Expand Down
41 changes: 31 additions & 10 deletions Tease AI/Classes/subAnswers.vb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Public Class subAnswers
checkList.Add(My.Settings.SubYes)
checkList.Add(My.Settings.SubNo)
checkList.Add(My.Settings.SubSorry)
checkList.Add("please")
checkList.Add("thank,thanks")
checkList.Add("please")
End Sub

Public Function returnWords(s As String) As String
Expand All @@ -26,9 +26,9 @@ Public Class subAnswers
Case "sorry"
Return checkList.Item(3)
Case "thanks"
Return checkList.Item(5)
Case "please"
Return checkList.Item(4)
Case "please"
Return checkList.Item(5)
Case Else
Return checkList.Item(0)
End Select
Expand All @@ -38,28 +38,49 @@ Public Class subAnswers
Return checkList
End Function

Public Function isSystemWord(ByVal wordList As String) As Boolean
Public Function returnAnswerList() As List(Of String)
Return answerList
End Function

Public Function returnSystemWord(wordList As String) As String
For i As Integer = 0 To checkList.Count() - 1
Dim list As String() = ssh.obtainSplitParts(checkList(i), False)
For n As Integer = 0 To list.Count - 1
If UCase(wordList).Contains(UCase(list(n))) Then Return True
If Trim(UCase(wordList)) = Trim((UCase(list(n)))) Then
Select Case i
Case 0
Return "hi"
Case 1
Return "yes"
Case 2
Return "no"
Case 3
Return "sorry"
Case 4
Return "thanks"
Case 5
Return "please"
Case Else
Return "hi"
End Select
End If
Next
Next
Return False
Return ""
End Function

Public Sub addToAnswerList(ByVal words As String)
Dim split() = words.Split(",")
For i As Integer = 0 To split.Count - 1
answerList.Add(split(i))
answerList.Add(Trim(split(i)))
Next
End Sub

Public Sub clearAnswers()
answerList.Clear()
End Sub

Public Function triggerWord(ByVal chatstring As String) As String
Public Function triggerWord(chatstring As String) As String

'we first order the list based on lenght of the answer option (and if equal lenght, by the order in which they are in the answer list)

Expand All @@ -68,15 +89,15 @@ Public Class subAnswers
'we then check only the answers with more than 1 word to see if the chat strings contain any of them

For i As Integer = 0 To sorted.Count - 1
If InStr(sorted(i), " ") > 0 Then If chatstring.Contains(sorted(i).Trim) Then Return sorted(i).Trim
If InStr(sorted(i), " ") > 0 Then If LCase(chatstring).Contains(LCase(sorted(i)).Trim) Then Return sorted(i).Trim
Next

'if all multiple words answers didn't return an answer, we check for the single words in the chat to see if any of them matches

Dim singleWords() = ssh.obtainSplitParts(chatstring, True)
For i As Integer = 0 To singleWords.Count - 1
For n As Integer = 0 To answerList.Count - 1
If UCase(answerList(n)) = UCase(singleWords(i)) Then Return singleWords(i)
If LCase(answerList(n)) = LCase(singleWords(i)) Then Return singleWords(i)
Next
Next
Return ""
Expand Down
24 changes: 0 additions & 24 deletions Tease AI/Form1.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading