Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function rs {
- Param([String]$deathTimer,
- [String]$aegisPickup)
- # Extract death second (last two digits of timer)
- $deathSecond = $deathTimer.Substring($deathTimer.Length -2, 2)
- # Extract death minute (everthing but the last two digits)
- $deathMinute = $deathTimer.Substring(0, $deathTimer.Length -2)
- # Calculate the aegis second, adding the $aegisPickup to the actual time, must be in two digit format
- $aegisSecond = ([Int]$deathSecond + [Int]$aegisPickup).ToString("00")
- # Calculate Aegis timer
- $aegisTimer = "$([Int]$deathMinute + 5):$aegisSecond"
- # Calculate rosh respawn timer (+8 to +11 minutes)
- $roshTimerStart = "$([Int]$deathMinute + 8):$deathSecond"
- $roshTimerEnd = "$([Int]$deathMinute + 11):$deathSecond"
- # Display output, copy to clipboard
- Write-Host "AEGIS: $aegisTimer, ROSHAN: $roshTimerStart - $roshTimerEnd"
- "AEGIS: $aegisTimer, ROSHAN: $roshTimerStart - $roshTimerEnd" | Clip
- }
Add Comment
Please, Sign In to add comment