-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGet-Dreamscythe.ps1
More file actions
27 lines (24 loc) · 932 Bytes
/
Copy pathGet-Dreamscythe.ps1
File metadata and controls
27 lines (24 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$isonline = $false
do {
# WoW Realm Status (PowerShell 7+)
$Uri = 'https://worldofwarcraft.blizzard.com/en-us/graphql/'
$Body = @{
operationName = 'GetRealmStatusData'
variables = @{ input = @{ compoundRegionGameVersionSlug = 'classic1x-us' } }
extensions = @{ persistedQuery = @{ version = 1; sha256Hash = 'b37e546366a58e211e922b8c96cd1ff74249f564a49029cc9737fef3300ff175' } }
} | ConvertTo-Json -Depth 5
$RealmSlug = 'dreamscythe'
$Realms = (Invoke-RestMethod -Uri $Uri -Method Post -ContentType 'application/json' -Body $Body).data.Realms
$ds = $Realms | ? { $_.slug -eq $RealmSlug }
$ds
if ($ds.online -eq "True") {
[console]::beep(500, 300)
[console]::beep(500, 300)
[console]::beep(500, 300)
$isonline = $true
}
else {
Start-Sleep -Seconds 10
}
}
while ($isonline -eq $false)