Post: [RELEASE] My New Dual-ish Menu Base [1.11]
10-31-2012, 04:03 AM #1
Master Ro
I make food
(adsbygoogle = window.adsbygoogle || []).push({}); Hi guys. I am just releasing my new dual-ish Menu Base I have had in my possession for a while. I will be updating this thread soon with an updated version of this menu with verification. I just wanted to get this base out there.

Also, Before we get Started, A Special thanks to xePixTVx for the Menu Base Style Idea!

Well, Here is The Video

Thanks KCxFTW for Recording :love:



    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader( "menu_button_selection_bar" );
precacheShader("hudsoftline");
level thread createPerkMap();
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread OutofMenuActions();
self thread rosMenu();
self maps\mp\gametypes\_hud_message:GaspldNotifyMessage("New Menu Base!", "By: rothebeast", "Credits to xePixTVx For The Idea", (1, 0, 0), "mp_level_up", 7);

}
}

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;
}

rosMenu()
{
self AddMenu( "Main", "Main Menu", "" );
self AddRightFunction( "Main", "Sub Menu 1", ::runRightSub, "Sub1");

self AddRightFunction( "Main", "Sub Menu 2", ::runRightSub, "Sub2");

self AddRightFunction( "Main", "Sub Menu 3", ::runRightSub, "Sub3");

self AddRightFunction( "Main", "Sub Menu 4", ::runRightSub, "Sub4");

self AddRightFunction( "Main", "Sub Menu 5", ::runRightSub, "Sub5");

self AddRightFunction( "Main", "Sub Menu 6", ::runRightSub, "Sub6");

self AddRightFunction( "Main", "Sub Menu 7", ::runRightSub, "Sub7");

self AddRightFunction( "Main", "Sub Menu 8", ::runRightSub, "Sub8");

self AddRightFunction( "Main", "Sub Menu 9", ::runRightSub, "Sub9");

self AddLeftMenu( "Sub1", "", "Main" );

self AddRightOptionFunction( "Sub1", "Test", ::Test, "Sub1");

self AddRightOptionFunction( "Sub1", "Zoidberg", ::Zoidberg, "Sub1");

self AddLeftMenu( "Sub2", "", "Main" );

self AddRightOptionFunction( "Sub2", "Test", ::Test, "Sub2");

self AddLeftMenu( "Sub3", "", "Main" );

self AddRightOptionFunction( "Sub3", "Test", ::Test, "Sub3");

self AddLeftMenu( "Sub4", "", "Main" );

self AddRightOptionFunction( "Sub4", "Test", ::Test, "Sub4");

self AddLeftMenu( "Sub5", "", "Main" );

self AddRightOptionFunction( "Sub5", "Test", ::Test, "Sub5");

self AddLeftMenu( "Sub6", "", "Main" );

self AddRightOptionFunction( "Sub6", "Test", ::Test, "Sub6");

self AddLeftMenu( "Sub7", "", "Main" );

self AddRightOptionFunction( "Sub7", "Test", ::Test, "Sub7");

self AddLeftMenu( "Sub8", "", "Main" );

self AddRightOptionFunction( "Sub8", "Test", ::Test, "Sub8");

self AddLeftMenu( "Sub9", "", "Main" );

self AddRightOptionFunction( "Sub9", "Test", ::Test, "Sub9");

}
Test()
{
self iPrintlnBold("This is a test function");
}

