├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── BoosterCreator.sln ├── BoosterCreator ├── .gitignore ├── BoosterCreator.cs ├── BoosterCreator.csproj ├── BoosterHandler.cs ├── Commands.cs ├── GlobalSuppressions.cs ├── Json.cs └── WebRequest.cs ├── LICENSE-2.0.txt ├── README.md ├── build.bat └── github-pandoc.css /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | 8 | [*.cs] 9 | csharp_prefer_braces = true:suggestion 10 | csharp_new_line_before_open_brace = none:suggestion 11 | csharp_new_line_before_else = false:suggestion 12 | csharp_new_line_before_catch = false:suggestion 13 | csharp_new_line_before_finally = false:suggestion 14 | csharp_new_line_before_members_in_object_initializers = false:suggestion 15 | csharp_new_line_before_members_in_anonymous_types = false:suggestion 16 | csharp_new_line_between_query_expression_clauses = false:suggestion 17 | 18 | csharp_style_var_for_built_in_types = false:suggestion 19 | csharp_style_var_when_type_is_apparent = false:suggestion 20 | csharp_style_var_elsewhere = false:suggestion 21 | 22 | csharp_style_expression_bodied_methods = when_on_single_line:suggestion 23 | csharp_style_expression_bodied_constructors = when_on_single_line:suggestion 24 | csharp_style_expression_bodied_operators = when_on_single_line:suggestion 25 | csharp_style_expression_bodied_properties = when_on_single_line:suggestion 26 | csharp_style_expression_bodied_indexers = when_on_single_line:suggestion 27 | csharp_style_expression_bodied_accessors = when_on_single_line:suggestion 28 | 29 | csharp_style_pattern_matching_over_as_with_null_check = false:suggestion 30 | 31 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion 32 | 33 | csharp_preserve_single_line_statements = false:suggestion 34 | csharp_preserve_single_line_blocks = true:suggestion 35 | 36 | csharp_indent_case_contents = true:suggestion 37 | csharp_indent_switch_labels = true:suggestion 38 | 39 | csharp_space_after_cast = true:suggestion 40 | csharp_space_after_keywords_in_control_flow_statements = true:suggestion 41 | csharp_space_between_method_declaration_parameter_list_parentheses = false:suggestion 42 | csharp_space_between_method_call_parameter_list_parentheses = false:suggestion 43 | csharp_space_between_parentheses = false:suggestion 44 | csharp_space_before_colon_in_inheritance_clause = true:suggestion 45 | csharp_space_after_colon_in_inheritance_clause = true:suggestion 46 | csharp_space_around_binary_operators = before_and_after:suggestion 47 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false:suggestion 48 | csharp_space_between_method_call_name_and_opening_parenthesis = false:suggestion 49 | csharp_space_between_method_call_empty_parameter_list_parentheses = false:suggestion 50 | 51 | 52 | dotnet_sort_system_directives_first = true:suggestion 53 | 54 | dotnet_style_require_accessibility_modifiers = always:suggestion 55 | dotnet_style_qualification_for_field = false:suggestion 56 | dotnet_style_qualification_for_property = false:suggestion 57 | dotnet_style_qualification_for_method = false:suggestion 58 | dotnet_style_qualification_for_event = false:suggestion 59 | dotnet_style_prefer_auto_properties = true:suggestion 60 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion 61 | dotnet_style_predefined_type_for_member_access = true:suggestion 62 | 63 | # PascalCase for naming everything but parameters 64 | dotnet_naming_rule.all_members_must_be_capitalized.symbols = all_symbols 65 | dotnet_naming_symbols.all_symbols.applicable_kinds = class,struct,interface,enum,property,method,field,event,delegate 66 | dotnet_naming_symbols.all_symbols.applicable_accessibilities = * 67 | dotnet_naming_rule.all_members_must_be_capitalized.style = all_symbols 68 | dotnet_naming_style.all_symbols.capitalization = pascal_case 69 | dotnet_naming_rule.all_members_must_be_capitalized.severity = suggestion 70 | 71 | # camelCase for naming parameters 72 | dotnet_naming_rule.parameters_must_be_camel_case.symbols = params 73 | dotnet_naming_symbols.params.applicable_kinds = parameter 74 | dotnet_naming_symbols.params.applicable_accessibilities = * 75 | dotnet_naming_rule.parameters_must_be_camel_case.style = params 76 | dotnet_naming_style.params.capitalization = camel_case 77 | dotnet_naming_rule.parameters_must_be_camel_case.severity = suggestion 78 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | *.sh text eol=lf 5 | 6 | # Custom for Visual Studio 7 | *.cs diff=csharp 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # _ ____ _____ 2 | # / \ / ___| | ___| 3 | # / _ \ \___ \ | |_ 4 | # / ___ \ ___) || _| 5 | # /_/ \_\|____/ |_| 6 | 7 | # Ignore all files in custom in-tree config directory (if exists) 8 | ArchiSteamFarm/config 9 | 10 | # Ignore local log + debug of development builds 11 | ArchiSteamFarm/log.txt 12 | ArchiSteamFarm/debug 13 | 14 | # Ignore standard out folders for publishing 15 | **/out 16 | 17 | # Ignore crowdin CLI secret (if exists) 18 | tools/ArchiCrowdin/crowdin_identity.yml 19 | 20 | # _ _ 21 | # | | (_) _ __ _ _ __ __ 22 | # | | | || '_ \ | | | |\ \/ / 23 | # | |___ | || | | || |_| | > < 24 | # |_____||_||_| |_| \__,_|/_/\_\ 25 | # 26 | # https://github.com/github/gitignore/blob/master/Global/Linux.gitignore 27 | 28 | *~ 29 | 30 | # temporary files which can be created if a process still has a handle open of a deleted file 31 | .fuse_hidden* 32 | 33 | # KDE directory preferences 34 | .directory 35 | 36 | # Linux trash folder which might appear on any partition or disk 37 | .Trash-* 38 | 39 | # .nfs files are created when an open file is removed but is still being accessed 40 | .nfs* 41 | 42 | # ___ ____ 43 | # _ __ ___ __ _ ___ / _ \ / ___| 44 | # | '_ ` _ \ / _` | / __|| | | |\___ \ 45 | # | | | | | || (_| || (__ | |_| | ___) | 46 | # |_| |_| |_| \__,_| \___| \___/ |____/ 47 | # 48 | # https://github.com/github/gitignore/blob/master/Global/macOS.gitignore 49 | 50 | # General 51 | .DS_Store 52 | .AppleDouble 53 | .LSOverride 54 | 55 | # Icon must end with two \r 56 | Icon 57 | 58 | # Thumbnails 59 | ._* 60 | 61 | # Files that might appear in the root of a volume 62 | .DocumentRevisions-V100 63 | .fseventsd 64 | .Spotlight-V100 65 | .TemporaryItems 66 | .Trashes 67 | .VolumeIcon.icns 68 | .com.apple.timemachine.donotpresent 69 | 70 | # Directories potentially created on remote AFP share 71 | .AppleDB 72 | .AppleDesktop 73 | Network Trash Folder 74 | Temporary Items 75 | .apdisk 76 | 77 | # __ __ ____ _ 78 | # | \/ | ___ _ __ ___ | _ \ ___ __ __ ___ | | ___ _ __ 79 | # | |\/| | / _ \ | '_ \ / _ \ | | | | / _ \\ \ / // _ \| | / _ \ | '_ \ 80 | # | | | || (_) || | | || (_) || |_| || __/ \ V /| __/| || (_) || |_) | 81 | # |_| |_| \___/ |_| |_| \___/ |____/ \___| \_/ \___||_| \___/ | .__/ 82 | # |_| 83 | # 84 | # https://github.com/github/gitignore/blob/master/Global/MonoDevelop.gitignore 85 | 86 | #User Specific 87 | *.userprefs 88 | *.usertasks 89 | 90 | #Mono Project Files 91 | *.pidb 92 | *.resources 93 | test-results/ 94 | 95 | # __ __ _ _ ____ _ _ _ 96 | # \ \ / /(_) ___ _ _ __ _ | |/ ___| | |_ _ _ __| |(_) ___ 97 | # \ \ / / | |/ __|| | | | / _` || |\___ \ | __|| | | | / _` || | / _ \ 98 | # \ V / | |\__ \| |_| || (_| || | ___) || |_ | |_| || (_| || || (_) | 99 | # \_/ |_||___/ \__,_| \__,_||_||____/ \__| \__,_| \__,_||_| \___/ 100 | # 101 | # https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 102 | 103 | ## Ignore Visual Studio temporary files, build results, and 104 | ## files generated by popular Visual Studio add-ons. 105 | ## 106 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 107 | 108 | # User-specific files 109 | *.rsuser 110 | *.suo 111 | *.user 112 | *.userosscache 113 | *.sln.docstates 114 | 115 | # User-specific files (MonoDevelop/Xamarin Studio) 116 | *.userprefs 117 | 118 | # Build results 119 | [Dd]ebug/ 120 | [Dd]ebugPublic/ 121 | [Rr]elease/ 122 | [Rr]eleases/ 123 | x64/ 124 | x86/ 125 | [Aa][Rr][Mm]/ 126 | [Aa][Rr][Mm]64/ 127 | bld/ 128 | [Bb]in/ 129 | [Oo]bj/ 130 | [Ll]og/ 131 | 132 | # Visual Studio 2015/2017 cache/options directory 133 | .vs/ 134 | .vscode/ 135 | # Uncomment if you have tasks that create the project's static files in wwwroot 136 | #wwwroot/ 137 | 138 | # Visual Studio 2017 auto generated files 139 | Generated\ Files/ 140 | 141 | # MSTest test Results 142 | [Tt]est[Rr]esult*/ 143 | [Bb]uild[Ll]og.* 144 | 145 | # NUNIT 146 | *.VisualState.xml 147 | TestResult.xml 148 | 149 | # Build Results of an ATL Project 150 | [Dd]ebugPS/ 151 | [Rr]eleasePS/ 152 | dlldata.c 153 | 154 | # Benchmark Results 155 | BenchmarkDotNet.Artifacts/ 156 | 157 | # .NET Core 158 | project.lock.json 159 | project.fragment.lock.json 160 | artifacts/ 161 | 162 | # StyleCop 163 | StyleCopReport.xml 164 | 165 | # Files built by Visual Studio 166 | *_i.c 167 | *_p.c 168 | *_h.h 169 | *.ilk 170 | *.meta 171 | *.obj 172 | *.iobj 173 | *.pch 174 | *.pdb 175 | *.ipdb 176 | *.pgc 177 | *.pgd 178 | *.rsp 179 | *.sbr 180 | *.tlb 181 | *.tli 182 | *.tlh 183 | *.tmp 184 | *.tmp_proj 185 | *_wpftmp.csproj 186 | *.log 187 | *.vspscc 188 | *.vssscc 189 | .builds 190 | *.pidb 191 | *.svclog 192 | *.scc 193 | 194 | # Chutzpah Test files 195 | _Chutzpah* 196 | 197 | # Visual C++ cache files 198 | ipch/ 199 | *.aps 200 | *.ncb 201 | *.opendb 202 | *.opensdf 203 | *.sdf 204 | *.cachefile 205 | *.VC.db 206 | *.VC.VC.opendb 207 | 208 | # Visual Studio profiler 209 | *.psess 210 | *.vsp 211 | *.vspx 212 | *.sap 213 | 214 | # Visual Studio Trace Files 215 | *.e2e 216 | 217 | # TFS 2012 Local Workspace 218 | $tf/ 219 | 220 | # Guidance Automation Toolkit 221 | *.gpState 222 | 223 | # ReSharper is a .NET coding add-in 224 | _ReSharper*/ 225 | *.[Rr]e[Ss]harper 226 | *.DotSettings.user 227 | 228 | # JustCode is a .NET coding add-in 229 | .JustCode 230 | 231 | # TeamCity is a build add-in 232 | _TeamCity* 233 | 234 | # DotCover is a Code Coverage Tool 235 | *.dotCover 236 | 237 | # AxoCover is a Code Coverage Tool 238 | .axoCover/* 239 | !.axoCover/settings.json 240 | 241 | # Visual Studio code coverage results 242 | *.coverage 243 | *.coveragexml 244 | 245 | # NCrunch 246 | _NCrunch_* 247 | .*crunch*.local.xml 248 | nCrunchTemp_* 249 | 250 | # MightyMoose 251 | *.mm.* 252 | AutoTest.Net/ 253 | 254 | # Web workbench (sass) 255 | .sass-cache/ 256 | 257 | # Installshield output folder 258 | [Ee]xpress/ 259 | 260 | # DocProject is a documentation generator add-in 261 | DocProject/buildhelp/ 262 | DocProject/Help/*.HxT 263 | DocProject/Help/*.HxC 264 | DocProject/Help/*.hhc 265 | DocProject/Help/*.hhk 266 | DocProject/Help/*.hhp 267 | DocProject/Help/Html2 268 | DocProject/Help/html 269 | 270 | # Click-Once directory 271 | publish/ 272 | 273 | # Publish Web Output 274 | *.[Pp]ublish.xml 275 | *.azurePubxml 276 | # Note: Comment the next line if you want to checkin your web deploy settings, 277 | # but database connection strings (with potential passwords) will be unencrypted 278 | *.pubxml 279 | *.publishproj 280 | 281 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 282 | # checkin your Azure Web App publish settings, but sensitive information contained 283 | # in these scripts will be unencrypted 284 | PublishScripts/ 285 | 286 | # NuGet Packages 287 | *.nupkg 288 | # The packages folder can be ignored because of Package Restore 289 | **/[Pp]ackages/* 290 | # except build/, which is used as an MSBuild target. 291 | !**/[Pp]ackages/build/ 292 | # Uncomment if necessary however generally it will be regenerated when needed 293 | #!**/[Pp]ackages/repositories.config 294 | # NuGet v3's project.json files produces more ignorable files 295 | *.nuget.props 296 | *.nuget.targets 297 | 298 | # Microsoft Azure Build Output 299 | csx/ 300 | *.build.csdef 301 | 302 | # Microsoft Azure Emulator 303 | ecf/ 304 | rcf/ 305 | 306 | # Windows Store app package directories and files 307 | AppPackages/ 308 | BundleArtifacts/ 309 | Package.StoreAssociation.xml 310 | _pkginfo.txt 311 | *.appx 312 | 313 | # Visual Studio cache files 314 | # files ending in .cache can be ignored 315 | *.[Cc]ache 316 | # but keep track of directories ending in .cache 317 | !?*.[Cc]ache/ 318 | 319 | # Others 320 | ClientBin/ 321 | ~$* 322 | *~ 323 | *.dbmdl 324 | *.dbproj.schemaview 325 | *.jfm 326 | *.pfx 327 | *.publishsettings 328 | orleans.codegen.cs 329 | 330 | # Including strong name files can present a security risk 331 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 332 | #*.snk 333 | 334 | # Since there are multiple workflows, uncomment next line to ignore bower_components 335 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 336 | #bower_components/ 337 | # ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true 338 | **/wwwroot/lib/ 339 | 340 | # RIA/Silverlight projects 341 | Generated_Code/ 342 | 343 | # Backup & report files from converting an old project file 344 | # to a newer Visual Studio version. Backup files are not needed, 345 | # because we have git ;-) 346 | _UpgradeReport_Files/ 347 | Backup*/ 348 | UpgradeLog*.XML 349 | UpgradeLog*.htm 350 | ServiceFabricBackup/ 351 | *.rptproj.bak 352 | 353 | # SQL Server files 354 | *.mdf 355 | *.ldf 356 | *.ndf 357 | 358 | # Business Intelligence projects 359 | *.rdl.data 360 | *.bim.layout 361 | *.bim_*.settings 362 | *.rptproj.rsuser 363 | 364 | # Microsoft Fakes 365 | FakesAssemblies/ 366 | 367 | # GhostDoc plugin setting file 368 | *.GhostDoc.xml 369 | 370 | # Node.js Tools for Visual Studio 371 | .ntvs_analysis.dat 372 | node_modules/ 373 | 374 | # Visual Studio 6 build log 375 | *.plg 376 | 377 | # Visual Studio 6 workspace options file 378 | *.opt 379 | 380 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 381 | *.vbw 382 | 383 | # Visual Studio LightSwitch build output 384 | **/*.HTMLClient/GeneratedArtifacts 385 | **/*.DesktopClient/GeneratedArtifacts 386 | **/*.DesktopClient/ModelManifest.xml 387 | **/*.Server/GeneratedArtifacts 388 | **/*.Server/ModelManifest.xml 389 | _Pvt_Extensions 390 | 391 | # Paket dependency manager 392 | .paket/paket.exe 393 | paket-files/ 394 | 395 | # FAKE - F# Make 396 | .fake/ 397 | 398 | # JetBrains Rider 399 | .idea/ 400 | *.sln.iml 401 | 402 | # CodeRush personal settings 403 | .cr/personal 404 | 405 | # Python Tools for Visual Studio (PTVS) 406 | __pycache__/ 407 | *.pyc 408 | 409 | # Cake - Uncomment if you are using it 410 | # tools/** 411 | # !tools/packages.config 412 | 413 | # Tabs Studio 414 | *.tss 415 | 416 | # Telerik's JustMock configuration file 417 | *.jmconfig 418 | 419 | # BizTalk build output 420 | *.btp.cs 421 | *.btm.cs 422 | *.odx.cs 423 | *.xsd.cs 424 | 425 | # OpenCover UI analysis results 426 | OpenCover/ 427 | 428 | # Azure Stream Analytics local run output 429 | ASALocalRun/ 430 | 431 | # MSBuild Binary and Structured Log 432 | *.binlog 433 | 434 | # NVidia Nsight GPU debugger configuration file 435 | *.nvuser 436 | 437 | # MFractors (Xamarin productivity tool) working folder 438 | .mfractor/ 439 | 440 | # Local History for Visual Studio 441 | .localhistory/ 442 | 443 | # BeatPulse healthcheck temp database 444 | healthchecksdb 445 | 446 | # __ __ _ _ ____ _ _ _ ____ _ 447 | # \ \ / /(_) ___ _ _ __ _ | |/ ___| | |_ _ _ __| |(_) ___ / ___| ___ __| | ___ 448 | # \ \ / / | |/ __|| | | | / _` || |\___ \ | __|| | | | / _` || | / _ \ | | / _ \ / _` | / _ \ 449 | # \ V / | |\__ \| |_| || (_| || | ___) || |_ | |_| || (_| || || (_) || |___| (_) || (_| || __/ 450 | # \_/ |_||___/ \__,_| \__,_||_||____/ \__| \__,_| \__,_||_| \___/ \____|\___/ \__,_| \___| 451 | # 452 | # https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore 453 | 454 | .vscode/* 455 | !.vscode/settings.json 456 | !.vscode/tasks.json 457 | !.vscode/launch.json 458 | !.vscode/extensions.json 459 | 460 | # __ __ _ _ 461 | # \ \ / /(_) _ __ __| | ___ __ __ ___ 462 | # \ \ /\ / / | || '_ \ / _` | / _ \\ \ /\ / // __| 463 | # \ V V / | || | | || (_| || (_) |\ V V / \__ \ 464 | # \_/\_/ |_||_| |_| \__,_| \___/ \_/\_/ |___/ 465 | # 466 | # https://github.com/github/gitignore/blob/master/Global/Windows.gitignore 467 | 468 | # Windows thumbnail cache files 469 | Thumbs.db 470 | ehthumbs.db 471 | ehthumbs_vista.db 472 | 473 | # Dump file 474 | *.stackdump 475 | 476 | # Folder config file 477 | [Dd]esktop.ini 478 | 479 | # Recycle Bin used on file shares 480 | $RECYCLE.BIN/ 481 | 482 | # Windows Installer files 483 | *.cab 484 | *.msi 485 | *.msix 486 | *.msm 487 | *.msp 488 | 489 | # Windows shortcuts 490 | *.lnk 491 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ArchiSteamFarm"] 2 | path = ArchiSteamFarm 3 | url = https://github.com/JustArchiNET/ArchiSteamFarm.git 4 | -------------------------------------------------------------------------------- /BoosterCreator.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.136 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BoosterCreator", "BoosterCreator\BoosterCreator.csproj", "{C485E0CB-4D22-4A09-8CBA-83D1300A83DC}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchiSteamFarm", "ArchiSteamFarm\ArchiSteamFarm\ArchiSteamFarm.csproj", "{CF84911C-2C4C-4195-8AF3-ABBB6D3DE9AA}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {C485E0CB-4D22-4A09-8CBA-83D1300A83DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {C485E0CB-4D22-4A09-8CBA-83D1300A83DC}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {C485E0CB-4D22-4A09-8CBA-83D1300A83DC}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {C485E0CB-4D22-4A09-8CBA-83D1300A83DC}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {CF84911C-2C4C-4195-8AF3-ABBB6D3DE9AA}.Debug|Any CPU.ActiveCfg = Release|Any CPU 21 | {CF84911C-2C4C-4195-8AF3-ABBB6D3DE9AA}.Debug|Any CPU.Build.0 = Release|Any CPU 22 | {CF84911C-2C4C-4195-8AF3-ABBB6D3DE9AA}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {CF84911C-2C4C-4195-8AF3-ABBB6D3DE9AA}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {F0A96B42-B9D3-46DB-B976-08836C4F60A2} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /BoosterCreator/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | **/out 27 | 28 | # Visual Studio 2015/2017 cache/options directory 29 | .vs/ 30 | # Uncomment if you have tasks that create the project's static files in wwwroot 31 | #wwwroot/ 32 | 33 | # Visual Studio 2017 auto generated files 34 | Generated\ Files/ 35 | 36 | # MSTest test Results 37 | [Tt]est[Rr]esult*/ 38 | [Bb]uild[Ll]og.* 39 | 40 | # NUNIT 41 | *.VisualState.xml 42 | TestResult.xml 43 | 44 | # Build Results of an ATL Project 45 | [Dd]ebugPS/ 46 | [Rr]eleasePS/ 47 | dlldata.c 48 | 49 | # Benchmark Results 50 | BenchmarkDotNet.Artifacts/ 51 | 52 | # .NET Core 53 | project.lock.json 54 | project.fragment.lock.json 55 | artifacts/ 56 | **/Properties/launchSettings.json 57 | 58 | # StyleCop 59 | StyleCopReport.xml 60 | 61 | # Files built by Visual Studio 62 | *_i.c 63 | *_p.c 64 | *_i.h 65 | *.ilk 66 | *.meta 67 | *.obj 68 | *.iobj 69 | *.pch 70 | *.pdb 71 | *.ipdb 72 | *.pgc 73 | *.pgd 74 | *.rsp 75 | *.sbr 76 | *.tlb 77 | *.tli 78 | *.tlh 79 | *.tmp 80 | *.tmp_proj 81 | *.log 82 | *.vspscc 83 | *.vssscc 84 | .builds 85 | *.pidb 86 | *.svclog 87 | *.scc 88 | *.zip 89 | 90 | # Chutzpah Test files 91 | _Chutzpah* 92 | 93 | # Visual C++ cache files 94 | ipch/ 95 | *.aps 96 | *.ncb 97 | *.opendb 98 | *.opensdf 99 | *.sdf 100 | *.cachefile 101 | *.VC.db 102 | *.VC.VC.opendb 103 | 104 | # Visual Studio profiler 105 | *.psess 106 | *.vsp 107 | *.vspx 108 | *.sap 109 | 110 | # Visual Studio Trace Files 111 | *.e2e 112 | 113 | # TFS 2012 Local Workspace 114 | $tf/ 115 | 116 | # Guidance Automation Toolkit 117 | *.gpState 118 | 119 | # ReSharper is a .NET coding add-in 120 | _ReSharper*/ 121 | *.[Rr]e[Ss]harper 122 | *.DotSettings.user 123 | 124 | # JustCode is a .NET coding add-in 125 | .JustCode 126 | 127 | # TeamCity is a build add-in 128 | _TeamCity* 129 | 130 | # DotCover is a Code Coverage Tool 131 | *.dotCover 132 | 133 | # AxoCover is a Code Coverage Tool 134 | .axoCover/* 135 | !.axoCover/settings.json 136 | 137 | # Visual Studio code coverage results 138 | *.coverage 139 | *.coveragexml 140 | 141 | # NCrunch 142 | _NCrunch_* 143 | .*crunch*.local.xml 144 | nCrunchTemp_* 145 | 146 | # MightyMoose 147 | *.mm.* 148 | AutoTest.Net/ 149 | 150 | # Web workbench (sass) 151 | .sass-cache/ 152 | 153 | # Installshield output folder 154 | [Ee]xpress/ 155 | 156 | # DocProject is a documentation generator add-in 157 | DocProject/buildhelp/ 158 | DocProject/Help/*.HxT 159 | DocProject/Help/*.HxC 160 | DocProject/Help/*.hhc 161 | DocProject/Help/*.hhk 162 | DocProject/Help/*.hhp 163 | DocProject/Help/Html2 164 | DocProject/Help/html 165 | 166 | # Click-Once directory 167 | publish/ 168 | 169 | # Publish Web Output 170 | *.[Pp]ublish.xml 171 | *.azurePubxml 172 | # Note: Comment the next line if you want to checkin your web deploy settings, 173 | # but database connection strings (with potential passwords) will be unencrypted 174 | *.pubxml 175 | *.publishproj 176 | 177 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 178 | # checkin your Azure Web App publish settings, but sensitive information contained 179 | # in these scripts will be unencrypted 180 | PublishScripts/ 181 | 182 | # NuGet Packages 183 | *.nupkg 184 | # The packages folder can be ignored because of Package Restore 185 | **/[Pp]ackages/* 186 | # except build/, which is used as an MSBuild target. 187 | !**/[Pp]ackages/build/ 188 | # Uncomment if necessary however generally it will be regenerated when needed 189 | #!**/[Pp]ackages/repositories.config 190 | # NuGet v3's project.json files produces more ignorable files 191 | *.nuget.props 192 | *.nuget.targets 193 | 194 | # Microsoft Azure Build Output 195 | csx/ 196 | *.build.csdef 197 | 198 | # Microsoft Azure Emulator 199 | ecf/ 200 | rcf/ 201 | 202 | # Windows Store app package directories and files 203 | AppPackages/ 204 | BundleArtifacts/ 205 | Package.StoreAssociation.xml 206 | _pkginfo.txt 207 | *.appx 208 | 209 | # Visual Studio cache files 210 | # files ending in .cache can be ignored 211 | *.[Cc]ache 212 | # but keep track of directories ending in .cache 213 | !*.[Cc]ache/ 214 | 215 | # Others 216 | ClientBin/ 217 | ~$* 218 | *~ 219 | *.dbmdl 220 | *.dbproj.schemaview 221 | *.jfm 222 | *.pfx 223 | *.publishsettings 224 | orleans.codegen.cs 225 | 226 | # Including strong name files can present a security risk 227 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 228 | #*.snk 229 | 230 | # Since there are multiple workflows, uncomment next line to ignore bower_components 231 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 232 | #bower_components/ 233 | 234 | # RIA/Silverlight projects 235 | Generated_Code/ 236 | 237 | # Backup & report files from converting an old project file 238 | # to a newer Visual Studio version. Backup files are not needed, 239 | # because we have git ;-) 240 | _UpgradeReport_Files/ 241 | Backup*/ 242 | UpgradeLog*.XML 243 | UpgradeLog*.htm 244 | ServiceFabricBackup/ 245 | *.rptproj.bak 246 | 247 | # SQL Server files 248 | *.mdf 249 | *.ldf 250 | *.ndf 251 | 252 | # Business Intelligence projects 253 | *.rdl.data 254 | *.bim.layout 255 | *.bim_*.settings 256 | *.rptproj.rsuser 257 | 258 | # Microsoft Fakes 259 | FakesAssemblies/ 260 | 261 | # GhostDoc plugin setting file 262 | *.GhostDoc.xml 263 | 264 | # Node.js Tools for Visual Studio 265 | .ntvs_analysis.dat 266 | node_modules/ 267 | 268 | # Visual Studio 6 build log 269 | *.plg 270 | 271 | # Visual Studio 6 workspace options file 272 | *.opt 273 | 274 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 275 | *.vbw 276 | 277 | # Visual Studio LightSwitch build output 278 | **/*.HTMLClient/GeneratedArtifacts 279 | **/*.DesktopClient/GeneratedArtifacts 280 | **/*.DesktopClient/ModelManifest.xml 281 | **/*.Server/GeneratedArtifacts 282 | **/*.Server/ModelManifest.xml 283 | _Pvt_Extensions 284 | 285 | # Paket dependency manager 286 | .paket/paket.exe 287 | paket-files/ 288 | 289 | # FAKE - F# Make 290 | .fake/ 291 | 292 | # JetBrains Rider 293 | .idea/ 294 | *.sln.iml 295 | 296 | # CodeRush 297 | .cr/ 298 | 299 | # Python Tools for Visual Studio (PTVS) 300 | __pycache__/ 301 | *.pyc 302 | 303 | # Cake - Uncomment if you are using it 304 | # tools/** 305 | # !tools/packages.config 306 | 307 | # Tabs Studio 308 | *.tss 309 | 310 | # Telerik's JustMock configuration file 311 | *.jmconfig 312 | 313 | # BizTalk build output 314 | *.btp.cs 315 | *.btm.cs 316 | *.odx.cs 317 | *.xsd.cs 318 | 319 | # OpenCover UI analysis results 320 | OpenCover/ 321 | 322 | # Azure Stream Analytics local run output 323 | ASALocalRun/ 324 | 325 | # MSBuild Binary and Structured Log 326 | *.binlog 327 | 328 | # NVidia Nsight GPU debugger configuration file 329 | *.nvuser 330 | 331 | # MFractors (Xamarin productivity tool) working folder 332 | .mfractor/ 333 | -------------------------------------------------------------------------------- /BoosterCreator/BoosterCreator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Composition; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using ArchiSteamFarm.Core; 7 | using ArchiSteamFarm.Steam; 8 | using ArchiSteamFarm.Plugins.Interfaces; 9 | using System.Text.Json; 10 | 11 | namespace BoosterCreator { 12 | [Export(typeof(IPlugin))] 13 | public sealed class BoosterCreator : IBotModules, IBotCommand2 { 14 | public string Name => nameof(BoosterCreator); 15 | public Version Version => typeof(BoosterCreator).Assembly.GetName().Version ?? new Version("0"); 16 | 17 | public Task OnLoaded() { 18 | ASF.ArchiLogger.LogGenericInfo("BoosterCreator ASF Plugin by Out (https://steamcommunity.com/id/outzzz) | fork by Rudokhvist"); 19 | return Task.CompletedTask; 20 | } 21 | 22 | public async Task OnBotCommand(Bot bot, EAccess access, string message, string[] args, ulong steamID = 0) => await Commands.Response(bot, access, steamID, message, args).ConfigureAwait(false); 23 | 24 | public async Task OnBotInitModules(Bot bot, IReadOnlyDictionary? additionalConfigProperties = null) { 25 | if (additionalConfigProperties == null) { 26 | return; 27 | } 28 | 29 | foreach (KeyValuePair configProperty in additionalConfigProperties) { 30 | switch (configProperty.Key) { 31 | case "GamesToBooster" when configProperty.Value.ValueKind == JsonValueKind.Array && (configProperty.Value.GetArrayLength() > 0): { 32 | if (BoosterHandler.BoosterHandlers.TryGetValue(bot.BotName, out BoosterHandler? value) && (value != null)) { 33 | value!.Dispose(); 34 | BoosterHandler.BoosterHandlers[bot.BotName] = null; 35 | } 36 | 37 | bot.ArchiLogger.LogGenericInfo("Games To Booster : " + string.Join(",", configProperty.Value)); 38 | IReadOnlyCollection? gameIDs = new HashSet(configProperty.Value.EnumerateArray().Select(static elem => elem.GetUInt32())); 39 | if (gameIDs == null) { 40 | bot.ArchiLogger.LogNullError(gameIDs); 41 | } else { 42 | await Task.Run(() => BoosterHandler.BoosterHandlers[bot.BotName] = new BoosterHandler(bot, gameIDs)).ConfigureAwait(false); 43 | } 44 | break; 45 | } 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /BoosterCreator/BoosterCreator.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | Out 6 | 2.0.0.1 7 | enable 8 | latest 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BoosterCreator/BoosterHandler.cs: -------------------------------------------------------------------------------- 1 | using ArchiSteamFarm.Steam; 2 | using ArchiSteamFarm.Localization; 3 | using System; 4 | using System.Collections.Concurrent; 5 | using System.Collections.Generic; 6 | using System.Globalization; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Text.RegularExpressions; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | using SteamKit2; 13 | using JetBrains.Annotations; 14 | using AngleSharp.Dom; 15 | using System.Text.Json.Serialization; 16 | using System.Text.Json; 17 | using ArchiSteamFarm.Helpers.Json; 18 | using System.Collections.ObjectModel; 19 | 20 | namespace BoosterCreator { 21 | internal sealed class BoosterHandler : IDisposable { 22 | private readonly Bot Bot; 23 | private readonly ConcurrentDictionary GameIDs = new(); 24 | private readonly Timer BoosterTimer; 25 | 26 | internal static ConcurrentDictionary BoosterHandlers = new(); 27 | 28 | internal const int DelayBetweenBots = 5; //5 minutes between bots 29 | 30 | internal static int GetBotIndex(Bot bot) { 31 | //this can be pretty slow and memory-consuming on lage bot farm. Luckily, I don't care about cases with >10 bots 32 | List botnames = [.. BoosterHandlers.Keys]; 33 | botnames.Sort(); 34 | int index = botnames.IndexOf(bot.BotName); 35 | return 1 + (index >= 0 ? index : botnames.Count); 36 | } 37 | 38 | internal BoosterHandler(Bot bot, IReadOnlyCollection gameIDs) { 39 | Bot = bot ?? throw new ArgumentNullException(nameof(bot)); 40 | foreach (uint gameID in gameIDs) { 41 | if (GameIDs.TryAdd(gameID, DateTime.Now.AddMinutes(GetBotIndex(bot) * DelayBetweenBots))) { 42 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Auto-attempt to make booster from " + gameID.ToString() + " is planned at " + GameIDs[gameID]!.Value.ToShortDateString() + " " + GameIDs[gameID]!.Value.ToShortTimeString())); 43 | } else { 44 | bot.ArchiLogger.LogGenericError("Unable to schedule next auto-attempt"); 45 | } 46 | } 47 | 48 | BoosterTimer = new Timer( 49 | async e => await AutoBooster().ConfigureAwait(false), 50 | null, 51 | TimeSpan.FromMinutes(GetBotIndex(bot) * DelayBetweenBots), 52 | TimeSpan.FromMinutes(GetBotIndex(bot) * DelayBetweenBots) 53 | ); 54 | } 55 | 56 | public void Dispose() => BoosterTimer.Dispose(); 57 | 58 | private async Task AutoBooster() { 59 | if (!Bot.IsConnectedAndLoggedOn) { 60 | return; 61 | } 62 | 63 | await CreateBooster(Bot, GameIDs).ConfigureAwait(false); 64 | } 65 | 66 | internal static async Task CreateBooster(Bot bot, ConcurrentDictionary gameIDs) { 67 | if (gameIDs.IsEmpty) { 68 | bot.ArchiLogger.LogNullError(null, nameof(gameIDs)); 69 | 70 | return null; 71 | } 72 | IDocument? boosterPage = await WebRequest.GetBoosterPage(bot).ConfigureAwait(false); 73 | if (boosterPage == null) { 74 | bot.ArchiLogger.LogNullError(boosterPage); 75 | 76 | return Commands.FormatBotResponse(bot, string.Format(Strings.ErrorFailingRequest, nameof(boosterPage))); 77 | ; 78 | } 79 | MatchCollection gooAmounts = Regex.Matches(boosterPage.Source.Text, "(?<=parseFloat\\( \")[0-9]+"); 80 | Match info = Regex.Match(boosterPage.Source.Text, "\\[\\{\"[\\s\\S]*\"}]"); 81 | if (!info.Success || (gooAmounts.Count != 3)) { 82 | bot.ArchiLogger.LogGenericError(string.Format(Strings.ErrorParsingObject, boosterPage)); 83 | return Commands.FormatBotResponse(bot, string.Format(Strings.ErrorParsingObject, boosterPage)); 84 | } 85 | uint gooAmount = uint.Parse(gooAmounts[0].Value); 86 | uint tradableGooAmount = uint.Parse(gooAmounts[1].Value); 87 | uint unTradableGooAmount = uint.Parse(gooAmounts[2].Value); 88 | 89 | IEnumerable? enumerableBoosters = info.Value.ToJsonObject>(); 90 | if (enumerableBoosters == null) { 91 | bot.ArchiLogger.LogNullError(enumerableBoosters); 92 | return Commands.FormatBotResponse(bot, string.Format(Strings.ErrorParsingObject, nameof(enumerableBoosters))); 93 | } 94 | 95 | Dictionary boosterInfos = enumerableBoosters.ToDictionary(boosterInfo => boosterInfo.AppID); 96 | StringBuilder response = new(); 97 | 98 | foreach (KeyValuePair gameID in gameIDs) { 99 | if (!gameID.Value.HasValue || DateTime.Compare(gameID.Value.Value, DateTime.Now) <= 0) { 100 | await Task.Delay(500).ConfigureAwait(false); 101 | if (!boosterInfos.ContainsKey(gameID.Key)) { 102 | response.AppendLine(Commands.FormatBotResponse(bot, "Not eligible to create boosters from " + gameID.Key.ToString())); 103 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Not eligible to create boosters from " + gameID.Key.ToString())); 104 | //If we are not eligible - wait 8 hours, just in case game will be added to account later 105 | if (gameID.Value.HasValue) { //if source is timer, not command 106 | gameIDs[gameID.Key] = DateTime.Now.AddHours(8); 107 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Next attempt to make booster from " + gameID.Key.ToString() + " is planned at " + gameIDs[gameID.Key]!.Value.ToShortDateString() + " " + gameIDs[gameID.Key]!.Value.ToShortTimeString())); 108 | } 109 | continue; 110 | } 111 | Steam.BoosterInfo bi = boosterInfos[gameID.Key]; 112 | 113 | if (!uint.TryParse(bi.Price, out uint gemPrice)) { 114 | response.AppendLine(Commands.FormatBotResponse(bot, "Failed to create booster from " + gameID.Key.ToString())); 115 | continue; 116 | } 117 | 118 | if (gooAmount < gemPrice) { 119 | response.AppendLine(Commands.FormatBotResponse(bot, "Not enough gems to create booster from " + gameID.Key.ToString())); 120 | //If we have not enough gems - wait 8 hours, just in case gems will be added to account later 121 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Not enough gems to create booster from " + gameID.Key.ToString())); 122 | if (gameID.Value.HasValue) { //if source is timer, not command 123 | gameIDs[gameID.Key] = DateTime.Now.AddHours(8); 124 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Next attempt to make booster from " + gameID.Key.ToString() + " is planned at " + gameIDs[gameID.Key]!.Value.ToShortDateString() + " " + gameIDs[gameID.Key]!.Value.ToShortTimeString())); 125 | } 126 | continue; 127 | } 128 | 129 | if (bi.Unavailable) { 130 | 131 | //God, I hate this shit. But for now I have no idea how to predict/enforce correct format. 132 | 133 | List timeFormats = [ 134 | "d MMM @ h:mmtt", 135 | "MMM d @ h:mmtt", 136 | "d MMM, yyyy @ h:mmtt", 137 | "MMM d, yyyy @ h:mmtt", 138 | ]; 139 | 140 | DateTime availableAtTime = DateTime.MinValue; 141 | foreach (string timeFormat in timeFormats) { 142 | if (DateTime.TryParseExact(bi.AvailableAtTime, timeFormat, new CultureInfo("en-US"), DateTimeStyles.None, out availableAtTime)) { 143 | break; 144 | } 145 | } 146 | if (availableAtTime == DateTime.MinValue) { 147 | bot.ArchiLogger.LogGenericInfo("Unable to parse time \"" + bi.AvailableAtTime + "\", please report this."); 148 | availableAtTime = DateTime.Now.AddHours(8); //fallback to 8 hours in case of error 149 | } 150 | 151 | response.AppendLine(Commands.FormatBotResponse(bot, "Crafting booster from " + gameID.Key.ToString() + " will be available at time: " + bi.AvailableAtTime)); 152 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Crafting booster from " + gameID.Key.ToString() + " is not available now")); 153 | 154 | if (gameID.Value.HasValue) { //if source is timer, not command 155 | gameIDs[gameID.Key] = availableAtTime;//convertedTime; 156 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Next attempt to make booster from " + gameID.Key.ToString() + " is planned at " + gameIDs[gameID.Key]!.Value.ToShortDateString() + " " + gameIDs[gameID.Key]!.Value.ToShortTimeString())); 157 | } 158 | continue; 159 | 160 | } 161 | uint nTp; 162 | 163 | if (unTradableGooAmount > 0) { 164 | nTp = tradableGooAmount > gemPrice ? (uint) 1 : 3; 165 | } else { 166 | nTp = 2; 167 | } 168 | 169 | Steam.BoostersResponse? result = await WebRequest.CreateBooster(bot, bi.AppID, bi.Series, nTp).ConfigureAwait(false); 170 | if (result?.Result?.Result != EResult.OK) { 171 | response.AppendLine(Commands.FormatBotResponse(bot, "Failed to create booster from " + gameID.Key.ToString())); 172 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Failed to create booster from " + gameID.Key.ToString())); 173 | //Some unhandled error - wait 8 hours before retry 174 | if (gameID.Value.HasValue) { //if source is timer, not command 175 | gameIDs[gameID.Key] = DateTime.Now.AddHours(8); 176 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Next attempt to make booster from " + gameID.Key.ToString() + " is planned at " + gameIDs[gameID.Key]!.Value.ToShortDateString() + " " + gameIDs[gameID.Key]!.Value.ToShortTimeString())); 177 | } 178 | continue; 179 | } 180 | 181 | gooAmount = uint.Parse(result.GooAmount!); 182 | tradableGooAmount = uint.Parse(result.TradableGooAmount!); 183 | unTradableGooAmount = result.UntradableGooAmount; 184 | response.AppendLine(Commands.FormatBotResponse(bot, "Successfuly created booster from " + gameID.Key.ToString())); 185 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Successfuly created booster from " + gameID.Key.ToString())); 186 | //Buster was made - next is only available in 24 hours 187 | if (gameID.Value.HasValue) { //if source is timer, not command 188 | gameIDs[gameID.Key] = DateTime.Now.AddHours(24); 189 | bot.ArchiLogger.LogGenericInfo(Commands.FormatBotResponse(bot, "Next attempt to make booster from " + gameID.Key.ToString() + " is planned at " + gameIDs[gameID.Key]!.Value.ToShortDateString() + " " + gameIDs[gameID.Key]!.Value.ToShortTimeString())); 190 | } 191 | } 192 | 193 | } 194 | //Get nearest time when we should try for new booster; 195 | DateTime? nextTry = gameIDs.Values.Min(); 196 | if (nextTry.HasValue) { //if it was not from command 197 | if (BoosterHandler.BoosterHandlers[bot.BotName] != null) { 198 | BoosterHandler.BoosterHandlers[bot.BotName]!.BoosterTimer.Change(nextTry.Value - DateTime.Now + TimeSpan.FromMinutes(GetBotIndex(bot) * DelayBetweenBots), nextTry.Value - DateTime.Now + TimeSpan.FromMinutes(GetBotIndex(bot) * DelayBetweenBots)); 199 | } 200 | } 201 | return response.Length > 0 ? response.ToString() : null; 202 | } 203 | } 204 | } 205 | -------------------------------------------------------------------------------- /BoosterCreator/Commands.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Collections.Concurrent; 6 | using ArchiSteamFarm.Core; 7 | using ArchiSteamFarm.Steam; 8 | using ArchiSteamFarm.Localization; 9 | 10 | namespace BoosterCreator { 11 | internal static class Commands { 12 | internal static async Task Response(Bot bot, EAccess access, ulong steamID, string message, string[] args) { 13 | if (string.IsNullOrEmpty(message)) { 14 | return null; 15 | } 16 | return args[0].ToUpperInvariant() switch { 17 | "BOOSTER" when args.Length > 2 => await ResponseBooster(access, steamID, args[1], args[2]).ConfigureAwait(false), 18 | "BOOSTER" => await ResponseBooster(bot, access, args[1]).ConfigureAwait(false), 19 | _ => null, 20 | }; 21 | } 22 | 23 | internal static readonly char[] Separator = [',']; 24 | 25 | private static async Task ResponseBooster(Bot bot, EAccess access, string targetGameIDs) { 26 | if (string.IsNullOrEmpty(targetGameIDs)) { 27 | ASF.ArchiLogger.LogNullError(null, nameof(targetGameIDs)); 28 | 29 | return null; 30 | } 31 | 32 | if (access < EAccess.Operator) { 33 | return null; 34 | } 35 | 36 | if (!bot.IsConnectedAndLoggedOn) { 37 | return FormatBotResponse(bot, Strings.BotNotConnected); 38 | } 39 | 40 | string[] gameIDs = targetGameIDs.Split(Separator, StringSplitOptions.RemoveEmptyEntries); 41 | 42 | if (gameIDs.Length == 0) { 43 | return FormatBotResponse(bot, string.Format(Strings.ErrorIsEmpty, nameof(gameIDs))); 44 | } 45 | 46 | 47 | ConcurrentDictionary gamesToBooster = new(); 48 | //HashSet gamesToBooster = new HashSet(); 49 | 50 | foreach (string game in gameIDs) { 51 | if (!uint.TryParse(game, out uint gameID) || (gameID == 0)) { 52 | return FormatBotResponse(bot, string.Format(Strings.ErrorParsingObject, nameof(gameID))); 53 | } 54 | 55 | gamesToBooster.TryAdd(gameID, null); 56 | } 57 | 58 | return await BoosterHandler.CreateBooster(bot, gamesToBooster).ConfigureAwait(false); 59 | } 60 | 61 | private static async Task ResponseBooster(EAccess access, ulong steamID, string botNames, string targetGameIDs) { 62 | if (string.IsNullOrEmpty(botNames) || string.IsNullOrEmpty(targetGameIDs)) { 63 | ASF.ArchiLogger.LogNullError(null, nameof(botNames) + " || " + nameof(targetGameIDs)); 64 | 65 | return null; 66 | } 67 | 68 | HashSet? bots = Bot.GetBots(botNames); 69 | 70 | if ((bots == null) || (bots.Count == 0)) { 71 | return access >= EAccess.Owner ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null; 72 | } 73 | 74 | IList results = await Utilities.InParallel(bots.Select(bot => ResponseBooster(bot, ArchiSteamFarm.Steam.Interaction.Commands.GetProxyAccess(bot, access, steamID), targetGameIDs))).ConfigureAwait(false); 75 | 76 | List responses = new(results.Where(result => !string.IsNullOrEmpty(result))); 77 | 78 | return responses.Count > 0 ? string.Join(Environment.NewLine, responses) : null; 79 | } 80 | 81 | internal static string FormatStaticResponse(string response) => ArchiSteamFarm.Steam.Interaction.Commands.FormatStaticResponse(response); 82 | internal static string FormatBotResponse(Bot bot, string response) => bot.Commands.FormatBotResponse(response); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /BoosterCreator/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. 3 | // Project-level suppressions either have no target or are given 4 | // a specific target and scoped to a namespace, type, member, etc. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | 8 | [assembly: SuppressMessage("Performance", "SYSLIB1045:Convert to 'GeneratedRegexAttribute'.", Justification = "", Scope = "member", Target = "~M:BoosterCreator.BoosterHandler.CreateBooster(ArchiSteamFarm.Steam.Bot,System.Collections.Concurrent.ConcurrentDictionary{System.UInt32,System.Nullable{System.DateTime}})~System.Threading.Tasks.Task{System.String}")] 9 | -------------------------------------------------------------------------------- /BoosterCreator/Json.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.CodeAnalysis; 2 | using System.Text.Json.Serialization; 3 | using ArchiSteamFarm.Helpers.Json; 4 | using SteamKit2; 5 | 6 | namespace BoosterCreator { 7 | internal class Steam { 8 | internal class EResultResponse { 9 | [JsonInclude] 10 | [JsonPropertyName("success")] 11 | [JsonRequired] 12 | public EResult Result { get; private init; } 13 | 14 | [JsonConstructor] 15 | public EResultResponse() { } 16 | } 17 | 18 | internal sealed class BoosterInfo { 19 | [JsonInclude] 20 | [JsonPropertyName("appid")] 21 | [JsonRequired] 22 | internal uint AppID { get; private init; } 23 | 24 | [JsonInclude] 25 | [JsonPropertyName("name")] 26 | [JsonRequired] 27 | internal string Name { get; private init; } 28 | 29 | [JsonInclude] 30 | [JsonPropertyName("series")] 31 | [JsonRequired] 32 | internal uint Series { get; private init; } 33 | 34 | [JsonInclude] 35 | [JsonPropertyName("price")] 36 | [JsonRequired] 37 | internal string Price { get; private init; } 38 | 39 | [JsonInclude] 40 | [JsonPropertyName("unavailable")] 41 | internal bool Unavailable { get; private init; } 42 | 43 | [JsonInclude] 44 | [JsonPropertyName("available_at_time")] 45 | internal string AvailableAtTime { get; private init; } 46 | 47 | [JsonConstructor] 48 | private BoosterInfo() { 49 | Price = ""; 50 | Name = ""; 51 | AvailableAtTime = ""; 52 | } 53 | } 54 | 55 | 56 | internal sealed class BoostersResponse { 57 | [JsonInclude] 58 | [JsonPropertyName("goo_amount")] 59 | [JsonRequired] 60 | internal string? GooAmount { get; private init; } 61 | 62 | [JsonInclude] 63 | [JsonPropertyName("tradable_goo_amount")] 64 | [JsonRequired] 65 | internal string? TradableGooAmount { get; private init; } 66 | 67 | [JsonInclude] 68 | [JsonPropertyName("untradable_goo_amount")] 69 | [JsonRequired] 70 | internal uint UntradableGooAmount { get; private init; } 71 | 72 | [JsonInclude] 73 | [JsonPropertyName("purchase_result")] 74 | [JsonDisallowNull] 75 | internal EResultResponse Result { get; private init; } 76 | 77 | [JsonConstructor] 78 | private BoostersResponse() => Result = new EResultResponse(); 79 | } 80 | } 81 | } 82 | #pragma warning restore 649 83 | -------------------------------------------------------------------------------- /BoosterCreator/WebRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using AngleSharp.Dom; 5 | using ArchiSteamFarm.Steam; 6 | using ArchiSteamFarm.Steam.Integration; 7 | using ArchiSteamFarm.Web.Responses; 8 | 9 | namespace BoosterCreator { 10 | internal static class WebRequest { 11 | internal static async Task GetBoosterPage(Bot bot) { 12 | Uri request = new(ArchiWebHandler.SteamCommunityURL, "/tradingcards/boostercreator?l=english"); 13 | HtmlDocumentResponse? boosterPageResponse = await bot.ArchiWebHandler.UrlGetToHtmlDocumentWithSession(request).ConfigureAwait(false); 14 | return boosterPageResponse?.Content; 15 | } 16 | 17 | internal static async Task CreateBooster(Bot bot, uint appID, uint series, uint nTradabilityPreference) { 18 | if (appID == 0) { 19 | bot.ArchiLogger.LogNullError(null, nameof(appID)); 20 | 21 | return null; 22 | } 23 | 24 | Uri request = new(ArchiWebHandler.SteamCommunityURL, "/tradingcards/ajaxcreatebooster"); 25 | 26 | // Extra entry for sessionID 27 | Dictionary data = new(4) { 28 | { "appid", appID.ToString() }, 29 | { "series", series.ToString() }, 30 | { "tradability_preference", nTradabilityPreference.ToString() } 31 | }; 32 | 33 | ObjectResponse? createBoosterResponse = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession(request, data: data).ConfigureAwait(false); 34 | 35 | return createBoosterResponse?.Content; 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LICENSE-2.0.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ASF Booster Creator Plugin 2 | 3 | # Maintenance status 4 | 5 | This plugin is not actively developed, and only maintained on last priority basis. I recommend to use [BoosterManager by Citrinate](https://github.com/Citrinate/BoosterManager) instead, if you want to benefit from new features and get support in timely manner. 6 | 7 | # ATTENTION! This plugin only works with ASF-generic! 8 | 9 | # Introduction 10 | This plugin was made by [Outzzz](https://github.com/Outzzz), but after some time it got removed from github. Luckily I forked it before that, and as it was published under Apache 2.0 license I can continue development of this plugin. I tried to improve it a little, you can check what changes I made to it in git commits history.
11 | As title says, aim of this plugin is giving a user an easy way to create booster packs from gems, both by command and automatically. 12 | 13 | ## Installation 14 | - download `BoosterCreator.zip` file from [latest release](https://github.com/Rudokhvist/BoosterCreator/releases/latest) 15 | - unpack downloaded .zip file to `plugins` folder inside your ASF folder. 16 | - (re)start ASF, you should get a message indicating that plugin loaded successfully. 17 | 18 | ## Usage 19 | There is two ways to create boosters with this plugin: manual and automatic. 20 | To manually create booster just send ASF command `booster `, and ASF will try to create boosters from specified games on selected bots.
21 | Example: `booster bot1 730`
22 | To automatically create boosters you can add to config of your bot(s) parameter `GamesToBooster`, of type "array of uint". ASF will create boosters from specified games as long as there is enough gems, automatically waiting for cooldowns.
23 | Example: `"GamesToBooster": [730, 570],`
24 | 25 | ![downloads](https://img.shields.io/github/downloads/Rudokhvist/BoosterCreator/total.svg?style=social) 26 | -------------------------------------------------------------------------------- /build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem getting current dir name by Tamara Wijsman, https://superuser.com/questions/160702 3 | for %%I in (.) do set CurrDirName=%%~nxI 4 | 5 | rem download submodule 6 | if not exist ArchiSteamFarm\ArchiSteamFarm (git submodule update --init) 7 | 8 | if [%1]==[] goto noarg 9 | rem update submodule to required tag, if specified... 10 | git submodule foreach "git fetch origin; git checkout %1;" 11 | goto continue 12 | :noarg 13 | rem ...otherwise update submodule to latest tag 14 | git submodule foreach "git fetch origin; git checkout $(git rev-list --tags --max-count=1);" 15 | :continue 16 | rem print what version we are building for 17 | git submodule foreach "git describe --tags;" 18 | 19 | rem wipe out old build 20 | if exist out rmdir /Q /S out 21 | 22 | rem release generic version 23 | 24 | dotnet publish -c "Release" -f "net8.0" -o "out/generic" "/p:LinkDuringPublish=false" 25 | mkdir .\out\%CurrDirName% 26 | copy .\out\generic\%CurrDirName%.dll .\out\%CurrDirName% 27 | rem comment section below (downto :zip label) if you don't want to include documentation 28 | if not exist README.md (goto zip) 29 | where /q pandoc.exe 30 | if ERRORLEVEL 1 ( 31 | copy README.md .\out\%CurrDirName% 32 | goto zip 33 | ) else ( 34 | pandoc --metadata title="%CurrDirName%" --standalone --columns 2000 -f markdown -t html --self-contained -c .\github-pandoc.css -o .\out\%CurrDirName%\README.html README.md 35 | ) 36 | :zip 37 | 7z a -tzip -mx7 .\out\%CurrDirName%.zip .\out\%CurrDirName% 38 | rmdir /Q /S out\%CurrDirName% 39 | 40 | -------------------------------------------------------------------------------- /github-pandoc.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v2.1.3 | MIT License | git.io/normalize */ 2 | 3 | /* ========================================================================== 4 | HTML5 display definitions 5 | ========================================================================== */ 6 | 7 | /** 8 | * Correct `block` display not defined in IE 8/9. 9 | */ 10 | 11 | article, 12 | aside, 13 | details, 14 | figcaption, 15 | figure, 16 | footer, 17 | header, 18 | hgroup, 19 | main, 20 | nav, 21 | section, 22 | summary { 23 | display: block; 24 | } 25 | 26 | /** 27 | * Correct `inline-block` display not defined in IE 8/9. 28 | */ 29 | 30 | audio, 31 | canvas, 32 | video { 33 | display: inline-block; 34 | } 35 | 36 | /** 37 | * Prevent modern browsers from displaying `audio` without controls. 38 | * Remove excess height in iOS 5 devices. 39 | */ 40 | 41 | audio:not([controls]) { 42 | display: none; 43 | height: 0; 44 | } 45 | 46 | /** 47 | * Address `[hidden]` styling not present in IE 8/9. 48 | * Hide the `template` element in IE, Safari, and Firefox < 22. 49 | */ 50 | 51 | [hidden], 52 | template { 53 | display: none; 54 | } 55 | 56 | /* ========================================================================== 57 | Base 58 | ========================================================================== */ 59 | 60 | /** 61 | * 1. Set default font family to sans-serif. 62 | * 2. Prevent iOS text size adjust after orientation change, without disabling 63 | * user zoom. 64 | */ 65 | 66 | html { 67 | font-family: sans-serif; /* 1 */ 68 | -ms-text-size-adjust: 100%; /* 2 */ 69 | -webkit-text-size-adjust: 100%; /* 2 */ 70 | } 71 | 72 | /** 73 | * Remove default margin. 74 | */ 75 | 76 | body { 77 | margin: 0; 78 | } 79 | 80 | /* ========================================================================== 81 | Links 82 | ========================================================================== */ 83 | 84 | /** 85 | * Remove the gray background color from active links in IE 10. 86 | */ 87 | 88 | a { 89 | background: transparent; 90 | } 91 | 92 | /** 93 | * Address `outline` inconsistency between Chrome and other browsers. 94 | */ 95 | 96 | a:focus { 97 | outline: thin dotted; 98 | } 99 | 100 | /** 101 | * Improve readability when focused and also mouse hovered in all browsers. 102 | */ 103 | 104 | a:active, 105 | a:hover { 106 | outline: 0; 107 | } 108 | 109 | /* ========================================================================== 110 | Typography 111 | ========================================================================== */ 112 | 113 | /** 114 | * Address variable `h1` font-size and margin within `section` and `article` 115 | * contexts in Firefox 4+, Safari 5, and Chrome. 116 | */ 117 | 118 | h1 { 119 | font-size: 2em; 120 | margin: 0.67em 0; 121 | } 122 | 123 | /** 124 | * Address styling not present in IE 8/9, Safari 5, and Chrome. 125 | */ 126 | 127 | abbr[title] { 128 | border-bottom: 1px dotted; 129 | } 130 | 131 | /** 132 | * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bold; 138 | } 139 | 140 | /** 141 | * Address styling not present in Safari 5 and Chrome. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Address differences between Firefox and other browsers. 150 | */ 151 | 152 | hr { 153 | -moz-box-sizing: content-box; 154 | box-sizing: content-box; 155 | height: 0; 156 | } 157 | 158 | /** 159 | * Address styling not present in IE 8/9. 160 | */ 161 | 162 | mark { 163 | background: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Correct font family set oddly in Safari 5 and Chrome. 169 | */ 170 | 171 | code, 172 | kbd, 173 | pre, 174 | samp { 175 | font-family: monospace, serif; 176 | font-size: 1em; 177 | } 178 | 179 | /** 180 | * Improve readability of pre-formatted text in all browsers. 181 | */ 182 | 183 | pre { 184 | white-space: pre-wrap; 185 | } 186 | 187 | /** 188 | * Set consistent quote types. 189 | */ 190 | 191 | q { 192 | quotes: "\201C" "\201D" "\2018" "\2019"; 193 | } 194 | 195 | /** 196 | * Address inconsistent and variable font size in all browsers. 197 | */ 198 | 199 | small { 200 | font-size: 80%; 201 | } 202 | 203 | /** 204 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 205 | */ 206 | 207 | sub, 208 | sup { 209 | font-size: 75%; 210 | line-height: 0; 211 | position: relative; 212 | vertical-align: baseline; 213 | } 214 | 215 | sup { 216 | top: -0.5em; 217 | } 218 | 219 | sub { 220 | bottom: -0.25em; 221 | } 222 | 223 | /* ========================================================================== 224 | Embedded content 225 | ========================================================================== */ 226 | 227 | /** 228 | * Remove border when inside `a` element in IE 8/9. 229 | */ 230 | 231 | img { 232 | border: 0; 233 | } 234 | 235 | /** 236 | * Correct overflow displayed oddly in IE 9. 237 | */ 238 | 239 | svg:not(:root) { 240 | overflow: hidden; 241 | } 242 | 243 | /* ========================================================================== 244 | Figures 245 | ========================================================================== */ 246 | 247 | /** 248 | * Address margin not present in IE 8/9 and Safari 5. 249 | */ 250 | 251 | figure { 252 | margin: 0; 253 | } 254 | 255 | /* ========================================================================== 256 | Forms 257 | ========================================================================== */ 258 | 259 | /** 260 | * Define consistent border, margin, and padding. 261 | */ 262 | 263 | fieldset { 264 | border: 1px solid #c0c0c0; 265 | margin: 0 2px; 266 | padding: 0.35em 0.625em 0.75em; 267 | } 268 | 269 | /** 270 | * 1. Correct `color` not being inherited in IE 8/9. 271 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 272 | */ 273 | 274 | legend { 275 | border: 0; /* 1 */ 276 | padding: 0; /* 2 */ 277 | } 278 | 279 | /** 280 | * 1. Correct font family not being inherited in all browsers. 281 | * 2. Correct font size not being inherited in all browsers. 282 | * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. 283 | */ 284 | 285 | button, 286 | input, 287 | select, 288 | textarea { 289 | font-family: inherit; /* 1 */ 290 | font-size: 100%; /* 2 */ 291 | margin: 0; /* 3 */ 292 | } 293 | 294 | /** 295 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 296 | * the UA stylesheet. 297 | */ 298 | 299 | button, 300 | input { 301 | line-height: normal; 302 | } 303 | 304 | /** 305 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 306 | * All other form control elements do not inherit `text-transform` values. 307 | * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. 308 | * Correct `select` style inheritance in Firefox 4+ and Opera. 309 | */ 310 | 311 | button, 312 | select { 313 | text-transform: none; 314 | } 315 | 316 | /** 317 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 318 | * and `video` controls. 319 | * 2. Correct inability to style clickable `input` types in iOS. 320 | * 3. Improve usability and consistency of cursor style between image-type 321 | * `input` and others. 322 | */ 323 | 324 | button, 325 | html input[type="button"], /* 1 */ 326 | input[type="reset"], 327 | input[type="submit"] { 328 | -webkit-appearance: button; /* 2 */ 329 | cursor: pointer; /* 3 */ 330 | } 331 | 332 | /** 333 | * Re-set default cursor for disabled elements. 334 | */ 335 | 336 | button[disabled], 337 | html input[disabled] { 338 | cursor: default; 339 | } 340 | 341 | /** 342 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 343 | * 2. Remove excess padding in IE 8/9/10. 344 | */ 345 | 346 | input[type="checkbox"], 347 | input[type="radio"] { 348 | box-sizing: border-box; /* 1 */ 349 | padding: 0; /* 2 */ 350 | } 351 | 352 | /** 353 | * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 354 | * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 355 | * (include `-moz` to future-proof). 356 | */ 357 | 358 | input[type="search"] { 359 | -webkit-appearance: textfield; /* 1 */ 360 | -moz-box-sizing: content-box; 361 | -webkit-box-sizing: content-box; /* 2 */ 362 | box-sizing: content-box; 363 | } 364 | 365 | /** 366 | * Remove inner padding and search cancel button in Safari 5 and Chrome 367 | * on OS X. 368 | */ 369 | 370 | input[type="search"]::-webkit-search-cancel-button, 371 | input[type="search"]::-webkit-search-decoration { 372 | -webkit-appearance: none; 373 | } 374 | 375 | /** 376 | * Remove inner padding and border in Firefox 4+. 377 | */ 378 | 379 | button::-moz-focus-inner, 380 | input::-moz-focus-inner { 381 | border: 0; 382 | padding: 0; 383 | } 384 | 385 | /** 386 | * 1. Remove default vertical scrollbar in IE 8/9. 387 | * 2. Improve readability and alignment in all browsers. 388 | */ 389 | 390 | textarea { 391 | overflow: auto; /* 1 */ 392 | vertical-align: top; /* 2 */ 393 | } 394 | 395 | /* ========================================================================== 396 | Tables 397 | ========================================================================== */ 398 | 399 | /** 400 | * Remove most spacing between table cells. 401 | */ 402 | 403 | table { 404 | border-collapse: collapse; 405 | border-spacing: 0; 406 | } 407 | 408 | .go-top { 409 | position: fixed; 410 | bottom: 2em; 411 | right: 2em; 412 | text-decoration: none; 413 | background-color: #E0E0E0; 414 | font-size: 12px; 415 | padding: 1em; 416 | display: inline; 417 | } 418 | 419 | /* Github css */ 420 | 421 | html,body{ margin: auto; 422 | padding-right: 1em; 423 | padding-left: 1em; 424 | color:black;}*:not('#mkdbuttons'){margin:0;padding:0}body{font:13.34px helvetica,arial,freesans,clean,sans-serif;-webkit-font-smoothing:subpixel-antialiased;line-height:1.4;padding:3px;background:#fff;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}p{margin:1em 0}a{color:#4183c4;text-decoration:none}body{background-color:#fff;padding:30px;margin:15px;font-size:14px;line-height:1.6}body>*:first-child{margin-top:0!important}body>*:last-child{margin-bottom:0!important}@media screen{body{box-shadow:0 0 0 1px #cacaca,0 0 0 4px #eee}}h1,h2,h3,h4,h5,h6{margin:20px 0 10px;padding:0;font-weight:bold;-webkit-font-smoothing:subpixel-antialiased;cursor:text}h1{font-size:28px;color:#000}h2{font-size:24px;border-bottom:1px solid #ccc;color:#000}h3{font-size:18px;color:#333}h4{font-size:16px;color:#333}h5{font-size:14px;color:#333}h6{color:#777;font-size:14px}p,blockquote,table,pre{margin:15px 0}ul{padding-left:30px}ol{padding-left:30px}ol li ul:first-of-type{margin-top:0}hr{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;border:0 none;color:#ccc;height:4px;padding:0}body>h2:first-child{margin-top:0;padding-top:0}body>h1:first-child{margin-top:0;padding-top:0}body>h1:first-child+h2{margin-top:0;padding-top:0}body>h3:first-child,body>h4:first-child,body>h5:first-child,body>h6:first-child{margin-top:0;padding-top:0}a:first-child h1,a:first-child h2,a:first-child h3,a:first-child h4,a:first-child h5,a:first-child h6{margin-top:0;padding-top:0}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p,ul li>:first-child,ol li>:first-child{margin-top:0}dl{padding:0}dl dt{font-size:14px;font-weight:bold;font-style:italic;padding:0;margin:15px 0 5px}dl dt:first-child{padding:0}dl dt>:first-child{margin-top:0}dl dt>:last-child{margin-bottom:0}dl dd{margin:0 0 15px;padding:0 15px}dl dd>:first-child{margin-top:0}dl dd>:last-child{margin-bottom:0}blockquote{border-left:4px solid #DDD;padding:0 15px;color:#777}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}table{border-collapse:collapse;border-spacing:0;font-size:100%;font:inherit}table th{font-weight:bold;border:1px solid #ccc;padding:6px 13px}table td{border:1px solid #ccc;padding:6px 13px}table tr{border-top:1px solid #ccc;background-color:#fff}table tr:nth-child(2n){background-color:#f8f8f8}img{max-width:100%}code,tt{margin:0 2px;padding:0 5px;white-space:nowrap;border:1px solid #eaeaea;background-color:#f8f8f8;border-radius:3px;font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;color:#333}pre>code{margin:0;padding:0;white-space:pre;border:0;background:transparent}.highlight pre{background-color:#f8f8f8;border:1px solid #ccc;font-size:13px;line-height:19px;overflow:auto;padding:6px 10px;border-radius:3px}pre{background-color:#f8f8f8;border:1px solid #ccc;font-size:13px;line-height:19px;overflow:auto;padding:6px 10px;border-radius:3px}pre code,pre tt{background-color:transparent;border:0}.poetry pre{font-family:Georgia,Garamond,serif!important;font-style:italic;font-size:110%!important;line-height:1.6em;display:block;margin-left:1em}.poetry pre code{font-family:Georgia,Garamond,serif!important;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;white-space:pre-wrap}sup,sub,a.footnote{font-size:1.4ex;height:0;line-height:1;vertical-align:super;position:relative}sub{vertical-align:sub;top:-1px}@media print{body{background:#fff}img,pre,blockquote,table,figure{page-break-inside:avoid}body{background:#fff;border:0}code{background-color:#fff;color:#333!important;padding:0 .2em;border:1px solid #dedede}pre{background:#fff}pre code{background-color:white!important;overflow:visible}}@media screen{body.inverted{color:#eee!important;border-color:#555;box-shadow:none}.inverted body,.inverted hr .inverted p,.inverted td,.inverted li,.inverted h1,.inverted h2,.inverted h3,.inverted h4,.inverted h5,.inverted h6,.inverted th,.inverted .math,.inverted caption,.inverted dd,.inverted dt,.inverted blockquote{color:#eee!important;border-color:#555;box-shadow:none}.inverted td,.inverted th{background:#333}.inverted h2{border-color:#555}.inverted hr{border-color:#777;border-width:1px!important}::selection{background:rgba(157,193,200,0.5)}h1::selection{background-color:rgba(45,156,208,0.3)}h2::selection{background-color:rgba(90,182,224,0.3)}h3::selection,h4::selection,h5::selection,h6::selection,li::selection,ol::selection{background-color:rgba(133,201,232,0.3)}code::selection{background-color:rgba(0,0,0,0.7);color:#eee}code span::selection{background-color:rgba(0,0,0,0.7)!important;color:#eee!important}a::selection{background-color:rgba(255,230,102,0.2)}.inverted a::selection{background-color:rgba(255,230,102,0.6)}td::selection,th::selection,caption::selection{background-color:rgba(180,237,95,0.5)}.inverted{background:#0b2531;background:#252a2a}.inverted body{background:#252a2a}.inverted a{color:#acd1d5}}.highlight .c{color:#998;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k,.highlight .o{font-weight:bold}.highlight .cm{color:#998;font-style:italic}.highlight .cp{color:#999;font-weight:bold}.highlight .c1{color:#998;font-style:italic}.highlight .cs{color:#999;font-weight:bold;font-style:italic}.highlight .gd{color:#000;background-color:#fdd}.highlight .gd .x{color:#000;background-color:#faa}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#999}.highlight .gi{color:#000;background-color:#dfd}.highlight .gi .x{color:#000;background-color:#afa}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:bold}.highlight .gu{color:#800080;font-weight:bold}.highlight .gt{color:#a00}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr{font-weight:bold}.highlight .kt{color:#458;font-weight:bold}.highlight .m{color:#099}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .nb{color:#0086b3}.highlight .nc{color:#458;font-weight:bold}.highlight .no{color:#008080}.highlight .ni{color:#800080}.highlight .ne,.highlight .nf{color:#900;font-weight:bold}.highlight .nn{color:#555}.highlight .nt{color:#000080}.highlight .nv{color:#008080}.highlight .ow{font-weight:bold}.highlight .w{color:#bbb}.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#099}.highlight .sb,.highlight .sc,.highlight .sd,.highlight .s2,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .bp{color:#999}.highlight .vc,.highlight .vg,.highlight .vi{color:#008080}.highlight .il{color:#099}.highlight .gc{color:#999;background-color:#eaf2f5}.type-csharp .highlight .k,.type-csharp .highlight .kt{color:#00F}.type-csharp .highlight .nf{color:#000;font-weight:normal}.type-csharp .highlight .nc{color:#2b91af}.type-csharp .highlight .nn{color:#000}.type-csharp .highlight .s,.type-csharp .highlight .sc{color:#a31515} 425 | --------------------------------------------------------------------------------