Guest User

Untitled

a guest
Oct 18th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. Function rs {
  2. Param([String]$deathTimer,
  3. [String]$aegisPickup)
  4. # Extract death second (last two digits of timer)
  5. $deathSecond = $deathTimer.Substring($deathTimer.Length -2, 2)
  6.  
  7. # Extract death minute (everthing but the last two digits)
  8. $deathMinute = $deathTimer.Substring(0, $deathTimer.Length -2)
  9.  
  10. # Calculate the aegis second, adding the $aegisPickup to the actual time, must be in two digit format
  11. $aegisSecond = ([Int]$deathSecond + [Int]$aegisPickup).ToString("00")
  12.  
  13. # Calculate Aegis timer
  14. $aegisTimer = "$([Int]$deathMinute + 5):$aegisSecond"
  15.  
  16. # Calculate rosh respawn timer (+8 to +11 minutes)
  17. $roshTimerStart = "$([Int]$deathMinute + 8):$deathSecond"
  18. $roshTimerEnd = "$([Int]$deathMinute + 11):$deathSecond"
  19.  
  20. # Display output, copy to clipboard
  21. Write-Host "AEGIS: $aegisTimer, ROSHAN: $roshTimerStart - $roshTimerEnd"
  22. "AEGIS: $aegisTimer, ROSHAN: $roshTimerStart - $roshTimerEnd" | Clip
  23. }
Add Comment
Please, Sign In to add comment