Advertisement
Guest User

autocomplete(not completed xD)

a guest
Aug 14th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.IO;
  5. using System.Runtime.InteropServices;
  6. using System.Windows.Forms;
  7. using Newtonsoft.Json;
  8.  
  9. namespace BO2_Console
  10. {
  11.     public class Commands
  12.     {
  13.         public string night = "r_lightTweakSunColor 0.8 0.8 0.8 \n" +
  14.                        "r_lightTweakSunLight 7 \n " +
  15.                        "r_lightTweakSunDirection \n" +
  16.                        "sm_enable 1 \n" +
  17.                        "sm_maxLights 1 \n" +
  18.                        "sm_polygonoffsetscale 5 \n" +
  19.                        "sm_polygonoffsetbias 0.2 \n" +
  20.                        "sm_polygonoffsetbias 0.8 \n" +
  21.                        "sm_sunSampleSizeNear 0.8 \n" +
  22.                        "sm_sunShadowScale 1 \n" +
  23.                        "r_skyColorTemp \n" +
  24.                        "r_sky_intensity_factor0 0 \n" +
  25.                        "r_sky_intensity_factor 0 \n";
  26.  
  27.         public string threefps = "com_maxfps 30 \n" + "timescale 0.1";
  28.         public string sixfps = "com_maxfps 30 \n" + "timescale 0.05";
  29.         public string maxfps = "com_maxfps 30 \n" + "timescale 0.01";
  30.  
  31.         public string quality = " r_lodbiasSkinned -1000\n" +
  32.                          "r_lodbiasRigid -1000";
  33.  
  34.         public string hud = "hud_health_pulserate_critical 0\n " +
  35.                      "hud_health_pulserate_injured 0\n" +
  36.                      "hud_health_startpulse_critical 0\n" +
  37.                      "hud_health_startpulse_injured 0\n" +
  38.                      "hud_healthOverlay_phaseEnd_pulseDuration 0\n" +
  39.                      "hud_healthOverlay_phaseEnd_toAlpha 0\n" +
  40.                      "hud_healthOverlay_phaseOne_pulseDuration 0\n" +
  41.                      "hud_healthOverlay_phaseThree_pulseDuration 0\n" +
  42.                      "hud_healthOverlay_phaseThree_toAlphaMultiplier 0\n" +
  43.                      "hud_healthOverlay_phaseTwo_pulseDuration 0\n" +
  44.                      "hud_healthOverlay_phaseTwo_toAlphaMultiplier 0\n" +
  45.                      "hud_healthOverlay_pulseStart 0\n" +
  46.                      "hud_healthOverlay_regenPauseTime 0\n" +
  47.                      "r_blur 0\n" +
  48.                      "r_detail 1\n" +
  49.                      "r_distortion 1\n" +
  50.                      "r_drawWater 1\n" +
  51.                      "r_forceLod 0\n" +
  52.                      "r_lodBiasRigid - 1000\n" +
  53.                      "r_lodBiasSkinned - 1000\n" +
  54.                      "r_lodScaleRigid 1\n" +
  55.                      "r_lodScaleSkinned 1\n" +
  56.                      "r_normalMap 1\n" +
  57.                      "r_rendererinuse shader model 3.0\n" +
  58.                      "r_rendererPreference shader model 3.0";
  59.  
  60.         public string greenscreen = "r_modellimit 0 \n" + "r_skipPvs 1\n" + "r_lockPvs .875\n" + "r_bloomTweaks 1\n" +
  61.                              "r_bloomHiQuality 0\n" +
  62.                              "r_clearColor 0 1 0 0\n" +
  63.                              "r_clearColor2 0 1 0 0\n" +
  64.                              "r_znear 10000\n" +
  65.                              "r_zfar 0.000001\n" +
  66.                              "r_glow_allowed 0\n" +
  67.                              "r_glowtweakbloomintensity 0\n" +
  68.                              "r_glowtweakradius 0\n" +
  69.                              "r_glowTweakEnable 0\n" +
  70.                              "r_glowUseTweaks 0\n" +
  71.                              "r_glow 0\n" +
  72.                              "r_glow_allowed 0\n" +
  73.                              "r_seethru_decal_enable 0\n" +
  74.                              "r_drawdecals 0\n" + "cg_drawgun 1";
  75.  
  76.         public string regular = "r_modellimit 1000\n" +
  77.                          "r_skipPvs 0\n" +
  78.                          "r_lockPvs 0\n" +
  79.                          "r_clearColor 0 0 0 0\n" +
  80.                          "r_clearColor2 0 0 0 0\n" +
  81.                          "r_bloomTweaks 0\n" +
  82.                          "r_bloomHiQuality 1\n" +
  83.                          "r_znear 10000\n" +
  84.                          "r_zfar 0\n" +
  85.                          "r_glow_allowed 1\n" +
  86.                          "r_glowtweakbloomintensity 1\n" +
  87.                          "r_glowtweakradius 1\n" +
  88.                          "r_glowTweakEnable 1\n" +
  89.                          "r_glowUseTweaks 1\n" +
  90.                          "r_glow 1\n" +
  91.                          "r_glow_allowed 1\n" +
  92.                          "r_seethru_decal_enable 1\n" +
  93.                          "r_drawdecals 1\n";
  94.  
  95.         public string regular2 = "r_modellimit 1000\n" +
  96.                           "r_skipPvs 0\n" +
  97.                           "r_lockPvs 0\n" +
  98.                           "r_clearColor 0 0 0 0\n" +
  99.                           "r_clearColor2 0 0 0 0\n" +
  100.                           "r_bloomTweaks 0\n" +
  101.                           "r_bloomHiQuality 1\n" +
  102.                           "r_znear 10000\n" +
  103.                           "r_zfar 0\n" +
  104.                           "r_glow_allowed 1\n" +
  105.                           "r_glowtweakbloomintensity 1\n" +
  106.                           "r_glowtweakradius 1\n" +
  107.                           "r_glowTweakEnable 1\n" +
  108.                           "r_glowUseTweaks 1\n" +
  109.                           "r_glow 1\n" +
  110.                           "r_glow_allowed 1\n" +
  111.                           "r_seethru_decal_enable 1\n" +
  112.                           "r_drawdecals 1\n" + "cg_drawgun 0";
  113.  
  114.         public string greensky = "r_modellimit 0\n" + "r_clearcolor 0 1 0\n" + "r_clearcolor2 0 1 0\n" +
  115.                           "r_bloomtweaks 1\n";
  116.  
  117.         public string depth = "r_Dof_Enable 0\n" +
  118.                        "r_dof_bias 0\n" +
  119.                        "r_dof_farBlur 0\n" +
  120.                        "r_dof_farEnd 5\n" +
  121.                        "r_dof_farStart 0\n" +
  122.                        "r_dof_nearBlur 0\n" +
  123.                        "r_dof_nearEnd 0\n" +
  124.                        "r_dof_nearStart 0\n" +
  125.                        "r_dof_tweak 1\n" +
  126.                        "r_dof_tweak_enable 1\n" +
  127.                        "r_enablePlayerShadow 0\n" +
  128.                        "r_exposureTweak 1\n" +
  129.                        "r_exposureValue 16\n" +
  130.                        "r_sky_intensity_factor 0\n" +
  131.                        "r_modellimit 40\n" +
  132.                        "r_clearcolor 1 1 1 0\n" +
  133.                        "r_clearcolor2 1 1 1 0\n" +
  134.                        "r_bloomtweaks 1";
  135.  
  136.         public string depthoff = "cg_draw2d 1\n " +
  137.                           "r_enablePlayerShadow 0\n " +
  138.                           "r_exposureTweak 0\n " +
  139.                           "r_exposureValue 12.5\n " +
  140.                           "r_sky_intensity_factor 1\n " +
  141.                           "r_modellimit 1024\n " +
  142.                           "r_clearcolor 1 1 1 0\n " +
  143.                           "r_clearcolor2 1 1 1 0\n " +
  144.                           "r_bloomtweaks 0";
  145.  
  146.         public string greenplayers = "r_zfar 1\n" + "r_lockPvs 0\n" + "r_modelLimit 0\n" + "r_clearColor 0 1 0 1\n" +
  147.                               "r_clearColor2 0 1 0 1\n" + "r_bloomTweaks 1";
  148.  
  149.         internal Dictionary<string, string> cmd = new Dictionary<string, string>();
  150.  
  151.         Commands()
  152.         {
  153.             var json = File.ReadAllText("dvar.json");
  154.             cmd = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
  155.         }
  156.  
  157.         internal List<string> FindCmd(string token)
  158.         {
  159.             List<string> list = new List<string>(cmd.Keys);
  160.             var result = list.Where(x => x.StartsWith(token));
  161.             return result.ToList();
  162.         }
  163.  
  164.         internal string GetHelp(string token)
  165.         {
  166.             return cmd.TryGetValue(token, out string res)
  167.                 ? res
  168.                 : "Command not found";
  169.         }
  170.  
  171.         internal void TypeString(string str)
  172.         {
  173.             SendKeys.Send(str);
  174.         }
  175.     }
  176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement