Advertisement
SemlerPDX

AVCS QCC Generate Random Pause time from range

Aug 14th, 2020
1,211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.12 KB | None | 0 0
  1. ' Quick Command Creator Inline-Function for VoiceAttack -  Get Macro Function Random Pause
  2. '  by SemlerPDX Jun2020
  3. '  VETERANS-GAMING.COM
  4.  
  5.  
  6. Imports Microsoft.VisualBasic
  7. Imports System
  8. Imports System.Text
  9. Imports System.Collections
  10. Imports System.Collections.Generic
  11. Imports System.Data
  12. Imports System.Drawing
  13. Imports System.Diagnostics
  14. Imports System.Windows.Forms
  15. Imports System.Linq
  16. Imports System.Xml.Linq
  17. Imports System.Threading.Tasks
  18.  
  19. Public Class VAInline
  20.     dim pauseRange() as string
  21.     dim pauseLower as integer
  22.     dim pauseUpper as integer
  23.     dim pauseFinal as string
  24.     dim pauseRandom as random = New Random
  25.    
  26.     Public Sub Main()
  27.        
  28.         if (VA.GetText("~avcs_qcc_this_step_func") IsNot nothing)
  29.            
  30.             pauseRange = VA.GetText("~avcs_qcc_this_step_func").Split("-")
  31.            
  32.             pauseLower = pauseRange(0) * 1000
  33.             pauseUpper = pauseRange(1) * 1000
  34.             pauseFinal = pauseRandom.Next(pauseLower,pauseUpper) / 1000
  35.            
  36.             VA.SetDecimal("~avcs_qcc_pause_random", pauseFinal.ToString())
  37.             VA.WriteToLog("Pausing for Random time: " + pauseFinal.ToString() + " seconds...","pink")
  38.        
  39.         end if
  40.    
  41.     End Sub
  42.  
  43. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement