tabnation

motivate random events

Apr 13th, 2021
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. ;TABNation 4/8/2021 v1
  2. ;every 2-4 hours a random event will happen as long as you have not
  3. ;already complete 3 events. Once 3 events are completed script will
  4. ;sleep for 8 hours and script only displays random events between
  5. ;the times of 10am - 5pm
  6.  
  7. ;=============================
  8. ;set timers up/settings
  9. ;=============================
  10. #NoEnv
  11. SetWorkingDir, %A_ScriptDir%
  12. #SingleInstance force
  13. ThingsHappend=0
  14. totaltodaycount=0
  15. random, rantime, 10000, 12000 ;go off every 2-4 hours
  16. settimer, randomthing , %rantime% ;starts random time for something to happen
  17. return
  18.  
  19. ;=============================
  20. ;Check is user active and day
  21. ;=============================
  22. randomthing:
  23. hour := A_Hour
  24. if (hour >= 10 and hour < 24) ; check if working hours 8-24
  25. {
  26. If A_TimeIdle < 50000 ;if user gone for more then x seconds do nothing
  27. {
  28. goto userthere
  29. }
  30. }
  31. Return
  32.  
  33. ;=============================
  34. ;Pick something to do
  35. ;=============================
  36. userthere:
  37. ThingsHappend++
  38.  
  39. If ThingsHappend = 3
  40. {
  41. ThingsHappend=0
  42. msgbox, Congrats on maxing out today!!!
  43. sleep 28800000 ;reached max for today wait till tommorrow
  44. return
  45. }
  46.  
  47. random, ranthing, 1, 9 ;pick thing to do
  48.  
  49. ;-----------------------
  50. ;say hi to person
  51. ;-----------------------
  52. If ranthing = 1
  53. {
  54. MsgBox, 4,, Say Hi to someone on teams and tell them a fact about yourself `n(Did you do this?)
  55. IfMsgBox Yes
  56. totaltodaycount++
  57. random, rantime, 7200000, 14400000
  58. Return
  59. IfMsgBox No
  60. random, rantime, 7200000, 14400000
  61. Return
  62. }
  63. ;-----------------------
  64. ;Stare away from screen
  65. ;-----------------------
  66. If ranthing = 2
  67. {
  68. MsgBox, 4,, Stare for 30 seconds 30 feet away `nThis is to rest your eyes`n(Did you do this?)
  69. IfMsgBox Yes
  70. totaltodaycount++
  71. random, rantime, 7200000, 14400000
  72. Return
  73. IfMsgBox No
  74. random, rantime, 7200000, 14400000
  75. Return
  76. }
  77.  
  78. ;-----------------------
  79. ;Dad Jokes
  80. ;-----------------------
  81. If ranthing = 3
  82. {
  83. FileRead, list, dadjokes.txt ; Load the list from a text file
  84. obj := [] ; Create original obj to clone from
  85. Loop, Parse, list, `n`r
  86. (Mod(A_Index,2) = 0) ? (obj.Push(Line1 . "`n" . A_LoopField)) : (Line1 := A_LoopField)
  87. if (!o.length())
  88. o := obj.Clone() ; Clone orignal obj when o is empty or not created yet.
  89. random, r, 1, % o.length() ; generates a random number between 1 and the current length of the array of words
  90. msgbox, % o.removeAt(r) ; remove the word from the given random position in the array returning it
  91. totaltodaycount++
  92. random, rantime, 7200000, 14400000
  93. Return
  94. }
  95. ;-----------------------
  96. ;Jumping Jacks
  97. ;-----------------------
  98. If ranthing = 4
  99. {
  100. MsgBox, 4,, Time for some movement 5 jumping jacks and go`n(Did you do this?)
  101. IfMsgBox Yes
  102. totaltodaycount++
  103. random, rantime, 7200000, 14400000
  104. Return
  105. IfMsgBox No
  106. random, rantime, 7200000, 14400000
  107. Return
  108. }
  109. ;-----------------------
  110. ;Water chug
  111. ;-----------------------
  112. If ranthing = 5
  113. {
  114. MsgBox, 4,, Take a longgggg sip of some Water`n(Did you do this?)
  115. IfMsgBox Yes
  116. totaltodaycount++
  117. random, rantime, 7200000, 14400000
  118. Return
  119. IfMsgBox No
  120. random, rantime, 7200000, 14400000
  121. Return
  122. }
  123. ;-----------------------
  124. ;Quick Walk
  125. ;-----------------------
  126. If ranthing = 6
  127. {
  128. MsgBox, 4,, Go For a short walk in the hall`n(Did you do this?)
  129. IfMsgBox Yes
  130. totaltodaycount++
  131. random, rantime, 7200000, 14400000
  132. Return
  133. IfMsgBox No
  134. random, rantime, 7200000, 14400000
  135. Return
  136. }
  137. ;-----------------------
  138. ;Clean Your area
  139. ;-----------------------
  140. If ranthing = 7
  141. {
  142. MsgBox, 4,, Clean up your area for a nice clean environment`n(Did you do this?)
  143. IfMsgBox Yes
  144. totaltodaycount++
  145. random, rantime, 7200000, 14400000
  146. Return
  147. IfMsgBox No
  148. random, rantime, 7200000, 14400000
  149. Return
  150. }
  151. ;-----------------------
  152. ;Learn something new
  153. ;-----------------------
  154. If ranthing = 8
  155. {
  156. MsgBox, 4,, Go to wiki and find something new to learn`n(Did you do this?)
  157. IfMsgBox Yes
  158. totaltodaycount++
  159. random, rantime, 7200000, 14400000
  160. Return
  161. IfMsgBox No
  162. random, rantime, 7200000, 14400000
  163. Return
  164. }
  165. ;-----------------------
  166. ;PC Clean
  167. ;-----------------------
  168. If ranthing = 9
  169. {
  170. MsgBox, 4,, Take a few minutes to Clean up your outlook and desktop`n(Did you do this?)
  171. IfMsgBox Yes
  172. totaltodaycount++
  173. random, rantime, 7200000, 14400000
  174. Return
  175. IfMsgBox No
  176. random, rantime, 7200000, 14400000
  177. Return
  178. }
  179. Return
  180.  
  181. f2::
  182. msgbox, Total Ponts today %totaltodaycount%
  183.  
Add Comment
Please, Sign In to add comment