Just a suggestion,
A lot of plugins use the IF / THEN statements based on the following:
86,400 = Number of minutes / day
86,400 / 60 will give you minutes = 1440
Here is a clip from one of the many Loneliness Plugins for Hal. Hope this helps.
----------------------------------------
Rem PLUGIN: MINUTE_TIMER
'------------------
' Declare variables
'------------------
Dim randomPatience, loChance, loTemper, loMinuteFactor, temperThresh1, temperThresh2, temperThresh3
If HalBrain.TopicSearch("PATIENCE", "lonelyParameter") = "99" Then
'
'--------------------
' Set minutes to a random integer from 4 to 30
'--------------------
Randomize
loPatience = Int(32 * Rnd + 3)
randomPatience=True
Else
'
'--------------------
' Set minute value (loPatience) to the parameter chosen in the PATIENCE menu
'--------------------
loPatience = CDbl(HalBrain.VBVal(HalBrain.TopicSearch("PATIENCE", "lonelyParameter")))
if loPatience = 0 Then loPatience = 32
End If
'
'--------------------
' Set frustration value (loFrustration) to the parameter chosen in the FRUSTRATION menu
'--------------------
loFrustration = CInt(HalBrain.VBVal(HalBrain.TopicSearch("FRUSTRATION", "LonelyParameter")))
if loFrustration = 0 then loFrustration = 15
'
'--------------------
' Skip the rest of this plugin if the user has spoken
'--------------------
If LastIdleResponse <> "" Then
'
'------------------
' Otherwise, convert PATIENCE to minutes factor (loMinuteFactor)
'------------------
loMinuteFactor = loPatience / 1440
'
'--------------------
' If the pause exceeds the minute factor, create a chance for Hal to speak once per minute
'--------------------
If Now - LastIdleResponse > loMinuteFactor Then
If InStr(1, IdlePrevUser, "BE RIGHT BACK", 1) > 0 Or InStr(1, IdlePrevUser, "BRB", 1) > 0 Or InStr(1, IdlePrevUser, "BE QUIET", 1) > 0 Or InStr(1, IdlePrevUser, "SHUT UP", 1) > 0 Then Exit Sub
'