Post: [RELEASE] Skyrim Look A Like Menu Base by Restxrt
12-17-2012, 02:35 AM #1
Restxrt Modz
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({});
Hey Guys, It's Restxrt!

Here it is! My Skyrim Look A Like Menu Base!!!
I finally decided to release it to the community, so enjoy Winky Winky

Video[/B]


How To Use[/B]
To Add a Option:
    
self addMenuOption( menu, scrolling number, option);

ex:
self addMenuOption( "exemple", 0, "LOL!");

To Add a Function:
    
self addMenuFunction( menu, scrolling number, function, argument/input);

ex:
self addMenuFunction( "exemple", 0, ::LOL, "LOL! Dont need this part");
Normal Function:
::yourFunction

To Make It Link To Another Gsc:
this\is\an\exemple::yourFunction

If you want to make it open a menu, this is how to:
self addMenuFunction( currentMenu, scrolling number, ::_openMenu, nextMenu);

or you can do this:
self thread _openMenu(menu);

[/SPOILER]

Controls
    
When its close
-----------------------------------------
Dpad Up - Mod Menu

When its open
-----------------------------------------
Dpad Up - Scroll Up
Dpad Down - Scroll Down
A/X - Select
B/O - Back



[/SIZE]
Credits:
    
★ Me - Making The Menu
★ K Brizzle - Button Handling
★ Skyrim - Idea lol
★ TheOz1337 - Recording
Tell me Smile


If youre going to make a menu with it, please give credits, thanks.

My Channel

You must login or register to view this content.


CODE HERE!
_missions.gsc
    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheString(&"MP_SUICIDE");
shaders = strTok("hudsoftline,cardicon_prestige10_02,cardicon_prestige10", ",");
for(i=0;i<shaders.size;i++)
precacheShader(shaders[i]);
for(i=1;i<=11;i++)
precacheShader("rank_prestige"+i);
level thread createPerkMap();
level thread onPlayerConnect();
}
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 );
}
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 welcomeMsg();
self thread iniMenu();
self thread notifyMenu();
self thread doButtons();
self iPrintln("Press [{+actionslot 1}] To Get The Skyrim Menu!");
self freezeControls(false);
self.menuOpen = 0;
self.subOpen = 0;
self.curs = 0;
self.curs2 = 0;
}
}
welcomeMsg()
{
hmb = spawnstruct();
hmb.iconName = "cardicon_prestige10_02";
hmb.titleText = "Skyrim Menu Base";
hmb.notifyText = "Made By Restxrt";
hmb.notifyText2 = "YT.com/RestxrtModz";
hmb.glowColor = (1,1,1);
self thread maps\mp\gametypes\_hud_message::notifyMessage( hmb );
}
createShader(point, rPoint, pos1, pos2, x, y, width, height, elem, color, alpha, foreground, sort, e1, e2, e3)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.vertAlign = pos1;
shader.horzAlign = pos2;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.color = color;
shader.alpha = alpha;
if(isDefined(foreground))
shader.foreground = foreground;
shader setShader(elem, width, height);
self thread destroyOnEvents(shader, e1, e2, e3);
return shader;
}
notifyMenu()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("buttonPress", button);
if(button == "Up"&&!self.menuOpen)
{
self.shader["first"] = createShader("center", "center", "center", "center", -300, 0, 150, 900, "black", (0,0,0), 0, false, 1, "death");
self.shader["second"] = createShader("center", "center", "center", "center", -100, 0, 150, 900, "black", (0,0,0), 0, false, 1, "death");
self.shader["line1"] = createShader("center", "center", "center", "center", -373, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line2"] = createShader("center", "center", "center", "center", -227, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line3"] = createShader("center", "center", "center", "center", -173, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line4"] = createShader("center", "center", "center", "center", -27, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.menuOpen = 1;
self setClientDvar("g_hardcore","1");
self setClientDvar("ui_hud_hardcore","1");
self setClientDvar("r_blur","3");
self thread _openMenu("main");
self freezeControls(true);
}
wait .05;
}
}
_openMenu(menu)
{
if(menu != "main")
{
self.curs2 = 0;
self.subOpen = 1;
}
else
{
self.curs = 0;
self.subOpen = 0;
}
if(menu == "main")
self notify("exit_sub");
self notify("stop_func");
self.menuText = [];
for(i=0;i<self.option[menu].size;i++)
{
self.menuText[i] = createFontString("default", 1.6);
if(menu == "main")
self.menuText[i] setPoint("LEFT", "LEFT", 0, i*20+20);
else
self.menuText[i] setPoint("LEFT", "LEFT", 200, i*20+20);
self.menuText[i] setText(self.option[menu][i]);
self.menuText[i].color = (1,1,1);
self.menuText[i].foreground = true;
//you can also use .archived = false; if you want more strings before the overflow
if(menu == "main")
self thread destroyOnEvents(self.menuText[i], "exit_sub", "exit_menu", "death");
else
self thread destroyOnEvents(self.menuText[i], "TROLOLOL", "exit_sub", "death");
}
self.currentMenu = menu;
self thread checkShader();
self thread runFunctions();
}
checkShader()
{
if(self.currentMenu != "main")
{
self.shader["second"].alpha = 0.9;
self.shader["first"].foreground = true;
self.shader["first"].color = ((200/255),(200/255),(200/255));
self.shader["first"].alpha = 0.6;
self.shader["line3"].alpha = 1;
self.shader["line4"].alpha = 1;
self.shader["line1"].alpha = 0.8;
self.shader["line2"].alpha = 0.8;
self.shader["line1"].foreground = false;
self.shader["line2"].foreground = false;
self.shader["line4"].foreground = true;
self.shader["line3"].foreground = true;
}
else
{
self.shader["second"].alpha = 0;
self.shader["first"].foreground = false;
self.shader["first"].color = (0,0,0);
self.shader["first"].alpha = 0.9;
self.shader["line3"].alpha = 0;
self.shader["line4"].alpha = 0;
self.shader["line1"].alpha = 1;
self.shader["line2"].alpha = 1;
self.shader["line1"].foreground = true;
self.shader["line2"].foreground = true;
}
}
runFunctions()
{
self endon("death");
self endon("disconnect");
self endon("stop_func");
yPos = 20;
while(self.menuOpen)
{
for(i=0;i<self.menuText.size;i++)
{
if(self.currentMenu == "main")
{
if(i == self.curs)
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].glowAlpha = 0.05;
self.menuText[i].fontscale = 1.9;
self.menuText[i].glowColor = (1,1,1);
self.menuText[i].alpha = 1;
}
else
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].fontscale = 1.6;
self.menuText[i].glowAlpha = 0;
self.menuText[i].alpha = 0.7;
}
}
else
{
if(i == self.curs2)
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].glowAlpha = 0.05;
self.menuText[i].fontscale = 1.9;
self.menuText[i].glowColor = (1,1,1);
self.menuText[i].alpha = 1;
}
else
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].fontscale = 1.6;
self.menuText[i].glowAlpha = 0;
self.menuText[i].alpha = 0.7;
}
}
}
self waittill("buttonPress", button);
if(button == "Down")
{
if(self.currentMenu == "main")
{
if(self.curs<self.option[self.currentMenu].size-1)
{
self playSound("mouse_over");
self.curs++;
move = yPos*-1;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
else if(self.currentMenu != "main")
{
if(self.curs2<self.option[self.currentMenu].size-1)
{
self playSound("mouse_over");
self.curs2++;
move = yPos*-1;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
}
if(button == "Up")
{
if(self.currentMenu == "main")
{
if(self.curs>=0)
{
self playSound("mouse_over");
self.curs--;
move = yPos;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
else if(self.currentMenu != "main")
{
if(self.curs2>=0)
{
self playSound("mouse_over");
self.curs2--;
move = yPos;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
}
if(button == "A")
{
self playSound("mp_ingame_summary");
if(self.currentMenu == "main")
self thread [[self.function[self.currentMenu][self.curs]]](self.input[self.currentMenu][self.curs]);
else
self thread [[self.function[self.currentMenu][self.curs2]]](self.input[self.currentMenu][self.curs2]);
}
if(button == "B")
{
if(self.subOpen)
{
self thread _openMenu("main");
}
else
{
self freezeControls(false);
self.menuOpen = 0;
foreach(shader in self.shader)
shader destroy();
self setClientDvar("g_hardcore","0");
self setClientDvar("ui_hud_hardcore","0");
self setClientDvar("r_blur","0");
self notify("exit_menu");
self notify("stop_func");
}
}
wait .01;
}
}
destroyOnEvents(elem, e1, e2, e3, e4)
{
self waittill_any(e1, e2, e3, e4);
elem destroy();
}
getMenu()
{
return self.currentMenu;
}
getCurs()
{
if(getMenu() == "main")
return self.curs;
else if(getMenu() != "main")
return self.curs2;
}
iniMenu()
{
self endon("death");
//Main
self addMenuOption("main", 0, "Sub Menu 1");
self addMenuOption("main", 1, "Sub Menu 2");
self addMenuOption("main", 2, "Sub Menu 3");
self addMenuOption("main", 3, "Sub Menu 4");
self addMenuOption("main", 4, "Sub Menu 5");
self addMenuOption("main", 5, "Sub Menu 6");
self addMenuOption("main", 6, "Sub Menu 7");
self addMenuOption("main", 7, "Option");
self addMenuOption("main", 8, "Option");
self addMenuOption("main", 9, "Option");
self addMenuOption("main", 10, "Option");
self addMenuOption("main", 11, "Option");
self addMenuFunction("main", 0, ::_openMenu, "sub1");
self addMenuFunction("main", 1, ::_openMenu, "sub2");
self addMenuFunction("main", 2, ::_openMenu, "sub3");
self addMenuFunction("main", 3, ::_openMenu, "sub4");
self addMenuFunction("main", 4, ::_openMenu, "sub5");
self addMenuFunction("main", 5, ::_openMenu, "sub6");
self addMenuFunction("main", 6, ::_openMenu, "sub7");
self addMenuFunction("main", 7, ::test);
self addMenuFunction("main", 8, ::test);
self addMenuFunction("main", 9, ::test);
self addMenuFunction("main", 10, ::test);
self addMenuFunction("main", 11, ::test);
//Sub 1
self addMenuOption("sub1", 0, "Option");
self addMenuOption("sub1", 1, "Option");
self addMenuOption("sub1", 2, "Option");
self addMenuOption("sub1", 3, "Option");
self addMenuOption("sub1", 4, "Option");
self addMenuOption("sub1", 5, "Option");
self addMenuOption("sub1", 6, "Option");
self addMenuOption("sub1", 7, "Option");
self addMenuOption("sub1", 8, "Option");
self addMenuOption("sub1", 9, "Option");
self addMenuOption("sub1", 10, "Option");
self addMenuOption("sub1", 11, "Option");
self addMenuFunction("sub1", 0, ::test);
self addMenuFunction("sub1", 1, ::test);
self addMenuFunction("sub1", 2, ::test);
self addMenuFunction("sub1", 3, ::test);
self addMenuFunction("sub1", 4, ::test);
self addMenuFunction("sub1", 5, ::test);
self addMenuFunction("sub1", 6, ::test);
self addMenuFunction("sub1", 7, ::test);
self addMenuFunction("sub1", 8, ::test);
self addMenuFunction("sub1", 9, ::test);
self addMenuFunction("sub1", 10, ::test);
self addMenuFunction("sub1", 11, ::test);
//Sub 2
self addMenuOption("sub2", 0, "Option");
self addMenuOption("sub2", 1, "Option");
self addMenuOption("sub2", 2, "Option");
self addMenuOption("sub2", 3, "Option");
self addMenuOption("sub2", 4, "Option");
self addMenuOption("sub2", 5, "Option");
self addMenuOption("sub2", 6, "Option");
self addMenuOption("sub2", 7, "Option");
self addMenuOption("sub2", 8, "Option");
self addMenuOption("sub2", 9, "Option");
self addMenuOption("sub2", 10, "Option");
self addMenuOption("sub2", 11, "Option");
self addMenuFunction("sub2", 0, ::test);
self addMenuFunction("sub2", 1, ::test);
self addMenuFunction("sub2", 2, ::test);
self addMenuFunction("sub2", 3, ::test);
self addMenuFunction("sub2", 4, ::test);
self addMenuFunction("sub2", 5, ::test);
self addMenuFunction("sub2", 6, ::test);
self addMenuFunction("sub2", 7, ::test);
self addMenuFunction("sub2", 8, ::test);
self addMenuFunction("sub2", 9, ::test);
self addMenuFunction("sub2", 10, ::test);
self addMenuFunction("sub2", 11, ::test);
//Sub 3
self addMenuOption("sub3", 0, "Option");
self addMenuOption("sub3", 1, "Option");
self addMenuOption("sub3", 2, "Option");
self addMenuOption("sub3", 3, "Option");
self addMenuOption("sub3", 4, "Option");
self addMenuOption("sub3", 5, "Option");
self addMenuOption("sub3", 6, "Option");
self addMenuOption("sub3", 7, "Option");
self addMenuOption("sub3", 8, "Option");
self addMenuOption("sub3", 9, "Option");
self addMenuOption("sub3", 10, "Option");
self addMenuOption("sub3", 11, "Option");
self addMenuFunction("sub3", 0, ::test);
self addMenuFunction("sub3", 1, ::test);
self addMenuFunction("sub3", 2, ::test);
self addMenuFunction("sub3", 3, ::test);
self addMenuFunction("sub3", 4, ::test);
self addMenuFunction("sub3", 5, ::test);
self addMenuFunction("sub3", 6, ::test);
self addMenuFunction("sub3", 7, ::test);
self addMenuFunction("sub3", 8, ::test);
self addMenuFunction("sub3", 9, ::test);
self addMenuFunction("sub3", 10, ::test);
self addMenuFunction("sub3", 11, ::test);
//Sub 4
self addMenuOption("sub4", 0, "Option");
self addMenuOption("sub4", 1, "Option");
self addMenuOption("sub4", 2, "Option");
self addMenuOption("sub4", 3, "Option");
self addMenuOption("sub4", 4, "Option");
self addMenuOption("sub4", 5, "Option");
self addMenuOption("sub4", 6, "Option");
self addMenuOption("sub4", 7, "Option");
self addMenuOption("sub4", 8, "Option");
self addMenuOption("sub4", 9, "Option");
self addMenuOption("sub4", 10, "Option");
self addMenuOption("sub4", 11, "Option");
self addMenuFunction("sub4", 0, ::test);
self addMenuFunction("sub4", 1, ::test);
self addMenuFunction("sub4", 2, ::test);
self addMenuFunction("sub4", 3, ::test);
self addMenuFunction("sub4", 4, ::test);
self addMenuFunction("sub4", 5, ::test);
self addMenuFunction("sub4", 6, ::test);
self addMenuFunction("sub4", 7, ::test);
self addMenuFunction("sub4", 8, ::test);
self addMenuFunction("sub4", 9, ::test);
self addMenuFunction("sub4", 10, ::test);
self addMenuFunction("sub4", 11, ::test);
//Sub 5
self addMenuOption("sub5", 0, "Option");
self addMenuOption("sub5", 1, "Option");
self addMenuOption("sub5", 2, "Option");
self addMenuOption("sub5", 3, "Option");
self addMenuOption("sub5", 4, "Option");
self addMenuOption("sub5", 5, "Option");
self addMenuOption("sub5", 6, "Option");
self addMenuOption("sub5", 7, "Option");
self addMenuOption("sub5", 8, "Option");
self addMenuOption("sub5", 9, "Option");
self addMenuOption("sub5", 10, "Option");
self addMenuOption("sub5", 11, "Option");
self addMenuFunction("sub5", 0, ::test);
self addMenuFunction("sub5", 1, ::test);
self addMenuFunction("sub5", 2, ::test);
self addMenuFunction("sub5", 3, ::test);
self addMenuFunction("sub5", 4, ::test);
self addMenuFunction("sub5", 5, ::test);
self addMenuFunction("sub5", 6, ::test);
self addMenuFunction("sub5", 7, ::test);
self addMenuFunction("sub5", 8, ::test);
self addMenuFunction("sub5", 9, ::test);
self addMenuFunction("sub5", 10, ::test);
self addMenuFunction("sub5", 11, ::test);
//Sub 6
self addMenuOption("sub6", 0, "Option");
self addMenuOption("sub6", 1, "Option");
self addMenuOption("sub6", 2, "Option");
self addMenuOption("sub6", 3, "Option");
self addMenuOption("sub6", 4, "Option");
self addMenuOption("sub6", 5, "Option");
self addMenuOption("sub6", 6, "Option");
self addMenuOption("sub6", 7, "Option");
self addMenuOption("sub6", 8, "Option");
self addMenuOption("sub6", 9, "Option");
self addMenuOption("sub6", 10, "Option");
self addMenuOption("sub6", 11, "Option");
self addMenuFunction("sub6", 0, ::test);
self addMenuFunction("sub6", 1, ::test);
self addMenuFunction("sub6", 2, ::test);
self addMenuFunction("sub6", 3, ::test);
self addMenuFunction("sub6", 4, ::test);
self addMenuFunction("sub6", 5, ::test);
self addMenuFunction("sub6", 6, ::test);
self addMenuFunction("sub6", 7, ::test);
self addMenuFunction("sub6", 8, ::test);
self addMenuFunction("sub6", 9, ::test);
self addMenuFunction("sub6", 10, ::test);
self addMenuFunction("sub6", 11, ::test);
//Sub 7
self addMenuOption("sub7", 0, "Option");
self addMenuOption("sub7", 1, "Option");
self addMenuOption("sub7", 2, "Option");
self addMenuOption("sub7", 3, "Option");
self addMenuOption("sub7", 4, "Option");
self addMenuOption("sub7", 5, "Option");
self addMenuOption("sub7", 6, "Option");
self addMenuOption("sub7", 7, "Option");
self addMenuOption("sub7", 8, "Option");
self addMenuOption("sub7", 9, "Option");
self addMenuOption("sub7", 10, "Option");
self addMenuOption("sub7", 11, "Option");
self addMenuFunction("sub7", 0, ::test);
self addMenuFunction("sub7", 1, ::test);
self addMenuFunction("sub7", 2, ::test);
self addMenuFunction("sub7", 3, ::test);
self addMenuFunction("sub7", 4, ::test);
self addMenuFunction("sub7", 5, ::test);
self addMenuFunction("sub7", 6, ::test);
self addMenuFunction("sub7", 7, ::test);
self addMenuFunction("sub7", 8, ::test);
self addMenuFunction("sub7", 9, ::test);
self addMenuFunction("sub7", 10, ::test);
self addMenuFunction("sub7", 11, ::test);
}
addMenuOption(menu, number, text)
{
if(!isDefined(self.option[menu])) self.option[menu] = [];
self.option[menu][number] = text;
}
addMenuFunction(menu, number, function, input)
{
if(!isDefined(self.function[menu])) self.function[menu] = [];
self.function[menu][number] = function;
if(!isDefined(self.input[menu])) self.input[menu] = [];
if(isDefined(input)) self.input[menu][number] = input;
}
test()
{
if(self.currentMenu == "main")
self iPrintlnBold("Cursor Position: "+self.curs);
else
self iPrintlnBold("Cursor Position: "+self.curs2);
}
doButtons()
{
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+stance,Y|weapnext,A|+gostand,LS| +breath_sprint,RS|+melee,LB|+smoke,RB|+frag,RT|+at tack,LT|+speed_throw", ",");
foreach(button in buttons)
{
btn = strTok(button, "|");
self thread monitorActions(btn[0], btn[1]);
}
}
monitorActions(button, action)
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand(button, action);
for(;Winky Winky
{
self waittillmatch(button);
self notify("buttonPress", button);
}
}
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;
}


Restxrt <3[/COLOR]
(adsbygoogle = window.adsbygoogle || []).push({});

The following 13 users say thank you to Restxrt Modz for this useful post:

^TPP^, -Xperia-, *xActionMods*, Flamby, HackersForHire, im rich whore, Josh_ox3, Mz-Bomb3rZz-, OmGRhys-x, Master Ro, silentcobra22, TheUnexpected, xePixTvx
12-17-2012, 03:04 AM #2
John Leepe
< ^ > < ^ >
FINALLY! Awesome Man. I might use this Happy
12-17-2012, 03:21 AM #3
nice base man Happy looks like u worked hard on this

Congrats on Your first Rep star Happy
12-17-2012, 06:38 AM #4
Master Ro
I make food
This is actually an Extremely Nice Menu Base, but there is a great deal of unnecessary code in ur script (Might wanna tidy it up a bit)

Other than that, it is extremely nice. Job Well Done! :y:
12-17-2012, 12:44 PM #5
HackersForHire
Climbing up the ladder
Originally posted by Restxrt
Hey Guys, It's Restxrt!

Here it is! My Skyrim Look A Like Menu Base!!!
I finally decided to release it to the community, so enjoy Winky Winky

Video[/B]


How To Use[/B]
To Add a Option:
    
self addMenuOption( menu, scrolling number, option);

ex:
self addMenuOption( "exemple", 0, "LOL!");

To Add a Function:
    
self addMenuFunction( menu, scrolling number, function, argument/input);

ex:
self addMenuFunction( "exemple", 0, ::LOL, "LOL! Dont need this part");
Normal Function:
::yourFunction

To Make It Link To Another Gsc:
this\is\an\exemple::yourFunction

If you want to make it open a menu, this is how to:
self addMenuFunction( currentMenu, scrolling number, ::_openMenu, nextMenu);

or you can do this:
self thread _openMenu(menu);

[/SPOILER]

Controls
    
When its close
-----------------------------------------
Dpad Up - Mod Menu

When its open
-----------------------------------------
Dpad Up - Scroll Up
Dpad Down - Scroll Down
A/X - Select
B/O - Back



[/SIZE]
Credits:
    
★ Me - Making The Menu
★ K Brizzle - Button Handling
★ Skyrim - Idea lol
★ TheOz1337 - Recording
Tell me Smile


If youre going to make a menu with it, please give credits, thanks.

My Channel

You must login or register to view this content.


CODE HERE!
    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheString(&"MP_SUICIDE");
shaders = strTok("hudsoftline,cardicon_prestige10_02,cardicon_presti ge10", ",");
for(i=0;i<shaders.size;i++)
precacheShader(shaders[i]);
for(i=1;i<=11;i++)
precacheShader("rank_prestige"+i);
level thread createPerkMap();
level thread onPlayerConnect();
}
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 );
}
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 welcomeMsg();
self thread iniMenu();
self thread notifyMenu();
self thread doButtons();
self iPrintln("Press [{+actionslot 1}] To Get The Skyrim Menu!");
self freezeControls(false);
self.menuOpen = 0;
self.subOpen = 0;
self.curs = 0;
self.curs2 = 0;
}
}
welcomeMsg()
{
hmb = spawnstruct();
hmb.iconName = "cardicon_prestige10_02";
hmb.titleText = "Skyrim Menu Base";
hmb.notifyText = "Made By Restxrt";
hmb.notifyText2 = "YT.com/RestxrtModz";
hmb.glowColor = (1,1,1);
self thread maps\mp\gametypes\_hud_message::notifyMessage( hmb );
}
createShader(point, rPoint, pos1, pos2, x, y, width, height, elem, color, alpha, foreground, sort, e1, e2, e3)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.vertAlign = pos1;
shader.horzAlign = pos2;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.color = color;
shader.alpha = alpha;
if(isDefined(foreground))
shader.foreground = foreground;
shader setShader(elem, width, height);
self thread destroyOnEvents(shader, e1, e2, e3);
return shader;
}
notifyMenu()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("buttonPress", button);
if(button == "Up"&&!self.menuOpen)
{
self.shader["first"] = createShader("center", "center", "center", "center", -300, 0, 150, 900, "black", (0,0,0), 0, false, 1, "death");
self.shader["second"] = createShader("center", "center", "center", "center", -100, 0, 150, 900, "black", (0,0,0), 0, false, 1, "death");
self.shader["line1"] = createShader("center", "center", "center", "center", -373, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line2"] = createShader("center", "center", "center", "center", -227, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line3"] = createShader("center", "center", "center", "center", -173, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line4"] = createShader("center", "center", "center", "center", -27, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.menuOpen = 1;
self setClientDvar("g_hardcore","1");
self setClientDvar("ui_hud_hardcore","1");
self setClientDvar("r_blur","3");
self thread _openMenu("main");
self freezeControls(true);
}
wait .05;
}
}
_openMenu(menu)
{
if(menu != "main")
{
self.curs2 = 0;
self.subOpen = 1;
}
else
{
self.curs = 0;
self.subOpen = 0;
}
if(menu == "main")
self notify("exit_sub");
self notify("stop_func");
self.menuText = [];
for(i=0;i<self.option[menu].size;i++)
{
self.menuText[i] = createFontString("default", 1.6);
if(menu == "main")
self.menuText[i] setPoint("LEFT", "LEFT", 0, i*20+20);
else
self.menuText[i] setPoint("LEFT", "LEFT", 200, i*20+20);
self.menuText[i] setText(self.option[menu][i]);
self.menuText[i].color = (1,1,1);
self.menuText[i].foreground = true;
if(menu == "main")
self thread destroyOnEvents(self.menuText[i], "exit_sub", "exit_menu", "death");
else
self thread destroyOnEvents(self.menuText[i], "TROLOLOL", "exit_sub", "death");
}
self.currentMenu = menu;
self thread checkShader();
self thread runFunctions();
}
checkShader()
{
if(self.currentMenu != "main")
{
self.shader["second"].alpha = 0.9;
self.shader["first"].foreground = true;
self.shader["first"].color = ((200/255),(200/255),(200/255));
self.shader["first"].alpha = 0.6;
self.shader["line3"].alpha = 1;
self.shader["line4"].alpha = 1;
self.shader["line1"].alpha = 0.8;
self.shader["line2"].alpha = 0.8;
self.shader["line1"].foreground = false;
self.shader["line2"].foreground = false;
self.shader["line4"].foreground = true;
self.shader["line3"].foreground = true;
}
else
{
self.shader["second"].alpha = 0;
self.shader["first"].foreground = false;
self.shader["first"].color = (0,0,0);
self.shader["first"].alpha = 0.9;
self.shader["line3"].alpha = 0;
self.shader["line4"].alpha = 0;
self.shader["line1"].alpha = 1;
self.shader["line2"].alpha = 1;
self.shader["line1"].foreground = true;
self.shader["line2"].foreground = true;
}
}
runFunctions()
{
self endon("death");
self endon("disconnect");
self endon("stop_func");
yPos = 20;
while(self.menuOpen)
{
for(i=0;i<self.menuText.size;i++)
{
if(self.currentMenu == "main")
{
if(i == self.curs)
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].glowAlpha = 0.05;
self.menuText[i].fontscale = 1.9;
self.menuText[i].glowColor = (1,1,1);
self.menuText[i].alpha = 1;
}
else
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].fontscale = 1.6;
self.menuText[i].glowAlpha = 0;
self.menuText[i].alpha = 0.7;
}
}
else
{
if(i == self.curs2)
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].glowAlpha = 0.05;
self.menuText[i].fontscale = 1.9;
self.menuText[i].glowColor = (1,1,1);
self.menuText[i].alpha = 1;
}
else
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].fontscale = 1.6;
self.menuText[i].glowAlpha = 0;
self.menuText[i].alpha = 0.7;
}
}
}
self waittill("buttonPress", button);
if(button == "Down")
{
if(self.currentMenu == "main")
{
if(self.curs<self.option[self.currentMenu].size-1)
{
self playSound("mouse_over");
self.curs++;
move = yPos*-1;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
else if(self.currentMenu != "main")
{
if(self.curs2<self.option[self.currentMenu].size-1)
{
self playSound("mouse_over");
self.curs2++;
move = yPos*-1;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
}
if(button == "Up")
{
if(self.currentMenu == "main")
{
if(self.curs>=1)
{
self playSound("mouse_over");
self.curs--;
move = yPos;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
else if(self.currentMenu != "main")
{
if(self.curs2>=1)
{
self playSound("mouse_over");
self.curs2--;
move = yPos;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
}
if(button == "A")
{
self playSound("mp_ingame_summary");
if(self.currentMenu == "main")
self thread [[self.function[self.currentMenu][self.curs]]](self.input[self.currentMenu][self.curs]);
else
self thread [[self.function[self.currentMenu][self.curs2]]](self.input[self.currentMenu][self.curs2]);
}
if(button == "B")
{
if(self.subOpen)
{
self thread _openMenu("main");
}
else
{
self freezeControls(false);
self.menuOpen = 0;
foreach(shader in self.shader)
shader destroy();
self setClientDvar("g_hardcore","0");
self setClientDvar("ui_hud_hardcore","0");
self setClientDvar("r_blur","0");
self notify("exit_menu");
self notify("stop_func");
}
}
wait .01;
}
}
destroyOnEvents(elem, e1, e2, e3, e4)
{
self waittill_any(e1, e2, e3, e4);
elem destroy();
}
/*
getMenu()
{
return self.currentMenu;
}
getCurs()
{
if(getMenu() == "main")
return self.curs;
else if(getMenu() != "main")
return self.curs2;
}
*/
iniMenu()
{
self endon("death");
//Main
self addMenuOption("main", 0, "Sub Menu 1");
self addMenuOption("main", 1, "Sub Menu 2");
self addMenuOption("main", 2, "Sub Menu 3");
self addMenuOption("main", 3, "Sub Menu 4");
self addMenuOption("main", 4, "Sub Menu 5");
self addMenuOption("main", 5, "Sub Menu 6");
self addMenuOption("main", 6, "Sub Menu 7");
self addMenuOption("main", 7, "Option");
self addMenuOption("main", 8, "Option");
self addMenuOption("main", 9, "Option");
self addMenuOption("main", 10, "Option");
self addMenuOption("main", 11, "Option");
self addMenuFunction("main", 0, ::_openMenu, "sub1");
self addMenuFunction("main", 1, ::_openMenu, "sub2");
self addMenuFunction("main", 2, ::_openMenu, "sub3");
self addMenuFunction("main", 3, ::_openMenu, "sub4");
self addMenuFunction("main", 4, ::_openMenu, "sub5");
self addMenuFunction("main", 5, ::_openMenu, "sub6");
self addMenuFunction("main", 6, ::_openMenu, "sub7");
self addMenuFunction("main", 7, ::test);
self addMenuFunction("main", 8, ::test);
self addMenuFunction("main", 9, ::test);
self addMenuFunction("main", 10, ::test);
self addMenuFunction("main", 11, ::test);
//Sub 1
self addMenuOption("sub1", 0, "Option");
self addMenuOption("sub1", 1, "Option");
self addMenuOption("sub1", 2, "Option");
self addMenuOption("sub1", 3, "Option");
self addMenuOption("sub1", 4, "Option");
self addMenuOption("sub1", 5, "Option");
self addMenuOption("sub1", 6, "Option");
self addMenuOption("sub1", 7, "Option");
self addMenuOption("sub1", 8, "Option");
self addMenuOption("sub1", 9, "Option");
self addMenuOption("sub1", 10, "Option");
self addMenuOption("sub1", 11, "Option");
self addMenuFunction("sub1", 0, ::test);
self addMenuFunction("sub1", 1, ::test);
self addMenuFunction("sub1", 2, ::test);
self addMenuFunction("sub1", 3, ::test);
self addMenuFunction("sub1", 4, ::test);
self addMenuFunction("sub1", 5, ::test);
self addMenuFunction("sub1", 6, ::test);
self addMenuFunction("sub1", 7, ::test);
self addMenuFunction("sub1", 8, ::test);
self addMenuFunction("sub1", 9, ::test);
self addMenuFunction("sub1", 10, ::test);
self addMenuFunction("sub1", 11, ::test);
//Sub 2
self addMenuOption("sub2", 0, "Option");
self addMenuOption("sub2", 1, "Option");
self addMenuOption("sub2", 2, "Option");
self addMenuOption("sub2", 3, "Option");
self addMenuOption("sub2", 4, "Option");
self addMenuOption("sub2", 5, "Option");
self addMenuOption("sub2", 6, "Option");
self addMenuOption("sub2", 7, "Option");
self addMenuOption("sub2", 8, "Option");
self addMenuOption("sub2", 9, "Option");
self addMenuOption("sub2", 10, "Option");
self addMenuOption("sub2", 11, "Option");
self addMenuFunction("sub2", 0, ::test);
self addMenuFunction("sub2", 1, ::test);
self addMenuFunction("sub2", 2, ::test);
self addMenuFunction("sub2", 3, ::test);
self addMenuFunction("sub2", 4, ::test);
self addMenuFunction("sub2", 5, ::test);
self addMenuFunction("sub2", 6, ::test);
self addMenuFunction("sub2", 7, ::test);
self addMenuFunction("sub2", 8, ::test);
self addMenuFunction("sub2", 9, ::test);
self addMenuFunction("sub2", 10, ::test);
self addMenuFunction("sub2", 11, ::test);
//Sub 3
self addMenuOption("sub3", 0, "Option");
self addMenuOption("sub3", 1, "Option");
self addMenuOption("sub3", 2, "Option");
self addMenuOption("sub3", 3, "Option");
self addMenuOption("sub3", 4, "Option");
self addMenuOption("sub3", 5, "Option");
self addMenuOption("sub3", 6, "Option");
self addMenuOption("sub3", 7, "Option");
self addMenuOption("sub3", 8, "Option");
self addMenuOption("sub3", 9, "Option");
self addMenuOption("sub3", 10, "Option");
self addMenuOption("sub3", 11, "Option");
self addMenuFunction("sub3", 0, ::test);
self addMenuFunction("sub3", 1, ::test);
self addMenuFunction("sub3", 2, ::test);
self addMenuFunction("sub3", 3, ::test);
self addMenuFunction("sub3", 4, ::test);
self addMenuFunction("sub3", 5, ::test);
self addMenuFunction("sub3", 6, ::test);
self addMenuFunction("sub3", 7, ::test);
self addMenuFunction("sub3", 8, ::test);
self addMenuFunction("sub3", 9, ::test);
self addMenuFunction("sub3", 10, ::test);
self addMenuFunction("sub3", 11, ::test);
//Sub 4
self addMenuOption("sub4", 0, "Option");
self addMenuOption("sub4", 1, "Option");
self addMenuOption("sub4", 2, "Option");
self addMenuOption("sub4", 3, "Option");
self addMenuOption("sub4", 4, "Option");
self addMenuOption("sub4", 5, "Option");
self addMenuOption("sub4", 6, "Option");
self addMenuOption("sub4", 7, "Option");
self addMenuOption("sub4", 8, "Option");
self addMenuOption("sub4", 9, "Option");
self addMenuOption("sub4", 10, "Option");
self addMenuOption("sub4", 11, "Option");
self addMenuFunction("sub4", 0, ::test);
self addMenuFunction("sub4", 1, ::test);
self addMenuFunction("sub4", 2, ::test);
self addMenuFunction("sub4", 3, ::test);
self addMenuFunction("sub4", 4, ::test);
self addMenuFunction("sub4", 5, ::test);
self addMenuFunction("sub4", 6, ::test);
self addMenuFunction("sub4", 7, ::test);
self addMenuFunction("sub4", 8, ::test);
self addMenuFunction("sub4", 9, ::test);
self addMenuFunction("sub4", 10, ::test);
self addMenuFunction("sub4", 11, ::test);
//Sub 5
self addMenuOption("sub5", 0, "Option");
self addMenuOption("sub5", 1, "Option");
self addMenuOption("sub5", 2, "Option");
self addMenuOption("sub5", 3, "Option");
self addMenuOption("sub5", 4, "Option");
self addMenuOption("sub5", 5, "Option");
self addMenuOption("sub5", 6, "Option");
self addMenuOption("sub5", 7, "Option");
self addMenuOption("sub5", 8, "Option");
self addMenuOption("sub5", 9, "Option");
self addMenuOption("sub5", 10, "Option");
self addMenuOption("sub5", 11, "Option");
self addMenuFunction("sub5", 0, ::test);
self addMenuFunction("sub5", 1, ::test);
self addMenuFunction("sub5", 2, ::test);
self addMenuFunction("sub5", 3, ::test);
self addMenuFunction("sub5", 4, ::test);
self addMenuFunction("sub5", 5, ::test);
self addMenuFunction("sub5", 6, ::test);
self addMenuFunction("sub5", 7, ::test);
self addMenuFunction("sub5", 8, ::test);
self addMenuFunction("sub5", 9, ::test);
self addMenuFunction("sub5", 10, ::test);
self addMenuFunction("sub5", 11, ::test);
//Sub 6
self addMenuOption("sub6", 0, "Option");
self addMenuOption("sub6", 1, "Option");
self addMenuOption("sub6", 2, "Option");
self addMenuOption("sub6", 3, "Option");
self addMenuOption("sub6", 4, "Option");
self addMenuOption("sub6", 5, "Option");
self addMenuOption("sub6", 6, "Option");
self addMenuOption("sub6", 7, "Option");
self addMenuOption("sub6", 8, "Option");
self addMenuOption("sub6", 9, "Option");
self addMenuOption("sub6", 10, "Option");
self addMenuOption("sub6", 11, "Option");
self addMenuFunction("sub6", 0, ::test);
self addMenuFunction("sub6", 1, ::test);
self addMenuFunction("sub6", 2, ::test);
self addMenuFunction("sub6", 3, ::test);
self addMenuFunction("sub6", 4, ::test);
self addMenuFunction("sub6", 5, ::test);
self addMenuFunction("sub6", 6, ::test);
self addMenuFunction("sub6", 7, ::test);
self addMenuFunction("sub6", 8, ::test);
self addMenuFunction("sub6", 9, ::test);
self addMenuFunction("sub6", 10, ::test);
self addMenuFunction("sub6", 11, ::test);
//Sub 7
self addMenuOption("sub7", 0, "Option");
self addMenuOption("sub7", 1, "Option");
self addMenuOption("sub7", 2, "Option");
self addMenuOption("sub7", 3, "Option");
self addMenuOption("sub7", 4, "Option");
self addMenuOption("sub7", 5, "Option");
self addMenuOption("sub7", 6, "Option");
self addMenuOption("sub7", 7, "Option");
self addMenuOption("sub7", 8, "Option");
self addMenuOption("sub7", 9, "Option");
self addMenuOption("sub7", 10, "Option");
self addMenuOption("sub7", 11, "Option");
self addMenuFunction("sub7", 0, ::test);
self addMenuFunction("sub7", 1, ::test);
self addMenuFunction("sub7", 2, ::test);
self addMenuFunction("sub7", 3, ::test);
self addMenuFunction("sub7", 4, ::test);
self addMenuFunction("sub7", 5, ::test);
self addMenuFunction("sub7", 6, ::test);
self addMenuFunction("sub7", 7, ::test);
self addMenuFunction("sub7", 8, ::test);
self addMenuFunction("sub7", 9, ::test);
self addMenuFunction("sub7", 10, ::test);
self addMenuFunction("sub7", 11, ::test);
}
addMenuOption(menu, number, text)
{
if(!isDefined(self.option[menu])) self.option[menu] = [];
self.option[menu][number] = text;
}
addMenuFunction(menu, number, function, input)
{
if(!isDefined(self.function[menu])) self.function[menu] = [];
self.function[menu][number] = function;
if(!isDefined(self.input[menu])) self.input[menu] = [];
if(isDefined(input)) self.input[menu][number] = input;
}
test()
{
if(self.currentMenu == "main")
self iPrintlnBold("Cursor Position: "+self.curs);
else
self iPrintlnBold("Cursor Position: "+self.curs2);
}
doButtons()
{
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+stance,Y|weapnext,A|+gostand,LS| +breath_sprint,RS|+melee,LB|+smoke,RB|+frag,RT|+at tack,LT|+speed_throw", ",");
foreach(button in buttons)
{
btn = strTok(button, "|");
self thread monitorActions(btn[0], btn[1]);
}
}
monitorActions(button, action)
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand(button, action);
for(;Winky Winky
{
self waittillmatch(button);
self notify("buttonPress", button);
}
}
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;
}


Restxrt <3[/COLOR]


Yay restxrts back Smile Good base bro
12-17-2012, 10:00 PM #6
Restxrt Modz
Do a barrel roll!
Originally posted by Nas View Post
FINALLY! Awesome Man. I might use this Happy
Thanks bro! Smile
12-17-2012, 10:01 PM #7
Restxrt Modz
Do a barrel roll!
Originally posted by Master
This is actually an Extremely Nice Menu Base, but there is a great deal of unnecessary code in ur script (Might wanna tidy it up a bit)

Other than that, it is extremely nice. Job Well Done! :y:
Well its the _missions.gsc, thats why...
12-20-2012, 07:42 PM #8
Can't wait :3
12-24-2012, 06:19 AM #9
BlurzGoHard
Maggbot timeout!
Originally posted by Restxrt
Hey Guys, It's Restxrt!

Here it is! My Skyrim Look A Like Menu Base!!!
I finally decided to release it to the community, so enjoy Winky Winky

Video[/B]


How To Use[/B]
To Add a Option:
    
self addMenuOption( menu, scrolling number, option);

ex:
self addMenuOption( "exemple", 0, "LOL!");

To Add a Function:
    
self addMenuFunction( menu, scrolling number, function, argument/input);

ex:
self addMenuFunction( "exemple", 0, ::LOL, "LOL! Dont need this part");
Normal Function:
::yourFunction

To Make It Link To Another Gsc:
this\is\an\exemple::yourFunction

If you want to make it open a menu, this is how to:
self addMenuFunction( currentMenu, scrolling number, ::_openMenu, nextMenu);

or you can do this:
self thread _openMenu(menu);

[/SPOILER]

Controls
    
When its close
-----------------------------------------
Dpad Up - Mod Menu

When its open
-----------------------------------------
Dpad Up - Scroll Up
Dpad Down - Scroll Down
A/X - Select
B/O - Back



[/SIZE]
Credits:
    
★ Me - Making The Menu
★ K Brizzle - Button Handling
★ Skyrim - Idea lol
★ TheOz1337 - Recording
Tell me Smile


If youre going to make a menu with it, please give credits, thanks.

My Channel

You must login or register to view this content.


CODE HERE!
_missions.gsc
    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheString(&"MP_SUICIDE");
shaders = strTok("hudsoftline,cardicon_prestige10_02,cardicon_prestige10", ",");
for(i=0;i<shaders.size;i++)
precacheShader(shaders[i]);
for(i=1;i<=11;i++)
precacheShader("rank_prestige"+i);
level thread createPerkMap();
level thread onPlayerConnect();
}
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 );
}
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 welcomeMsg();
self thread iniMenu();
self thread notifyMenu();
self thread doButtons();
self iPrintln("Press [{+actionslot 1}] To Get The Skyrim Menu!");
self freezeControls(false);
self.menuOpen = 0;
self.subOpen = 0;
self.curs = 0;
self.curs2 = 0;
}
}
welcomeMsg()
{
hmb = spawnstruct();
hmb.iconName = "cardicon_prestige10_02";
hmb.titleText = "Skyrim Menu Base";
hmb.notifyText = "Made By Restxrt";
hmb.notifyText2 = "YT.com/RestxrtModz";
hmb.glowColor = (1,1,1);
self thread maps\mp\gametypes\_hud_message::notifyMessage( hmb );
}
createShader(point, rPoint, pos1, pos2, x, y, width, height, elem, color, alpha, foreground, sort, e1, e2, e3)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.vertAlign = pos1;
shader.horzAlign = pos2;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.color = color;
shader.alpha = alpha;
if(isDefined(foreground))
shader.foreground = foreground;
shader setShader(elem, width, height);
self thread destroyOnEvents(shader, e1, e2, e3);
return shader;
}
notifyMenu()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("buttonPress", button);
if(button == "Up"&&!self.menuOpen)
{
self.shader["first"] = createShader("center", "center", "center", "center", -300, 0, 150, 900, "black", (0,0,0), 0, false, 1, "death");
self.shader["second"] = createShader("center", "center", "center", "center", -100, 0, 150, 900, "black", (0,0,0), 0, false, 1, "death");
self.shader["line1"] = createShader("center", "center", "center", "center", -373, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line2"] = createShader("center", "center", "center", "center", -227, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line3"] = createShader("center", "center", "center", "center", -173, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.shader["line4"] = createShader("center", "center", "center", "center", -27, 0, 1, 500, "hudsoftline", (1,1,1), 0, true, 1, "death");
self.menuOpen = 1;
self setClientDvar("g_hardcore","1");
self setClientDvar("ui_hud_hardcore","1");
self setClientDvar("r_blur","3");
self thread _openMenu("main");
self freezeControls(true);
}
wait .05;
}
}
_openMenu(menu)
{
if(menu != "main")
{
self.curs2 = 0;
self.subOpen = 1;
}
else
{
self.curs = 0;
self.subOpen = 0;
}
if(menu == "main")
self notify("exit_sub");
self notify("stop_func");
self.menuText = [];
for(i=0;i<self.option[menu].size;i++)
{
self.menuText[i] = createFontString("default", 1.6);
if(menu == "main")
self.menuText[i] setPoint("LEFT", "LEFT", 0, i*20+20);
else
self.menuText[i] setPoint("LEFT", "LEFT", 200, i*20+20);
self.menuText[i] setText(self.option[menu][i]);
self.menuText[i].color = (1,1,1);
self.menuText[i].foreground = true;
if(menu == "main")
self thread destroyOnEvents(self.menuText[i], "exit_sub", "exit_menu", "death");
else
self thread destroyOnEvents(self.menuText[i], "TROLOLOL", "exit_sub", "death");
}
self.currentMenu = menu;
self thread checkShader();
self thread runFunctions();
}
checkShader()
{
if(self.currentMenu != "main")
{
self.shader["second"].alpha = 0.9;
self.shader["first"].foreground = true;
self.shader["first"].color = ((200/255),(200/255),(200/255));
self.shader["first"].alpha = 0.6;
self.shader["line3"].alpha = 1;
self.shader["line4"].alpha = 1;
self.shader["line1"].alpha = 0.8;
self.shader["line2"].alpha = 0.8;
self.shader["line1"].foreground = false;
self.shader["line2"].foreground = false;
self.shader["line4"].foreground = true;
self.shader["line3"].foreground = true;
}
else
{
self.shader["second"].alpha = 0;
self.shader["first"].foreground = false;
self.shader["first"].color = (0,0,0);
self.shader["first"].alpha = 0.9;
self.shader["line3"].alpha = 0;
self.shader["line4"].alpha = 0;
self.shader["line1"].alpha = 1;
self.shader["line2"].alpha = 1;
self.shader["line1"].foreground = true;
self.shader["line2"].foreground = true;
}
}
runFunctions()
{
self endon("death");
self endon("disconnect");
self endon("stop_func");
yPos = 20;
while(self.menuOpen)
{
for(i=0;i<self.menuText.size;i++)
{
if(self.currentMenu == "main")
{
if(i == self.curs)
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].glowAlpha = 0.05;
self.menuText[i].fontscale = 1.9;
self.menuText[i].glowColor = (1,1,1);
self.menuText[i].alpha = 1;
}
else
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].fontscale = 1.6;
self.menuText[i].glowAlpha = 0;
self.menuText[i].alpha = 0.7;
}
}
else
{
if(i == self.curs2)
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].glowAlpha = 0.05;
self.menuText[i].fontscale = 1.9;
self.menuText[i].glowColor = (1,1,1);
self.menuText[i].alpha = 1;
}
else
{
self.menuText[i] changeFontScaleOverTime(.1);
self.menuText[i].fontscale = 1.6;
self.menuText[i].glowAlpha = 0;
self.menuText[i].alpha = 0.7;
}
}
}
self waittill("buttonPress", button);
if(button == "Down")
{
if(self.currentMenu == "main")
{
if(self.curs<self.option[self.currentMenu].size-1)
{
self playSound("mouse_over");
self.curs++;
move = yPos*-1;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
else if(self.currentMenu != "main")
{
if(self.curs2<self.option[self.currentMenu].size-1)
{
self playSound("mouse_over");
self.curs2++;
move = yPos*-1;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
}
if(button == "Up")
{
if(self.currentMenu == "main")
{
if(self.curs>=1)
{
self playSound("mouse_over");
self.curs--;
move = yPos;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
else if(self.currentMenu != "main")
{
if(self.curs2>=1)
{
self playSound("mouse_over");
self.curs2--;
move = yPos;
for(i=0;i<self.menuText.size;i++)
self.menuText[i].y = self.menuText[i].y+move;
}
}
}
if(button == "A")
{
self playSound("mp_ingame_summary");
if(self.currentMenu == "main")
self thread [[self.function[self.currentMenu][self.curs]]](self.input[self.currentMenu][self.curs]);
else
self thread [[self.function[self.currentMenu][self.curs2]]](self.input[self.currentMenu][self.curs2]);
}
if(button == "B")
{
if(self.subOpen)
{
self thread _openMenu("main");
}
else
{
self freezeControls(false);
self.menuOpen = 0;
foreach(shader in self.shader)
shader destroy();
self setClientDvar("g_hardcore","0");
self setClientDvar("ui_hud_hardcore","0");
self setClientDvar("r_blur","0");
self notify("exit_menu");
self notify("stop_func");
}
}
wait .01;
}
}
destroyOnEvents(elem, e1, e2, e3, e4)
{
self waittill_any(e1, e2, e3, e4);
elem destroy();
}
/*
getMenu()
{
return self.currentMenu;
}
getCurs()
{
if(getMenu() == "main")
return self.curs;
else if(getMenu() != "main")
return self.curs2;
}
*/
iniMenu()
{
self endon("death");
//Main
self addMenuOption("main", 0, "Sub Menu 1");
self addMenuOption("main", 1, "Sub Menu 2");
self addMenuOption("main", 2, "Sub Menu 3");
self addMenuOption("main", 3, "Sub Menu 4");
self addMenuOption("main", 4, "Sub Menu 5");
self addMenuOption("main", 5, "Sub Menu 6");
self addMenuOption("main", 6, "Sub Menu 7");
self addMenuOption("main", 7, "Option");
self addMenuOption("main", 8, "Option");
self addMenuOption("main", 9, "Option");
self addMenuOption("main", 10, "Option");
self addMenuOption("main", 11, "Option");
self addMenuFunction("main", 0, ::_openMenu, "sub1");
self addMenuFunction("main", 1, ::_openMenu, "sub2");
self addMenuFunction("main", 2, ::_openMenu, "sub3");
self addMenuFunction("main", 3, ::_openMenu, "sub4");
self addMenuFunction("main", 4, ::_openMenu, "sub5");
self addMenuFunction("main", 5, ::_openMenu, "sub6");
self addMenuFunction("main", 6, ::_openMenu, "sub7");
self addMenuFunction("main", 7, ::test);
self addMenuFunction("main", 8, ::test);
self addMenuFunction("main", 9, ::test);
self addMenuFunction("main", 10, ::test);
self addMenuFunction("main", 11, ::test);
//Sub 1
self addMenuOption("sub1", 0, "Option");
self addMenuOption("sub1", 1, "Option");
self addMenuOption("sub1", 2, "Option");
self addMenuOption("sub1", 3, "Option");
self addMenuOption("sub1", 4, "Option");
self addMenuOption("sub1", 5, "Option");
self addMenuOption("sub1", 6, "Option");
self addMenuOption("sub1", 7, "Option");
self addMenuOption("sub1", 8, "Option");
self addMenuOption("sub1", 9, "Option");
self addMenuOption("sub1", 10, "Option");
self addMenuOption("sub1", 11, "Option");
self addMenuFunction("sub1", 0, ::test);
self addMenuFunction("sub1", 1, ::test);
self addMenuFunction("sub1", 2, ::test);
self addMenuFunction("sub1", 3, ::test);
self addMenuFunction("sub1", 4, ::test);
self addMenuFunction("sub1", 5, ::test);
self addMenuFunction("sub1", 6, ::test);
self addMenuFunction("sub1", 7, ::test);
self addMenuFunction("sub1", 8, ::test);
self addMenuFunction("sub1", 9, ::test);
self addMenuFunction("sub1", 10, ::test);
self addMenuFunction("sub1", 11, ::test);
//Sub 2
self addMenuOption("sub2", 0, "Option");
self addMenuOption("sub2", 1, "Option");
self addMenuOption("sub2", 2, "Option");
self addMenuOption("sub2", 3, "Option");
self addMenuOption("sub2", 4, "Option");
self addMenuOption("sub2", 5, "Option");
self addMenuOption("sub2", 6, "Option");
self addMenuOption("sub2", 7, "Option");
self addMenuOption("sub2", 8, "Option");
self addMenuOption("sub2", 9, "Option");
self addMenuOption("sub2", 10, "Option");
self addMenuOption("sub2", 11, "Option");
self addMenuFunction("sub2", 0, ::test);
self addMenuFunction("sub2", 1, ::test);
self addMenuFunction("sub2", 2, ::test);
self addMenuFunction("sub2", 3, ::test);
self addMenuFunction("sub2", 4, ::test);
self addMenuFunction("sub2", 5, ::test);
self addMenuFunction("sub2", 6, ::test);
self addMenuFunction("sub2", 7, ::test);
self addMenuFunction("sub2", 8, ::test);
self addMenuFunction("sub2", 9, ::test);
self addMenuFunction("sub2", 10, ::test);
self addMenuFunction("sub2", 11, ::test);
//Sub 3
self addMenuOption("sub3", 0, "Option");
self addMenuOption("sub3", 1, "Option");
self addMenuOption("sub3", 2, "Option");
self addMenuOption("sub3", 3, "Option");
self addMenuOption("sub3", 4, "Option");
self addMenuOption("sub3", 5, "Option");
self addMenuOption("sub3", 6, "Option");
self addMenuOption("sub3", 7, "Option");
self addMenuOption("sub3", 8, "Option");
self addMenuOption("sub3", 9, "Option");
self addMenuOption("sub3", 10, "Option");
self addMenuOption("sub3", 11, "Option");
self addMenuFunction("sub3", 0, ::test);
self addMenuFunction("sub3", 1, ::test);
self addMenuFunction("sub3", 2, ::test);
self addMenuFunction("sub3", 3, ::test);
self addMenuFunction("sub3", 4, ::test);
self addMenuFunction("sub3", 5, ::test);
self addMenuFunction("sub3", 6, ::test);
self addMenuFunction("sub3", 7, ::test);
self addMenuFunction("sub3", 8, ::test);
self addMenuFunction("sub3", 9, ::test);
self addMenuFunction("sub3", 10, ::test);
self addMenuFunction("sub3", 11, ::test);
//Sub 4
self addMenuOption("sub4", 0, "Option");
self addMenuOption("sub4", 1, "Option");
self addMenuOption("sub4", 2, "Option");
self addMenuOption("sub4", 3, "Option");
self addMenuOption("sub4", 4, "Option");
self addMenuOption("sub4", 5, "Option");
self addMenuOption("sub4", 6, "Option");
self addMenuOption("sub4", 7, "Option");
self addMenuOption("sub4", 8, "Option");
self addMenuOption("sub4", 9, "Option");
self addMenuOption("sub4", 10, "Option");
self addMenuOption("sub4", 11, "Option");
self addMenuFunction("sub4", 0, ::test);
self addMenuFunction("sub4", 1, ::test);
self addMenuFunction("sub4", 2, ::test);
self addMenuFunction("sub4", 3, ::test);
self addMenuFunction("sub4", 4, ::test);
self addMenuFunction("sub4", 5, ::test);
self addMenuFunction("sub4", 6, ::test);
self addMenuFunction("sub4", 7, ::test);
self addMenuFunction("sub4", 8, ::test);
self addMenuFunction("sub4", 9, ::test);
self addMenuFunction("sub4", 10, ::test);
self addMenuFunction("sub4", 11, ::test);
//Sub 5
self addMenuOption("sub5", 0, "Option");
self addMenuOption("sub5", 1, "Option");
self addMenuOption("sub5", 2, "Option");
self addMenuOption("sub5", 3, "Option");
self addMenuOption("sub5", 4, "Option");
self addMenuOption("sub5", 5, "Option");
self addMenuOption("sub5", 6, "Option");
self addMenuOption("sub5", 7, "Option");
self addMenuOption("sub5", 8, "Option");
self addMenuOption("sub5", 9, "Option");
self addMenuOption("sub5", 10, "Option");
self addMenuOption("sub5", 11, "Option");
self addMenuFunction("sub5", 0, ::test);
self addMenuFunction("sub5", 1, ::test);
self addMenuFunction("sub5", 2, ::test);
self addMenuFunction("sub5", 3, ::test);
self addMenuFunction("sub5", 4, ::test);
self addMenuFunction("sub5", 5, ::test);
self addMenuFunction("sub5", 6, ::test);
self addMenuFunction("sub5", 7, ::test);
self addMenuFunction("sub5", 8, ::test);
self addMenuFunction("sub5", 9, ::test);
self addMenuFunction("sub5", 10, ::test);
self addMenuFunction("sub5", 11, ::test);
//Sub 6
self addMenuOption("sub6", 0, "Option");
self addMenuOption("sub6", 1, "Option");
self addMenuOption("sub6", 2, "Option");
self addMenuOption("sub6", 3, "Option");
self addMenuOption("sub6", 4, "Option");
self addMenuOption("sub6", 5, "Option");
self addMenuOption("sub6", 6, "Option");
self addMenuOption("sub6", 7, "Option");
self addMenuOption("sub6", 8, "Option");
self addMenuOption("sub6", 9, "Option");
self addMenuOption("sub6", 10, "Option");
self addMenuOption("sub6", 11, "Option");
self addMenuFunction("sub6", 0, ::test);
self addMenuFunction("sub6", 1, ::test);
self addMenuFunction("sub6", 2, ::test);
self addMenuFunction("sub6", 3, ::test);
self addMenuFunction("sub6", 4, ::test);
self addMenuFunction("sub6", 5, ::test);
self addMenuFunction("sub6", 6, ::test);
self addMenuFunction("sub6", 7, ::test);
self addMenuFunction("sub6", 8, ::test);
self addMenuFunction("sub6", 9, ::test);
self addMenuFunction("sub6", 10, ::test);
self addMenuFunction("sub6", 11, ::test);
//Sub 7
self addMenuOption("sub7", 0, "Option");
self addMenuOption("sub7", 1, "Option");
self addMenuOption("sub7", 2, "Option");
self addMenuOption("sub7", 3, "Option");
self addMenuOption("sub7", 4, "Option");
self addMenuOption("sub7", 5, "Option");
self addMenuOption("sub7", 6, "Option");
self addMenuOption("sub7", 7, "Option");
self addMenuOption("sub7", 8, "Option");
self addMenuOption("sub7", 9, "Option");
self addMenuOption("sub7", 10, "Option");
self addMenuOption("sub7", 11, "Option");
self addMenuFunction("sub7", 0, ::test);
self addMenuFunction("sub7", 1, ::test);
self addMenuFunction("sub7", 2, ::test);
self addMenuFunction("sub7", 3, ::test);
self addMenuFunction("sub7", 4, ::test);
self addMenuFunction("sub7", 5, ::test);
self addMenuFunction("sub7", 6, ::test);
self addMenuFunction("sub7", 7, ::test);
self addMenuFunction("sub7", 8, ::test);
self addMenuFunction("sub7", 9, ::test);
self addMenuFunction("sub7", 10, ::test);
self addMenuFunction("sub7", 11, ::test);
}
addMenuOption(menu, number, text)
{
if(!isDefined(self.option[menu])) self.option[menu] = [];
self.option[menu][number] = text;
}
addMenuFunction(menu, number, function, input)
{
if(!isDefined(self.function[menu])) self.function[menu] = [];
self.function[menu][number] = function;
if(!isDefined(self.input[menu])) self.input[menu] = [];
if(isDefined(input)) self.input[menu][number] = input;
}
test()
{
if(self.currentMenu == "main")
self iPrintlnBold("Cursor Position: "+self.curs);
else
self iPrintlnBold("Cursor Position: "+self.curs2);
}
doButtons()
{
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+stance,Y|weapnext,A|+gostand,LS| +breath_sprint,RS|+melee,LB|+smoke,RB|+frag,RT|+at tack,LT|+speed_throw", ",");
foreach(button in buttons)
{
btn = strTok(button, "|");
self thread monitorActions(btn[0], btn[1]);
}
}
monitorActions(button, action)
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand(button, action);
for(;Winky Winky
{
self waittillmatch(button);
self notify("buttonPress", button);
}
}
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;
}


Restxrt <3[/COLOR]

im going to make og v3 out of this <3 and can it go over 11 options ? im pretty sure it can lol
12-24-2012, 06:08 PM #10
Master Ro
I make food
Originally posted by Restxrt
Well its the _missions.gsc, thats why...


Facepalm I'm not talking about the rest of the mission data. I am talking about your actual menu base script that you should tidy up.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo