GSC [Release] Illuison V1 Dvar Editor!

Discussion in 'Call of Duty: Black Ops 2 Scripts' started by [[email protected]:], Jan 27, 2016.

  1. [nobody@CCM:]

    [[email protected]:] Member

    95
    96
    18
    Credits:
    3
    Hello cabcon community I am just releasing my dvar editor I used in illusion v1 I hope you enjoy using it.

    [​IMG]

    The function is self explanatory you just need to know the basics of gsc.
    Function:
    EditDvar(Dvar)
    {
    self exitMenu();
    self disableWeapons();
    self freezeControls( true );
    self setBlur(4, .4);
    wait 0.2;
    if(Dvar == "cg_fov")
    {
    Max = 125;//125 150
    Value = 65;
    Increment = 5;//5
    Min = 65;
    Move = 20.8;//20.8 14.7
    }
    else if(Dvar == "perk_weapRateMultiplier" || Dvar == "perk_weapReloadMultiplier")
    {
    Max = 1;
    Value = 0.01;
    Increment = 0.03;//0.03
    Min = 0.01;
    Move = 7.6;
    }
    else
    {
    Max = 1000;
    Value = 0;
    Increment = 20;//20
    Min = 0;
    Move = 5;
    }
    self.DvarChange = self createText("default",1.8,self);
    self.DvarChange setpoint("CENTER","CENTER",0,70);
    self.DvarChange settext("Edit Dvar: "+Dvar+"");
    self.DvarValue = self createText("default",1.7,self);
    self.DvarValue setpoint("CENTER","CENTER",0,35);
    self.DvarValue settext("Dvar Value: "+Value+"");
    self.DvarBG = self createRectangleFOV("CENTER","CENTER",0,0,2000,2000,(0,0,0),-999,0.7,"white");
    self.DvarBar = self createRectangleFOV("CENTER","CENTER",-125,-20,14,26,(1, 0, 0),4,1,"white");
    self.DvarSlider = self createRectangleFOV("CENTER","CENTER",0,-20,274,18,(255,255,255),3,1,"white");
    wait 0.3;
    self endon("DvarEdit_Over");
    for(;:wink:
    {
    wait 0.001;
    self.DvarValue settext("Dvar Value: "+Value+"");
    if(Dvar == "cg_fov")
    //setDvar("cg_fov",Value);//edit setclientfov setDvar
    self setclientfov(Value);
    if(self MeleeButtonPressed())
    {
    self thread DvarDone("Melee",Dvar);
    wait 1;
    }
    else if(self AdsButtonPressed() && Value == Min)
    {
    wait 0.001;
    self.DvarBar.x = self.DvarBar.x + 250;//250
    value = Max;
    }
    else if(self AttackButtonPressed() && Value == Max)
    {
    wait 0.001;
    self.DvarBar.x = self.DvarBar.x - 250;//250
    value = Min;
    }
    else if(self AttackButtonPressed() && Value < Max)
    {
    wait 0.001;
    self.DvarBar.x = self.DvarBar.x + Move;
    value = value + increment;
    }
    else if(self AdsButtonPressed() && Value > Min)
    {
    wait 0.001;
    self.DvarBar.x = self.DvarBar.x - Move;
    value = value - increment;
    }
    else if(self UseButtonPressed())
    {
    self thread DvarDone("Else",Dvar,Value);
    wait 1;
    }
    }
    }
    DvarDone(Obj, Dvar, Value)
    {
    self.DvarBG Destroy();
    self.DvarBar Destroy();
    self.DvarSlider Destroy();
    self.DvarChange Destroy();
    self.DvarValue Destroy();
    self enableWeapons();
    self freezeControls( false );
    self setBlur(0, .4);
    self notify("DvarEdit_Over");
    if(self MeleeButtonPressed())
    {
    self iPrintln(""+Dvar+" Set To: "+Value+"");
    wait .1;
    }
    }

    I strongly recommend using the createRectangle you are already using in your menu base but you can have the one I used either way.
    Spawn Hud Function:
    createRectangle(align,relative,x,y,width,height,color,sort,alpha,shader)
    {
    barElemBG = newClientHudElem( self );
    barElemBG.elemType = "bar";
    barElemBG.width = width;
    barElemBG.height = height;
    barElemBG.align = align;
    barElemBG.relative = relative;
    barElemBG.xOffset = 0;
    barElemBG.yOffset = 0;
    barElemBG.children = [];
    barElemBG.sort = sort;
    barElemBG.color = color;
    barElemBG.alpha = alpha;
    barElemBG setParent( level.uiParent );
    barElemBG setShader( shader, width , height );
    barElemBG.hidden = false;
    barElemBG setPoint(align,relative,x,y);
    return barElemBG;
    }

    Thanks
    ~ Extinct
     
    Last edited: May 10, 2016
  2. God

    God Skiddy

    342
    244
    243
    Credits:
    1,046
    Nice release, a lot better than just using a toggle in a menu
     
  3. The Dark Side

    The Dark Side Former Staff Member

    995
    827
    398
    Credits:
    3,675
    Oh damn. I think i came a little.
     
  4. Sheperdebops

    Sheperdebops Code Junkie

    76
    73
    218
    Credits:
    42
    i would use like a pastebin maybe just to tidy it up and sort the smileys
     
  5. Guilherme_INFR

    Guilherme_INFR Member

    79
    22
    8
    Credits:
    3
    SetZombieSpawnDelay(i) //0.08 Def
    {
    set_zombie_var("zombie_spawn_delay", i);
    level.zombie_spawn_delay = i;
    level.zombie_vars["zombie_spawn_delay"] = i;
    self iprintln("Zombie Spawn Delay Set To ^2" + i);
    }

    How can i edit this with this Dvar editor? (Sorry i'm new in GSC)
     
  6. Harry

    Harry Software Engineer Premium Member

    1,196
    971
    398
    Credits:
    5,909
    Looks **** good :wink:
     
  7. LGK_Reversal

    LGK_Reversal New Member

    6
    2
    3
    Credits:
    56
    Is there anyway a dvar can be set just for you? Like Rapid Fire in zombies for example... I sets for all when everyone has double tap. Is there a way where a dvar can be only set for you? Any help would be highly appreciated.
     
  8. candy

    candy G59 Terrorist Donator

    1,241
    813
    398
    Credits:
    6,792
    No point in bumping a 2 year old thread, just make a new question thread here.
    Please login or register to view links or downloads!

    But, probably not. Especially for that dvar. Just make a loop and do magicbullet for each time you fire your weapon.
     

Share This Page