Dpad Up = Open/Scroll Up
Dpad Down = Scroll Down
X = Select
Melee = Exit
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
/*
|-------------------------------|
| Patch Created By: Your Name |
|-------------------------------|
| Menu Base By: xePixTvx |
|-------------------------------|
| Verifycation By: Name Here |
|-------------------------------|
*/
init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
PrecacheShader("progress_bar_bg");
PrecacheShader("popup_button_selection_bar");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill("connected",player);
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread initMenu();
}
}
MenuOptionsList()
{
self NewMenu("main","Main Menu","Exit_Ohh_Yeah");
self NewOpt("main","Menu 1",::subMenu,"M1");
self NewOpt("main","Option 2",::Test,"");
self NewOpt("main","Option 3",::Test,"");
self NewOpt("main","Option 4",::Test,"");
self NewOpt("main","Option 5",::Test,"");
self NewOpt("main","Option 6",::Test,"");
self NewOpt("main","Option 7",::Test,"");
self NewOpt("main","Option 8",::Test,"");
self NewOpt("main","Option 9",::Test,"");
self NewOpt("main","Option 10",::Test,"");
self NewOpt("main","Option 11",::Test,"");
self NewOpt("main","Option 12",::Test,"");
self NewOpt("main","Option 13",::Test,"");
self NewOpt("main","Option 14",::Test,"");
self NewOpt("main","Option 15",::Test,"");
self NewOpt("main","Option 16",::Test,"");
self NewOpt("main","Option 17",::Test,"");
self NewOpt("main","Option 18",::Test,"");
self NewOpt("main","Option 19",::Test,"");
self NewOpt("main","Option 20",::Test,"");
self NewOpt("main","Option 21",::Test,"");
self NewOpt("main","Option 22",::Test,"");
self NewMenu("M1","Menu 1","main");
self NewOpt("M1","Option 1",::Test,"");
self NewOpt("M1","Option 2",::Test,"");
self NewOpt("M1","Option 3",::Test,"");
self NewOpt("M1","Option 4",::Test,"");
self NewOpt("M1","Option 5",::Test,"");
self NewOpt("M1","Option 6",::Test,"");
self NewOpt("M1","Option 7",::Test,"");
self NewOpt("M1","Option 8",::Test,"");
self NewOpt("M1","Option 9",::Test,"");
self NewOpt("M1","Option 10",::Test,"");
self NewOpt("M1","Option 11",::Test,"");
self NewOpt("M1","Option 12",::Test,"");
self NewOpt("M1","Option 13",::Test,"");
self NewOpt("M1","Option 14",::Test,"");
}
initMenu()
{
if(self isHost()||self.name=="Your Name Here")
{
self.FuZiioN = [];
self.FuZiioN["Menu"]["Open"] = false;
self thread StartMenu();
self thread MenuOptionsList();
}
}
StartMenu()
{
self endon("death");
self endon("disconnect");
self thread inibuttons();
for(;
{
self waittill("buttonPress",button);
if(button=="Up" && !self.FuZiioN["Menu"]["Open"])
{
self thread ControlMenu();
wait .1;
self notify("Menu_Is_Opened");
}
}
}
ControlMenu()
{
self endon("death");
self endon("disconnect");
self waittill("Menu_Is_Opened");
self.FuZiioN["Menu"]["Open"] = true;
self freezeControls(true);
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = "main";
self thread doText();
self thread doShaders();
self CursProtection();
while(self.FuZiioN["Menu"]["Open"])
{
self waittill("buttonPress",button);
if(button=="Up")
{
self.FuZiioN["Scroller"] --;
self CursProtection();
}
if(button=="Down")
{
self.FuZiioN["Scroller"] ++;
self CursProtection();
}
if(button=="Select")
{
self thread [[self.FuZiioN[self.FuZiioN["CurrentMenu"]].func[self.FuZiioN["Scroller"]]]](self.FuZiioN[self.FuZiioN["CurrentMenu"]].inp[self.FuZiioN["Scroller"]]);
self thread SelectEffect();
}
if(button=="Exit")
{
if(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent=="Exit_Ohh_Yeah")
{
self.FuZiioN["Menu"]["Open"] = false;
self freezeControls(false);
self notify("Menu_Is_Closed");
}
else
{
self thread subMenu(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent);
}
}
}
}
CursProtection()
{
if(!self.FuZiioN["Menu"]["Open"])
{
return;
}
if(self.FuZiioN["Scroller"]<0)
{
self.FuZiioN["Scroller"] = self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1;
}
if(self.FuZiioN["Scroller"]>self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1)
{
self.FuZiioN["Scroller"] = 0;
}
/*** Dont touch This!! ***/
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]-8]) || self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size<=10)
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*self.FuZiioN["Scroller"]);
self.FuZiioN["XButton"].y = 70+(20*self.FuZiioN["Scroller"]);
}
else
{
if(isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]+8]))
{
xePixTvx = 0;
for(i=self.FuZiioN["Scroller"]-8;i<self.FuZiioN["Scroller"]+9;i++)
{
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]))
{
self.FuZiioN["Text"][xePixTvx] setText("");
}
else
{
self.FuZiioN["Text"][xePixTvx] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
xePixTvx ++;
}
self.FuZiioN["Scrollbar"].y = 70+(20*
;
self.FuZiioN["XButton"].y = 70+(20*
;
}
else
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size+(i-9)]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
self.FuZiioN["XButton"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
}
}
}
subMenu(menu)
{
self notify("Update");
self thread MenuOptionsList();
wait .001;
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = menu;
self.FuZiioN["Titel"] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel);
self thread doText();
self CursProtection();
}
doShaders()
{
self.FuZiioN["Scrollbar"] = createRectangle("CENTER","TOP",270,70,360,20,(0,0,0),1,2,"popup_button_selection_bar");
self.FuZiioN["XButton"] = createText("default",1.5,"[{+gostand}]","CENTER","TOP",70,70,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["BG"] = createRectangle("CENTER","TOP",300,120,350,2000,(0,0,0),(1/1.75),0,"progress_bar_bg");
self.FuZiioN["Titel"] = createText("default",2.0,self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel,"CENTER","TOP",250,30,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Scrollbar"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["XButton"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["BG"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["Titel"] thread destroyOnDeathOrUpdate2(self);
}
doText()
{
self.FuZiioN["Text"] = [];
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] = createText("default",1.5,self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i],"CENTER","TOP",250,70+(20*i),3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Text"][i] thread destroyOnDeathOrUpdate(self);
}
}
NewMenu(menu,titel,parent)
{
if(!isDefined(self.FuZiioN))self.FuZiioN=[];
self.FuZiioN[menu] = spawnStruct();
self.FuZiioN[menu].titel = titel;
self.FuZiioN[menu].parent = parent;
self.FuZiioN[menu].name = [];
self.FuZiioN[menu].func = [];
self.FuZiioN[menu].inp = [];
}
NewOpt(menu,name,func,inp)
{
F=self.FuZiioN[menu].name.size;
self.FuZiioN[menu].name[F] = name;
self.FuZiioN[menu].func[F] = func;
self.FuZiioN[menu].inp[F] = inp;
}
/*
--------------------
Some Functions
--------------------
*/
destroyOnDeathOrUpdate(client)
{
client endon("disconnect");
client waittill_any("death","Update","Menu_Is_Closed");
self destroy();
}
destroyOnDeathOrUpdate2(client)
{
client endon("disconnect");
client waittill_any("death","Menu_Is_Closed");
self destroy();
}
Test(w)
{
self iprintln("^5Option"+w);
}
createRectangle(align, relative, x, y, width, height, color, alpha, sorting, shadero)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.color = color;
if(isDefined(alpha))
barElemBG.alpha = alpha;
else
barElemBG.alpha = 1;
barElemBG setShader( shadero, width , height );
barElemBG.hidden = false;
barElemBG.sort = sorting;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
createText( font, fontScale, text, point, relativePoint, xOffset, yOffset, sort, hideWhenInMenu, alpha, color, glowAlpha, glowColor )
{
textElem = createFontString(font, fontScale);
textElem setText(text);
textElem setPoint( point, relativePoint, xOffset, yOffset );
textElem.sort = sort;
textElem.hideWhenInMenu = hideWhenInMenu;
textElem.alpha = alpha;
textElem.color = color;
textElem.glowAlpha = glowAlpha;
textElem.glowColor = glowColor;
return textElem;
}
SelectEffect()
{
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 2.0;
wait .2;
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 1.5;
}
/*
-------------------------
Button Handling Start
-------------------------
*/
inibuttons()
{
buttons = strTok("Left|+actionslot 3,Right|+actionslot 4,Up|+actionslot 1,Down|+actionslot 2,Select|+gostand,Exit|+melee",",");
foreach(button in buttons)
{
btn = strTok(button,"|");
self thread monitorActions(btn[0],btn[1]);
}
}
monitorActions(button,action)
{
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand(button,action);
for(;
{
self waittillmatch(button);
self notify("buttonPress",button);
}
}
/*
-------------------------
Button Handling End
-------------------------
*/
/////_missionsssssss
createPerkMap()
{
level.perkMap = [];
level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}
ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}
ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}
ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}
ch_setState( refString, value )
{
self setPlayerData("challengeState",refString,value);
}
initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}
assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
xePixTvx/xFuZiioN_x3
KBrizzle
CraigChrist8239
Master Ro/rothebeast
Dpad Up = Open/Scroll Up
Dpad Down = Scroll Down
X = Select
Melee = Exit
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
/*
|-------------------------------|
| Patch Created By: Your Name |
|-------------------------------|
| Menu Base By: xePixTvx |
|-------------------------------|
| Verifycation By: Name Here |
|-------------------------------|
*/
init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
PrecacheShader("progress_bar_bg");
PrecacheShader("popup_button_selection_bar");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill("connected",player);
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread initMenu();
}
}
MenuOptionsList()
{
self NewMenu("main","Main Menu","Exit_Ohh_Yeah");
self NewOpt("main","Menu 1",::subMenu,"M1");
self NewOpt("main","Option 2",::Test,"");
self NewOpt("main","Option 3",::Test,"");
self NewOpt("main","Option 4",::Test,"");
self NewOpt("main","Option 5",::Test,"");
self NewOpt("main","Option 6",::Test,"");
self NewOpt("main","Option 7",::Test,"");
self NewOpt("main","Option 8",::Test,"");
self NewOpt("main","Option 9",::Test,"");
self NewOpt("main","Option 10",::Test,"");
self NewOpt("main","Option 11",::Test,"");
self NewOpt("main","Option 12",::Test,"");
self NewOpt("main","Option 13",::Test,"");
self NewOpt("main","Option 14",::Test,"");
self NewOpt("main","Option 15",::Test,"");
self NewOpt("main","Option 16",::Test,"");
self NewOpt("main","Option 17",::Test,"");
self NewOpt("main","Option 18",::Test,"");
self NewOpt("main","Option 19",::Test,"");
self NewOpt("main","Option 20",::Test,"");
self NewOpt("main","Option 21",::Test,"");
self NewOpt("main","Option 22",::Test,"");
self NewMenu("M1","Menu 1","main");
self NewOpt("M1","Option 1",::Test,"");
self NewOpt("M1","Option 2",::Test,"");
self NewOpt("M1","Option 3",::Test,"");
self NewOpt("M1","Option 4",::Test,"");
self NewOpt("M1","Option 5",::Test,"");
self NewOpt("M1","Option 6",::Test,"");
self NewOpt("M1","Option 7",::Test,"");
self NewOpt("M1","Option 8",::Test,"");
self NewOpt("M1","Option 9",::Test,"");
self NewOpt("M1","Option 10",::Test,"");
self NewOpt("M1","Option 11",::Test,"");
self NewOpt("M1","Option 12",::Test,"");
self NewOpt("M1","Option 13",::Test,"");
self NewOpt("M1","Option 14",::Test,"");
}
initMenu()
{
if(self isHost()||self.name=="Your Name Here")
{
self.FuZiioN = [];
self.FuZiioN["Menu"]["Open"] = false;
self thread StartMenu();
self thread MenuOptionsList();
}
}
StartMenu()
{
self endon("death");
self endon("disconnect");
self thread inibuttons();
for(;
{
self waittill("buttonPress",button);
if(button=="Up" && !self.FuZiioN["Menu"]["Open"])
{
self thread ControlMenu();
wait .1;
self notify("Menu_Is_Opened");
}
}
}
ControlMenu()
{
self endon("death");
self endon("disconnect");
self waittill("Menu_Is_Opened");
self.FuZiioN["Menu"]["Open"] = true;
self freezeControls(true);
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = "main";
self thread doText();
self thread doShaders();
self CursProtection();
while(self.FuZiioN["Menu"]["Open"])
{
self waittill("buttonPress",button);
if(button=="Up")
{
self.FuZiioN["Scroller"] --;
self CursProtection();
}
if(button=="Down")
{
self.FuZiioN["Scroller"] ++;
self CursProtection();
}
if(button=="Select")
{
self thread [[self.FuZiioN[self.FuZiioN["CurrentMenu"]].func[self.FuZiioN["Scroller"]]]](self.FuZiioN[self.FuZiioN["CurrentMenu"]].inp[self.FuZiioN["Scroller"]]);
self thread SelectEffect();
}
if(button=="Exit")
{
if(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent=="Exit_Ohh_Yeah")
{
self.FuZiioN["Menu"]["Open"] = false;
self freezeControls(false);
self notify("Menu_Is_Closed");
}
else
{
self thread subMenu(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent);
}
}
}
}
CursProtection()
{
if(!self.FuZiioN["Menu"]["Open"])
{
return;
}
if(self.FuZiioN["Scroller"]<0)
{
self.FuZiioN["Scroller"] = self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1;
}
if(self.FuZiioN["Scroller"]>self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1)
{
self.FuZiioN["Scroller"] = 0;
}
/*** Dont touch This!! ***/
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]-8]) || self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size<=10)
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*self.FuZiioN["Scroller"]);
self.FuZiioN["XButton"].y = 70+(20*self.FuZiioN["Scroller"]);
}
else
{
if(isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]+8]))
{
xePixTvx = 0;
for(i=self.FuZiioN["Scroller"]-8;i<self.FuZiioN["Scroller"]+9;i++)
{
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]))
{
self.FuZiioN["Text"][xePixTvx] setText("");
}
else
{
self.FuZiioN["Text"][xePixTvx] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
xePixTvx ++;
}
self.FuZiioN["Scrollbar"].y = 70+(20*
;
self.FuZiioN["XButton"].y = 70+(20*
;
}
else
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size+(i-9)]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
self.FuZiioN["XButton"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
}
}
}
subMenu(menu)
{
self notify("Update");
self thread MenuOptionsList();
wait .001;
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = menu;
self.FuZiioN["Titel"] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel);
self thread doText();
self CursProtection();
}
doShaders()
{
self.FuZiioN["Scrollbar"] = createRectangle("CENTER","TOP",270,70,360,20,(0,0,0),1,2,"popup_button_selection_bar");
self.FuZiioN["XButton"] = createText("default",1.5,"[{+gostand}]","CENTER","TOP",70,70,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["BG"] = createRectangle("CENTER","TOP",300,120,350,2000,(0,0,0),(1/1.75),0,"progress_bar_bg");
self.FuZiioN["Titel"] = createText("default",2.0,self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel,"CENTER","TOP",250,30,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Scrollbar"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["XButton"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["BG"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["Titel"] thread destroyOnDeathOrUpdate2(self);
}
doText()
{
self.FuZiioN["Text"] = [];
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] = createText("default",1.5,self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i],"CENTER","TOP",250,70+(20*i),3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Text"][i] thread destroyOnDeathOrUpdate(self);
}
}
NewMenu(menu,titel,parent)
{
if(!isDefined(self.FuZiioN))self.FuZiioN=[];
self.FuZiioN[menu] = spawnStruct();
self.FuZiioN[menu].titel = titel;
self.FuZiioN[menu].parent = parent;
self.FuZiioN[menu].name = [];
self.FuZiioN[menu].func = [];
self.FuZiioN[menu].inp = [];
}
NewOpt(menu,name,func,inp)
{
F=self.FuZiioN[menu].name.size;
self.FuZiioN[menu].name[F] = name;
self.FuZiioN[menu].func[F] = func;
self.FuZiioN[menu].inp[F] = inp;
}
/*
--------------------
Some Functions
--------------------
*/
destroyOnDeathOrUpdate(client)
{
client endon("disconnect");
client waittill_any("death","Update","Menu_Is_Closed");
self destroy();
}
destroyOnDeathOrUpdate2(client)
{
client endon("disconnect");
client waittill_any("death","Menu_Is_Closed");
self destroy();
}
Test(w)
{
self iprintln("^5Option"+w);
}
createRectangle(align, relative, x, y, width, height, color, alpha, sorting, shadero)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.color = color;
if(isDefined(alpha))
barElemBG.alpha = alpha;
else
barElemBG.alpha = 1;
barElemBG setShader( shadero, width , height );
barElemBG.hidden = false;
barElemBG.sort = sorting;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
createText( font, fontScale, text, point, relativePoint, xOffset, yOffset, sort, hideWhenInMenu, alpha, color, glowAlpha, glowColor )
{
textElem = createFontString(font, fontScale);
textElem setText(text);
textElem setPoint( point, relativePoint, xOffset, yOffset );
textElem.sort = sort;
textElem.hideWhenInMenu = hideWhenInMenu;
textElem.alpha = alpha;
textElem.color = color;
textElem.glowAlpha = glowAlpha;
textElem.glowColor = glowColor;
return textElem;
}
SelectEffect()
{
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 2.0;
wait .2;
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 1.5;
}
/*
-------------------------
Button Handling Start
-------------------------
*/
inibuttons()
{
buttons = strTok("Left|+actionslot 3,Right|+actionslot 4,Up|+actionslot 1,Down|+actionslot 2,Select|+gostand,Exit|+melee",",");
foreach(button in buttons)
{
btn = strTok(button,"|");
self thread monitorActions(btn[0],btn[1]);
}
}
monitorActions(button,action)
{
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand(button,action);
for(;
{
self waittillmatch(button);
self notify("buttonPress",button);
}
}
/*
-------------------------
Button Handling End
-------------------------
*/
/////_missionsssssss
createPerkMap()
{
level.perkMap = [];
level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}
ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}
ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}
ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}
ch_setState( refString, value )
{
self setPlayerData("challengeState",refString,value);
}
initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}
assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
xePixTvx/xFuZiioN_x3
KBrizzle
CraigChrist8239
Master Ro/rothebeast
Dpad Up = Open/Scroll Up
Dpad Down = Scroll Down
X = Select
Melee = Exit
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
/*
|-------------------------------|
| Patch Created By: Your Name |
|-------------------------------|
| Menu Base By: xePixTvx |
|-------------------------------|
| Verifycation By: Name Here |
|-------------------------------|
*/
init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
PrecacheShader("progress_bar_bg");
PrecacheShader("popup_button_selection_bar");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill("connected",player);
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread initMenu();
}
}
MenuOptionsList()
{
self NewMenu("main","Main Menu","Exit_Ohh_Yeah");
self NewOpt("main","Menu 1",::subMenu,"M1");
self NewOpt("main","Option 2",::Test,"");
self NewOpt("main","Option 3",::Test,"");
self NewOpt("main","Option 4",::Test,"");
self NewOpt("main","Option 5",::Test,"");
self NewOpt("main","Option 6",::Test,"");
self NewOpt("main","Option 7",::Test,"");
self NewOpt("main","Option 8",::Test,"");
self NewOpt("main","Option 9",::Test,"");
self NewOpt("main","Option 10",::Test,"");
self NewOpt("main","Option 11",::Test,"");
self NewOpt("main","Option 12",::Test,"");
self NewOpt("main","Option 13",::Test,"");
self NewOpt("main","Option 14",::Test,"");
self NewOpt("main","Option 15",::Test,"");
self NewOpt("main","Option 16",::Test,"");
self NewOpt("main","Option 17",::Test,"");
self NewOpt("main","Option 18",::Test,"");
self NewOpt("main","Option 19",::Test,"");
self NewOpt("main","Option 20",::Test,"");
self NewOpt("main","Option 21",::Test,"");
self NewOpt("main","Option 22",::Test,"");
self NewMenu("M1","Menu 1","main");
self NewOpt("M1","Option 1",::Test,"");
self NewOpt("M1","Option 2",::Test,"");
self NewOpt("M1","Option 3",::Test,"");
self NewOpt("M1","Option 4",::Test,"");
self NewOpt("M1","Option 5",::Test,"");
self NewOpt("M1","Option 6",::Test,"");
self NewOpt("M1","Option 7",::Test,"");
self NewOpt("M1","Option 8",::Test,"");
self NewOpt("M1","Option 9",::Test,"");
self NewOpt("M1","Option 10",::Test,"");
self NewOpt("M1","Option 11",::Test,"");
self NewOpt("M1","Option 12",::Test,"");
self NewOpt("M1","Option 13",::Test,"");
self NewOpt("M1","Option 14",::Test,"");
}
initMenu()
{
if(self isHost()||self.name=="Your Name Here")
{
self.FuZiioN = [];
self.FuZiioN["Menu"]["Open"] = false;
self thread StartMenu();
self thread MenuOptionsList();
}
}
StartMenu()
{
self endon("death");
self endon("disconnect");
self thread inibuttons();
for(;
{
self waittill("buttonPress",button);
if(button=="Up" && !self.FuZiioN["Menu"]["Open"])
{
self thread ControlMenu();
wait .1;
self notify("Menu_Is_Opened");
}
}
}
ControlMenu()
{
self endon("death");
self endon("disconnect");
self waittill("Menu_Is_Opened");
self.FuZiioN["Menu"]["Open"] = true;
self freezeControls(true);
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = "main";
self thread doText();
self thread doShaders();
self CursProtection();
while(self.FuZiioN["Menu"]["Open"])
{
self waittill("buttonPress",button);
if(button=="Up")
{
self.FuZiioN["Scroller"] --;
self CursProtection();
}
if(button=="Down")
{
self.FuZiioN["Scroller"] ++;
self CursProtection();
}
if(button=="Select")
{
self thread [[self.FuZiioN[self.FuZiioN["CurrentMenu"]].func[self.FuZiioN["Scroller"]]]](self.FuZiioN[self.FuZiioN["CurrentMenu"]].inp[self.FuZiioN["Scroller"]]);
self thread SelectEffect();
}
if(button=="Exit")
{
if(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent=="Exit_Ohh_Yeah")
{
self.FuZiioN["Menu"]["Open"] = false;
self freezeControls(false);
self notify("Menu_Is_Closed");
}
else
{
self thread subMenu(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent);
}
}
}
}
CursProtection()
{
if(!self.FuZiioN["Menu"]["Open"])
{
return;
}
if(self.FuZiioN["Scroller"]<0)
{
self.FuZiioN["Scroller"] = self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1;
}
if(self.FuZiioN["Scroller"]>self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1)
{
self.FuZiioN["Scroller"] = 0;
}
/*** Dont touch This!! ***/
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]-8]) || self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size<=10)
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*self.FuZiioN["Scroller"]);
self.FuZiioN["XButton"].y = 70+(20*self.FuZiioN["Scroller"]);
}
else
{
if(isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]+8]))
{
xePixTvx = 0;
for(i=self.FuZiioN["Scroller"]-8;i<self.FuZiioN["Scroller"]+9;i++)
{
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]))
{
self.FuZiioN["Text"][xePixTvx] setText("");
}
else
{
self.FuZiioN["Text"][xePixTvx] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
xePixTvx ++;
}
self.FuZiioN["Scrollbar"].y = 70+(20*
;
self.FuZiioN["XButton"].y = 70+(20*
;
}
else
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size+(i-9)]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
self.FuZiioN["XButton"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
}
}
}
subMenu(menu)
{
self notify("Update");
self thread MenuOptionsList();
wait .001;
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = menu;
self.FuZiioN["Titel"] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel);
self thread doText();
self CursProtection();
}
doShaders()
{
self.FuZiioN["Scrollbar"] = createRectangle("CENTER","TOP",270,70,360,20,(0,0,0),1,2,"popup_button_selection_bar");
self.FuZiioN["XButton"] = createText("default",1.5,"[{+gostand}]","CENTER","TOP",70,70,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["BG"] = createRectangle("CENTER","TOP",300,120,350,2000,(0,0,0),(1/1.75),0,"progress_bar_bg");
self.FuZiioN["Titel"] = createText("default",2.0,self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel,"CENTER","TOP",250,30,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Scrollbar"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["XButton"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["BG"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["Titel"] thread destroyOnDeathOrUpdate2(self);
}
doText()
{
self.FuZiioN["Text"] = [];
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] = createText("default",1.5,self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i],"CENTER","TOP",250,70+(20*i),3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Text"][i] thread destroyOnDeathOrUpdate(self);
}
}
NewMenu(menu,titel,parent)
{
if(!isDefined(self.FuZiioN))self.FuZiioN=[];
self.FuZiioN[menu] = spawnStruct();
self.FuZiioN[menu].titel = titel;
self.FuZiioN[menu].parent = parent;
self.FuZiioN[menu].name = [];
self.FuZiioN[menu].func = [];
self.FuZiioN[menu].inp = [];
}
NewOpt(menu,name,func,inp)
{
F=self.FuZiioN[menu].name.size;
self.FuZiioN[menu].name[F] = name;
self.FuZiioN[menu].func[F] = func;
self.FuZiioN[menu].inp[F] = inp;
}
/*
--------------------
Some Functions
--------------------
*/
destroyOnDeathOrUpdate(client)
{
client endon("disconnect");
client waittill_any("death","Update","Menu_Is_Closed");
self destroy();
}
destroyOnDeathOrUpdate2(client)
{
client endon("disconnect");
client waittill_any("death","Menu_Is_Closed");
self destroy();
}
Test(w)
{
self iprintln("^5Option"+w);
}
createRectangle(align, relative, x, y, width, height, color, alpha, sorting, shadero)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.color = color;
if(isDefined(alpha))
barElemBG.alpha = alpha;
else
barElemBG.alpha = 1;
barElemBG setShader( shadero, width , height );
barElemBG.hidden = false;
barElemBG.sort = sorting;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
createText( font, fontScale, text, point, relativePoint, xOffset, yOffset, sort, hideWhenInMenu, alpha, color, glowAlpha, glowColor )
{
textElem = createFontString(font, fontScale);
textElem setText(text);
textElem setPoint( point, relativePoint, xOffset, yOffset );
textElem.sort = sort;
textElem.hideWhenInMenu = hideWhenInMenu;
textElem.alpha = alpha;
textElem.color = color;
textElem.glowAlpha = glowAlpha;
textElem.glowColor = glowColor;
return textElem;
}
SelectEffect()
{
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 2.0;
wait .2;
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 1.5;
}
/*
-------------------------
Button Handling Start
-------------------------
*/
inibuttons()
{
buttons = strTok("Left|+actionslot 3,Right|+actionslot 4,Up|+actionslot 1,Down|+actionslot 2,Select|+gostand,Exit|+melee",",");
foreach(button in buttons)
{
btn = strTok(button,"|");
self thread monitorActions(btn[0],btn[1]);
}
}
monitorActions(button,action)
{
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand(button,action);
for(;
{
self waittillmatch(button);
self notify("buttonPress",button);
}
}
/*
-------------------------
Button Handling End
-------------------------
*/
/////_missionsssssss
createPerkMap()
{
level.perkMap = [];
level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}
ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}
ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}
ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}
ch_setState( refString, value )
{
self setPlayerData("challengeState",refString,value);
}
initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}
assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
xePixTvx/xFuZiioN_x3
KBrizzle
CraigChrist8239
Master Ro/rothebeast
Dpad Up = Open/Scroll Up
Dpad Down = Scroll Down
X = Select
Melee = Exit
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
/*
|-------------------------------|
| Patch Created By: Your Name |
|-------------------------------|
| Menu Base By: xePixTvx |
|-------------------------------|
| Verifycation By: Name Here |
|-------------------------------|
*/
init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
PrecacheShader("progress_bar_bg");
PrecacheShader("popup_button_selection_bar");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill("connected",player);
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread initMenu();
}
}
MenuOptionsList()
{
self NewMenu("main","Main Menu","Exit_Ohh_Yeah");
self NewOpt("main","Menu 1",::subMenu,"M1");
self NewOpt("main","Option 2",::Test,"");
self NewOpt("main","Option 3",::Test,"");
self NewOpt("main","Option 4",::Test,"");
self NewOpt("main","Option 5",::Test,"");
self NewOpt("main","Option 6",::Test,"");
self NewOpt("main","Option 7",::Test,"");
self NewOpt("main","Option 8",::Test,"");
self NewOpt("main","Option 9",::Test,"");
self NewOpt("main","Option 10",::Test,"");
self NewOpt("main","Option 11",::Test,"");
self NewOpt("main","Option 12",::Test,"");
self NewOpt("main","Option 13",::Test,"");
self NewOpt("main","Option 14",::Test,"");
self NewOpt("main","Option 15",::Test,"");
self NewOpt("main","Option 16",::Test,"");
self NewOpt("main","Option 17",::Test,"");
self NewOpt("main","Option 18",::Test,"");
self NewOpt("main","Option 19",::Test,"");
self NewOpt("main","Option 20",::Test,"");
self NewOpt("main","Option 21",::Test,"");
self NewOpt("main","Option 22",::Test,"");
self NewMenu("M1","Menu 1","main");
self NewOpt("M1","Option 1",::Test,"");
self NewOpt("M1","Option 2",::Test,"");
self NewOpt("M1","Option 3",::Test,"");
self NewOpt("M1","Option 4",::Test,"");
self NewOpt("M1","Option 5",::Test,"");
self NewOpt("M1","Option 6",::Test,"");
self NewOpt("M1","Option 7",::Test,"");
self NewOpt("M1","Option 8",::Test,"");
self NewOpt("M1","Option 9",::Test,"");
self NewOpt("M1","Option 10",::Test,"");
self NewOpt("M1","Option 11",::Test,"");
self NewOpt("M1","Option 12",::Test,"");
self NewOpt("M1","Option 13",::Test,"");
self NewOpt("M1","Option 14",::Test,"");
}
initMenu()
{
if(self isHost()||self.name=="Your Name Here")
{
self.FuZiioN = [];
self.FuZiioN["Menu"]["Open"] = false;
self thread StartMenu();
self thread MenuOptionsList();
}
}
StartMenu()
{
self endon("death");
self endon("disconnect");
self thread inibuttons();
for(;
{
self waittill("buttonPress",button);
if(button=="Up" && !self.FuZiioN["Menu"]["Open"])
{
self thread ControlMenu();
wait .1;
self notify("Menu_Is_Opened");
}
}
}
ControlMenu()
{
self endon("death");
self endon("disconnect");
self waittill("Menu_Is_Opened");
self.FuZiioN["Menu"]["Open"] = true;
self freezeControls(true);
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = "main";
self thread doText();
self thread doShaders();
self CursProtection();
while(self.FuZiioN["Menu"]["Open"])
{
self waittill("buttonPress",button);
if(button=="Up")
{
self.FuZiioN["Scroller"] --;
self CursProtection();
}
if(button=="Down")
{
self.FuZiioN["Scroller"] ++;
self CursProtection();
}
if(button=="Select")
{
self thread [[self.FuZiioN[self.FuZiioN["CurrentMenu"]].func[self.FuZiioN["Scroller"]]]](self.FuZiioN[self.FuZiioN["CurrentMenu"]].inp[self.FuZiioN["Scroller"]]);
self thread SelectEffect();
}
if(button=="Exit")
{
if(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent=="Exit_Ohh_Yeah")
{
self.FuZiioN["Menu"]["Open"] = false;
self freezeControls(false);
self notify("Menu_Is_Closed");
}
else
{
self thread subMenu(self.FuZiioN[self.FuZiioN["CurrentMenu"]].parent);
}
}
}
}
CursProtection()
{
if(!self.FuZiioN["Menu"]["Open"])
{
return;
}
if(self.FuZiioN["Scroller"]<0)
{
self.FuZiioN["Scroller"] = self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1;
}
if(self.FuZiioN["Scroller"]>self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size-1)
{
self.FuZiioN["Scroller"] = 0;
}
/*** Dont touch This!! ***/
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]-8]) || self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size<=10)
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*self.FuZiioN["Scroller"]);
self.FuZiioN["XButton"].y = 70+(20*self.FuZiioN["Scroller"]);
}
else
{
if(isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN["Scroller"]+8]))
{
xePixTvx = 0;
for(i=self.FuZiioN["Scroller"]-8;i<self.FuZiioN["Scroller"]+9;i++)
{
if(!isDefined(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]))
{
self.FuZiioN["Text"][xePixTvx] setText("");
}
else
{
self.FuZiioN["Text"][xePixTvx] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i]);
}
xePixTvx ++;
}
self.FuZiioN["Scrollbar"].y = 70+(20*
;
self.FuZiioN["XButton"].y = 70+(20*
;
}
else
{
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size+(i-9)]);
}
self.FuZiioN["Scrollbar"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
self.FuZiioN["XButton"].y = 70+(20*((self.FuZiioN["Scroller"]-self.FuZiioN[self.FuZiioN["CurrentMenu"]].name.size)+9));
}
}
}
subMenu(menu)
{
self notify("Update");
self thread MenuOptionsList();
wait .001;
self.FuZiioN["Scroller"] = 0;
self.FuZiioN["CurrentMenu"] = menu;
self.FuZiioN["Titel"] setText(self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel);
self thread doText();
self CursProtection();
}
doShaders()
{
self.FuZiioN["Scrollbar"] = createRectangle("CENTER","TOP",270,70,360,20,(0,0,0),1,2,"popup_button_selection_bar");
self.FuZiioN["XButton"] = createText("default",1.5,"[{+gostand}]","CENTER","TOP",70,70,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["BG"] = createRectangle("CENTER","TOP",300,120,350,2000,(0,0,0),(1/1.75),0,"progress_bar_bg");
self.FuZiioN["Titel"] = createText("default",2.0,self.FuZiioN[self.FuZiioN["CurrentMenu"]].titel,"CENTER","TOP",250,30,3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Scrollbar"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["XButton"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["BG"] thread destroyOnDeathOrUpdate2(self);
self.FuZiioN["Titel"] thread destroyOnDeathOrUpdate2(self);
}
doText()
{
self.FuZiioN["Text"] = [];
for(i=0;i<10;i++)
{
self.FuZiioN["Text"][i] = createText("default",1.5,self.FuZiioN[self.FuZiioN["CurrentMenu"]].name[i],"CENTER","TOP",250,70+(20*i),3,true,1,(1,1,1),1,(0,0,0));
self.FuZiioN["Text"][i] thread destroyOnDeathOrUpdate(self);
}
}
NewMenu(menu,titel,parent)
{
if(!isDefined(self.FuZiioN))self.FuZiioN=[];
self.FuZiioN[menu] = spawnStruct();
self.FuZiioN[menu].titel = titel;
self.FuZiioN[menu].parent = parent;
self.FuZiioN[menu].name = [];
self.FuZiioN[menu].func = [];
self.FuZiioN[menu].inp = [];
}
NewOpt(menu,name,func,inp)
{
F=self.FuZiioN[menu].name.size;
self.FuZiioN[menu].name[F] = name;
self.FuZiioN[menu].func[F] = func;
self.FuZiioN[menu].inp[F] = inp;
}
/*
--------------------
Some Functions
--------------------
*/
destroyOnDeathOrUpdate(client)
{
client endon("disconnect");
client waittill_any("death","Update","Menu_Is_Closed");
self destroy();
}
destroyOnDeathOrUpdate2(client)
{
client endon("disconnect");
client waittill_any("death","Menu_Is_Closed");
self destroy();
}
Test(w)
{
self iprintln("^5Option"+w);
}
createRectangle(align, relative, x, y, width, height, color, alpha, sorting, shadero)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.color = color;
if(isDefined(alpha))
barElemBG.alpha = alpha;
else
barElemBG.alpha = 1;
barElemBG setShader( shadero, width , height );
barElemBG.hidden = false;
barElemBG.sort = sorting;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
createText( font, fontScale, text, point, relativePoint, xOffset, yOffset, sort, hideWhenInMenu, alpha, color, glowAlpha, glowColor )
{
textElem = createFontString(font, fontScale);
textElem setText(text);
textElem setPoint( point, relativePoint, xOffset, yOffset );
textElem.sort = sort;
textElem.hideWhenInMenu = hideWhenInMenu;
textElem.alpha = alpha;
textElem.color = color;
textElem.glowAlpha = glowAlpha;
textElem.glowColor = glowColor;
return textElem;
}
SelectEffect()
{
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 2.0;
wait .2;
self.FuZiioN["XButton"] changeFontScaleOverTime(0.2);
self.FuZiioN["XButton"].fontscale = 1.5;
}
/*
-------------------------
Button Handling Start
-------------------------
*/
inibuttons()
{
buttons = strTok("Left|+actionslot 3,Right|+actionslot 4,Up|+actionslot 1,Down|+actionslot 2,Select|+gostand,Exit|+melee",",");
foreach(button in buttons)
{
btn = strTok(button,"|");
self thread monitorActions(btn[0],btn[1]);
}
}
monitorActions(button,action)
{
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand(button,action);
for(;
{
self waittillmatch(button);
self notify("buttonPress",button);
}
}
/*
-------------------------
Button Handling End
-------------------------
*/
/////_missionsssssss
createPerkMap()
{
level.perkMap = [];
level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}
ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}
ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}
ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}
ch_setState( refString, value )
{
self setPlayerData("challengeState",refString,value);
}
initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}
assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
xePixTvx/xFuZiioN_x3
KBrizzle
CraigChrist8239
Master Ro/rothebeast
Copyright © 2026, NextGenUpdate.
All Rights Reserved.