//My Dual Base (Credits to xePixTVx for Idea)
OutofMenuActions()
{
self endon("disconnect");
self endon("death");
self.menuOpen = false;
self.subMenuOpen = false;
self thread buttons();
for(;Winky Winky
{
self waittill("buttonPress", button);
if( button == "Left" && !self.menuOpen )
{
self freezeControls( true );
self.menuOpen = true;
self.subMenuOpen = true;
self thread runMenu( "Main" );
self thread createMenuElements();
self thread inMenuDvars();
}
wait .4;
}
}

runMenu( menu )
{
self endon("disconnect");
self endon("death");
if(!isDefined(self.curser)) self.curser = 0;
if(!isDefined(self.menuText)) self.menuText = [];
self.menuOpen = true;
self.isScrolling = false;
for( i = 0; i < self.rothebeast[menu].opt.size; i++ )
{
self.menuText[i] = createFontString("default", 1.3 );
self.menuText[i] setPoint("CENTER", "TOP", -370, i * 18 + 0 );
self.menuText[i] setText( self.rothebeast[menu].opt[i] );
self.menuText[i].alpha = 1;
self.menuText[i].sort = 3;
}
while( self.menuOpen )
{
for( i = 0; i < self.rothebeast[menu].opt.size; i++ )
{
self.menuText[i].color = (1, 1, 1);
self.menuText[i].fontscale = 1.3;
}
self.menuText[self.curser].color = (1, 1, 1);
self.menuText[self.curser].fontscale = 1.3;
self.menu["Scrollbar"] Move( "y", (self.curser * 1Cool Man (aka Tustin) + 0, 1.0 );
self waittill("buttonPress", button);
switch( button )
{
case "Up":
self.curser--;
if( self.curser < 0 ) self.curser = self.rothebeast[menu].opt.size - 1;
//self initializeMenuCurs( menu );
//self cursMove();
self.isScrolling = true;
break;
case "Down":
self.curser++;
if( self.curser > self.rothebeast[menu].opt.size - 1 ) self.curser = 0;
//self initializeMenuCurs( menu );
//self cursMove();
self.isScrolling = true;
break;
case "A":
self thread [[self.rothebeast[menu].func[self.curser]]]( self.rothebeast[menu].arg[self.curser] );
self.menu["Scrollbar"].alpha = 0;
self thread createRightMenuElements();
break;
case "RB":
if( self.rothebeast[menu].parent == "" )
{
self thread destroyElements();
self setClientDvar("g_hardcore", 0);
self.menuOpen = false;
}
else
self thread runRightSub( self.right[menu].parent );
self.menu["Scrollbar"].alpha = 1;
self.rightmenu["Scrollbar"].alpha = 0;
break;
}
}
for( i = 0; i < self.rothebeast[menu].opt.size; i++ ) self.menuText[i] destroy();
}

runRightMenu( menu )
{
self endon("death");
self endon("disconnect");
if(!isDefined(self.rightcurs)) self.rightcurs = 0;
if(!isDefined(self.subText)) self.subText = [];
self.menuOpen = false;
self.subMenuOpen = true;
for( i = 0; i < self.right[menu].opt.size; i++ )
{
self.subText[i] = createFontString("default", 1.3 );
self.subText[i] setPoint( "CENTER", "TOP", -220, i * 18 + 0 );
self.subText[i] setText( self.right[menu].opt[i] );
self.subText[i].alpha = 1;
self.subText[i].sort = 3;
}
while( self.subMenuOpen )
{
for( i = 0; i < self.right[menu].opt.size; i++ )
{
self.subText[i].color = (1, 1 ,1);
self.subText[i].fontscale = 1.2;
}
self.subText[self.rightcurs].color = (1, 1, 1);
self.subText[self.rightcurs].fontscale = 1.2;
self.rightmenu["Scrollbar"] Move( "y", (self.rightcurs * 1Cool Man (aka Tustin) + 0, 1.0 );
self waittill("buttonPress", button );
switch( button )
{
case "Up":
self.rightcurs--;
if( self.rightcurs < 0 ) self.rightcurs = self.right[menu].opt.size - 1;
//self initializeMenuCurs();
//self cursMove();
break;
case "Down":
self.rightcurs++;
if( self.rightcurs > self.right[menu].opt.size - 1 ) self.rightcurs = 0;
//self initializeMenuCurs();
//self cursMove();
break;
case "A":
self thread [[self.right[menu].func[self.rightcurs]]](self.right[menu].arg[self.rightcurs]);
break;
case "RB":
self thread runMenu("Main");
self.menuOpen = true;
self.subMenuOpen = false;
self.menu["Scrollbar"].alpha = 1;
self.rightmenu["Scrollbar"].alpha = 0;
break;
}
}
for( i = 0; i < self.right[menu].opt.size; i++ ) self.subText[i] destroy();
}

createMenuElements()
{
self.menu["Background"] = self createShader("white", -150, -70, 330, 280, undefined, undefined, 1, true, (0, 0, 0), 0.6);//( "CENTER", "CENTER", -260, -110, 400, 350, (0, 0, 0), 0.5, 1 );
self.menu["Scrollbar"] = self createRectangle( "RIGHT", "TOP", -285, 0, 320, 22, (0,0,0), 1, 2 );
self.menu["Separator"] = self createRectangle( "LEFT", "TOP", -290, 30, 6, 300, (1,0,0), 1, 3 );
}

createRightMenuElements()
{
self.rightmenu["Scrollbar"] = self createRectangle( "RIGHT", "TOP", -140, 40, 145, 22, (0, 0, 0), 1, 2);
}

inMenuDvars()
{
self setClientDvar("g_hardcore", 1);
}

destroyElements()
{
self.menuOpen = false;
self freezeControls( false );
self.menu["Background"] destroy();
self.menu["Scrollbar"] destroy();
self.menu["Separator"] destroy();
self.menu["HorizLine"] destroy();
self.menu["Background"].alpha = 0;
self.menu["Scrollbar"].alpha = 0;
self.menu["Separator"].alpha = 0;
self.menu["HorizLine"].alpha = 0;
}

Move(axis, calc, time)
{
if(axis=="x") self.x = calc;
else self.y = calc;
}

createShader(shader, x, y, width, height, horzAlign, vertAlign, sort, hideWhenInMenu, color, alpha)
{
shaderElem = newClientHudElem(self);
shaderElem.x = x;
shaderElem.y = y;
shaderElem setShader( shader, width, height );
shaderElem.horzAlign = horzAlign;
shaderElem.vertAlign = vertAlign;
shaderElem.sort = sort;
shaderElem.hideWhenInMenu = hideWhenInMenu;
shaderElem.color = color;
if(isDefined(alpha))
shaderElem.alpha = alpha;
else
shaderElem.alpha = 1;

return shaderElem;
}

createRectangle( align, relative, x, y, width, height, color, alpha, sort )
{
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.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( "white", width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}

//Functions
runRightSub( menu )
{
self.menuOpen = false;
self.subMenuOpen = false;
wait .2;
runRightMenu( menu );
}

//For Main menu
AddLeftMenu( menu, title, parent )
{
if(!isDefined(self.right)) self.right = [];
self.right[menu] = spawnStruct();
self.right[menu].title = title;
self.right[menu].parent = parent;
}

AddMenu( menu, title, parent )
{
if(!isDefined(self.rothebeast)) self.rothebeast = [];
self.rothebeast[menu] = spawnStruct();
self.rothebeast[menu].title = title;
self.rothebeast[menu].parent = parent;
}
//For Main Menu
AddRightFunction( menu, opt, func, arg )
{
if(!isDefined(self.rothebeast[menu].opt)) self.rothebeast[menu].opt = [];
if(!isDefined(self.rothebeast[menu].func)) self.rothebeast[menu].func = [];
if(!isDefined(self.rothebeast[menu].arg)) self.rothebeast[menu].arg = [];
i = self.rothebeast[menu].func.size;
self.rothebeast[menu].opt[i] = opt;
self.rothebeast[menu].func[i] = func;
self.rothebeast[menu].arg[i] = arg;
}
AddRightOptionFunction( menu, opt, func, arg )
{
if(!isDefined(self.right[menu].opt)) self.right[menu].opt = [];
if(!isDefined(self.right[menu].func)) self.right[menu].func = [];
if(!isDefined(self.right[menu].arg)) self.right[menu].arg = [];
i = self.right[menu].func.size;
self.right[menu].opt[i] = opt;
self.right[menu].func[i] = func;
self.right[menu].arg[i] = arg;
}

buttons()
{
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+reload,B|+stance,Y|weapnext,A|+gostand,LS|+br eath_sprint,RS|+melee,LB|+smoke,RB|+frag", ",");
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(;Winky Winky
{
self waittillmatch( button );
self notify( "buttonPress", button );
}
}

elemMove(time, input)
{
self moveOverTime(time);
self.y = input;
}
//WHY NOT ZOIDBERG?
Zoidberg()
{
//The shaders
zoid[0] = cShader("center", "center", 300, 100, 300, 260, "white", (224/255,88/255,88/255), 1, 1337); //head
zoid[1] = cShader("center", "center", 205, 240, 110, 80, "white", (1,1,1), 1, 133Cool Man (aka Tustin); //left eye
zoid[2] = cShader("center", "center", 395, 240, 110, 80, "white", (1,1,1), 1, 1339); //right eye
zoid[3] = cShader("center", "center", 205, 240, 40, 40, "white", (0,0,0), 1, 1340); //left pupil
zoid[4] = cShader("center", "center", 395, 240, 40, 40, "white", (0,0,0), 1, 1341); //right pupil
zoid[5] = cShader("center", "center", 300, 360, 300, 40, "white", (224/255,72/255,72/255), 1, 1342); //mouth
zoid[6] = cShader("center", "center", 300, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1343); //tenticle 1
zoid[7] = cShader("center", "center", 190, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1344); //tenticle 2
zoid[8] = cShader("center", "center", 410, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1345); //tenticle 3
}

//Use this to generate them
cShader(point, rPoint, x, y, width, height, elem, colour, alpha, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.alpha = alpha;
shader.y = y;
shader.sort = sort;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}

doQuickRace()
{
self endon("death");
for(;Winky Winky
{
self thread Race();
}
}

Race( i )
{
self endon("death");
self maps\mp\gametypes\_hud_message:GaspldNotifyMessage("Quick Race Mod", "By: rothebeast", "Enjoy!", (0, 0, 1), "mp_level_up", 7);
for( i = 0; i < 10; i++ )
{
iPrintlnBold(i);
}
}
//Thank you Mikkkeeey and TheFallen for helping me understand this better
initializeMenuCurs( menu )
{

if(!isDefined(self.rothebeast[menu].opt[self.curser-2]) || self.rothebeast[menu].opt.size <= 5)
{
for(i = 0; i < 5; i++)
self.menuText[i] setText(self.rothebeast[menu].opt[i]);
self.menuText.y = (15*self.curser)-203;
}
else
{
if(isDefined(self.rothebeast[menu][self.curser]+Cool Man (aka Tustin))
{
optNum = 0;
for(i=self.curser-8;i<self.curser+9;i++)
{
if(!isDefined(self.rothebeast[menu].opt[i]))
self.menuText[optNum] setText("");
else
self.menuText[optNum] setText(self.rothebeast[menu].opt[i]);
optNum++;
}
//Menu Text
self.menuText[self.curser].y = -173;
}
else
{
for(i = 0; i < 5; i++)
self.menuText[i] setText(self.rothebeast[menu][self.rothebeast[menu].opt.size+i-8]);
}
}
}
cursMove()
{
self.menu["Scrollbar"] MoveOverTime( 1 );
}



CREDITS:

KBrizzle and CraigChrist - Button Handling
ITheFallenI - Inspiration on all my bases
xePixTVx - A Special Thanks for the Idea :y:
KCxFTW - For Testing, Recording and A Lot of Ideas. Thanks Bro :love:
LabelHD - Zoidberg Needa
TribeModz - Ideas
itzJmacias - Ideas
rothebeast - Making the Menu Base

I hope you Enjoy Thank you!
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to Master Ro for this useful post:

KCxFTW, Kitty=^.^=, KM-_1337, ohhImpreza, xePixTvx, xExploitModzHD

The following user groaned Master Ro for this awful post:

xGscClan
10-31-2012, 04:06 AM #2
KCxFTW
Who’s Jim Erased?
Originally posted by Master
Hi guys. I am just releasing my new dual-ish Menu Base I have had in my possession for a while. I will be updating this thread soon with an updated version of this menu with verification. I just wanted to get this base out there.

Also, Before we get Started, A Special thanks to xePixTVx for the Menu Base Style Idea!

Well, Here is The Video

Thanks KCxFTW for Recording :love:

You must login or register to view this content.

    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader( "menu_button_selection_bar" );
precacheShader("hudsoftline");
level thread createPerkMap();
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread OutofMenuActions();
self thread rosMenu();
self maps\mp\gametypes\_hud_message:GaspldNotifyMessage("New Menu Base!", "By: rothebeast", "Credits to xePixTVx For The Idea", (1, 0, 0), "mp_level_up", 7);

}
}

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;
}

rosMenu()
{
self AddMenu( "Main", "Main Menu", "" );
self AddRightFunction( "Main", "Sub Menu 1", ::runRightSub, "Sub1");

self AddRightFunction( "Main", "Sub Menu 2", ::runRightSub, "Sub2");

self AddRightFunction( "Main", "Sub Menu 3", ::runRightSub, "Sub3");

self AddRightFunction( "Main", "Sub Menu 4", ::runRightSub, "Sub4");

self AddRightFunction( "Main", "Sub Menu 5", ::runRightSub, "Sub5");

self AddRightFunction( "Main", "Sub Menu 6", ::runRightSub, "Sub6");

self AddRightFunction( "Main", "Sub Menu 7", ::runRightSub, "Sub7");

self AddRightFunction( "Main", "Sub Menu 8", ::runRightSub, "Sub8");

self AddRightFunction( "Main", "Sub Menu 9", ::runRightSub, "Sub9");

self AddLeftMenu( "Sub1", "", "Main" );

self AddRightOptionFunction( "Sub1", "Test", ::Test, "Sub1");

self AddRightOptionFunction( "Sub1", "Zoidberg", ::Zoidberg, "Sub1");

self AddLeftMenu( "Sub2", "", "Main" );

self AddRightOptionFunction( "Sub2", "Test", ::Test, "Sub2");

self AddLeftMenu( "Sub3", "", "Main" );

self AddRightOptionFunction( "Sub3", "Test", ::Test, "Sub3");

self AddLeftMenu( "Sub4", "", "Main" );

self AddRightOptionFunction( "Sub4", "Test", ::Test, "Sub4");

self AddLeftMenu( "Sub5", "", "Main" );

self AddRightOptionFunction( "Sub5", "Test", ::Test, "Sub5");

self AddLeftMenu( "Sub6", "", "Main" );

self AddRightOptionFunction( "Sub6", "Test", ::Test, "Sub6");

self AddLeftMenu( "Sub7", "", "Main" );

self AddRightOptionFunction( "Sub7", "Test", ::Test, "Sub7");

self AddLeftMenu( "Sub8", "", "Main" );

self AddRightOptionFunction( "Sub8", "Test", ::Test, "Sub8");

self AddLeftMenu( "Sub9", "", "Main" );

self AddRightOptionFunction( "Sub9", "Test", ::Test, "Sub9");

}
Test()
{
self iPrintlnBold("This is a test function");
}

//My Dual Base (Credits to xePixTVx for Idea)
OutofMenuActions()
{
self endon("disconnect");
self endon("death");
self.menuOpen = false;
self.subMenuOpen = false;
self thread buttons();
for(;Winky Winky
{
self waittill("buttonPress", button);
if( button == "Left" && !self.menuOpen )
{
self freezeControls( true );
self.menuOpen = true;
self.subMenuOpen = true;
self thread runMenu( "Main" );
self thread createMenuElements();
self thread inMenuDvars();
}
wait .4;
}
}

runMenu( menu )
{
self endon("disconnect");
self endon("death");
if(!isDefined(self.curser)) self.curser = 0;
if(!isDefined(self.menuText)) self.menuText = [];
self.menuOpen = true;
self.isScrolling = false;
for( i = 0; i < self.rothebeast[menu].opt.size; i++ )
{
self.menuText[i] = createFontString("default", 1.3 );
self.menuText[i] setPoint("CENTER", "TOP", -370, i * 18 + 0 );
self.menuText[i] setText( self.rothebeast[menu].opt[i] );
self.menuText[i].alpha = 1;
self.menuText[i].sort = 3;
}
while( self.menuOpen )
{
for( i = 0; i < self.rothebeast[menu].opt.size; i++ )
{
self.menuText[i].color = (1, 1, 1);
self.menuText[i].fontscale = 1.3;
}
self.menuText[self.curser].color = (1, 1, 1);
self.menuText[self.curser].fontscale = 1.3;
self.menu["Scrollbar"] Move( "y", (self.curser * 1Cool Man (aka Tustin) + 0, 1.0 );
self waittill("buttonPress", button);
switch( button )
{
case "Up":
self.curser--;
if( self.curser < 0 ) self.curser = self.rothebeast[menu].opt.size - 1;
//self initializeMenuCurs( menu );
//self cursMove();
self.isScrolling = true;
break;
case "Down":
self.curser++;
if( self.curser > self.rothebeast[menu].opt.size - 1 ) self.curser = 0;
//self initializeMenuCurs( menu );
//self cursMove();
self.isScrolling = true;
break;
case "A":
self thread [[self.rothebeast[menu].func[self.curser]]]( self.rothebeast[menu].arg[self.curser] );
self.menu["Scrollbar"].alpha = 0;
self thread createRightMenuElements();
break;
case "RB":
if( self.rothebeast[menu].parent == "" )
{
self thread destroyElements();
self setClientDvar("g_hardcore", 0);
self.menuOpen = false;
}
else
self thread runRightSub( self.right[menu].parent );
self.menu["Scrollbar"].alpha = 1;
self.rightmenu["Scrollbar"].alpha = 0;
break;
}
}
for( i = 0; i < self.rothebeast[menu].opt.size; i++ ) self.menuText[i] destroy();
}

runRightMenu( menu )
{
self endon("death");
self endon("disconnect");
if(!isDefined(self.rightcurs)) self.rightcurs = 0;
if(!isDefined(self.subText)) self.subText = [];
self.menuOpen = false;
self.subMenuOpen = true;
for( i = 0; i < self.right[menu].opt.size; i++ )
{
self.subText[i] = createFontString("default", 1.3 );
self.subText[i] setPoint( "CENTER", "TOP", -220, i * 18 + 0 );
self.subText[i] setText( self.right[menu].opt[i] );
self.subText[i].alpha = 1;
self.subText[i].sort = 3;
}
while( self.subMenuOpen )
{
for( i = 0; i < self.right[menu].opt.size; i++ )
{
self.subText[i].color = (1, 1 ,1);
self.subText[i].fontscale = 1.2;
}
self.subText[self.rightcurs].color = (1, 1, 1);
self.subText[self.rightcurs].fontscale = 1.2;
self.rightmenu["Scrollbar"] Move( "y", (self.rightcurs * 1Cool Man (aka Tustin) + 0, 1.0 );
self waittill("buttonPress", button );
switch( button )
{
case "Up":
self.rightcurs--;
if( self.rightcurs < 0 ) self.rightcurs = self.right[menu].opt.size - 1;
//self initializeMenuCurs();
//self cursMove();
break;
case "Down":
self.rightcurs++;
if( self.rightcurs > self.right[menu].opt.size - 1 ) self.rightcurs = 0;
//self initializeMenuCurs();
//self cursMove();
break;
case "A":
self thread [[self.right[menu].func[self.rightcurs]]](self.right[menu].arg[self.rightcurs]);
break;
case "RB":
self thread runMenu("Main");
self.menuOpen = true;
self.subMenuOpen = false;
self.menu["Scrollbar"].alpha = 1;
self.rightmenu["Scrollbar"].alpha = 0;
break;
}
}
for( i = 0; i < self.right[menu].opt.size; i++ ) self.subText[i] destroy();
}

createMenuElements()
{
self.menu["Background"] = self createShader("white", -150, -70, 330, 280, undefined, undefined, 1, true, (0, 0, 0), 0.6);//( "CENTER", "CENTER", -260, -110, 400, 350, (0, 0, 0), 0.5, 1 );
self.menu["Scrollbar"] = self createRectangle( "RIGHT", "TOP", -285, 0, 320, 22, (0,0,0), 1, 2 );
self.menu["Separator"] = self createRectangle( "LEFT", "TOP", -290, 30, 6, 300, (1,0,0), 1, 3 );
}

createRightMenuElements()
{
self.rightmenu["Scrollbar"] = self createRectangle( "RIGHT", "TOP", -140, 40, 145, 22, (0, 0, 0), 1, 2);
}

inMenuDvars()
{
self setClientDvar("g_hardcore", 1);
}

destroyElements()
{
self.menuOpen = false;
self freezeControls( false );
self.menu["Background"] destroy();
self.menu["Scrollbar"] destroy();
self.menu["Separator"] destroy();
self.menu["HorizLine"] destroy();
self.menu["Background"].alpha = 0;
self.menu["Scrollbar"].alpha = 0;
self.menu["Separator"].alpha = 0;
self.menu["HorizLine"].alpha = 0;
}

Move(axis, calc, time)
{
if(axis=="x") self.x = calc;
else self.y = calc;
}

createShader(shader, x, y, width, height, horzAlign, vertAlign, sort, hideWhenInMenu, color, alpha)
{
shaderElem = newClientHudElem(self);
shaderElem.x = x;
shaderElem.y = y;
shaderElem setShader( shader, width, height );
shaderElem.horzAlign = horzAlign;
shaderElem.vertAlign = vertAlign;
shaderElem.sort = sort;
shaderElem.hideWhenInMenu = hideWhenInMenu;
shaderElem.color = color;
if(isDefined(alpha))
shaderElem.alpha = alpha;
else
shaderElem.alpha = 1;

return shaderElem;
}

createRectangle( align, relative, x, y, width, height, color, alpha, sort )
{
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.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( "white", width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}

//Functions
runRightSub( menu )
{
self.menuOpen = false;
self.subMenuOpen = false;
wait .2;
runRightMenu( menu );
}

//For Main menu
AddLeftMenu( menu, title, parent )
{
if(!isDefined(self.right)) self.right = [];
self.right[menu] = spawnStruct();
self.right[menu].title = title;
self.right[menu].parent = parent;
}

AddMenu( menu, title, parent )
{
if(!isDefined(self.rothebeast)) self.rothebeast = [];
self.rothebeast[menu] = spawnStruct();
self.rothebeast[menu].title = title;
self.rothebeast[menu].parent = parent;
}
//For Main Menu
AddRightFunction( menu, opt, func, arg )
{
if(!isDefined(self.rothebeast[menu].opt)) self.rothebeast[menu].opt = [];
if(!isDefined(self.rothebeast[menu].func)) self.rothebeast[menu].func = [];
if(!isDefined(self.rothebeast[menu].arg)) self.rothebeast[menu].arg = [];
i = self.rothebeast[menu].func.size;
self.rothebeast[menu].opt[i] = opt;
self.rothebeast[menu].func[i] = func;
self.rothebeast[menu].arg[i] = arg;
}
AddRightOptionFunction( menu, opt, func, arg )
{
if(!isDefined(self.right[menu].opt)) self.right[menu].opt = [];
if(!isDefined(self.right[menu].func)) self.right[menu].func = [];
if(!isDefined(self.right[menu].arg)) self.right[menu].arg = [];
i = self.right[menu].func.size;
self.right[menu].opt[i] = opt;
self.right[menu].func[i] = func;
self.right[menu].arg[i] = arg;
}

buttons()
{
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+reload,B|+stance,Y|weapnext,A|+gostand,LS|+br eath_sprint,RS|+melee,LB|+smoke,RB|+frag", ",");
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(;Winky Winky
{
self waittillmatch( button );
self notify( "buttonPress", button );
}
}

elemMove(time, input)
{
self moveOverTime(time);
self.y = input;
}
//WHY NOT ZOIDBERG?
Zoidberg()
{
//The shaders
zoid[0] = cShader("center", "center", 300, 100, 300, 260, "white", (224/255,88/255,88/255), 1, 1337); //head
zoid[1] = cShader("center", "center", 205, 240, 110, 80, "white", (1,1,1), 1, 133Cool Man (aka Tustin); //left eye
zoid[2] = cShader("center", "center", 395, 240, 110, 80, "white", (1,1,1), 1, 1339); //right eye
zoid[3] = cShader("center", "center", 205, 240, 40, 40, "white", (0,0,0), 1, 1340); //left pupil
zoid[4] = cShader("center", "center", 395, 240, 40, 40, "white", (0,0,0), 1, 1341); //right pupil
zoid[5] = cShader("center", "center", 300, 360, 300, 40, "white", (224/255,72/255,72/255), 1, 1342); //mouth
zoid[6] = cShader("center", "center", 300, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1343); //tenticle 1
zoid[7] = cShader("center", "center", 190, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1344); //tenticle 2
zoid[8] = cShader("center", "center", 410, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1345); //tenticle 3
}

//Use this to generate them
cShader(point, rPoint, x, y, width, height, elem, colour, alpha, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.alpha = alpha;
shader.y = y;
shader.sort = sort;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}

doQuickRace()
{
self endon("death");
for(;Winky Winky
{
self thread Race();
}
}

Race( i )
{
self endon("death");
self maps\mp\gametypes\_hud_message:GaspldNotifyMessage("Quick Race Mod", "By: rothebeast", "Enjoy!", (0, 0, 1), "mp_level_up", 7);
for( i = 0; i < 10; i++ )
{
iPrintlnBold(i);
}
}
//Thank you Mikkkeeey and TheFallen for helping me understand this better
initializeMenuCurs( menu )
{

if(!isDefined(self.rothebeast[menu].opt[self.curser-2]) || self.rothebeast[menu].opt.size <= 5)
{
for(i = 0; i < 5; i++)
self.menuText[i] setText(self.rothebeast[menu].opt[i]);
self.menuText.y = (15*self.curser)-203;
}
else
{
if(isDefined(self.rothebeast[menu][self.curser]+Cool Man (aka Tustin))
{
optNum = 0;
for(i=self.curser-8;i<self.curser+9;i++)
{
if(!isDefined(self.rothebeast[menu].opt[i]))
self.menuText[optNum] setText("");
else
self.menuText[optNum] setText(self.rothebeast[menu].opt[i]);
optNum++;
}
//Menu Text
self.menuText[self.curser].y = -173;
}
else
{
for(i = 0; i < 5; i++)
self.menuText[i] setText(self.rothebeast[menu][self.rothebeast[menu].opt.size+i-8]);
}
}
}
cursMove()
{
self.menu["Scrollbar"] MoveOverTime( 1 );
}



CREDITS:

KBrizzle and CraigChrist - Button Handling
ITheFallenI - Inspiration on all my bases
xePixTVx - A Special Thanks for the Idea :y:
KCxFTW - For Testing, Recording and A Lot of Ideas. Thanks Bro :love:
TribeModz - Ideas
itzJmacias - Ideas
rothebeast - Making the Menu Base

I hope you Enjoy Thank you!


Great job bro! :y:
10-31-2012, 10:06 AM #3
Good Job. Smile
10-31-2012, 08:26 PM #4
Looks pretty good, i like this alot. :ca:
10-31-2012, 08:35 PM #5
JXT2020
Do a barrel roll!
Nice keep it up stare
11-01-2012, 12:49 AM #6
Master Ro
I make food
Originally posted by JXT2020 View Post
Nice keep it up stare


Thanks :rainbowcry:
11-01-2012, 01:10 AM #7
I find it hilarious how xGscClan has the right to Groan anything. :boss:

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

BvB-09r-_-N!c0, KM-_1337, Komet웃, Master Ro
11-01-2012, 02:15 AM #8
UnboundUser
[move]:rainbowcry: {UU}'s v5 :rainbowcry:[/move]
Originally posted by Master
Hi guys. I am just releasing my new dual-ish Menu Base I have had in my possession for a while. I will be updating this thread soon with an updated version of this menu with verification. I just wanted to get this base out there.

Also, Before we get Started, A Special thanks to xePixTVx for the Menu Base Style Idea!

Well, Here is The Video

Thanks KCxFTW for Recording


Nice but you can make it look better and work better. Just saying cuz I have seen better dual menu bases from people. *cough* ITheFallenI *cough* :love:
11-01-2012, 02:20 AM #9
Originally posted by xCosmic View Post
I find it hilarious how xGscClan has the right to Groan anything. :boss:


Agreed :y:

The following user thanked KM-_1337 for this useful post:

Fittro
11-01-2012, 02:21 AM #10
Originally posted by Master
Hi guys. I am just releasing my new dual-ish Menu Base I have had in my possession for a while. I will be updating this thread soon with an updated version of this menu with verification. I just wanted to get this base out there.

Also, Before we get Started, A Special thanks to xePixTVx for the Menu Base Style Idea!

Well, Here is The Video

Thanks KCxFTW for Recording :love:



    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader( "menu_button_selection_bar" );
precacheShader("hudsoftline");
level thread createPerkMap();
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread OutofMenuActions();
self thread rosMenu();
self maps\mp\gametypes\_hud_message:GaspldNotifyMessage("New Menu Base!", "By: rothebeast", "Credits to xePixTVx For The Idea", (1, 0, 0), "mp_level_up", 7);

}
}

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;
}

rosMenu()
{
self AddMenu( "Main", "Main Menu", "" );
self AddRightFunction( "Main", "Sub Menu 1", ::runRightSub, "Sub1");

self AddRightFunction( "Main", "Sub Menu 2", ::runRightSub, "Sub2");

self AddRightFunction( "Main", "Sub Menu 3", ::runRightSub, "Sub3");

self AddRightFunction( "Main", "Sub Menu 4", ::runRightSub, "Sub4");

self AddRightFunction( "Main", "Sub Menu 5", ::runRightSub, "Sub5");

self AddRightFunction( "Main", "Sub Menu 6", ::runRightSub, "Sub6");

self AddRightFunction( "Main", "Sub Menu 7", ::runRightSub, "Sub7");

self AddRightFunction( "Main", "Sub Menu 8", ::runRightSub, "Sub8");

self AddRightFunction( "Main", "Sub Menu 9", ::runRightSub, "Sub9");

self AddLeftMenu( "Sub1", "", "Main" );

self AddRightOptionFunction( "Sub1", "Test", ::Test, "Sub1");

self AddRightOptionFunction( "Sub1", "Zoidberg", ::Zoidberg, "Sub1");

self AddLeftMenu( "Sub2", "", "Main" );

self AddRightOptionFunction( "Sub2", "Test", ::Test, "Sub2");

self AddLeftMenu( "Sub3", "", "Main" );

self AddRightOptionFunction( "Sub3", "Test", ::Test, "Sub3");

self AddLeftMenu( "Sub4", "", "Main" );

self AddRightOptionFunction( "Sub4", "Test", ::Test, "Sub4");

self AddLeftMenu( "Sub5", "", "Main" );

self AddRightOptionFunction( "Sub5", "Test", ::Test, "Sub5");

self AddLeftMenu( "Sub6", "", "Main" );

self AddRightOptionFunction( "Sub6", "Test", ::Test, "Sub6");

self AddLeftMenu( "Sub7", "", "Main" );

self AddRightOptionFunction( "Sub7", "Test", ::Test, "Sub7");

self AddLeftMenu( "Sub8", "", "Main" );

self AddRightOptionFunction( "Sub8", "Test", ::Test, "Sub8");

self AddLeftMenu( "Sub9", "", "Main" );

self AddRightOptionFunction( "Sub9", "Test", ::Test, "Sub9");

}
Test()
{
self iPrintlnBold("This is a test function");
}

//My Dual Base (Credits to xePixTVx for Idea)
OutofMenuActions()
{
self endon("disconnect");
self endon("death");
self.menuOpen = false;
self.subMenuOpen = false;
self thread buttons();
for(;Winky Winky
{
self waittill("buttonPress", button);
if( button == "Left" && !self.menuOpen )
{
self freezeControls( true );
self.menuOpen = true;
self.subMenuOpen = true;
self thread runMenu( "Main" );
self thread createMenuElements();
self thread inMenuDvars();
}
wait .4;
}
}

runMenu( menu )
{
self endon("disconnect");
self endon("death");
if(!isDefined(self.curser)) self.curser = 0;
if(!isDefined(self.menuText)) self.menuText = [];
self.menuOpen = true;
self.isScrolling = false;
for( i = 0; i < self.rothebeast[menu].opt.size; i++ )
{
self.menuText[i] = createFontString("default", 1.3 );
self.menuText[i] setPoint("CENTER", "TOP", -370, i * 18 + 0 );
self.menuText[i] setText( self.rothebeast[menu].opt[i] );
self.menuText[i].alpha = 1;
self.menuText[i].sort = 3;
}
while( self.menuOpen )
{
for( i = 0; i < self.rothebeast[menu].opt.size; i++ )
{
self.menuText[i].color = (1, 1, 1);
self.menuText[i].fontscale = 1.3;
}
self.menuText[self.curser].color = (1, 1, 1);
self.menuText[self.curser].fontscale = 1.3;
self.menu["Scrollbar"] Move( "y", (self.curser * 1Cool Man (aka Tustin) + 0, 1.0 );
self waittill("buttonPress", button);
switch( button )
{
case "Up":
self.curser--;
if( self.curser < 0 ) self.curser = self.rothebeast[menu].opt.size - 1;
//self initializeMenuCurs( menu );
//self cursMove();
self.isScrolling = true;
break;
case "Down":
self.curser++;
if( self.curser > self.rothebeast[menu].opt.size - 1 ) self.curser = 0;
//self initializeMenuCurs( menu );
//self cursMove();
self.isScrolling = true;
break;
case "A":
self thread [[self.rothebeast[menu].func[self.curser]]]( self.rothebeast[menu].arg[self.curser] );
self.menu["Scrollbar"].alpha = 0;
self thread createRightMenuElements();
break;
case "RB":
if( self.rothebeast[menu].parent == "" )
{
self thread destroyElements();
self setClientDvar("g_hardcore", 0);
self.menuOpen = false;
}
else
self thread runRightSub( self.right[menu].parent );
self.menu["Scrollbar"].alpha = 1;
self.rightmenu["Scrollbar"].alpha = 0;
break;
}
}
for( i = 0; i < self.rothebeast[menu].opt.size; i++ ) self.menuText[i] destroy();
}

runRightMenu( menu )
{
self endon("death");
self endon("disconnect");
if(!isDefined(self.rightcurs)) self.rightcurs = 0;
if(!isDefined(self.subText)) self.subText = [];
self.menuOpen = false;
self.subMenuOpen = true;
for( i = 0; i < self.right[menu].opt.size; i++ )
{
self.subText[i] = createFontString("default", 1.3 );
self.subText[i] setPoint( "CENTER", "TOP", -220, i * 18 + 0 );
self.subText[i] setText( self.right[menu].opt[i] );
self.subText[i].alpha = 1;
self.subText[i].sort = 3;
}
while( self.subMenuOpen )
{
for( i = 0; i < self.right[menu].opt.size; i++ )
{
self.subText[i].color = (1, 1 ,1);
self.subText[i].fontscale = 1.2;
}
self.subText[self.rightcurs].color = (1, 1, 1);
self.subText[self.rightcurs].fontscale = 1.2;
self.rightmenu["Scrollbar"] Move( "y", (self.rightcurs * 1Cool Man (aka Tustin) + 0, 1.0 );
self waittill("buttonPress", button );
switch( button )
{
case "Up":
self.rightcurs--;
if( self.rightcurs < 0 ) self.rightcurs = self.right[menu].opt.size - 1;
//self initializeMenuCurs();
//self cursMove();
break;
case "Down":
self.rightcurs++;
if( self.rightcurs > self.right[menu].opt.size - 1 ) self.rightcurs = 0;
//self initializeMenuCurs();
//self cursMove();
break;
case "A":
self thread [[self.right[menu].func[self.rightcurs]]](self.right[menu].arg[self.rightcurs]);
break;
case "RB":
self thread runMenu("Main");
self.menuOpen = true;
self.subMenuOpen = false;
self.menu["Scrollbar"].alpha = 1;
self.rightmenu["Scrollbar"].alpha = 0;
break;
}
}
for( i = 0; i < self.right[menu].opt.size; i++ ) self.subText[i] destroy();
}

createMenuElements()
{
self.menu["Background"] = self createShader("white", -150, -70, 330, 280, undefined, undefined, 1, true, (0, 0, 0), 0.6);//( "CENTER", "CENTER", -260, -110, 400, 350, (0, 0, 0), 0.5, 1 );
self.menu["Scrollbar"] = self createRectangle( "RIGHT", "TOP", -285, 0, 320, 22, (0,0,0), 1, 2 );
self.menu["Separator"] = self createRectangle( "LEFT", "TOP", -290, 30, 6, 300, (1,0,0), 1, 3 );
}

createRightMenuElements()
{
self.rightmenu["Scrollbar"] = self createRectangle( "RIGHT", "TOP", -140, 40, 145, 22, (0, 0, 0), 1, 2);
}

inMenuDvars()
{
self setClientDvar("g_hardcore", 1);
}

destroyElements()
{
self.menuOpen = false;
self freezeControls( false );
self.menu["Background"] destroy();
self.menu["Scrollbar"] destroy();
self.menu["Separator"] destroy();
self.menu["HorizLine"] destroy();
self.menu["Background"].alpha = 0;
self.menu["Scrollbar"].alpha = 0;
self.menu["Separator"].alpha = 0;
self.menu["HorizLine"].alpha = 0;
}

Move(axis, calc, time)
{
if(axis=="x") self.x = calc;
else self.y = calc;
}

createShader(shader, x, y, width, height, horzAlign, vertAlign, sort, hideWhenInMenu, color, alpha)
{
shaderElem = newClientHudElem(self);
shaderElem.x = x;
shaderElem.y = y;
shaderElem setShader( shader, width, height );
shaderElem.horzAlign = horzAlign;
shaderElem.vertAlign = vertAlign;
shaderElem.sort = sort;
shaderElem.hideWhenInMenu = hideWhenInMenu;
shaderElem.color = color;
if(isDefined(alpha))
shaderElem.alpha = alpha;
else
shaderElem.alpha = 1;

return shaderElem;
}

createRectangle( align, relative, x, y, width, height, color, alpha, sort )
{
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.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( "white", width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}

//Functions
runRightSub( menu )
{
self.menuOpen = false;
self.subMenuOpen = false;
wait .2;
runRightMenu( menu );
}

//For Main menu
AddLeftMenu( menu, title, parent )
{
if(!isDefined(self.right)) self.right = [];
self.right[menu] = spawnStruct();
self.right[menu].title = title;
self.right[menu].parent = parent;
}

AddMenu( menu, title, parent )
{
if(!isDefined(self.rothebeast)) self.rothebeast = [];
self.rothebeast[menu] = spawnStruct();
self.rothebeast[menu].title = title;
self.rothebeast[menu].parent = parent;
}
//For Main Menu
AddRightFunction( menu, opt, func, arg )
{
if(!isDefined(self.rothebeast[menu].opt)) self.rothebeast[menu].opt = [];
if(!isDefined(self.rothebeast[menu].func)) self.rothebeast[menu].func = [];
if(!isDefined(self.rothebeast[menu].arg)) self.rothebeast[menu].arg = [];
i = self.rothebeast[menu].func.size;
self.rothebeast[menu].opt[i] = opt;
self.rothebeast[menu].func[i] = func;
self.rothebeast[menu].arg[i] = arg;
}
AddRightOptionFunction( menu, opt, func, arg )
{
if(!isDefined(self.right[menu].opt)) self.right[menu].opt = [];
if(!isDefined(self.right[menu].func)) self.right[menu].func = [];
if(!isDefined(self.right[menu].arg)) self.right[menu].arg = [];
i = self.right[menu].func.size;
self.right[menu].opt[i] = opt;
self.right[menu].func[i] = func;
self.right[menu].arg[i] = arg;
}

buttons()
{
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+reload,B|+stance,Y|weapnext,A|+gostand,LS|+br eath_sprint,RS|+melee,LB|+smoke,RB|+frag", ",");
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(;Winky Winky
{
self waittillmatch( button );
self notify( "buttonPress", button );
}
}

elemMove(time, input)
{
self moveOverTime(time);
self.y = input;
}
//WHY NOT ZOIDBERG?
Zoidberg()
{
//The shaders
zoid[0] = cShader("center", "center", 300, 100, 300, 260, "white", (224/255,88/255,88/255), 1, 1337); //head
zoid[1] = cShader("center", "center", 205, 240, 110, 80, "white", (1,1,1), 1, 133Cool Man (aka Tustin); //left eye
zoid[2] = cShader("center", "center", 395, 240, 110, 80, "white", (1,1,1), 1, 1339); //right eye
zoid[3] = cShader("center", "center", 205, 240, 40, 40, "white", (0,0,0), 1, 1340); //left pupil
zoid[4] = cShader("center", "center", 395, 240, 40, 40, "white", (0,0,0), 1, 1341); //right pupil
zoid[5] = cShader("center", "center", 300, 360, 300, 40, "white", (224/255,72/255,72/255), 1, 1342); //mouth
zoid[6] = cShader("center", "center", 300, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1343); //tenticle 1
zoid[7] = cShader("center", "center", 190, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1344); //tenticle 2
zoid[8] = cShader("center", "center", 410, 360, 80, 100, "white", (224/255,88/255,88/255), 1, 1345); //tenticle 3
}

//Use this to generate them
cShader(point, rPoint, x, y, width, height, elem, colour, alpha, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.alpha = alpha;
shader.y = y;
shader.sort = sort;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}

doQuickRace()
{
self endon("death");
for(;Winky Winky
{
self thread Race();
}
}

Race( i )
{
self endon("death");
self maps\mp\gametypes\_hud_message:GaspldNotifyMessage("Quick Race Mod", "By: rothebeast", "Enjoy!", (0, 0, 1), "mp_level_up", 7);
for( i = 0; i < 10; i++ )
{
iPrintlnBold(i);
}
}
//Thank you Mikkkeeey and TheFallen for helping me understand this better
initializeMenuCurs( menu )
{

if(!isDefined(self.rothebeast[menu].opt[self.curser-2]) || self.rothebeast[menu].opt.size <= 5)
{
for(i = 0; i < 5; i++)
self.menuText[i] setText(self.rothebeast[menu].opt[i]);
self.menuText.y = (15*self.curser)-203;
}
else
{
if(isDefined(self.rothebeast[menu][self.curser]+Cool Man (aka Tustin))
{
optNum = 0;
for(i=self.curser-8;i<self.curser+9;i++)
{
if(!isDefined(self.rothebeast[menu].opt[i]))
self.menuText[optNum] setText("");
else
self.menuText[optNum] setText(self.rothebeast[menu].opt[i]);
optNum++;
}
//Menu Text
self.menuText[self.curser].y = -173;
}
else
{
for(i = 0; i < 5; i++)
self.menuText[i] setText(self.rothebeast[menu][self.rothebeast[menu].opt.size+i-8]);
}
}
}
cursMove()
{
self.menu["Scrollbar"] MoveOverTime( 1 );
}



CREDITS:

KBrizzle and CraigChrist - Button Handling
ITheFallenI - Inspiration on all my bases
xePixTVx - A Special Thanks for the Idea :y:
KCxFTW - For Testing, Recording and A Lot of Ideas. Thanks Bro :love:
LabelHD - Zoidberg Needa
TribeModz - Ideas
itzJmacias - Ideas
rothebeast - Making the Menu Base

I hope you Enjoy Thank you!


Nice Job Ro Looks Good...:y:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo