2024-01-16 01:35:25 +01:00
# OpenCS2hock
2024-01-16 04:43:07 +01:00


2024-01-19 03:14:53 +01:00
Electrifying your Counter-Strike experience. With [OpenShock ](https://openshock.org/ ) and [PiShock ](https://pishock.com/#/ )! (Not Associated)
2024-01-16 01:35:25 +01:00
## How to use
2024-01-16 01:36:06 +01:00
Download [latest Release ](https://github.com/C9Glax/OpenCS2hock/releases/latest ) and execute.
2024-01-16 01:35:25 +01:00
Example `config.json` . Place next to executable. Will also be generated on first start.
2024-01-16 01:22:53 +01:00
```json
2024-01-14 02:41:33 +01:00
{
2024-01-16 01:22:53 +01:00
"LogLevel": 2,
2024-01-18 00:06:39 +01:00
"Shockers": [
{
"ShockerIds": [
"ID HERE"
],
"IntensityRange": {
"Min": 30,
"Max": 50
},
"DurationRange": {
"Min": 1000,
"Max": 1000
},
"ApiType": 0,
2025-01-16 21:49:51 +01:00
"Endpoint": "https://api.shocklink.app",
2024-01-18 00:06:39 +01:00
"ApiKey": "API KEY HERE"
}
],
"ShockerActions": [
{
"TriggerEvent": 2,
"ShockerIds": [
"SAME ID HERE"
],
"Action": 2,
"ValueFromInput": false
}
]
2024-01-14 02:41:33 +01:00
}
2024-01-14 02:52:39 +01:00
```
2024-01-19 02:06:26 +01:00
## LogLevel
2024-01-18 18:15:11 +01:00
[Levels ](https://learn.microsoft.com/de-de/dotnet/api/microsoft.extensions.logging.loglevel?view=dotnet-plat-ext-8.0 )
2024-01-19 02:06:26 +01:00
## Shockers
2024-01-14 02:52:39 +01:00
### ApiKey
2024-01-19 02:22:12 +01:00
- For OpenShock (HTTP) get token [here ](https://shocklink.net/#/dashboard/tokens )
- For PiShock (HTTP) get information [here ](https://apidocs.pishock.com/#header-authenticating )
2024-01-18 18:15:11 +01:00
### ApiType
2024-01-18 18:16:10 +01:00
CShocker [](https://github.com/C9Glax/cshocker) [here ](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/Abstract/ShockerApi.cs )
2024-01-14 02:52:39 +01:00
2024-01-18 00:06:39 +01:00
### ShockerIds
2024-01-19 02:06:26 +01:00
List of Shocker-Ids, comma seperated.
2024-01-14 02:52:39 +01:00
2024-01-19 02:06:26 +01:00
`[ "ID-1-asdasd", "ID-2-fghfgh" ]`
2024-01-14 02:52:39 +01:00
### Intensity Range
2024-01-19 02:06:26 +01:00
in percent
`0-100`
2024-01-14 02:52:39 +01:00
### Duration Range
in ms
2024-01-19 02:06:26 +01:00
- `0-30000` OpenShock
- `0-15000` PiShock
### Username (PiShockHttp only)
For PiShock (HTTP) get information [here ](https://apidocs.pishock.com/#header-authenticating )
### Sharecode (PiShockHttp only)
For PiShock (HTTP) get information [here ](https://apidocs.pishock.com/#header-authenticating )
## ShockerActions
2024-01-14 02:52:39 +01:00
2024-01-18 18:15:11 +01:00
### TriggerEvent IDs
2024-01-18 18:16:10 +01:00
From CS2GSI [](https://github.com/C9Glax/CS2GSI) [here ](https://github.com/C9Glax/CS2GSI/blob/master/CS2GSI/CS2Event.cs )
2024-01-18 18:15:11 +01:00
2024-01-19 02:06:26 +01:00
### ShockerIds
List of Shocker-Ids, comma seperated. (Same as in configured Shocker)
`[ "ID-1", "ID-2" ]`
### Actions
2024-01-18 18:16:50 +01:00
From CShocker [](https://github.com/C9Glax/cshocker) [here ](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/ControlAction.cs )
2024-01-18 18:15:11 +01:00
### ValueFromInput
2024-01-19 02:06:26 +01:00
Use CS2GSI EventArgs value to determine Intensity (within configured IntensityRange)
2024-01-16 01:35:25 +01:00
2024-01-18 00:06:39 +01:00
# Using
### CS2GSI
2024-01-19 02:06:26 +01:00
[](https://img.shields.io/github/license/c9glax/CS2GSI/LICENSE)
2024-01-18 00:06:39 +01:00
[](https://www.nuget.org/packages/CS2GSI/)
[](https://github.com/C9Glax/CS2GSI)
[](https://github.com/C9Glax/CS2GSI/releases/latest)
### CShocker
[](https://github.com/C9Glax/CShocker)
[](https://github.com/C9Glax/cshocker)
[](https://shields.io/badges/nu-get-version)