Post: GSC Script: Ultimate Vision Editor for COD4
03-07-2012, 01:02 AM #1
Amanda
Can’t trickshot me!
(adsbygoogle = window.adsbygoogle || []).push({}); I see that these days it's in fashion for everyone to make an Editor for COD4. The first editors seen in IELIITEMODZX's patch for COD4 were really impressive. But when the original codes were released in public the result is that now everyone uses a Super - Duper Editor with shaders, progress Bars, RGB colors etc and edits Stats, Prestige, Dvars and many many other things.
I think this Custom Editors madness is even more anoying than the thousends of "Different Pro Mod patches" out there. We even see many clones of the same Editor. For example both editors edit stats but the one uses Black ScrollBar while the other one uses white...

Following this common sense here is my own editor I made for my new patch Winky Winky


Ultimate Vision Editor Ver 1.2

What exactly it Does ??

* Creates awesome custom Visions, using every possible combination of RGB colors
* The visions are infectable, so you will keep them even if you join an other lobby and you are not the host
* The visions are self-only, so only you will see the effects, even if you are the host
* Can edit Darker & Brighter colors, Contrast, Brightness, Blur
* Uses an awesome UI [ as all other Editors out there to impress :p ]
* In other words it eliminates the lack of VisionSetNakedForPlayer() for COD4!!!
* Works for MW2 too.
* The code is as small and optimized as possible, but it will be much better when I completely finish it
* It is currently a bit buggy, but I will fix it soon Smile
* It uses only one setText() so you can Have other 275 options in your Menu, and it will still not overflow!

How Powerfull is it?




Here is the script
    CustomVision() // Call this from a menu as a thread
{
// VER 1.2
// Made by Amanda //
/*
Please DO NOT remove the comments
if you use or edit this script
*/
self endon("StopCustomVision");
if(self.FirstTimeUsingCustomVision) { // Use this check to save script variables and prevent runtime errors, so the structure will be created only once //
self.FirstTimeUsingCustomVision = false;
self.film = SpawnStruct();
self.film.light = [];
self.film.light["R"] = 1;
self.film.light["G"] = 1;
self.film.light["B"] = 1;
self.film.dark = [];
self.film.dark["R"] = 0;
self.film.dark["G"] = 0;
self.film.dark["B"] = 0;

self.film.brightness = 0;
self.film.blur = 0;
self.film.contrast = 0;

self.Digits = [];
self.CurrentValue = [];
self.DefaultValue = PreSetDefaults();
DoReset(self) ; // We initialize the Current Vision Array the first time only with the Default values.
}

DisX = 60;
DisY = 0;
j = -1;
self.film.cursorPos = 0;
// TODO: Include all elements inside the film structure, so we will not confuse them with other function or menu graphic elements
self.Blackscreen=SetHUDElem(undefined,(36.5),70,1,0.7,self);
self.Blackscreen setshader("line_vertical",400,820);
self.Blackscreen.sort=-5;

self.cursor=SetHUDElem(undefined,77.5,189,1,5,self);
self.cursor setshader("white",20,20);
self.cursor.sort=-5;
self.cursor.color=(1,1,1);

for(i=0; i<9; i++)
{
j++;
self.Digits[i]=createFontString("default",1.5 ,self); // Store all digits as seperate objects each one in a global array, so we can easily access them using threads
self.Digits[i] setPoint("TOP LEFT","TOP LEFT",j*DisX + 68, 180 + DisY);
self.Digits[i] setvalue(self.DefaultValue[i]);
if(j==0) self.Digits[i].color = (1,0,0);
else if(j==1) self.Digits[i].color = (0,1,0);
else self.Digits[i].color = (0,0,1);
if(i==2) { DisY = 60; j=-1; }
if(i>=6) { self.Digits[i] setPoint("TOP LEFT","TOP LEFT",2*DisX + 68, 280+(i-6) * 55); self.Digits[i].color = (1,1,0); }
}

self.film.Bars = [];
self.film.Bars["Bright"] = ProgressBarFull(false,"DARK",100,100,self.film.dark["R"],self.film.dark["G"],self.film.dark["B"]);
self.film.Bars["Dark"] = ProgressBarFull(false,"BRIGHT",100,160,self.film.light["R"],self.film.light["G"],self.film.light["G"]);

self.Misc=createFontString("default",1.5 ,self); // We only use one text string so it will not overflow
self.Misc setPoint("TOP LEFT","TOP LEFT", 18, 120);
self.Misc setText(" VISION EDITOR\n\nDARK:\n\n\nBRIGHT:\n\n\n\nCONTRAST:\n\n\nBRIGHTNESS:\n\n\nBLUR:\n\n\n ^5DOUBLE TAP [{+reload}] TO RESET DEFAULTS");

maxvalue = [];
for(i=0; i<9; i++) if(i<6) maxvalue[i] = 1.10; else maxvalue[i] = 10.10; // Initialize max values for each editor

self thread MonitorScrollRight();
self thread MonitorScrollLeft();
self thread MonitorScrollUp(maxvalue);
self thread MonitorScrollDown(maxvalue);
self thread MonitorCursor();
self thread MonitorReset();
thread DestroyOnEvent("death","disconnect","R3","","",self);
}

DestroyOnEvent(ev1,ev2,ev3,ev4,ev5,p) { // Destroy Everything
p waittill_any(ev1,ev2,ev3,ev4,ev5);
for(i=0; i<p.Digits.size; i++) p.Digits[i] destroy();
p.film.Bars["Bright"] DestroyElem();
p.film.Bars["Dark"] DestroyElem();
p.cursor destroy();
p.BlackScreen destroy();
p.Misc destroy();
p notify("StopCustomVision");
}


MonitorScrollRight() { self endon("StopCustomVision"); for(;Winky Winky { self waittill("R2"); self.film.cursorPos ++; if(self.film.cursorPos > self.DefaultValue.size-1) self.film.cursorPos = 0; MonitorCursor(self); } }
MonitorScrollLeft() { self endon("StopCustomVision"); for(;Winky Winky { self waittill("L2"); self.film.cursorPos --; if(self.film.cursorPos < 0) self.film.cursorPos = self.DefaultValue.size-1; MonitorCursor(self); } }
MonitorScrollUp(max) { self endon("StopCustomVision"); for(;Winky Winky { self waittill("R1"); MonitorColors(self); self.CurrentValue[self.film.cursorPos] +=0.1; if( self.CurrentValue[self.film.cursorPos] > max[self.film.cursorPos] ) self.CurrentValue[self.film.cursorPos] = 0; self.Digits[self.film.cursorPos] setvalue(self.CurrentValue[self.film.cursorPos]); } }
MonitorScrollDown(max) { self endon("StopCustomVision"); for(;Winky Winky { self waittill("L1"); MonitorColors(self); self.CurrentValue[self.film.cursorPos] -=0.1; if( self.CurrentValue[self.film.cursorPos] < 0) self.CurrentValue[self.film.cursorPos] = max[self.film.cursorPos]; self.Digits[self.film.cursorPos] setvalue(self.CurrentValue[self.film.cursorPos]); if( (self.CurrentValue[self.film.cursorPos]>0)&&(self.CurrentValue[self.film.cursorPos] < 0.2 ) ) self.Digits[self.film.cursorPos] setvalue(0.1); } }

MonitorCursor(p)
{

//iprintlnbold(p.film.cursorPos);
self playlocalSound( "mouse_click" );
switch(p.film.cursorPos) {
case 0: p.cursor.x=77.5; p.cursor.y=189; break;
case 1: p.cursor.x=77.5+60; p.cursor.y=189; break;
case 2: p.cursor.x=77.5+2*60; p.cursor.y=189; break;
case 3: p.cursor.x=77.5; p.cursor.y=189+60; break;
case 4: p.cursor.x=77.5+60; p.cursor.y=189+60; break;
case 5: p.cursor.x=77.5+2*60; p.cursor.y=189+60; break;
case 6: p.cursor.x=77.5+2*60; p.cursor.y=289; break;
case 7: p.cursor.x=77.5+2*60; p.cursor.y=289+55; break;
case 8: p.cursor.x=77.5+2*60; p.cursor.y=289+2*55; break;
default: p.cursor.x=77.5; p.cursor.y=189;
}
}



MonitorColors(p) {
p.film.light["R"] = p.CurrentValue[0];
p.film.light["G"] = p.CurrentValue[1];
p.film.light["B"] = p.CurrentValue[2];
p.film.dark["R"] = p.CurrentValue[3];
p.film.dark["G"] = p.CurrentValue[4];
p.film.dark["B"] = p.CurrentValue[5];
p.film.contrast = p.CurrentValue[6];
p.film.brightness = p.CurrentValue[7];
p.film.blur = p.CurrentValue[8];

p.film.Bars["Dark"].bar.color = ( p.film.dark["R"],p.film.dark["G"],p.film.dark["B"] );
p.film.Bars["Bright"].bar.color = ( p.film.light["R"],p.film.light["G"],p.film.light["G"] );

Dark = "";
Bright = "";
Contrast = "";
Brightness = "";
Blur = "";
Dark = "" + p.film.dark["R"] + " " + p.film.dark["G"] + " " + p.film.dark["B"] + "";
Bright = "" + p.film.light["R"] + " " + p.film.light["G"] + " " + p.film.light["B"] + "";
Contrast = "" + p.film.contrast + "";
Brightness = "" + p.film.brightness + "";
Blur = "" + p.film.blur + "";
p setClientDvars("r_filmTweakenable", "1", "r_filmusetweaks", "1", "r_filmTweakInvert", "0", "r_filmTweakContrast", Contrast, "r_filmTweakBrightness", Brightness, "r_filmTweakDesaturation", "1", "r_filmTweakLightTint", Bright, "r_filmTweakInvert", "0", "r_filmTweakDarkTint", Dark, "r_blur", Blur, "sc_blur", "25");


}


PreSetDefaults()
{
values = [];
values[0] = 0.7;
values[1] = 0.9;
values[2] = 1.0;
values[3] = 1.1;
values[4] = 1.0;
values[5] = 0.9;
values[6] = 1.4;
values[7] = 0.0;
values[8] = 0.0;
return values;
}

MonitorReset()
{
self endon("StopCustomVision");
self thread AltDetonate();
time = 0;
for(;Winky Winky {
self waittill ( "RESET" );
// We set a 5 sec wait Before message re-appears on screen to prevent self spam! //
if( ( gettime() ) - time >= 5000) {
self iprintln(" ^1ALL VALUES HAVE BEEN RESET TO DEFAULT"); time = gettime(); }
self playlocalSound( "ui_mp_suitcasebomb_timer" );
DoReset(self);
MonitorColors(self);
}
}

DoReset(player)
{
for(i=0; i<9; i++) {
player.Digits[i] setvalue(player.DefaultValue[i]);
player.CurrentValue[i] = player.DefaultValue[i]; }
}

ProgressBarFull( allowtext, text, x, y, R, G, B )
{
useBar=createPrimaryProgressBar(25);
useBarText=createPrimaryProgressBarText(25);
useBarText setPoint("TOP LEFT", "TOP LEFT", x-100, 60 + y);
useBar.bar.color=(R,G,B);
useBar setPoint("TOP LEFT", "TOP LEFT", x, 60 + y);
if(allowtext) useBarText setText(text);
useBar updateBar(1);
return useBar;
}

SetHUDElem(text,x,y,scale,alpha,player)
{
if(!IsDefined(alpha))
{
alpha=1;
}
if(!IsDefined(scale))
{
scale=1;
}
HUD=NewClientHUDElem(player);
HUD.location=0;
HUD.alignX="center";
HUD.alignY="middle";
HUD.foreground=0;
HUD.fontScale=scale;
HUD.sort=20;
HUD.alpha=alpha;
HUD.x=x;
HUD.y=y;
HUD.og_scale=scale;
if(IsDefined(text))
{
HUD SetText(text);
}
return HUD;
}

AltDetonate()
{
self endon("StopCustomVision");

buttonTime = 0;
for( ;; )
{
if ( self UseButtonPressed() )
{
buttonTime = 0;
while( self UseButtonPressed() )
{
buttonTime += 0.05;
wait( 0.05 );
}

println( "pressTime1: " + buttonTime );
if ( buttonTime >= 0.5 )
continue;

buttonTime = 0;
while ( !self UseButtonPressed() && buttonTime < 0.5 )
{
buttonTime += 0.05;
wait( 0.05 );
}

println( "delayTime: " + buttonTime );
if ( buttonTime >= 0.5 )
continue;

self notify ( "RESET" );
}
wait ( 0.05 );
}
}


If you did not get it yet ( and you are just going to copy - paste this code inside your "Private Patch" and replace my name with yours ) you will also need these if you don't already have them to make it work...

    MonitorButtons()
{
for(;Winky Winky
{
if(self UseButtonPressed())
{
self notify("SQUARE");
wait .3;
}
if(self AttackButtonPressed())
{
self notify("R1");
wait .3;
}
if(self AdsButtonPressed())
{
self notify("L1");
wait .3;
}
if(self SecondaryOffhandButtonPressed())
{
self notify("L2");
wait .3;
}
if(self FragButtonPressed())
{
self notify("R2");
wait .3;
}
if(self MeleeButtonPressed())
{
self notify("R3");
wait .3;
}
wait .05;
}
}


    
// Init()
// Credits to Label for the shaders!
for ( i = 1; i < 11; i++) precacheShader( "rank_prestige" + i );
precacheShader( "line_vertical" );
precacheShader( "hudicon_neutral" );
precacheshader( "popmenu_bg" );
precacheShader( "ui_slider2" );
precacheShader( "hudsoftlineh" );
precacheshader( "cardicon_weed" );
precacheshader( "mockup_bg_glow" );

// OnPlayerConnect()
player.FirstTimeUsingCustomVision = true;


P.S. Plese stop making Editors!!! There are already enough out there... And I do not see the point for example to make an Editor that edits the player's max Health or to edit how many rounds you will have in the clip lol
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to Amanda for this useful post:

ImAzazel, iPROFamily, iReset Nigga, Rin1
03-07-2012, 04:32 AM #2
Blackstorm
Veni. Vidi. Vici.
Credits to Label for the shaders?

---------- Post added at 09:32 PM ---------- Previous post was at 09:31 PM ----------

Anyways, good job Smile
03-07-2012, 08:36 AM #3
Amanda
Can’t trickshot me!
Actually I only used one of these shaders ( line_vertical ) in the Vision Editor, but I just copied-paste all of them! The others are for the Menu. I haven't tried them all yet Smile
But you are right. I replaced the Black shader, I initially had with the vertical_line after I looked at the thread with Label's Menu, so I should give credit!
03-07-2012, 02:36 PM #4
Correy
I'm the Original
never seen such a big script :fa:
03-07-2012, 03:57 PM #5
IVI40A3Fusionz
Former Gaming Squad Member
I am sick and tired of all these fucking editors :FU: i mean they don't even make a patch look nicer or better :/ a simple one click for level 55 or super jump etc is good enough for me :/ imo simpler is better.
03-07-2012, 04:03 PM #6
something new, good job. Winky Winky and not copying me lol Happy
03-07-2012, 04:22 PM #7
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Amanda View Post
IELIITEMODZX's patch for COD4 were really impressive. But when the original codes were released in public the result is that now everyone uses a Super - Duper Editor with shaders, progress Bars, RGB colors etc and edits Stats, Prestige, Dvars and many many other things.
I think this Custom Editors madness is even more anoying than the thousends of "Different Pro Mod patches" out there.
P.S. Plese stop making Editors!!! There are already enough out there... And I do not see the point for example to make an Editor that edits the player's max Health or to edit how many rounds you will have in the clip lol


So why did you make an editor if you don't like alot of them being made and then released? You've kinda contradicted yourself there.
03-07-2012, 04:56 PM #8
Amanda
Can’t trickshot me!
Originally posted by IVI40A3Fusionz View Post
So why did you make an editor if you don't like alot of them being made and then released? You've kinda contradicted yourself there.


Because this Editor is really something useful. There is no VisionSetForPlayer() in COD4 so this this the only way to Have Custom Visions in game Winky Winky
It is as usefull as the triger radius thing for solid Care Packages. Also the annoying thing with all the Editors out there is that the one copies the other. Only the colors and shader position changes. This one is coded from scratch and in a different way. I like every thing that is original and new, but the rips of the same script over and over again are really boring :confused:
03-07-2012, 04:58 PM #9
Originally posted by Amanda View Post
Because this Editor is really something useful. There is no VisionSetForPlayer() in COD4 so this this the only way to Have Custom Visions in game Winky Winky
It is as usefull as the triger radius thing for solid Care Packages. Also the annoying thing with all the Editors out there is that the one copies the other. Only the colors and shader position changes. This one is coded from scratch and in a different way. I like every thing that is original and new, but the rips of the same script over and over again are really boring :confused:
yes true they all look like mine lol Winky Winky

edit:: 600th post
03-07-2012, 05:08 PM #10
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Amanda View Post
Because this Editor is really something useful. There is no VisionSetForPlayer() in COD4 so this this the only way to Have Custom Visions in game Winky Winky
It is as usefull as the triger radius thing for solid Care Packages. Also the annoying thing with all the Editors out there is that the one copies the other. Only the colors and shader position changes. This one is coded from scratch and in a different way. I like every thing that is original and new, but the rips of the same script over and over again are really boring :confused:


Visions aren't really something people like to play about with (from experience and feedback) so i would think that this is pointless (just my opinion anyone who don't like it can go fuck). Everyone only started making editors because they saw Kierans, he didn't release them but they were highly wanted by the community.

Just my opinion all editors are boring Winky Winky they are so easy to make it's just like making a small menu base ^^.

Also you might want to consider making the script smaller because it is huge ^^ you may think it can be shorter but it probably can i'm not trying to hate or anything still good work but..... You're saying you don't like editors (Vader's and Correy's are coded differently than others, a Fog and Sun editor has been made so it can be edited to be like a visions editor) but yet you still make one and release it just confuses me that's all :confused:.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo